Abstract
We give an overview on the applications and foundations of the \(\mathbb {K}\) language framework, a semantic framework for programming languages and formal analysis tools. \(\mathbb {K}\) represents a 20-year effort in pursuing the ideal language framework vision, where programming languages must have formal definitions, and tools for a given language, such as parsers, interpreters, compilers, semantic-based debuggers, state-space explorers, model checkers, deductive program verifiers, etc., can be derived from just one reference formal definition of the language, which is executable, and no other semantics for the same language should be needed. The correctness of the language tools is guaranteed on a case-by-case basis by proof objects, which encode rigorous mathematical proofs as certificates for every individual task that the tools do and can be mechanically checked by third-party proof checkers.
This paper follows the lecture notes presented by the second author at the School on Engineering Trustworthy Software Systems (SETSS) in 2019.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Substitution can be defined fully generically in \(\mathbb {K}\) (not shown here) and then used to give semantics to various constructs in various languages.
References
Clang: A C language family frontend for LLVM. https://clang.llvm.org/
GCC, the GNU compiler collection. https://gcc.gnu.org/
TrustInSoft–cybersecurity and safety provider. https://trust-in-soft.com/
Ahrendt, W., Beckert, B., Bubel, R., Hahnle, R., Schmitt, P.H., Ulbrich, M.: Deductive Software Verification-The KeY Book. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-319-49812-6
Barendregt, H.: The lambda calculus: its syntax and semantics. Studies in Logic and the Foundations of Mathematics, Elsevier Science Publishers (1984)
Barnett, M., Chang, B.-Y.E., DeLine, R., Jacobs, B., Leino, K.R.M.: Boogie: a modular reusable verifier for object-oriented programs. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2005. LNCS, vol. 4111, pp. 364–387. Springer, Heidelberg (2006). https://doi.org/10.1007/11804192_17
Bertot, Y., Castran, P.: Interactive Theorem Proving and Program Development. Coq’Art the Calculus of Inductive Constructions. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-662-07964-5
Bogdănaş, D., Roşu, G.: K-Java: a complete semantics of Java. In: Proceedings of the 42\(^{\rm nd}\) Symposium on Principles of Programming Languages (POPL 2015), pp. 445–456. ACM, January 2015. https://doi.org/10.1145/2676726.2676982
Brady, E.: IDRIS – systems programming meets full dependent types. In: Proceedings of the 5\(^{\rm th}\) ACM Workshop on Programming Languages Meets Program Verification (PLPV 2011), pp. 43–54. ACM (2011). https://doi.org/10.1145/1929529.1929536
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 34\(^{\rm th}\) Annual ACM/IEEE Symposium on Logic in Computer Science (LICS 2019) (2019)
Chen, X., Roşu, G.: A language-independent program verification framework. In: Proceedings of the 8th International Symposium on Leveraging Applications of Formal Methods (ISoLA 2018), vol.11245, pp. 92–102. Springer (2018). https://doi.org/10.1007/978-3-030-03421-4
Church, A.: The Calculi of Lambda-Conversion. Princeton University Press, New Jersey (1941)
Cohen, E., et al.: VCC: a practical system for verifying concurrent C. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 23–42. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-03359-9_2
Dasgupta, S., Park, D., Kasampalis, T., Adve, V.S., Roşu, G.: A complete formal semantics of x 86–64 user-level instruction set architecture. In: Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2019), pp. 1133–1148. ACM, June 2019. https://doi.org/10.1145/3314221.3314601
De Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Proceedings of the 14\(^{\rm th}\) International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2008). pp. 337–340. Springer, Cham (2008). https://doi.org/10.1007/978-3-540-78800-3_24
Ethereum: Solidity documentation (2019). http://solidity.readthedocs.io
Ethereum: Vyper documentation (2019). https://vyper.readthedocs.io
Filliâtre, J.-C., Marché, C.: The Why/Krakatoa/caduceus platform for deductive program verification. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 173–177. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-73368-3_21
Guth, D.: A formal semantics of Python 3.3. Master’s thesis, University of Illinois at Urbana-Champaign (2013). http://hdl.handle.net/2142/45275
Hathhorn, C., Ellison, C., Roşu, G.: Defining the undefinedness of C. In: Proceedings of the 36\(^{\rm th}\) ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2015). pp. 336–345. ACM, June 2015. https://doi.org/10.1145/2813885.2737979
Hildenbrandt, E., et al.: KEVM: a complete semantics of the Ethereum virtual machine. In: Proceedings of the 2018 IEEE Computer Security Foundations Symposium (CSF 2018). IEEE (2018). http://jellopaper.org
Kasampalis, T., et al.: IELE: a rigorously designed language and tool ecosystem for the blockchain. In: Proceeding of the 23\(^{\rm rd}\) International Symposium on Formal Methods (FM 2019) (2019)
Kroening, D., Tautschnig, M.: CBMC – C bounded model checker. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014. LNCS, vol. 8413, pp. 389–391. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54862-8_26
The Coq development team: The Coq proof assistant reference manual. LogiCal Project (2004). http://coq.inria.fr
Norell, U.: Dependently typed programming in agda. In: Koopman, P., Plasmeijer, R., Swierstra, D. (eds.) AFP 2008. LNCS, vol. 5832, pp. 230–266. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-04652-0_5
Park, D., Ştefănescu, A., Roşu, G.: KJS: a complete formal semantics of JavaScript. In: Proceedings of the 36\(^{\rm th}\) ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2015), pp. 346–356. ACM, June 2015. https://doi.org/10.1145/2737924.2737991
Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: Proceedings of the 17\(^{\rm th}\) Annual IEEE Symposium on Logic in Computer Science (LICS 2002), pp. 55–74. IEEE (2002). https://doi.org/10.1109/lics.2002.1029817
Roşu, G.: K–a semantic framework for programming languages and formal analysis tools. In: Dependable Software Systems Engineering. IOS Press (2017)
Roşu, G.: Matching logic. Logic. Methods Comput. Sci. 13(4), 1–61 (2017). https://doi.org/10.23638/lmcs-13(4:28)2017
Roşu, G., Ştefănescu, A.: Checking reachability using matching logic. In: Proceedings of the 27\(^{\rm th}\) Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2012), pp. 555–574. ACM, October 2012. http://dl.acm.org/citation.cfm?doid=2384616.2384656
Roşu, G., Ştefănescu, A., Ciobâcă, Ş., Moore, B.M.: One-path reachability logic. In: Proceedings of the 28\(^{\rm th}\) Symposium on Logic in Computer Science (LICS 2013), pp. 358–367. IEEE (2013). https://doi.org/10.1109/lics.2013.42
Roşu, G., Serbanuta, T.F.: K overview and simple case study. In: Proceedings of International K Workshop (K 2011). ENTCS, vol. 304, pp. 3–56. Elsevier, June 2014. https://doi.org/10.1016/j.entcs.2014.05.002
Roşu, G., Şerbănuţă, T.F.: An overview of the K semantic framework. J. Logic Algebraic Program. 79(6), 397–434 (2010). https://doi.org/10.1016/j.jlap.2010.03.012
Tarski, A.: A lattice-theoretical fixpoint theorem and its applications. Pacific J. Math. 5(2), 285–309 (1955). https://doi.org/10.2140/pjm.1955.5.285
The Isabelle development team: Isabelle (2018). https://isabelle.in.tum.de/
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Chen, X., Roşu, G. (2020). \(\mathbb {K}\)—A Semantic Framework for Programming Languages and Formal Analysis. In: Bowen, J., Liu, Z., Zhang, Z. (eds) Engineering Trustworthy Software Systems. SETSS 2019. Lecture Notes in Computer Science(), vol 12154. Springer, Cham. https://doi.org/10.1007/978-3-030-55089-9_4
Download citation
DOI: https://doi.org/10.1007/978-3-030-55089-9_4
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-55088-2
Online ISBN: 978-3-030-55089-9
eBook Packages: Computer ScienceComputer Science (R0)