First-order Lax Logic as a framework for Constraint Logic Programming

In this report we introduce a new proof theoretic approach to the semantics of Constraint Logic Programming based on an intuitionistic rst order modal logic called QLL The dis tinguishing feature of this new approach is that the logic calculus of QLL is used not only to capture the usual extensional aspects of Logic Programming i e which queries are success ful but also some of the intensional aspects i e what is the answer constraint and how is it constructed It provides for a direct link between the model theoretic and the operational semantics following a formulas as programs and proofs as constraints principle This approach makes use of logic in a di erent way than other approaches based on logic calculi On the one side it is to be distinguished from the well known provability semantics which is concerned merely with what is derivable as opposed to how it is derivable paying attention to the fact that it is the how that determines the answer constraint On the other side our approach is distinguished from so called external logic characterizations of the operational semantics of logic programming There operational semantics are axiomatized in a classical meta logic specifying the program behaviour in terms of successful and failing queries Here in contrast QLL is used as an internal logic in which operational semantics are not di erentiated by di erent axiom systems but by di erent rule systems Or to put it at another level Formulas in QLL do not specify properties of programs but the programs themselves Technically we rst extend existing work on Propositional Lax Logic PLL to a rst order language QLL presenting a soundness and completeness theorem for a Gentzen style system via a syntactic translation into a classical rst order bimodal theory Previous work on applying Lax Logic to deal with behavioural constraints in formal hardware veri cation has demonstrated the complementary nature of abstraction and constraints we proceed to show how the Lax Logic Programming LLP fragment of QLL can reveal abstractions behind Constraint Logic Programming CLP Our main tool is an intensional rst order extension of the Curry Howard isomorphism between natural deduction proofs in PLL and terms of the computational lambda calculus Instantiating the monadic operator of QLL by a generic notion of constraint computation we factor a concrete CLP program into two parts an abstract LLP program and an associated constraint table These tables allow us to recover concrete answer constraints for CLP programs from abstract LLP derivations and thus to establish precise proof and model theoretic connections between our Lax logical account of CLP and existing work Choosing di erent notions of constraint allows us to generalize the standard notion of constraint as in CLP and to apply the LLP paradigm to the complementary problems of program abstraction and program re nement Department of Computer Science The University of She eld Regent Court Portobello St She eld S DP Emails m fairtlough dcs shef ac uk m walton dcs shef ac uk yDepartment of Mathematics and Computer Science University of Passau Innstra e D Passau Email mendler fmi uni passau de The author is supported by the Deutsche Forschungsgemeinschaft Technical Report University of Passau MIP July

[1]  Dirk van Dalen,et al.  Logic and structure , 1980 .

[2]  David A. Plaisted,et al.  Theorem Proving with Abstraction , 1981, Artif. Intell..

[3]  J. Lloyd Foundations of Logic Programming , 1984, Symbolic Computation.

[4]  David Kelley A theory of abstraction. , 1984 .

[5]  Pascal Van Hentenryck,et al.  The Constraint Logic Programming Language CHIP , 1988, FGCS.

[6]  E. Moggi The partial lambda calculus , 1988 .

[7]  B. Scharfstein The Dilemma of Context , 2020 .

[8]  Alain Colmerauer,et al.  An introduction to Prolog III , 1989, CACM.

[9]  Jacques Cohen,et al.  Constraint logic programming languages , 1990, CACM.

[10]  Lars Hallnäs,et al.  A Proof-Theoretic Approach to Logic Programming. I. Clauses as Rules , 1990, J. Log. Comput..

[11]  Michael Mendler,et al.  Constrained Proofs: A Logic for Dealing with Behavioural Constraints in Formal Hardware Verification , 1991 .

[12]  James H. Andrews,et al.  Logic programming : operational semantics and proof theory , 1993 .

[13]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[14]  Yike Guo,et al.  A General Computational Scheme for Constraint Logic Programming , 1991, ALPUK.

[15]  Roland H. C. Yap,et al.  The CLP( R ) language and system , 1992, TOPL.

[16]  Thom W. Frühwirth,et al.  Contraint Logic Programming - An Informal Introduction , 1992, Logic Programming Summer School.

[17]  Philip Wadler,et al.  Comprehending monads , 1990, Mathematical Structures in Computer Science.

[18]  Philip Wadler,et al.  Monads for functional programming , 1995, NATO ASI PDC.

[19]  Michael V. Mendler A modal logic for handling behavioural constraints in formal hardware verification , 1992 .

[20]  Enn Tyugu,et al.  Higher-Order Functional Constraint Networks , 1993, NATO ASI CP.

[21]  Michael Mendler,et al.  An Intuitionistic Modal Logic with Applications to the Formal Verification of Hardware , 1994, CSL.

[22]  Michael J. Maher,et al.  Constraint Logic Programming: A Survey , 1994, J. Log. Program..

[23]  Yike Guo,et al.  Constraint Logic Programming in the Sequent Calculus , 1994, LPAR.

[24]  Eugenio Moggi A Semantics for Evaluation Logic , 1995, Fundam. Informaticae.

[25]  Maurizio Gabbrielli,et al.  Observable Semantics for Constraint Logic Programs , 1995, J. Log. Comput..

[26]  Simon Thompson,et al.  Haskell: The Craft of Functional Programming , 1996 .

[27]  Andrei Voronkov,et al.  Semantics of Constraint Logic Programs with Bounded Quantifiers , 1996, ELP.

[28]  Michael Mendler A Timing Refinement of Intuitionistic Proofs and its Application to the Timing Analysis of Combinational Circuits , 1996, TABLEAUX.

[29]  Michael Mendler,et al.  Ternary Simulation: a Reenement of Binary Functions or an Abstraction of Real-time Behaviour? , 1996 .

[30]  Wiebe van der Hoek,et al.  First steps in modal logic , 1997 .

[31]  Nicolas Beldiceanu,et al.  Constraint Logic Programming , 2010, 25 Years GULP.

[32]  Michael J. Maher,et al.  The Semantics of Constraint Logic Programs , 1998, J. Log. Program..

[33]  Nick Benton,et al.  Computational types from a logical perspective , 1998, Journal of Functional Programming.