Abstract
Reachability Logic (rl) is a formalism for defining the operational semantics of programming languages and for specifying program properties. As a program logic it can be seen as a language-independent alternative to Hoare Logics. Several verification techniques have been proposed for rl, all of which have a circular nature: the rl formula under proof can circularly be used as a hypothesis in the proof of another rl formula, or even in its own proof. This feature is essential for dealing with possibly unbounded repetitive behaviour (e.g., program loops). The downside of such approaches is that the verification of a set of rl formulas is monolithic, i.e., either all formulas in the set are proved valid, or nothing can be inferred about any of the formula’s validity or invalidity. In this paper we propose a new, incremental method for proving a large class of rl formulas. The proposed method takes as input a given rl formula under proof (corresponding to a given program fragment), together with a (possibly empty) set of other valid rl formulas (e.g., already proved using our method), which specify sub-programs of the program fragment under verification. It then checks certain conditions are shown to be equivalent to the validity of the rl formula under proof. A newly proved formula can then be incrementally used in the proof of other rl formulas, corresponding to larger program fragments. The process is repeated until the whole program is proved. We illustrate our approach by verifying the nontrivial Knuth-Morris-Pratt string-matching program.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
For the language of interest in this paper the rules are shown in Sect. 2.
- 2.
See, e.g., the languages defined in the \(\mathbb {K}\) framework: http://k-framework.org.
- 3.
We liberally use a mixture of Maude and math notation for the sake of the example.
- 4.
“Sequencing” and “empty” do not need to be actual statements of the programming language; they can just be artifacts required by the language’s operational semantics.
- 5.
This property is called weak well-definedness in [4].
References
Roşu, G., Ştefănescu, A.: Towards a unified theory of operational and axiomatic semantics. In: Czumaj, A., Mehlhorn, K., Pitts, A., Wattenhofer, R. (eds.) ICALP 2012, Part II. LNCS, vol. 7392, pp. 351–363. Springer, Heidelberg (2012)
Roşu, G., Ştefănescu, A.: Checking reachability using matching logic. In: Proceedings of the 27th Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2012), pp. 555–574. ACM (2012)
Roşu, G., Ştefănescu, A., Ciobâcă, Ş., Moore, B.M.: One-path reachability logic. In: Proceedings of the 28th Symposium on Logic in Computer Science (LICS 2013), pp. 358–367. IEEE, June 2013
Ştefănescu, A., Ciobâcă, Ş., Mereuţă, R., Moore, B.M., Şerbănuţă, T.F., Roşu, G.: All-path reachability logic. In: Dowek, G. (ed.) RTA-TLCA 2014. LNCS, vol. 8560, pp. 425–440. Springer, Heidelberg (2014)
Arusoaie, A., Lucanu, D., Rusu, V.: A generic framework for symbolic execution: theory and applications. Research report RR-8189. Inria, September 2015
Arusoaie, A., Lucanu, D., Rusu, V.: A generic framework for symbolic execution. Research report RR-8189. Inria, September 2015. https://hal.inria.fr/hal-00766220
Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C. (eds.): All About Maude. LNCS, vol. 4350. Springer, Heidelberg (2007)
de Moura, L., Bjørner, N.S.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008)
Roşu, G., Ellison, C., Schulte, W.: Matching logic: an alternative to Hoare/Floyd logic. In: Johnson, M., Pavlovic, D. (eds.) AMAST 2010. LNCS, vol. 6486, pp. 142–162. Springer, Heidelberg (2011)
Roşu, G., Ştefănescu, A.: Matching logic: a new program verification approach (NIER track). In: ICSE 2011: Proceedings of the 30th International Conference on Software Engineering, pp. 868–871. ACM (2011)
Roşu, G.: Matching logic — extended abstract. In: Proceedings of the 26th International Conference on Rewriting Techniques and Applications (RTA 2015). Leibniz International Proceedings in Informatics (LIPIcs), vol. 36, pp. 5–21. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, July 2015
Verification of the KMP algorithm. https://fmse.info.uaic.ro/imgs/kmp.pdf
Lucanu, D., Rusu, V., Arusoaie, A., Nowak, D.: Verifying reachability-logic properties on rewriting-logic specifications. In: Martí-Oliet, N., Ölveczky, P.C., Talcott, C. (eds.) Meseguer Festschrift. LNCS, vol. 9200, pp. 451–474. Springer, Heidelberg (2015)
Visser, W., Havelund, K., Brat, G.P., Park, S., Lerda, F.: Model checking programs. Autom. Softw. Eng. 10(2), 203–232 (2003)
Filliâtre, J.-C., Paskevich, A.: Why3 — where programs meet provers. In: Felleisen, M., Gardner, P. (eds.) ESOP 2013. LNCS, vol. 7792, pp. 125–128. Springer, Heidelberg (2013)
de Roever, W.P., de Boer, F.S., Hannemann, U., Hooman, J., Lakhnech, Y., Poel, M., Zwiers, J.: Concurrency Verification: Introduction to Compositional and Noncompositional Methods. Cambridge Tracts in Theoretical Computer Science, vol. 54. Cambridge University Press, Cambridge (2001)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer International Publishing Switzerland
About this paper
Cite this paper
Rusu, V., Arusoaie, A. (2016). Proving Reachability-Logic Formulas Incrementally. In: Lucanu, D. (eds) Rewriting Logic and Its Applications. WRLA 2016. Lecture Notes in Computer Science(), vol 9942. Springer, Cham. https://doi.org/10.1007/978-3-319-44802-2_8
Download citation
DOI: https://doi.org/10.1007/978-3-319-44802-2_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-44801-5
Online ISBN: 978-3-319-44802-2
eBook Packages: Computer ScienceComputer Science (R0)