A Fresh Look at Pattern Matching Compilation
スポンサーリンク
概要
- 論文の詳細を見る
This paper presents a denotational semantics for patten matching compilation, and develops a simple algorithm to compile pattern matching into efficient code. We interpret a given set of patterns as a disjoint set of subsets of values that partition the domain of a given type, and define a semantics of a pattern matching construct as an operation to determine the subset to which a given value belongs. By developing tree representations for subsets of values, this semantics yields a simple tree-expansion algorithm to compile a pattern matching construct into a sequence of primitive tests. The resulting algorithm is shown to be correct with respect to the denotational semantics. The algorithm produces efficient code performing each test only once, and detects redundancy and non-exhaustiveness of a given set of patterns without introducing any additional mechanism. The presented method has been implemented for SML#, an extension of the Standard ML language being developed at Research Institute of Electrical Communication, Tohoku University.
- 日本ソフトウェア科学会の論文
日本ソフトウェア科学会 | 論文
- LCDと透明弾性体の光弾性を用いたユーザインタフェース (特集 インタラクティブシステムとソフトウェア)
- Bluetoothによる位置検出
- COINSにおけるSIMD並列化(最新コンパイラ技術とCOINSによる実践)
- データ型を考慮した軽量なXML文書処理系の自動生成(ソフトウェア開発を支援する基盤技術)
- 計算と論理のための自然枠組NF/CAL(システム検証の科学技術)