This paper presents Fresh, a language that integrates logic programming features into higher-order functional programming. The language incorporates unification, multiple results and a collection construct. Many examples illustrate that these extensions of functional programming are useful. We define an operational semantics along the lines of Plotkin''s structural approach. The semantics is of intrinsic interest since it covers backtracking and the collection construct. To illustrate the conceptual similarities and differences between functional and logic programming, we begin with a purely functional core language and add first unification and then backtracking. With each addition we discuss the enhanced eloquence of the language and the concomitant modifications to the semantics.
Recommendations
Ramified Higher-Order Unification
LICS '97: Proceedings of the 12th Annual IEEE Symposium on Logic in Computer ScienceWhile unification in the simple theory of types (a.k.a. higher-order logic) is undecidable, we show that unification in the pure ramified theory of types with integer levels is decidable. Since pure ramified type theory is not very expressive, we ...
Higher-Order unification for free!: Reusing the meta-language unification for the object language
PPDP '24: Proceedings of the 26th International Symposium on Principles and Practice of Declarative ProgrammingSpecifying and implementing a proof system from scratch requires significant effort. Logical Frameworks and Higher Order Logic Programming Languages provide dedicated, high-level meta languages to facilitate this task in two ways: 1) variable binding ...