Item type |
Trans(1) |
公開日 |
2024-08-19 |
タイトル |
|
|
タイトル |
余パターンマッチの簡潔なコンパイル手法 |
タイトル |
|
|
言語 |
en |
|
タイトル |
Succinct Compilation Method for Copattern Matching |
言語 |
|
|
言語 |
jpn |
キーワード |
|
|
主題Scheme |
Other |
|
主題 |
[発表概要, Unrefereed Presentatin Abstract] |
資源タイプ |
|
|
資源タイプ識別子 |
http://purl.org/coar/resource_type/c_6501 |
|
資源タイプ |
journal article |
著者所属 |
|
|
|
広島市立大学 |
著者所属 |
|
|
|
広島市立大学 |
著者所属 |
|
|
|
広島市立大学 |
著者所属(英) |
|
|
|
en |
|
|
Hiroshima City University |
著者所属(英) |
|
|
|
en |
|
|
Hiroshima City University |
著者所属(英) |
|
|
|
en |
|
|
Hiroshima City University |
著者名 |
河野, 雄也
川端, 英之
弘中, 哲夫
|
著者名(英) |
Yuya, Kono
Hideyuki, Kawabata
Tetsuo, Hironaka
|
論文抄録 |
|
|
内容記述タイプ |
Other |
|
内容記述 |
オブジェクトやストリームなどの余データを簡潔に記述する言語機能として,余パターンマッチが考えられている.余パターンマッチは通常のパターンマッチの双対であり,値を構造からではなく振舞いから定義するように記述できる.既存のコンパイル手法の多くは,余パターンと通常のパターンの両方をコンパイルするため,複雑なアルゴリズムである.型付き言語を対象とした既存手法では,型検査と網羅性検査を行い,網羅性の情報を元にコンパイルを行う.型情報を使用しない手法では,式を部分的に評価することで余パターンマッチを含まない式に変換する.これらの既存手法は既存言語で利用されているものの,複雑さゆえに理解と実装が難しい.このことは余パターンマッチのさらなる応用の妨げのなっている.我々は,余パターンから内包される通常のパターンを分離して扱う,より簡潔で理解しやすいコンパイル手法を考案した.提案手法は余パターンをパターンとは独立に扱うため,パターンマッチには性能の良い既知のコンパイル手法を採用することができる.提案手法は抽象構文木のみを利用してコンパイルを行い,型情報を必要としないため,型付き言語,型なし言語の双方に適用可能である.既存の言語に対して糖衣構文として余パターンマッチを導入することもできる.また,余パターンマッチとは独立にパターンマッチへ拡張を加えることができ,提案手法は既存手法に比べて拡張性に優れている. |
論文抄録(英) |
|
|
内容記述タイプ |
Other |
|
内容記述 |
Copattern matching is considered a language feature to simply describe objects, streams, and other codata. Copattern matching is a dual of ordinary pattern matching, allowing values to be described in a way that defines them in terms of their behavior rather than their structure. Most existing compilation methods are complex because they compile both copatterns and ordinary patterns. Existing methods for typed languages perform type and exhaustiveness checking and compile based on exhaustiveness information. In methods without type information, expressions are converted to ones that does not contain copattern matching by partially evaluating expressions. Although these are used in existing languages, they are difficult to understand and implement due to their complexity. This puts the limit of applicability of copattern matching. We propose a more simple and easy-to-understand compilation method that separates copatterns from ordinary patterns they contain. Since our method treats copatterns independently from patterns, existing efficient compilation techniques can be utilized for ordinary pattern matching. Our method compiles using only abstract syntax trees and does not require type information, so that it is applicable to both typed and untyped languages. Our proposal also enables easy introduction of copattern matching facility into existing languages through the use of syntactic sugar. In addition, the method is more extensible than existing ones because it can add extensions to patterns that are different from copatterns. |
書誌レコードID |
|
|
収録物識別子タイプ |
NCID |
|
収録物識別子 |
AA11464814 |
書誌情報 |
情報処理学会論文誌プログラミング(PRO)
巻 17,
号 4,
p. 27-27,
発行日 2024-08-19
|
ISSN |
|
|
収録物識別子タイプ |
ISSN |
|
収録物識別子 |
1882-7802 |
出版者 |
|
|
言語 |
ja |
|
出版者 |
情報処理学会 |