17,700 research outputs found
In Praise of Impredicativity: A Contribution to the Formalization of Meta-Programming
Processing 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
A calculus for higher-order concurrent constraint programming with deep guards
We present a calculus providing an abstract operational semantics forhigher-order concurrent constraint programming. The calculus isparameterized with a first-order constraint system and provides first-class abstraction, guarded disjunction, committed-choice, deepguards, dynamic creation of unique names, and constraint communication.The calculus comes with a declarative sublanguage for which computation amounts to equivalence transformation of formulas. The declarative sublanguage can express negation. Abstractions are referred to by names, which are first-class values. This way we obtain a smooth and straight forward combination of first-order constraints with higher-order programming. Constraint communication is asynchronous and exploits the presence of logic variables. It provides a notion of state that is fully compatible with constraints and concurrency. The calculus serves as the semantic basis of Oz, a programming language and system under development at DFKI
Correctness and completeness of logic programs
We discuss proving correctness and completeness of definite clause logic
programs. We propose a method for proving completeness, while for proving
correctness we employ a method which should be well known but is often
neglected. Also, we show how to prove completeness and correctness in the
presence of SLD-tree pruning, and point out that approximate specifications
simplify specifications and proofs.
We compare the proof methods to declarative diagnosis (algorithmic
debugging), showing that approximate specifications eliminate a major drawback
of the latter. We argue that our proof methods reflect natural declarative
thinking about programs, and that they can be used, formally or informally, in
every-day programming.Comment: 29 pages, 2 figures; with editorial modifications, small corrections
and extensions. arXiv admin note: text overlap with arXiv:1411.3015. Overlaps
explained in "Related Work" (p. 21
Operationalizing Declarative and Procedural Knowledge: A Benchmark on Logic Programming Petri Nets (LPPNs)
Modelling, specifying and reasoning about complex systems requires to process
in an integrated fashion declarative and procedural aspects of the target
domain. The paper reports on an experiment conducted with a propositional
version of Logic Programming Petri Nets (LPPNs), a notation extending Petri
Nets with logic programming constructs. Two semantics are presented: a
denotational semantics that fully maps the notation to ASP via Event Calculus;
and a hybrid operational semantics that process separately the causal
mechanisms via Petri nets, and the constraints associated to objects and to
events via Answer Set Programming (ASP). These two alternative specifications
enable an empirical evaluation in terms of computational efficiency.
Experimental results show that the hybrid semantics is more efficient w.r.t.
sequences, whereas the two semantics follows the same behaviour w.r.t.
branchings (although the denotational one performs better in absolute terms).Comment: draft version -- update
- …