Program Schemata Technique to Solve Propositional Program Logics Revised ?

Propositional program (dynamic, temporal and process) logics are basis for logical specification of program systems (including parallel, distributed and multiagent systems). Therefore development of efficient algorithms (decision procedures) for validation, provability and model checking of program logics is an important research topic for the theory of programming. The essence of a program schemata technique consists in the following. Formulas of a program logic to be translated into uninterpreted nondeterministic monadic flowcharts (so called Yanov schemata) so that the scheme is total (i.e. terminates) in all special interpretations if and only if the initial formula is a tautology (i.e. is identically true). Since this generalized halting problem is solvable (with an exponential complexity), it implies the decidability of initial program logic (and leads to a decidability upper bound). The first version of the technique was developed by Nikolay V. Shilov and Valery A. Nepomnjaschy in 1983-1987 for variants of Propositional Dynamic Logic (PDL). In 1997 the technique was expanded on the propositional μ-Calculus. In both cases a special algorithm was used to solve the generalized halting problem. A recent development of program schemata technique consists in revised decision procedure for the halting problem. A new decision procedure consists in model checking of a special fairness property (presented by some fixed μ-Calculus formula) in finite models presented by Yanov schemata flowcharts. Exponential lower bound for transformation of μCalculus formulas to equivalent guarded form is a consequence of the new version of the decision procedure. 1 Propositional μ-Calculus Let us define syntax and semantics of the propositional μ-Calculus (μC) [8], one of the most expressive propositional program logics. Definition 1. Let Con = {true, false} be Boolean constants and V ar and Act be disjoint (countable) alphabets of propositional and program variables. Syntax of μC consists of formulas to be defined by structural induction. This work is supported by the RFBR-grant # 13-01-00645-a. – All constants in Con and variable in V ar are formulas. – Any propositional combination of formulas is a formula: negation ¬φ, conjunction (φ ∧ ψ) and disjunction (φ ∨ ψ) are formulas for any formulas φ and ψ. – For any program variable a ∈ Act and formula φ modal constructs sometimes (〈a〉φ) and always ([a]φ) are formulas. – For any propositional variable x ∈ V ar and formula φ without negative and bound instances of x, the least fix-point (μx.φ) and the greatest fix-point (νx.φ) are formulas too. Let us drop the top-level parenthesis around formulas as well as those parenthesis inside formulas that may be restored according to the standard precedence rules for the propositional connectives: negation precedes conjunction that precedes disjunction For any syntactic expression r and any two expressions of same kind s and t let rt/s be the result of instantiation of t instead of all instances of s in r; also let r t/s denote the expression t itself, and for every n ≥ 0 let r n+1 t/s be rrn t/s/s i.e. r t/s stays for m-times substitution of t instead of s in φ. For example, if φ is a formula ψ ∨ 〈a〉x (where x ∈ V ar and a ∈ Act are propositional and program variables) then – φtrue/x ≡ true, – φtrue/x ≡ (ψ ∨ (〈a〉true)), – φtrue/x ≡ (ψ ∨ (〈a〉(ψ ∨ (〈a〉true)))), etc. μC semantics is defined in models that are called labeled transition systems (LTS) in Computer Science and Kripke systems/structures in Logic and Philosophy; let us just use term model instead of both in this paper. Definition 2. Each model M is a triple (D,R,E) where – the domain D 6= ∅ is a set of states; – the interpretation R : Act → 2D×D is a function that assigns a binary relation R(a) ⊆ D ×D to each a ∈ Act; – the valuation E : V ar → 2 is a function that assigns a unary predicate E(x) ⊆ D to each x ∈ V ar. If M = (D,R,E) is a model, S ⊆ D is a set of states, and x ∈ V AR is a propositional variable then let MS/x denote a model (D,R,ES/x) where 6 valuation 1 An instance of a subformula is said to be negative if it is in the scope of odd number of negations; otherwise the instance is said to be positive. 2 An instance of a variable x is said to be bound if it is in the scope of μx or νx; otherwise it is said to be free. 3 The definition implies that all bound variable within a formula must be different. 4 i.e. both are simultaneously propositional variables, program variables, formulas, etc. 5 Hereafter we use ’≡’ for syntax identity, but ‘=’ for (set-theoretic) equality. 6 Acronym upd stays for update, i.e. the following second-order function modifier: for any function f : X×Y , elements x ∈ X and y ∈ Y let upd(f, x, y) = λz ∈ X. if z = x then y else f(y). ES/x is upd(E, x, S) i.e. a valuation that may differ from E for propositional variable x only: ES/x(x) = S. Definition 3. μC semantics in may be defined by extending valuations (provided by models) from propositional variables onto all formulas by structural induction as follows. For any model M = (D,R,E) let – M(true) = D, M(false) = ∅, and M(x) = E(x) for every x ∈ V ar; – M(¬φ) = D \M(φ), M(φ∧ψ) = M(φ)∩M(ψ), M(φ∨ψ) = M(φ)∪M(ψ); – M(〈a〉φ) = {s ∈ D : ∃t ∈ D((s, t) ∈ R(a) and t ∈M(φ))}, – M([a]φ) = {s ∈ D : ∀t ∈ D((s, t) ∈ R(a) implies t ∈M(φ))}; – M(μx.φ) is the least (w.r.t. ⊆) set of states S ⊆ D that MS/x(φ) = S; – M(μx.φ) is the greatest (w.r.t. ⊆) set of states S ⊆ D that MS/x(φ) = S. Satisfiability |= is a ternary relation between states, models and formulas defined as follows: s |=M φ iff s ∈M(φ). The above definition needs some justification since it refers to existence of the set-theoretic least and greatest fix-points MS/x(φ) = S over 2 . Correctness of this definition follows from monotonicity of a function λS ⊆ D.MS/x(φ) : 2 → 2 (assuming φ hasn’tt negative instances of x) and Knaster-Tarski fixpoint theorem [13, 8, 15]. We skip full details of this justification (due to space limitations) but formulate a corollary that follows from the proof of the theorem. Corollary 1. For any propositional variable x ∈ V ar, μC-formula φ without bound and negative instances of x, for every n ≥ 0 and every model M the following inclusions hold: M(φfalse/x) ⊆M(μx.φ) and M(νx.φ) ⊆M(φ n true/x). Definition 4. Let φ be any μC-formula. – φ is said to be valid in a model M (|=M φ), if M(φ) = DM where DM is the domain of the model; φ is said to be valid (|= φ), if it is valid in all models. – φ is said to be satisfiable in a model M , if there exists a state s such that s |=M φ; φ is said to be satisfiable if it is so in some model. The following definition just recalls some general logic concepts.