Abstract
Formal programming language semantics should be a unique opportunity to give birth to a better language, not a cumbersome post-mortem activity. Moreover, language implementations and analysis tools should be automatically generated from the formal semantics in a correct-by-construction manner, at no additional cost. In this paper, we discuss how we are pursuing this vision of programming language design and analysis within the context of the \(\mathbb {K}\) framework (http://kframework.org), where it is easy and fun to design and deploy new programming languages; where language designers can focus on the desired features and not worry about their implementation; and where the correctness of all auto-generated language implementations and tools is guaranteed on a case-by-case basis, and every individual task, be it parsing, execution, verification, or anything else, is endorsed by its own proof object that can be independently checked by third-party proof checkers, making no compromise to safety or correctness.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
The code is extracted from the complete \(\mathbb {K}\) definition of an academic language named IMP\(^{++}\); see https://github.com/kframework/k/blob/master/k-distribution/tutorial/1_k/4_imp++/lesson_8/imp.md.
References
Berry, G., Boudol, G.: The chemical abstract machine. Theor. Comput. Sci. 96(1), 217–248 (1992). https://doi.org/10.1016/0304-3975(92)90185-I
Bogdanas, D., Roşu, G.: K-Java: a complete semantics of Java. In: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015, pp. 445–456. ACM, New York (2015). https://doi.org/10.1145/2676726.2676982
Chen, X., Roşu, G.: Matching \(\mu \)-logic. In: Proceedings of the 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS 2019), Vancouver, BC, Canada, pp. 1–13. IEEE (2019)
Chen, X., Roşu, G.: A general approach to define binders using matching logic. Technical report, University of Illinois at Urbana-Champaign (2020). http://hdl.handle.net/2142/106608
Dasgupta, S., Park, D., Kasampalis, T., Adve, V.S., Roşu, G.: A complete formal semantics of x86-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
Floyd, R.W.: Assigning meaning to programs. In: Symposium on Applied Mathematics, vol. 19, pp. 19–32 (1967)
Guth, D.: A formal semantics of Python 3.3. Master’s thesis, University of Illinois at Urbana-Champaign, August 2013. http://hdl.handle.net/2142/45275
Hathhorn, C., Ellison, C., Roşu, G.: Defining the undefinedness of C. In: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2015, pp. 336–345. ACM, New York (2015). https://doi.org/10.1145/2737924.2737979
Hildenbrandt, E., et al.: KEVM: a complete semantics of the Ethereum virtual machine. In: Proceedings of the 31st IEEE Computer Security Foundations Symposium (CSF 2018). IEEE (2018). http://jellopaper.org
Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969)
Johnson, S.C.: Yacc: Yet another compiler-compiler (1975). http://dinosaur.compilertools.net/yacc/
Kahn, G.: Natural semantics. In: Brandenburg, F.J., Vidal-Naquet, G., Wirsing, M. (eds.) STACS 1987. LNCS, vol. 247, pp. 22–39. Springer, Heidelberg (1987). https://doi.org/10.1007/BFb0039592
Mosses, P.D.: Modular structural operational semantics. J. Log. Algebraic Program. 60–61, 195–228 (2004)
Park, D., Stefănescu, A., Roşu, G.: KJS: a complete formal semantics of JavaScript. In: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2015, pp. 346–356. ACM, New York (2015). https://doi.org/10.1145/2737924.2737991
Plotkin, G.: A structural approach to operational semantics. J. Log. Algebraic Program. 60–61, 17–139 (2004)
Roşu, G.: Matching logic. Log. Methods Comput. Sci. 13(4), 1–61 (2017)
Scott, D.S.: Domains for denotational semantics. In: Nielsen, M., Schmidt, E.M. (eds.) ICALP 1982. LNCS, vol. 140, pp. 577–610. Springer, Heidelberg (1982). https://doi.org/10.1007/BFb0012801
Author information
Authors and Affiliations
Corresponding authors
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Chen, X., Roşu, G. (2021). The \(\mathbb {K}\) Vision for the Future of Programming Language Design and Analysis. In: Bartocci, E., Falcone, Y., Leucker, M. (eds) Formal Methods in Outer Space. Lecture Notes in Computer Science(), vol 13065. Springer, Cham. https://doi.org/10.1007/978-3-030-87348-6_1
Download citation
DOI: https://doi.org/10.1007/978-3-030-87348-6_1
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-87347-9
Online ISBN: 978-3-030-87348-6
eBook Packages: Computer ScienceComputer Science (R0)