Abstract
In the context provided by the proceedings of the UVMP track of ISoLA 2016, we propose Type Theory as a suitable framework for both modelling and programming. We show that it fits most of the requirements put forward on such frameworks by Broy et al. and discuss some of the objections that can be raised against it.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
We have used the British spelling throughout the document, except in literal quotes.
- 2.
Here, formal is in the OED’s sense 5.a: “Done or made with the forms recognized as ensuring validity; explicit and definite, as opposed to what is matter of tacit understanding”.
References
Altenkirch, T.: Naive type theory (2017). http://www.cs.nott.ac.uk/~psztxa/mgs-17/notes-mgs17.pdf. Lecture Notes for a course at MGS 2017
Bar, K., Kissinger, A., Vicary, J.: Globular: an online proof assistant for higher-dimensional rewriting. Logical Methods Comput. Sci. 14(1) (2018). https://doi.org/10.23638/LMCS-14(1:8)2018. http://arxiv.org/abs/1612.01093
Barendregt, H.P.: Lambda calculi with types. In: Abramsky, S., Gabbay, D.M., Maibaum, S.E. (eds.) Handbook of Logic in Computer Science, vol. 2, pp. 117–309. Oxford University Press Inc., New York (1992). http://dl.acm.org/citation.cfm?id=162552.162561
Berry, G.: Formally unifying modeling and design for embedded systems - a personal view. In: Margaria and Steffen [38], pp. 134–149. https://doi.org/10.1007/978-3-319-47169-3_11
Bishop, E., Bridges, D.: Constructive Analysis. Springer, Heidelberg (1985). https://doi.org/10.1007/978-3-642-61667-9
Botta, N., Jansson, P., Ionescu, C.: Contributions to a computational theory of policy advice and avoidability. J. Funct. Program. 27, 1–52 (2017). https://doi.org/10.1017/S0956796817000156
Bourbaki, N.: Éléments de mathématique: Fasc. I. Livre 1, Théorie des ensembles; [5], Fascicule de résultats. Hermann (1964)
Bourbaki, N.: Théorie des ensembles. Springer, Heidelberg (2006). https://doi.org/10.1007/978-3-540-34035-5
Brady, E.: The IDRIS programming language – implementing embedded domain specific languages with dependent types. In: Central European Functional Programming School - 5th Summer School, CEFP 2013, Cluj-Napoca, Romania, 8 July–20 2013, Revised Selected Papers, pp. 115–186 (2013). https://doi.org/10.1007/978-3-319-15940-9_4
Brady, E.: Type-driven development of concurrent communicating systems. Comput. Sci. 18(3) (2017). https://doi.org/10.7494/csci.2017.18.3.1413. https://journals.agh.edu.pl/csci/article/view/1413
Brady, E., Hammond, K.: Resource-safe systems programming with embedded domain specific languages. In: Russo, C., Zhou, N.F. (eds.) PADL 2012. LNCS, vol. 7149, pp. 242–257. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-27694-1_18
Broy, M., Havelund, K., Kumar, R.: Towards a unified view of modeling and programming. In: Margaria and Steffen [38], pp. 238–257. https://doi.org/10.1007/978-3-319-47169-3_17
Chlipala, A.: Ur: Statically-typed metaprogramming with type-level record computation. In: Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2010, pp. 122–133. ACM, New York (2010). https://doi.org/10.1145/1806596.1806612
Coecke, B., Kissinger, A.: Picturing Quantum Processes: A First Course in Quantum Theory and Diagrammatic Reasoning. Cambridge University Press, Cambridge (2017)
Elaasar, M., Badreddin, O.: Modeling meets programming: a comparative study in model driven engineering action languages. In: Margaria and Steffen [38], pp. 50–67. https://doi.org/10.1007/978-3-319-47169-3_5
Elmqvist, H., Henningsson, T., Otter, M.: Systems modeling and programming in a unified environment based on Julia. In: Margaria and Steffen [38], pp. 198–217. https://doi.org/10.1007/978-3-319-47169-3_15
ForMath project team: Papers and slides from the “formalisation of mathematics” (ForMath) project. http://wiki.portal.chalmers.se/cse/pmwiki.php/ForMath/PapersAndSlides
Fritzson, P.: Principles of Object-oriented Modeling and Simulation with Modelica 2.1. Wiley, Hoboken (2010)
Halmos, P.: Naive Set Theory. Van Nostrand (1960). Reprinted by Springer-Verlag, Undergraduate Texts in Mathematics (1974)
Haxthausen, A.E., Peleska, J.: On the feasibility of a unified modelling and programming paradigm. In: Margaria and Steffen [38], pp. 32–49. https://doi.org/10.1007/978-3-319-47169-3_4
Igried, B., Setzer, A.: Programming with monadic CSP-style processes in dependent type theory. In: Proceedings of the 1st International Workshop on Type-Driven Development, TyDe 2016, pp. 28–38. ACM, New York (2016). https://doi.org/10.1145/2976022.2976032
Ionescu, C.: Vulnerability modelling and monadic dynamical systems. Ph.D. thesis, Freie Universität Berlin (2009)
Ionescu, C.: Vulnerability modelling with functional programming and dependent types. Math. Struct. Comput. Sci. 26(01), 114–128 (2016). https://doi.org/10.1017/S0960129514000139
Ionescu, C., Jansson, P.: Domain-specific languages of mathematics: presenting mathematical analysis using functional programming. In: Proceedings of the 4th and 5th International Workshop on Trends in Functional Programming in Education, TFPIE 2016, Sophia-Antipolis, France and University of Maryland College Park, USA, 2nd June 2015 and 7th June 2016, pp. 1–15 (2016). https://doi.org/10.4204/EPTCS.230.1
Jansson, P., Einarsdóttir, S.H., Ionescu, C.: Examples and results from a BSc-level course on domain specific languages of mathematics. In: Proceedings 7th International Workshop on Trends in Functional Programming in Education. EPTCS, Open Publishing Association (2018, in submission). Presented at TFPIE 2018
Jansson, P., Ionescu, C.: Domain specific languages of mathematics: Lecture notes (2018). https://github.com/DSLsofMath/DSLsofMath
Jeffrey, A.: Dependently typed web client applications. In: Sagonas, K. (ed.) Practical Aspects of Declarative Languages (PADL), pp. 228–243. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-45284-0_16
Kugler, H.: Unifying modelling and programming: a systems biology perspective. In: Margaria and Steffen [38], pp. 131–133. https://doi.org/10.1007/978-3-319-47169-3_10
Lamport, L.: How to write a 21st century proof. J. Fixed Point Theor. Appl., November 2011. https://doi.org/10.1007/s11784-012-0071-6. https://www.microsoft.com/en-us/research/publication/write-21st-century-proof/
Landin, P.J.: The next 700 programming languages. Commun. ACM 9(3), 157–166 (1966)
Larsen, P.G., Fitzgerald, J.S., Woodcock, J., Nilsson, R., Gamble, C., Foster, S.: Towards semantically integrated models and tools for cyber-physical systems design. In: Margaria and Steffen [38], pp. 171–186. https://doi.org/10.1007/978-3-319-47169-3_13
Larsen, P.G., et al.: VDM-10 Language Manual. Technical report TR-001, The Overture Initiative, April 2013. www.overturetool.org
Lattmann, Z., Kecskés, T., Meijer, P., Karsai, G., Völgyesi, P., Lédeczi, Á.: Abstractions for modeling complex systems. In: Margaria and Steffen [38], pp. 68–79. https://doi.org/10.1007/978-3-319-47169-3_6
Leavens, G.T., Naumann, D.A., Rajan, H., Aotani, T.: Specifying and verifying advanced control features. In: Margaria and Steffen [38], pp. 80–96. https://doi.org/10.1007/978-3-319-47169-3_7
Leroy, X.: Formal verification of a realistic compiler. Commun. ACM 52(7), 107–115 (2009). https://doi.org/10.1145/1538788.1538814
Lethbridge, T.C., Abdelzad, V., Orabi, M.H., Orabi, A.H., Adesina, O.: Merging modeling and programming using Umple. In: Margaria and Steffen [38], pp. 187–197. https://doi.org/10.1007/978-3-319-47169-3_14
Ludewig, J.: Models in software engineering - an introduction. Softw. Syst. Model 2, 5–14 (2003). https://doi.org/10.1007/s10270-003-0020-3
Margaria, T., Steffen, B. (eds.): ISoLA 2016. LNCS, vol. 9953. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-47169-3
Marlow, S.: Parallel and concurrent programming in Haskell. In: Zsók, V., Horváth, Z., Plasmeijer, R. (eds)Central European Functional Programming School: 4th Summer School. LNCS, vol. 7241, pp. 339–401. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-32096-5_7
MBE Visual Glossary project: Model-based engineering visual glossary (2017). http://modelbasedengineering.com/glossary/
Morgenstern, J., Licata, D.: Security-typed programming within dependently-typed programming. In: International Conference on Functional Programming. ACM (2010). https://doi.org/10.1145/1863543.1863569
Naujokat, S., Neubauer, J., Margaria, T., Steffen, B.: Meta-level reuse for mastering domain specialization. In: Margaria and Steffen [38], pp. 218–237. https://doi.org/10.1007/978-3-319-47169-3_16
Object Management Group (OMG): Unified modeling language. OMG Document Number formal/17-12-05 (2017). https://www.omg.org/spec/UML/2.5.1/
Oury, N., Swierstra, W.: The power of Pi. In: Proceedings of ICFP 2008, pp. 39–50. ACM (2008). https://doi.org/10.1145/1411204.1411213
Pierce, B.C.: Types and Programming Languages, 1st edn. MIT Press, Cambridge (2002)
Prinz, A., Møller-Pedersen, B., Fischer, J.: Modelling and testing of real systems. In: Margaria and Steffen [38], pp. 119–130. https://doi.org/10.1007/978-3-319-47169-3_9
Protzenko, J., et al.: Verified low-level programming embedded in F*. In: Proceedings of the ACM on Programming Languages 1(ICFP), pp. 17:1–17:29, August 2017. https://doi.org/10.1145/3110261. http://arxiv.org/abs/1703.00053
Rouquette, N.F.: Simplifying OMG MOF-based metamodeling. In: Margaria and Steffen [38], pp. 97–118. https://doi.org/10.1007/978-3-319-47169-3_8
Rybicki, F., Smyth, S., Motika, C., Schulz-Rosengarten, A., von Hanxleden, R.: Interactive model-based compilation continued - incremental hardware synthesis for SCCharts. In: Margaria and Steffen [38], pp. 150–170. https://doi.org/10.1007/978-3-319-47169-3_12
Seidewitz, E.: On a unified view of modeling and programming position paper. In: Margaria and Steffen [38], pp. 27–31. https://doi.org/10.1007/978-3-319-47169-3_3
Selic, B.: Programming \(\subset \) modeling \(\subset \) engineering. In: Margaria and Steffen [38], pp. 11–26. https://doi.org/10.1007/978-3-319-47169-3_2
Swamy, N., Chen, J., Fournet, C., Strub, P.Y., Bhargavan, K., Yang, J.: Secure distributed programming with value-dependent types. Proc. ICFP 2011, 266–278 (2011). https://doi.org/10.1145/2034773.2034811
Turner, R.: Computable Models. Springer, Heidelberg (2009). https://doi.org/10.1007/978-1-84882-052-4
Wells, C.: Communicating mathematics: useful ideas from computer science. Am. Math. Monthl., 397–408 (1995). https://doi.org/10.2307/2975030
Acknowledgements
The work presented in this paper heavily relies on free software, among others on Idris, Agda, GHC, git, vi, Emacs, and on the FreeBSD and Debian GNU/Linux operating systems. It is our pleasure to thank all developers of these excellent products. This work was partially supported by the CoeGSS project (grant agreement No. 676547), which has received funding from the European Union’s Horizon 2020 research and innovation programme.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer Nature Switzerland AG
About this paper
Cite this paper
Ionescu, C., Jansson, P., Botta, N. (2018). Type Theory as a Framework for Modelling and Programming. In: Margaria, T., Steffen, B. (eds) Leveraging Applications of Formal Methods, Verification and Validation. Modeling. ISoLA 2018. Lecture Notes in Computer Science(), vol 11244. Springer, Cham. https://doi.org/10.1007/978-3-030-03418-4_8
Download citation
DOI: https://doi.org/10.1007/978-3-030-03418-4_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-03417-7
Online ISBN: 978-3-030-03418-4
eBook Packages: Computer ScienceComputer Science (R0)