EqWB
The Equilibrium Logic Workbench1
This page contains several tools related to Equilibrium Logic [Pea96] and its
monotonic basis, the intermediate logic of Here-and-There [Hey60]. Equilibrium
Logic is a logical characterisation of the stable models (or answer
set) semantics for logic programs [GL88]. As shown in [LPV01], it
allows capturing the important property of strong equivalence of logic
programs, that is, when a piece of program can be safely replaced by
another regardless the context they are included in. Furthermore, it
can also characterise as logical formulas most extensions and
sysntactic constructions defined for Answer Set Programming. In fact,
the current most general definition of stable models for arbitrary
propositional [Fer05] or first order theories [FLV07] are equivalent to
the definition of Equilibrium Models.
Most tools are programmed in prolog and have been tested for the SWI Prolog interpreter.
1. Tools for Here-and-There and Equilibrium Logic
- qht.pl
This program takes as an input an arbitrary first order theory
from Quantified Here-and-There and uses the translation into classical
logic presented in [LPV07] to generate a file to be processed by the
theorem prover Prover9. Among other uses,
this tool can be applied to check strong equivalence of logic programs
with variables: we just write their equivalence, call qht.pl and then wait for Prover9 answer for the result.
- minlp.pl
This is a Prolog program that accepts as input an arbitrary
propositional theory and generates one (or more) equivalent disjuntive
ground logic program (possibly with negation in the head) that are
syntactically minimal. As shown in [CF07], under equilibrium logic, any
arbitrary theory is strongly equivalent to a logic program. The tool
implements the method presented in [CPV07] to obtain a minimal logic
program from the set of countermodels of an arbitrary theory, using a
similar technique to Quine-McCluskey's algorithm for minimising boolean
functions. The tool can be used to simplify a logic program (removing
redundant literals and rules) or to obtain the simplest logic program
representation of an arbitrary propositional expressions. For further
help, call predicate help(minlp).
This program has been used to generate the list of 162
possible (minimal) logic programs for 2 variables.
- rptlp.pl, polytrans.pl
These two programs are similar to minlp.pl
in the sense that they allow transforming arbitrary propositional
theories into ground logic programs. The main difference is that they
do not guarantee syntactic minimality. However, they are usually faster
than minlp, as they do
not generate the set of countermodels. Both programs implement the two
transformations presented in [CPV05]. The first transformation rptlp.pl is exponential, but
maintains the original propositional alphabet, whereas the second one polytrans.pl is polynomial but
at the cost of introducing auxiliary atoms. To invoke rptlp.pl just call predicate write_transform(F) with F a propositional formula: the
resulting program is printed in the screen. If you previously call assert(show_steps), all the
intermediate transformation steps are shown too. For polytrans.pl call predicate lp(F,Rs), with F a propositional formula and Rs the set of resulting rules.
- htcheck.pl
This program computes the Equilibrium and Here-and-There models of an
arbitrary theory. Models are organised following the models
minimisation criterion of Equilibrium Logic. It also allows checking
strong equivalence of two theories or programs by blind-force
comparison of their sets of Here-and-There models.
- tabeql
This program is written in Caml language and implements semantic
tableaux procedures for:
- computing the equilibrium models of an arbitrary theory [PGV00]
- checking the strong equivalence between two arbitrary theories
- checking the uniform
equivalence (i.e., the same behaviour wrt addition of atoms)
between two arbitrary theories
2. Tools for Partial Equilibrium Logic
- wfht.pl
This program allows computing several semantics related to
Well-Founded Semantics [GRS91] and Partial Equilibrium Logic [COPV07] .
The program allows computing the Partial Equilibrium Models [COPV07],
the Back-and-Forth semantics [] and the Infinite Valued Semantics of
[]. Once loaded in the prolog interpreter, type help for more information.
[under construction]
3. High level languages: Action Theories, Computational Societies,
etc
[under construction]
Acknowledgements
1 This research is partially supported
by Spanish MEC coordinated project TIN-2006-15455-C03, subprojects 01,
02, 03.
REFERENCES
[CF07] P. Cabalar and P. Ferraris, "Propositional Theories are
Strongly Equivalent to Logic Programs", Theory and Practice of
Logic Programming 7 (6), pp. 749-759, 2007.
[COPV07] P. Cabalar, S. Odintsov, D. Pearce and A. Valverde, "Partial
Equilibrium Logic", Annals of Mathematics and Artificial
Intelligence (50), pp. 305-331, 2007.
[CPV05] P. Cabalar, D. Pearce and A. Valverde, "Reducing
Propositional Theories in Equilibrium Logic to Logic Programs",
12th Portuguese Conference on Artificial Intelligence (EPIA'05).
Lecture Notes in Computer Science 3808, pp. 4-17, 2005.
[CPV07] P. Cabalar, D. Pearce and A. Valverde, "Minimal Logic
Programs",
23rd International Conference on Logic Programming (ICLP'07), Porto,
Portugal, September 2007. Lecture Notes in Computer Science (4670), pp.
104-118, 2007.
[Fer05] P. Ferraris, "Answer
sets for propositional theories". In: Proceedings of LPNMR-05,
pages 119-131.
[FLV07] P. Ferraris, J. Lee and V. Lifschitz. "A new
perspective on stable models". In Proc. IJCAI-07, 2007.
[vGRS91] A. van Gelder, K. Ross and J. S. Schlipf, "The
Well-Founded Semantics for General Logic Programs", Journal of the
ACM 38 (3), pp. 620--650, 1991.
[GL88] M. Gelfond and V. Lifschitz, "The Stable
Model Semantics for Logic Programming", Proceedings of the Fifth
International Conference on Logic Programming, pp. 1070-1080, 1988.
[LPV01] V. Lifschitz and D. Pearce and A. Valverde, "Strongly
equivalent logic programs", ACM Transactions on Computational Logic
2 (4), pp. 526-541. 2001.
[LPV07] V. Lifschitz, D. Pearce and A. Valverde, "A
characterization of strong equivalence for logic programs with variables",
in Proceedings of LPNMR-07, 2007.
[Pea96] D. Pearce, "A New Logical
Characterisation of Stable Models and Answer Sets", Non-Monotonic
Extensions of Logic Programming, pp. 57-70, 1996.
[Pea98] D. Pearce, "Back
and Forth Semantics for Normal, Disjunctive and Extended Logic programs".
APPIA-GULP-PRODE 1998: 329-342.
[PGV00] D. Pearce and I. P. de Guzman and A. Valverde, "A Tableau
Calculus for Equilibrium Entailment", Proceedings of Analytic
Tableaux and Related Methods (TABLEAUX'00), pp. 352-367, 2000.
[RW05] P. Rondogiannis and W.W. Wadge. "Minimum Model Semantics
for Logic Programs with Negation-as-Failure". ACM Transactions on
Computational Logic, 6(2):441-467, 2005.