Abstract
\(\textsc {lang}\text {-}\textsc {n}\text {-}\textsc {change}\) is a tool for transforming language definitions into other language definitions. It provides a declarative domain-specific language for expressing algorithms over languages. lang-n-change is implemented in OCaml and generates language definitions that can be compiled and executed in \(\lambda \)Prolog. The tool provides a repository with a number of language definitions and a handful of transformations.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
This is similar to the directive (+ bind x in e +) in the Ott tool [17]. We prefer our style for binding. We also prefer our constructs MAP and MAP_UNION, therefore we have not adopted Ott.
- 2.
\(\textsc {lang}\text {-}\textsc {n}\text {-}\textsc {change}\) makes use of brackets \(\mathtt {\{}\) and \(\mathtt {\}}\) rather than indentation, though we use the latter style in the code here for readability.
- 3.
This is similar to printing out a premise with printf. In we do not perform the concatenation \(\mathtt {\varGamma 1,\varGamma 2}\). Instead, we are placing that equation in the typing rule we are creating, and that notation specifies that the typing rule will do the concatenation when applied.
References
Amadio, R.M., Cardelli, L.: Subtyping recursive types. ACM Trans. Program. Lang. Syst. 15(4), 575–631 (1993). https://doi.org/10.1145/155183.155231
Bousse, E., Degueule, T., Vojtisek, D., Mayerhofer, T., Deantoni, J., Combemale, B.: Execution framework of the gemoc studio (tool demo). In: Proceedings of the 2016 ACM SIGPLAN International Conference on Software Language Engineering, SLE 2016, pp. 84–89. ACM (2016)
Cheney, J.: Toward a general theory of names: binding and scope. In: Proceedings of the 3rd ACM SIGPLAN Workshop on Mechanized Reasoning About Languages with Variable Binding, pp. 33–40. ACM, New York (2005)
Cimini, M., Siek, J.G.: The gradualizer: a methodology and algorithm for generating gradual type systems. In: Symposium on Principles of Programming Languages, POPL, January 2016
Cimini, M., Siek, J.G.: Automatically generating the dynamic semantics of gradually typed languages. In: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, pp. 789–803. ACM, New York (2017)
Ciobâcă, Ş.: From small-step semantics to big-step semantics, automatically. In: Johnsen, E.B., Petre, L. (eds.) IFM 2013. LNCS, vol. 7940, pp. 347–361. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-38613-8_24
Danvy, O.: Defunctionalized interpreters for programming languages. In: Proceedings of the 13th ACM SIGPLAN International Conference on Functional Programming, ICFP 2008, pp. 131–142. ACM, New York (2008)
Erdweg, S., Giarrusso, P.G., Rendel, T.: Language composition untangled, LDTA 2012, pp. 7:1–7:8. ACM, New York (2012)
Erdweg, S., et al.: The state of the art in language workbenches. In: Erwig, M., Paige, R.F., Van Wyk, E. (eds.) SLE 2013. LNCS, vol. 8225, pp. 197–217. Springer, Cham (2013). https://doi.org/10.1007/978-3-319-02654-1_11
Felleisen, M., Findler, R.B., Flatt, M.: Semantics Engineering with PLT Redex. MIT Press, Cambridge (2009)
Miller, D., Nadathur, G.: Programming with Higher-Order Logic, 1st edn. Cambridge University Press, New York (2012)
Mourad, B., Cimini, M.: A calculus for language transformations. Technical report (2019). arXiv:1910.11924 [cs.PL]
Mourad, B., Cimini, M.: A calculus for language transformations. In: Chatzigeorgiou, A., et al. (eds.) SOFSEM 2020. LNCS, vol. 12011, pp. 547–555. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-38919-2_44
Mourad, B., Cimini, M.: Lang-n-Change. Webpage of the tool (2019). http://cimini.info/LNC/index.html
Bach Poulsen, C., Mosses, P.D.: Deriving pretty-big-step semantics from small-step semantics. In: Shao, Z. (ed.) ESOP 2014. LNCS, vol. 8410, pp. 270–289. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54833-8_15
Rosu, G., Şerbănuţă, T.F.: An overview of the K semantic framework. J. Log. Algebraic Program. 79(6), 397–434 (2010)
Sewell, P., et al.: Ott: effective tool support for the working semanticist. In: Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming, ICFP 2007, pp. 1–12. ACM, New York (2007)
Vacchi, E., Cazzola, W.: Neverlang: a framework for feature-oriented language development. Comput. Lang. Syst. Struct. 43, 1–40 (2015)
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
Mourad, B., Cimini, M. (2020). System Description: Lang-n-Change - A Tool for Transforming Languages. In: Nakano, K., Sagonas, K. (eds) Functional and Logic Programming. FLOPS 2020. Lecture Notes in Computer Science(), vol 12073. Springer, Cham. https://doi.org/10.1007/978-3-030-59025-3_12
Download citation
DOI: https://doi.org/10.1007/978-3-030-59025-3_12
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-59024-6
Online ISBN: 978-3-030-59025-3
eBook Packages: Computer ScienceComputer Science (R0)