Higher-order recursion schemes
A higher-order recursion schemes, or HOCS, is a grammar-like abstraction of a functional program.
More specifically, a HOCS is a "typed" grammar over the set of simple types
A, B \Coloneqq \omicron\ |\ A \to B
where
It consists of:
- A set
\Sigma of terminals. These are "final symbols" or "tree constructors", that refer to calls to not-yet-provided functions (or libraries). Eachf \in \Sigma has type of the formf : \omicron \to ... \to \omicron , where the arity\textsf{ar}(f) is the number of\omicron 's minus 1. - A set
\mathcal{N} of non-terminals. These are calls-to-be-evaluated, and are also typed. - A distinguished start symbol
S \in \mathcal{N} . - A set of rewrite rules of the form
F\ x_1 \ldots x_n \to e
where
The order of a recursion scheme is the highest order of its non-terminals, which in turn is the order of its type. It is known that
- Order 0 terms generate regular trees
- Order 1 terms generate algebraic trees, i.e. those of context-free tree grammars.
- Order 2 terms generate hyperalgebraic trees.
Relationship to other formalisms
This calculus may be considered as a subsystem of the
References
- An introduction to model checking HOCS can be found in a LICS 2015 invited talk by Luke Ong:
@inproceedings{ong_2015,
address = {Kyoto, Japan},
title = {Higher-{Order} {Model} {Checking}: {An} {Overview}},
doi = {10.1109/LICS.2015.9},
booktitle = {2015 30th {Annual} {ACM}/{IEEE} {Symposium} on {Logic} in {Computer} {Science} ({LICS})},
publisher = {IEEE},
author = {Ong, Luke},
year = {2015},
pages = {1--15},
}