Abstract

It has been argued elsewhere that a logic programming language with function variables and λ-abstractions within terms makes a very good meta-programming language, especially when an object language contains notions of bound variables and scope. The λProlog logic programming language and the closely related Elf and Isabelle systems provide meta-programs with both function variables and λ-abstractions by containing implementations of higher-order unification. In this paper, we present a logic programming language, called Lλ, that also contains both function variables and λ-abstractions, but certain restriction are placed on occurrences of function variables. As a result, an implementation of Lλ does not need to implement full higher-order unification. Instead, an extension to first-order unification that respects bound variable names and scopes is all that is required. Such unification problems are shown to be decidable and to possess most general unifiers when unifiers exist. A unification algorithm and logic programming interpreter are described and proved correct. Several examples of using Lλ as a meta-programming language are presented.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.