434,847 research outputs found
Answer Sets for Logic Programs with Arbitrary Abstract Constraint Atoms
In this paper, we present two alternative approaches to defining answer sets
for logic programs with arbitrary types of abstract constraint atoms (c-atoms).
These approaches generalize the fixpoint-based and the level mapping based
answer set semantics of normal logic programs to the case of logic programs
with arbitrary types of c-atoms. The results are four different answer set
definitions which are equivalent when applied to normal logic programs. The
standard fixpoint-based semantics of logic programs is generalized in two
directions, called answer set by reduct and answer set by complement. These
definitions, which differ from each other in the treatment of
negation-as-failure (naf) atoms, make use of an immediate consequence operator
to perform answer set checking, whose definition relies on the notion of
conditional satisfaction of c-atoms w.r.t. a pair of interpretations. The other
two definitions, called strongly and weakly well-supported models, are
generalizations of the notion of well-supported models of normal logic programs
to the case of programs with c-atoms. As for the case of fixpoint-based
semantics, the difference between these two definitions is rooted in the
treatment of naf atoms. We prove that answer sets by reduct (resp. by
complement) are equivalent to weakly (resp. strongly) well-supported models of
a program, thus generalizing the theorem on the correspondence between stable
models and well-supported models of a normal logic program to the class of
programs with c-atoms. We show that the newly defined semantics coincide with
previously introduced semantics for logic programs with monotone c-atoms, and
they extend the original answer set semantics of normal logic programs. We also
study some properties of answer sets of programs with c-atoms, and relate our
definitions to several semantics for logic programs with aggregates presented
in the literature
Relational Parametricity and Separation Logic
Separation logic is a recent extension of Hoare logic for reasoning about
programs with references to shared mutable data structures. In this paper, we
provide a new interpretation of the logic for a programming language with
higher types. Our interpretation is based on Reynolds's relational
parametricity, and it provides a formal connection between separation logic and
data abstraction
Towards an Abstract Domain for Resource Analysis of Logic Programs Using Sized Types
We present a novel general resource analysis for logic programs based on
sized types.Sized types are representations that incorporate structural (shape)
information and allow expressing both lower and upper bounds on the size of a
set of terms and their subterms at any position and depth. They also allow
relating the sizes of terms and subterms occurring at different argument
positions in logic predicates. Using these sized types, the resource analysis
can infer both lower and upper bounds on the resources used by all the
procedures in a program as functions on input term (and subterm) sizes,
overcoming limitations of existing analyses and enhancing their precision. Our
new resource analysis has been developed within the abstract interpretation
framework, as an extension of the sized types abstract domain, and has been
integrated into the Ciao preprocessor, CiaoPP. The abstract domain operations
are integrated with the setting up and solving of recurrence equations for
both, inferring size and resource usage functions. We show that the analysis is
an improvement over the previous resource analysis present in CiaoPP and
compares well in power to state of the art systems.Comment: Part of WLPE 2013 proceedings (arXiv:1308.2055
Using parametric set constraints for locating errors in CLP programs
This paper introduces a framework of parametric descriptive directional types
for constraint logic programming (CLP). It proposes a method for locating type
errors in CLP programs and presents a prototype debugging tool. The main
technique used is checking correctness of programs w.r.t. type specifications.
The approach is based on a generalization of known methods for proving
correctness of logic programs to the case of parametric specifications.
Set-constraint techniques are used for formulating and checking verification
conditions for (parametric) polymorphic type specifications. The specifications
are expressed in a parametric extension of the formalism of term grammars. The
soundness of the method is proved and the prototype debugging tool supporting
the proposed approach is illustrated on examples.
The paper is a substantial extension of the previous work by the same authors
concerning monomorphic directional types.Comment: 64 pages, To appear in Theory and Practice of Logic Programmin
The Guarded Lambda-Calculus: Programming and Reasoning with Guarded Recursion for Coinductive Types
We present the guarded lambda-calculus, an extension of the simply typed
lambda-calculus with guarded recursive and coinductive types. The use of
guarded recursive types ensures the productivity of well-typed programs.
Guarded recursive types may be transformed into coinductive types by a
type-former inspired by modal logic and Atkey-McBride clock quantification,
allowing the typing of acausal functions. We give a call-by-name operational
semantics for the calculus, and define adequate denotational semantics in the
topos of trees. The adequacy proof entails that the evaluation of a program
always terminates. We introduce a program logic with L\"ob induction for
reasoning about the contextual equivalence of programs. We demonstrate the
expressiveness of the calculus by showing the definability of solutions to
Rutten's behavioural differential equations.Comment: Accepted to Logical Methods in Computer Science special issue on the
18th International Conference on Foundations of Software Science and
Computation Structures (FoSSaCS 2015
A functional quantum programming language
We introduce the language QML, a functional language for quantum computations
on finite types. Its design is guided by its categorical semantics: QML
programs are interpreted by morphisms in the category FQC of finite quantum
computations, which provides a constructive semantics of irreversible quantum
computations realisable as quantum gates. QML integrates reversible and
irreversible quantum computations in one language, using first order strict
linear logic to make weakenings explicit. Strict programs are free from
decoherence and hence preserve superpositions and entanglement - which is
essential for quantum parallelism.Comment: 15 pages. Final version, to appear in Logic in Computer Science 200
- …