HackerPapers

arXiv:1407.0729cs.PL

Non-Linear Pattern-Matching against Unfree Data Types with Lexical Scoping

Satoshi Egi

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

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.

arXiv comments
25 pages, 3 figures
Journal reference
DOI
Subjects
cs.PLProgramming Languages

On Hacker News

Linked by 1 identifiable commenter in 2 comments across 1 thread, from Jul 2014 to Jul 2014.

Comments linking this paper, per year.

Discussed in comments1 thread

    • The creator of the language here, ask me anything. Please check my paper recently I put on arXiv.org. http://arxiv.org/abs/1407.0729

      egiView on HNParent context

    • The biggest difference is Egison realizes non-linear pattern matching against unfree data types such as multisets and sets. I've wrote brief comparison here. https://github.com/egison/egison#comparison-with-related-wor... Please check my paper, too. http://arxiv.org/abs/1407.0729

      egiView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.