Abstract
Alk is an educational platform designed to help in learning algorithms and acquiring algorithmic thinking. This paper describes how the semantics of Alk and the algorithm’s properties can be formally described using matching logic such that the reasoning about algorithms, described as Alk programs, can be done in a uniform way. Challenges are coming from the specificity of the Alk Language: abstract descriptions for the values, no declarations for variable or for parameter types, and various algorithmic paradigms (e.g., non-deterministic algorithms). The main consequence of this approach is that we may use in a sound way the symbolic execution for proving algorithms’ properties.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
In many cases, the information needed for analysis, e.g., the types of variables and the variables modified by an iterative statement, can be deduced by static analysis. Such a component is a work in progress, and it will be presented somewhere else.
- 2.
For convenience, we introduce it directly in the syntax of patterns but it can be axiomatised as in [23].
- 3.
In order to make the the presentation more intuitive, we use the full syntax for configurations, instead of the AST notation.
References
Ahrendt, W., Beckert, B., Bubel, R., Hähnle, R., Schmitt, P.H., Ulbrich, M. (eds.): Deductive Software Verification - The KeY Book - From Theory to Practice. LNCS, vol. 10001. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-49812-6
Alexandru-Ioan, L., Lucanu, D.: Supporting algorithm analysis with symbolic execution in ALK. In: Aït-Ameur, Y., Craciun, F. (eds.) TASE 2022. LNCS, vol. 13299, pp. 406–423. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-10363-6_27
Arusoaie, A., Lucanu, D.: Unification in matching logic. In: ter Beek, M.H., McIver, A., Oliveira, J.N. (eds.) FM 2019. LNCS, vol. 11800, pp. 502–518. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-30942-8_30
Arusoaie, A., Lucanu, D., Rusu, V.: A generic framework for symbolic execution. In: Erwig, M., Paige, R.F., Van Wyk, E. (eds.) SLE 2013. LNCS, vol. 8225, pp. 281–301. Springer, Cham (2013). https://doi.org/10.1007/978-3-319-02654-1_16
Bobot, F., Filliâtre, J.-C., Marché, C., Paskevich, A.: Let’s verify this with why3. Int. J. Softw. Tools Technol. Transf. 17(6), 709–727 (2015)
Chen, X., Lin, Z., Trinh, M.-T., Roşu, G.: Towards a trustworthy semantics-based language framework via proof generation. In: Silva, A., Leino, K.R.M. (eds.) CAV 2021. LNCS, vol. 12760, pp. 477–499. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-81688-9_23
Chen, X., Lucanu, D., Roşu, G.: Initial algebra semantics in matching logic. Technical report, University of Illinois at Urbana-Champaign, July 2020. submitted. http://hdl.handle.net/2142/107781
Chen, X., Lucanu, D., Roşu, G.: Matching logic explained. J. Log. Algebr. Methods Program. 120, 100638 (2021)
Chen, X., Roşu, G.: Applicative matching logic. Technical report, University of Illinois at Urbana-Champaign, July 2019. http://hdl.handle.net/2142/104616
Chen, X., Roşu, G.: Matching mu-logic. In: Proceedings of the 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS 2019) (2019, to appear)
Chen, X., Rosu, G.: SETSS’19 lecture notes on K. In: Bowen, J., Liu, Z. (eds.) Engineering Trustworthy Software Systems. LNCS, Springer, Cham (2019)
de Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-78800-3_24
Floyd, R.W.: Nondeterministic algorithms. J. ACM 14(4), 636–644 (1967)
Floyd, R.W.: Assigning meanings to programs. In: Colburn, T.R., Fetzer, J.H., Rankin, T.L. (eds.) Program Verification. Studies in Cognitive Systems, vol. 14, pp. 65–81. Springer, Dordrecht (1993). https://doi.org/10.1007/978-94-011-1793-7_4
Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969)
Huisman, M., Ahrendt, W., Grahl, D., Hentschel, M.: Formal specification with the java modeling language. In: Ahrendt, W., Beckert, B., Bubel, R., Hahnle, R., Schmitt, P., Ulbrich, M. (eds.) Deductive Software Verification – The KeY Book. LNCS, vol. 10001, pp. 193–241. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-49812-6_7
Khedker, U.P., Sanyal, A., Karkare, B.: Data Flow Analysis - Theory and Practice. CRC Press, Boca Raton (2009)
Kosmatov, N., Signoles, J.: Frama-C, A collaborative framework for C code verification: tutorial synopsis. In: Falcone, Y., Sánchez, C. (eds.) RV 2016. LNCS, vol. 10012, pp. 92–115. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-46982-9_7
Leino, K.R.M.: This is boogie 2. manuscript KRML 178(131), 9 (2008)
Leino, K.R.M.: Dafny: an automatic program verifier for functional correctness. In: Clarke, E.M., Voronkov, A. (eds.) LPAR 2010. LNCS (LNAI), vol. 6355, pp. 348–370. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-17511-4_20
Lucanu, D., Rusu, V., Arusoaie, A.: A generic framework for symbolic execution: a coinductive approach. J. Symb. Comput. 80, 125–163 (2017)
Alexandru-Ioan, L.: Extended z3 array. In: 23th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing (FROM Workshop), SYNASC 2021. IEEE (2021, to appear)
Roşu, G.: Matching logic. Log. Methods Comput. Sci. 13(4), 1–61 (2017)
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). https://doi.org/10.1007/978-3-642-17796-5_9
Stefanescu, A., Ciobâcă, Ş., Mereuta, R., Moore, B.M., Serbanuta, T.-F., Rosu, G.: All-path reachability logic. Log. Methods Comput. Sci. 15(2) (2019)
Vogels, F., Jacobs, B., Piessens, F.: Featherweight verifast. Log. Methods Comput. Sci. 11(3) (2015)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Lungu, AI., Lucanu, D. (2022). A Matching Logic Foundation for Alk. In: Seidl, H., Liu, Z., Pasareanu, C.S. (eds) Theoretical Aspects of Computing – ICTAC 2022. ICTAC 2022. Lecture Notes in Computer Science, vol 13572. Springer, Cham. https://doi.org/10.1007/978-3-031-17715-6_19
Download citation
DOI: https://doi.org/10.1007/978-3-031-17715-6_19
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-17714-9
Online ISBN: 978-3-031-17715-6
eBook Packages: Computer ScienceComputer Science (R0)