Skip to main content

Representing Structural Language Features in Formal Meta-languages

  • Conference paper
  • First Online:
Book cover Intelligent Computer Mathematics (CICM 2020)

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).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 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. 2.

    For notational simplicity, we only consider the case of unary constructors; the generalization to n-ary constructors is clear.

  3. 3.

    For simplicity, we restrict ourselves to the case where \(D_{ind}\) elaborates into a single inductive type (ignoring mutual induction).

References

  1. 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

    Chapter  Google Scholar 

  2. 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)

    Google Scholar 

  3. Coq Development Team: The Coq Proof Assistant: Reference Manual. Technical report, INRIA (2015)

    Google Scholar 

  4. 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)

    Google Scholar 

  5. 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)

    Google Scholar 

  6. 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

    Chapter  Google Scholar 

  7. Harper, R., Honsell, F., Plotkin, G.: A framework for defining logics. J. Assoc. Comput. Mach. 40(1), 143–184 (1993)

    Article  MathSciNet  Google Scholar 

  8. 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

    Chapter  Google Scholar 

  9. Horozal, F.: A framework for defining declarative languages. Ph.D. thesis, Jacobs University Bremen (2014)

    Google Scholar 

  10. 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

    Chapter  Google Scholar 

  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)

    Article  MathSciNet  Google Scholar 

  12. 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

    Chapter  Google Scholar 

  13. 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

    Book  Google Scholar 

  14. 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

    Chapter  Google Scholar 

  15. Kohlhase, M., Rabe, F.: Experiences from exporting major proof assistant libraries (2020, submitted). https://kwarc.info/people/frabe/Research/KR_oafexp_20.pdf

  16. 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

    Chapter  Google Scholar 

  17. 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

    Chapter  Google Scholar 

  18. 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

  19. Paulson, L.: Isabelle: A Generic Theorem Prover. Lecture Notes in Computer Science, vol. 828. Springer, Heidelberg (1994). https://doi.org/10.1007/BFb0030541

    Book  MATH  Google Scholar 

  20. Rabe, F.: How to identify, translate, and combine logics? J. Log. Comput. 27(6), 1753–1798 (2017)

    Article  MathSciNet  Google Scholar 

  21. Rabe, F., Kohlhase, M.: A scalable module system. Inf. Comput. (230), 1–54 (2013). http://kwarc.info/frabe/Research/mmt.pdf

  22. Rabe, F., Müller, D.: Structuring theories with implicit morphisms (2018). http://wadt18.cs.rhul.ac.uk/submissions/WADT18A43.pdf

  23. Rothgang, C.: Theories as inductive types, 05 2020. B.Sc. Thesis, expected May 2020

    Google Scholar 

  24. Rabe, F., Sojakova, K.: Logical relations for a logical framework. ACM Trans. Comput. Log. (2013). http://kwarc.info/frabe/Research/RS_logrels_12.pdf

  25. 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

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Dennis Müller .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics