Abstract
AbstractProcessing programs as data is one of the successes of functional and logic programming. Higher-order functions, as program-processing programs are called in functional programming, and meta-programs, as they are called in logic programming, are widespread declarative programming techniques. In logic programming, there is a gap between the meta-programming practice and its theory: The formalizations of meta-programming do not explicitly address its impredicativity and are not fully adequate. This article aims at overcoming this unsatisfactory situation by discussing the relevance of impredicativity to meta-programming, by revisiting former formalizations of meta-programming, and by defining Reflective Predicate Logic, a conservative extension of first-order logic, which provides a simple formalization of meta-programming.
Highlights
Processing programs as data is one of the successes of functional and logic programming
Three aspects of meta-programming have been stressed : 1. Self-reflective predicates: Some meta-predicates are self-reflective in the sense that they can occur within their own arguments like forall in: forall(enrolled(student(S), P), forall(syllabus(P, C), attends(S, C) )
A formula expressing the Barber Paradox is inconsistent with respect to the model theory defined in the section after as it is in first-order logic
Summary
Processing programs as data is one of the successes of functional and logic programming. (∀ T trust(T) ⇒ T)(ann , bill) or, in a program syntax with implicit universal quantification (T ← trust(T))(ann , bill) with the intended meaning that Ann trusts Bill, expressed as T(ann, bill), in all forms of trust specified by the meta-predicate trust. Explicit quantifications make system predicates like Prolog’s var/1 that do not have a declarative semantics replaceable by declarative syntax checks because the presence of explicit universal quantifications distinguishes non-instantiated from instantiated variables Another consequence of the paradigm “quantification makes variables” is that Reflective Predicate Logic has no open formulas. A model theory realizing Frege’s initial intuition that impredicative, or reflective, predicates can be accommodated in a predicate logic
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
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.