Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
175 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
42 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Non-Linear Pattern-Matching against Unfree Data Types with Lexical Scoping (1407.0729v6)

Published 2 Jul 2014 in cs.PL

Abstract: This paper proposes a pattern-matching system that enables non-linear pattern-matching against unfree data types. The system allows multiple occurrences of the same variables in a pattern, multiple results of pattern-matching and modularization of the way of pattern-matching for each data type at the same time. It enables us to represent pattern-matching against not only algebraic data types but also unfree data types such as sets, graphs and any other data types whose data have no canonical form and multiple ways of decomposition. I have realized that with a rule that pattern-matching is executed from the left side of a pattern and a rule that a binding to a variable in a pattern can be referred to in its right side of the pattern. Furthermore, I have realized modularization of these patterns with lexical scoping. In my system, a pattern is not a first class object, but a pattern-function that obtains only patterns and returns a pattern is a first class object. This restriction simplifies the non-linear pattern-matching system with lexical scoping. I have already implemented the pattern-matching system in the Egison programming language.

Citations (6)

Summary

We haven't generated a summary for this paper yet.