Temporal Reasoning and Termination of Programs
暂无分享,去创建一个
This paper deals with the relationship between the termination of programs and the v a l i di ty of certain modal formulas. We give a complete proof procedure for theses formulas, which w i l l allow to bring the correctness of these programs back to a problem of automated deduction in modal logic. adding to a habitual formalization of lower predicate calculus (LPC) the following axiom schemes and the following rule of inference : Many modal logics of programs have been developped during these last years [PR, HKP, M2]. Particular attention has been paid to their a b i l i ty to express many properties of programs [HKP, M2]. This paper is concerned with the relationship of termination problem for regular programs to the va l id i ty of certain formulas in modal logic. For these formulas we present a proof procedure, very close to the resolution procedure for f i rst-order predicate, calculus. We w i l l use this procedure to prove the termination of programs. As in Lucid [AW] we can consider the set of modal formulas with the proof procedure as a programming language. This way of doing things permits direct reasoning about programs, from their direct manipulat ion, rather than indirectly via another language. I . Preliminaries We shall consider as in [M2] the modal system S4, for reasoning about programs. For our formalization of quantif icational S4, we start with denumerably in f in i te l i s t s of i nd iv i dual variables x1, X2, X3, . . . , n-adic function symbols fn , gn, h n , . . . , and n-adic predicate symbols pn, qn, rn, Atomic formulas as well as negations of atomic formulas are called l i t e ra l s . We adopt the prime symbols & (conjunction), ^ (negation) L (necessity) and (xi) (universal quanti f icat ion). We use the usual notions of terms and well-formel formulas. Let A, B, C, . . . be arbitrary formulas. For each A, MA is defined as usual as ^L A. The axiomat izat ion of quantif icational S4 is obtained by Following the example of Kripke, we define a quantif icational S4 modal structure as an ordered t r ip le (G, K, R), where K is a set, R is a relation on K and G is a distinguished element of K, together with a function Y wich assigns to each H a set y'(H), called domain in H. We shall further specify that a l l domaines are identical. The interpretation T of A at H is defined as in LPC by in duction on the number of logical symbols in A. And F(LB,H)=t i f f T(B,H')=t for every H'EK such HRH\ otherwise T(LB,H)=f. A sentece A is said to be true in a model U associated with a modal structure (G,K,R) if r(A,G)=t ; it is said to be false in that model if T(A,G)=f. A is said to be valid i f f it is true in a l l i ts models (for every modal structure), and unsatisfiable i f f i t is false in a l l i t s models. A set of formulas is said to be consistent if there is no f i n i t e subset such that the disjunction of negations of i t s elements in a theorem. I I . Programs and modalities 2 .1. Assume that a program is represented by a directed graph whose nodes are the labels of this program and whose arcs represent transitions between labels. In the graphs there is only a start node (ls) and a terminal node ( l t ) [Ml] . For an arc ( 1 | , I2) the transit ion has the general form as follows : where x = (x , . . . , x ) is the input variables, L Farinas-del-Cerro 927 928 L. Farinas-del-Cerro L. Farinas-del-Cerro 929 [Ml] Manna, Z. "Properties of programs and f i r s t order predicate calculus", in J. A.CM. , 16, 2, (1969), pp. 244-255. [M2J Manna, Z. "Logics of Programs", in Proc. IFIP 80, North-Holland, pp. 41-52. [MW] Manna, Z., Waldinger, R. "Is "sometime" sometime better than "always" ? : Intermittent assertions in proving program correctness", in Com. ACM, 21, 2, (1978), pp. 159172. 0] Orlowska, E. "Resolution systems and their applications", I, TT, Fundamenta Informaticae, (1980), pp. 235-267, 333-362. [PR] Pratt , V. R. "Semantical Considerations on Floys-Hoare Logic", in Proc. 17th Ann. IEEE Symp. on Foundations of Comp. Sc i . , (1976); pp. 109-121. [RS) Rasiowa, Sikorski, "The mathematics of mathematics", Warszowa, (1963). [R] Robinson, "A machine oriented logic based on the resolution pr inc ip le" , in J. A. CM. , 17, (1965), pp. 23-41. jS] Salwicki, "Fromatized algorithme language", in Bul. Ac. Pol. Sci. , 18, 5, (1970), pp. 227-232.
[1] Luis Fariñas del Cerro. A Deduction Method for Modal Logic , 1982, ECAI.
[2] Zohar Manna,et al. Properties of Programs and the First-Order Predicate Calculus , 1969, JACM.
[3] Zohar Manna,et al. Is “sometime” sometimes better than “always”?: Intermittent assertions in proving program correctness , 1976, ICSE '76.