Skip to main content

System Description: Lang-n-Change - A Tool for Transforming Languages

  • Conference paper
  • First Online:
Functional and Logic Programming (FLOPS 2020)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 12073))

Included in the following conference series:

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.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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

Similar content being viewed by others

Notes

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

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

    Article  Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

    Chapter  Google Scholar 

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

    Google Scholar 

  8. Erdweg, S., Giarrusso, P.G., Rendel, T.: Language composition untangled, LDTA 2012, pp. 7:1–7:8. ACM, New York (2012)

    Google Scholar 

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

    Chapter  Google Scholar 

  10. Felleisen, M., Findler, R.B., Flatt, M.: Semantics Engineering with PLT Redex. MIT Press, Cambridge (2009)

    MATH  Google Scholar 

  11. Miller, D., Nadathur, G.: Programming with Higher-Order Logic, 1st edn. Cambridge University Press, New York (2012)

    Book  Google Scholar 

  12. Mourad, B., Cimini, M.: A calculus for language transformations. Technical report (2019). arXiv:1910.11924 [cs.PL]

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

    Chapter  Google Scholar 

  14. Mourad, B., Cimini, M.: Lang-n-Change. Webpage of the tool (2019). http://cimini.info/LNC/index.html

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

    Chapter  Google Scholar 

  16. Rosu, G., Şerbănuţă, T.F.: An overview of the K semantic framework. J. Log. Algebraic Program. 79(6), 397–434 (2010)

    Article  MathSciNet  Google Scholar 

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

    Google Scholar 

  18. Vacchi, E., Cazzola, W.: Neverlang: a framework for feature-oriented language development. Comput. Lang. Syst. Struct. 43, 1–40 (2015)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Benjamin Mourad .

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

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)

Publish with us

Policies and ethics