Abstract
Structural language features are those that introduce new kinds of declarations as opposed to those that only add expressions. They pose a significant challenge when representing languages in meta-languages such as standard formats like OMDoc or logical frameworks like LF. It is desirable to use shallow representations where a structural language feature is represented by the analogous feature of the meta-language, but the richness of structural language features in practical languages makes this difficult. Therefore, the current state of the art is to encode unrepresentable structural language features in terms of more elementary ones, but that makes the representations difficult to reuse and verify. This challenge is exacerbated by the fact that many languages allow users to add new structural language features that are elaborated into a small trusted kernel, which allows for a large and growing set of features.
In this paper we extend the Mmt representation framework with a generic concept of structural features. This allows defining exactly the language features needed for elegant shallow embeddings of object languages. The key achievement here is to make this concept expressive enough to cover complex practical features while retaining the simplicity of existing meta-languages. We exemplify our framework with representations of various important structural features including datatype definitions and theory instantiations.
The authors were supported by DFG grant RA-1872/3-1, KO 2428/13-1 OAF and EU grant Horizon 2020 ERI 676541 OpenDreamKit.
D. Müller—The author was supported by a postdoc fellowship of the German Academic Exchange Service (DAAD).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
These listings show our actual formalizations in concrete syntax and use a few semantically inessential features that go beyond the syntax introduced in Fig. 1. Most notably, # introduces a notation and separates declaration components.
- 2.
For notational simplicity, we only consider the case of unary constructors; the generalization to n-ary constructors is clear.
- 3.
For simplicity, we restrict ourselves to the case where \(D_{ind}\) elaborates into a single inductive type (ignoring mutual induction).
References
Blanchette, J.C., Hölzl, J., Lochbihler, A., Panny, L., Popescu, A., Traytel, D.: Truly modular (co)datatypes for Isabelle/HOL. In: Klein, G., Gamboa, R. (eds.) ITP 2014. LNCS, vol. 8558, pp. 93–110. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08970-6_7
Christiansen, D., Brady, E.: Elaborator reflection: extending idris in idris. In: Garrigue, J., Keller, G., Sumii, E. (eds.) International Conference on Functional Programming, pp. 284–297. ACM (2016)
Coq Development Team: The Coq Proof Assistant: Reference Manual. Technical report, INRIA (2015)
Ebner, G., Ullrich, S., Roesch, J., Avigad, J., de Moura, L.: A metaprogramming framework for formal verification. In: Proceedings of the ACM on Programming Languages, vol. 1, no. ICFP, pp. 34:1–34:29 (2017)
Gordon,M.: HOL: a proof generating system for higher-order logic. In: Birtwistle, G., Subrahmanyam, P. (eds.) VLSI Specification, Verification and Synthesis, pp. 73–128. Kluwer-Academic Publishers (1988)
Harrison, J.: HOL light: a tutorial introduction. In: Srivas, M., Camilleri, A. (eds.) FMCAD 1996. LNCS, vol. 1166, pp. 265–269. Springer, Heidelberg (1996). https://doi.org/10.1007/BFb0031814
Harper, R., Honsell, F., Plotkin, G.: A framework for defining logics. J. Assoc. Comput. Mach. 40(1), 143–184 (1993)
Horozal, F., Kohlhase, M., Rabe, F.: Extending MKM formats at the statement level. In: Jeuring, J., et al. (eds.) CICM 2012. LNCS (LNAI), vol. 7362, pp. 65–80. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-31374-5_5
Horozal, F.: A framework for defining declarative languages. Ph.D. thesis, Jacobs University Bremen (2014)
Horozal, F., Rabe, F.: Formal logic definitions for interchange languages. In: Kerber, M., Carette, J., Kaliszyk, C., Rabe, F., Sorge, V. (eds.) CICM 2015. LNCS (LNAI), vol. 9150, pp. 171–186. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-20615-8_11
Iancu, M., Kohlhase, M., Rabe, F., Urban, J.: The Mizar mathematical library in OMDoc: translation and applications. J. Autom. Reason. 50(2), 191–202 (2013)
Kohlhase, M., Müller, D., Owre, S., Rabe, F.: Making PVS accessible to generic services by interpretation in a universal format. In: Ayala-Rincón, M., Muñoz, C.A. (eds.) ITP 2017. LNCS, vol. 10499, pp. 319–335. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-66107-0_21
Kohlhase, M.: OMDoc: An Open Markup Format for Mathematical Documents (Version.12). Lecture Notes in Artificial Intelligence, vol. 4180. Springer, Heidelberg (2006). https://doi.org/10.1007/11826095
Kaliszyk, C., Rabe, F.: Towards knowledge management for HOL light. In: Watt, S.M., Davenport, J.H., Sexton, A.P., Sojka, P., Urban, J. (eds.) CICM 2014. LNCS (LNAI), vol. 8543, pp. 357–372. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08434-3_26
Kohlhase, M., Rabe, F.: Experiences from exporting major proof assistant libraries (2020, submitted). https://kwarc.info/people/frabe/Research/KR_oafexp_20.pdf
Müller, D., Rabe, F., Kohlhase, M.: Theories as types. In: Galmiche, D., Schulz, S., Sebastiani, R. (eds.) IJCAR 2018. LNCS (LNAI), vol. 10900, pp. 575–590. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-94205-6_38
Müller, D., Rabe, F., Sacerdoti Coen, C.: The Coq library as a theory graph. In: Kaliszyk, C., Brady, E., Kohlhase, A., Sacerdoti Coen, C. (eds.) CICM 2019. LNCS (LNAI), vol. 11617, pp. 171–186. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-23250-4_12
Müller, D.: Mathematical knowledge management across formal libraries. Ph.D. thesis, Informatics, FAU Erlangen-Nürnberg, October 2019. https://kwarc.info/people/dmueller/pubs/thesis.pdf
Paulson, L.: Isabelle: A Generic Theorem Prover. Lecture Notes in Computer Science, vol. 828. Springer, Heidelberg (1994). https://doi.org/10.1007/BFb0030541
Rabe, F.: How to identify, translate, and combine logics? J. Log. Comput. 27(6), 1753–1798 (2017)
Rabe, F., Kohlhase, M.: A scalable module system. Inf. Comput. (230), 1–54 (2013). http://kwarc.info/frabe/Research/mmt.pdf
Rabe, F., Müller, D.: Structuring theories with implicit morphisms (2018). http://wadt18.cs.rhul.ac.uk/submissions/WADT18A43.pdf
Rothgang, C.: Theories as inductive types, 05 2020. B.Sc. Thesis, expected May 2020
Rabe, F., Sojakova, K.: Logical relations for a logical framework. ACM Trans. Comput. Log. (2013). http://kwarc.info/frabe/Research/RS_logrels_12.pdf
Rabe, F., Sharoda, Y.: Diagram combinators in MMT. In: Kaliszyk, C., Brady, E., Kohlhase, A., Sacerdoti Coen, C. (eds.) CICM 2019. LNCS (LNAI), vol. 11617, pp. 211–226. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-23250-4_15
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Müller, D., Rabe, F., Rothgang, C., Kohlhase, M. (2020). Representing Structural Language Features in Formal Meta-languages. In: Benzmüller, C., Miller, B. (eds) Intelligent Computer Mathematics. CICM 2020. Lecture Notes in Computer Science(), vol 12236. Springer, Cham. https://doi.org/10.1007/978-3-030-53518-6_13
Download citation
DOI: https://doi.org/10.1007/978-3-030-53518-6_13
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-53517-9
Online ISBN: 978-3-030-53518-6
eBook Packages: Computer ScienceComputer Science (R0)