51 research outputs found
Verification of Imperative Programs by Constraint Logic Program Transformation
We present a method for verifying partial correctness properties of
imperative programs that manipulate integers and arrays by using techniques
based on the transformation of constraint logic programs (CLP). We use CLP as a
metalanguage for representing imperative programs, their executions, and their
properties. First, we encode the correctness of an imperative program, say
prog, as the negation of a predicate 'incorrect' defined by a CLP program T. By
construction, 'incorrect' holds in the least model of T if and only if the
execution of prog from an initial configuration eventually halts in an error
configuration. Then, we apply to program T a sequence of transformations that
preserve its least model semantics. These transformations are based on
well-known transformation rules, such as unfolding and folding, guided by
suitable transformation strategies, such as specialization and generalization.
The objective of the transformations is to derive a new CLP program TransfT
where the predicate 'incorrect' is defined either by (i) the fact 'incorrect.'
(and in this case prog is not correct), or by (ii) the empty set of clauses
(and in this case prog is correct). In the case where we derive a CLP program
such that neither (i) nor (ii) holds, we iterate the transformation. Since the
problem is undecidable, this process may not terminate. We show through
examples that our method can be applied in a rather systematic way, and is
amenable to automation by transferring to the field of program verification
many techniques developed in the field of program transformation.Comment: In Proceedings Festschrift for Dave Schmidt, arXiv:1309.455
The Ecce and Logen Partial Evaluators and their Web Interfaces
We present Ecce and Logen, two partial evaluators for Prolog using the online and offline approach respectively. We briefly present the foundations of these tools and discuss various applications. We also present new implementations of these tools, carried out in Ciao Prolog. In addition to a command-line interface new user-friendly web interfaces were developed. These enable non-expert users to specialise logic programs using a web browser, without the need for a local installation
A Polynomial Translation of Logic Programs with Nested Expressions into Disjunctive Logic Programs: Preliminary Report
Nested logic programs have recently been introduced in order to allow for
arbitrarily nested formulas in the heads and the bodies of logic program rules
under the answer sets semantics. Nested expressions can be formed using
conjunction, disjunction, as well as the negation as failure operator in an
unrestricted fashion. This provides a very flexible and compact framework for
knowledge representation and reasoning. Previous results show that nested logic
programs can be transformed into standard (unnested) disjunctive logic programs
in an elementary way, applying the negation as failure operator to body
literals only. This is of great practical relevance since it allows us to
evaluate nested logic programs by means of off-the-shelf disjunctive logic
programming systems, like DLV. However, it turns out that this straightforward
transformation results in an exponential blow-up in the worst-case, despite the
fact that complexity results indicate that there is a polynomial translation
among both formalisms. In this paper, we take up this challenge and provide a
polynomial translation of logic programs with nested expressions into
disjunctive logic programs. Moreover, we show that this translation is modular
and (strongly) faithful. We have implemented both the straightforward as well
as our advanced transformation; the resulting compiler serves as a front-end to
DLV and is publicly available on the Web.Comment: 10 pages; published in Proceedings of the 9th International Workshop
on Non-Monotonic Reasonin
Deciding Full Branching Time Logic by Program Transformation
We present a method based on logic program transformation, for verifying Computation Tree Logic (CTL*) properties of finite state reactive systems. The finite state systems and the CTL* properties we want to verify, are encoded as logic programs on infinite lists. Our verification method consists of two steps. In the first step we transform the logic program that encodes the given system and the given property, into a monadic ω -program, that is, a stratified program defining nullary or unary predicates on infinite lists. This transformation is performed by applying unfold/fold rules that preserve the perfect model of the initial program. In the second step we verify the property of interest by using a proof method for monadic ω-program
Experiences with Some Benchmarks for Deductive Databases and Implementations of Bottom-Up Evaluation
OpenRuleBench is a large benchmark suite for rule engines, which includes
deductive databases. We previously proposed a translation of Datalog to C++
based on a method that "pushes" derived tuples immediately to places where they
are used. In this paper, we report performance results of various
implementation variants of this method compared to XSB, YAP and DLV. We study
only a fraction of the OpenRuleBench problems, but we give a quite detailed
analysis of each such task and the factors which influence performance. The
results not only show the potential of our method and implementation approach,
but could be valuable for anybody implementing systems which should be able to
execute tasks of the discussed types.Comment: In Proceedings WLP'15/'16/WFLP'16, arXiv:1701.0014
- …