First-Order Theorem Proving in Practice M. C. Fernández-Gago, U. Hustadt, C. Dixon, M. Fisher and B. Konev Department of Computer Science The University of Liverpool, Liverpool L69 7ZF, UK {mcarmen,ullrich,clare,michael,konev}@csc.liv.ac.uk http://www.csc.liv.ac.uk/research/logics/ Introduction First-order temporal logic (FOTL), the extension of first-order logic with operators dealing with time, is a powerful and expressive formalism with many potential applications. This expressive logic can be viewed as a framework in which we can investigate problems specified in other logics. The monodic fragment of first-order temporal logic [6] is a useful fragment which possesses good computational properties such as completeness and sometimes even decidability. Temporal logics of knowledge, KL(n) , (see for example [4]) are useful for dealing with situations where the knowledge of agents in a system is involved. Here we use a translation from temporal logics of knowledge into the monodic fragment of first-order temporal logic. Essentially the epistemic part is translated into a fragment of classical first-order logic. We can then use a theorem-prover for monodic first-order temporal logic to prove properties of the translated formulae. This allows problems specified in temporal logics of knowledge to be verified automatically without needing a specialised theorem prover for temporal logics of knowledge. We assume the usual syntax and semantics for first-order temporal logic [6] and for the temporal logic of knowledge [4]. A FOTL formula φ is called monodic if any subformulae of the form T φ, where , g (or φ1 T φ2 , where T is one of U or W ) contains at most one free variable. T is one of ♦, Translating KL(n) into FOTL We want to translate KL(n) formulae into the monodic fragment of first-order temporal logic. Without loss of generality we can assume that formulae are already in SNFK normal form (a normal form for KL(n) that removes many temporal operators and requires formulae to be of a particular form, see [3]). Let ∪j Tj be a set of clauses, written in the normal form SNFK . Then ∪j Tj can be translated into firstorder temporal logic by applying the transformations π0 and π1 . In the following, p is a literal, φ and ψ are formulae in KL(n) , Q is a new predicate symbol introduced in order to define the beginning of time, st is a constant representing the initial moment in time, QKi p is a new predicate uniquely associated with Ki p and Ri is the accessibility relation for the modal operator Ki : ^ π0 [∪j Tj ] = Q(st) ∧ ∀xπ1 (Tj , x). j The translation π1 is as given in Figure 1. For each Ki p we add the clauses: π1 (start , x) = Q(x) π1 (true , x) = true π1 (false , x) = false π1 (p, x) = P (x) π1 (¬p, x) = ¬P (x) π1 (φ ∨ ψ, x) = π1 (φ, x) ∨ π1 (ψ, x) π1 (φ ∧ ψ, x) π1 (φ ⇒ ψ, x) π1 ( gφ, x) π1 (♦φ, x) π1 (Ki p, x) π1 (¬Ki p, x) Figure 1: π1 translation = = = = = = π1 (φ, x) ∧ π1 (ψ, x) π1 (φ, x) ⇒ π1 (ψ, x) gπ1 (φ, x) ♦π1 (φ, x) QKi p (x) Q¬Ki p (x) (QKi p (x) ⇒ (∀y.Ri (x, y) ⇒ QKi p (y))) (QKi p (x) ⇒ (∀y.Ri (x, y) ⇒ P (y))) and for each ¬Ki p we add the clause: (Q¬Ki p (x) ⇒ (∃y.Ri (x, y) ∧ P (y))). For every modal operator, Ki , we will also add reflexivity and symmetry axioms to the translation. ∀x.Ri (x, x) Reflexivity ∀x, y.(Ri (x, y) ⇒ Ri (y, x)) Symmetry Note, the translation of the epistemic part of the logic is non-standard. In particular, transitivity is dealt with differently, as compared to reflexivity and symmetry, to ensure termination when the resolution rules are applied. This translation is based on the axiomatic translation principle given in [9]. The translation has been shown to preserve satisfiability in [5]. Experimental Results We have applied the above translation to problems specified in KL(n) . The resultant formulae have been sent to TeMP [7], a resolution theorem prover for monodic FOTL, based on the calculus presented in [8]. The implementation of TeMP makes use of the fact that inference steps in this calculus can be simulated by inference steps in a first-order ordered resolution calculus. We have proved properties of case studies and examples using this approach including a specification of the board game Cluedo Re [2], the well known muddy children problem (see for example [3]), and security protocols [1], each originally expressed in KL(n) . Experimental results are given in [5]. Comparisons with the standard translation are also given. Acknowledgements The full version of this abstract appears in [5]. This work was partially supported by the EPSRC project: Analysis and Mechanisation of Decidable First-Order Temporal Logics (GR/R45376/01). References [1] C. Dixon and M.-C. Fernández Gago and M. Fisher and W. van der Hoek. Using Temporal Logics of Knowledge in the Formal Verification of Security Protocols. In Proceedings of TIME 2004 the Eleventh International Symposium on Temporal Representation and Reasoning, Tatihou, Normandie, France, July 2004. IEEE Computer Society Press. [2] C. Dixon. Miss Scarlett in the Ballroom with the Lead Piping. In 16th European Conference on Artificial Intelligence (ECAI 2004), pages 995–996, Valencia, Spain, August 2004. IOS Press. [3] C. Dixon, M. Fisher, and M. Wooldridge. Resolution for Temporal Logics of Knowledge. Journal of Logic and Computation, 8(3):345–372, 1998. [4] R. Fagin, J. Y. Halpern, Y. Moses, and M. Y. Vardi. Reasoning About Knowledge. MIT Press, 1995. [5] M.C. Fernández Gago, U. Hustadt, C. Dixon, M. Fisher, and B. Konev. First-Order Verification in Practice. Journal of Automated Reasoning, 2005. (To appear). [6] I. Hodkinson, F. Wolter, and M. Zakharyaschev. Decidable Fragments of First-Order Temporal Logics. Annals of Pure Applied Logic, 106(1-3):85–134, 2000. [7] U. Hustadt, B. Konev, A. Riazanov, and A. Voronkov. TeMP: A temporal monodic prover. In David A. Basin and Michaël Rusinowitch, editors, Proceedings of the Second International Joint Conference on Automated Reasoning (IJCAR), volume 3097 of LNAI, pages 326–330. Springer, 2004. [8] B. Konev, A. Degtyarev, C. Dixon, M. Fisher, and U. Hustadt. Mechanising First-Order Temporal Resolution. Information and Computation, 2005. In press. [9] R. A. Schmidt and U. Hustadt. A principle for incorporating axioms into the first-order translation of modal formulae. In Automated Deduction—CADE-19, volume 2741 of Lecture Notes in Artificial Intelligence, pages 412–426. Springer, 2003. 2