Skip to main content
QUICK REVIEW

[論文レビュー] Fibred Computational Effects

Danel Ahman|arXiv (Cornell University)|Oct 6, 2017
Logic, programming, and type systems参考文献 94被引用数 9
ひとこと要約

この論文は、計算的効果を統合するための新しい計算的Σ型とファイブリレーテッド随伴モデルの圏論的枠組みを通じて、マーティン・ロフ型理論と計算的効果を統合するコアな効果的依存型付き言語eMLTTを紹介する。効果的依存型のための整合的で完全な意味論を提供し、代数的効果にハンドラを導入するタイプベースの取り扱いにより、項レベルでのハンドラ定義における整合性の問題を解決する。

ABSTRACT

Dependent types provide a lightweight and modular means to integrate programming and formal program verification. In particular, the types of programs written in dependently typed programming languages (Agda, Idris, F*, etc.) can be used to express specifications of program correctness. These specifications can vary from being as simple as requiring the divisor in the division function to be non-zero, to as complex as specifying the correctness of compilers of industrial-strength languages. Successful compilation of a program then guarantees that it satisfies its type-based specification. While dependent types allow many runtime errors to be eliminated by rejecting erroneous programs at compile-time, dependently typed languages are yet to gain popularity in the wider programming community. One reason for this is their limited support for computational effects, an integral part of all widely used programming languages, ranging from imperative languages, such as C, to functional languages, such as ML and Haskell. For example, in addition to simply turning their inputs to outputs, programs written in these programming languages can raise exceptions, access computer's memory, communicate over a network, render images on a screen, etc. Therefore, if dependently typed programming languages are to truly live up to their promise of seamlessly integrating programming and formal program verification, we must first understand how to properly account for computational effects in such languages. While there already exists work on this topic, ingredients needed for a comprehensive theory are generally missing. For example, foundations are often not settled; available effects may be limited; or effects may not be treated systematically. In this thesis we address these shortcomings by providing a comprehensive treatment of the combination of dependent types and general computational effects.

研究の動機と目的

  • 現代のプログラミング言語において基礎的である依存型と計算的効果を統合する包括的な理論の構築を目的とする。
  • 個別に数学的に成熟しているにもかかわらず、効果的依存型のための厳密で統一された基礎の欠如に応えることを目的とする。
  • 依存型を用いてステート、I/O、例外などの効果を体系的かつ明示的に指定できるようにすることを目的とする。
  • ハンドラベースの効果管理における整合性の問題を解消するため、ハンドラをタイプベースで取り扱う手法を導入することを目的とする。
  • 一般再帰と代数的効果を含む全言語に対する圏論的意味論を提供することを目的とする。

提案手法

  • 値と効果的計算を明確に分離する、intensional型理論を拡張したコア言語eMLTTを提案する。
  • 逐次合成における型の依存性を一貫して扱うために、計算的Σ型を導入する。
  • 分割閉パンクツレーショナルカテゴリー(依存型のため)と随伴(計算的効果のため)を統合するファイブリレーテッド随伴モデルという圏論的枠組みを定義する。
  • ユーザー定義代数型という新しい計算型を用いて、ハンドラのタイプベースの取り扱いを構築する。この型は、キャリア型と操作の族をペアで持つ。
  • プロットキンとプレトナーの効果理論の依存型付き一般化を用いて、eMLTTにファイブリレーテッド代数的効果を拡張する。
  • 項レベルでのハンドラがタイプベースの取り扱いから導出可能であることを示し、効果的プログラムの整合的推論を可能にする。

実験結果

リサーチクエスチョン

  • RQ1依存型と計算的効果を、単一の形式的言語内で体系的かつ統合的に組み合わせる方法は何か?
  • RQ2効果的依存型の整合的で完全な解釈を支える圏論的モデルは何か?
  • RQ3代数的効果のハンドラを依存型付き環境に安全に統合する方法は何か? これによりプログラムの等価性が破壊されないようにする。
  • RQ4計算的Σ型は、効果的計算における型の依存性を一貫した方法で扱えるか?
  • RQ5ファイブリレーテッド代数的効果は、場所依存型を有するストア型とアップデートモナドを、依存型付き環境でどのように捉えることができるか?

主な発見

  • 計算的Σ型は、効果的計算における型の依存性を一貫して扱えるようにし、依存型と効果の統合における主要な課題を解決する。
  • ファイブリレーテッド随伴モデルは、eMLTTの整合的で完全な圏論的意味論を提供し、依存型と計算的効果のモデルを統合する。
  • ユーザー定義代数型によるタイプベースのハンドラ取り扱いは、項レベルでのハンドラ定義に生じる整合性の欠如をもたらすプログラムの等価性を防ぐ。
  • このアプローチにより、ステートに場所依存型を含むものやアップデートモナドを含む、体系的かつ代数的な効果の指定が可能になる。
  • タイプベースのハンドラフレームワークは、一般性が十分に高く、従来の項レベルでのハンドラを導出可能な構成として再構築可能である。
  • 言語と意味論が、ファミリーの集合のファイブレーションとローヴェレ理論に基づくモデルにおいて整合的に解釈可能であることが示された。

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。