WEKO3
アイテム
多相ヴァリアントを含んだパターンマッチングの型付けについて
https://ipsj.ixsq.nii.ac.jp/records/16679
https://ipsj.ixsq.nii.ac.jp/records/16679cc7bee21-a55a-4ee7-8cc7-66ccb8017c7e
名前 / ファイル | ライセンス | アクション |
---|---|---|
![]() |
Copyright (c) 2004 by the Information Processing Society of Japan
|
|
オープンアクセス |
Item type | Trans(1) | |||||||
---|---|---|---|---|---|---|---|---|
公開日 | 2004-07-15 | |||||||
タイトル | ||||||||
タイトル | 多相ヴァリアントを含んだパターンマッチングの型付けについて | |||||||
タイトル | ||||||||
言語 | en | |||||||
タイトル | Typing Deep Pattern - matching in Presence of Polymorphic Variants | |||||||
言語 | ||||||||
言語 | jpn | |||||||
キーワード | ||||||||
主題Scheme | Other | |||||||
主題 | 発表概要 | |||||||
資源タイプ | ||||||||
資源タイプ識別子 | http://purl.org/coar/resource_type/c_6501 | |||||||
資源タイプ | journal article | |||||||
著者所属 | ||||||||
京都大学数理解析研究所 | ||||||||
著者所属(英) | ||||||||
en | ||||||||
Research Institute for Mathematical Sciences, Kyoto University | ||||||||
著者名 |
JACQUES, GARRIGUE
× JACQUES, GARRIGUE
|
|||||||
著者名(英) |
Jacques, Garrigue
× Jacques, Garrigue
|
|||||||
論文抄録 | ||||||||
内容記述タイプ | Other | |||||||
内容記述 | 多相ヴァリアントはObjective Camlに導入されてから,よく使われるようになってきた.代数的型定義の構造による等価性を可能にし,多相性によるコードの共有・再利用も促進している.多相ヴァリアントの型付けとコンパイル方法は過去に研究され,すでに発表されている.しかしながら,多相ヴァリアントはパターンマッチングによって分解されるが,今まで浅いパターンマッチングしか考慮されてこなかった.浅いパターンマッチングに限定すると,パターンが対応している場合は自明で,型付けは対応漏れを防ぐ.深いパターンマッチングを許すと,様々な型の値が同じパターンマッチングの中で出現し,互いに影響する可能性がある.対応漏れの検索が型付けの後でしかできないので,それを型付けに利用することができないという.問題を説明し,多相ヴァリアントを含んだパターンマッチングの(対照的な)型付けアルゴリズムを提案する. | |||||||
論文抄録(英) | ||||||||
内容記述タイプ | Other | |||||||
内容記述 | Polymorphic variants are a well-known feature of the Objective Caml programming language, and they have turned popular since their introduction. They allow structural equality of algebraic type definitions, and code reuse through their polymorphism. Their typing and compilation have been studied in the past, and there are already detailed published works for both [1] and [2]. By their very nature, polymorphic variants depend on pattern matching to analyze their contents. However, only typing for shallow pattern matching was studied in the past. In that case, checking exhaustivity is trivial, and the natural typing rule guarantees it. Deep pattern matching is more complex, as other constructors may appear nested in the same pattern matching. Exhaustivity check is available, but only after finishing type checking, while we would like to use it to define the typing of polymorphic variant patterns. We explain the tradeoffs, and define a type checking algorithm for pattern-matching containing polymorphic variants which is symmetric. | |||||||
書誌レコードID | ||||||||
収録物識別子タイプ | NCID | |||||||
収録物識別子 | AA11464814 | |||||||
書誌情報 |
情報処理学会論文誌プログラミング(PRO) 巻 45, 号 SIG09(PRO22), p. 83-83, 発行日 2004-07-15 |
|||||||
ISSN | ||||||||
収録物識別子タイプ | ISSN | |||||||
収録物識別子 | 1882-7802 | |||||||
出版者 | ||||||||
言語 | ja | |||||||
出版者 | 情報処理学会 |