From Separate Compilation to Sound Language Composition
Federico Bruzzone, Walter Cazzola, Luca Favalli

TL;DR
This paper introduces nlgcheck, a static analysis tool for the Neverlang language workbench, which detects potential runtime attribute errors at compile time, enabling separate compilation without sacrificing correctness or modularity.
Contribution
It presents a theoretically sound static analysis method that ensures attribute correctness in language extensions, improving reliability in modular language development.
Findings
nlgcheck effectively detects undefined attribute errors at compile time.
The approach maintains separate compilation and modularity.
Performance impact is minimal, supporting practical adoption.
Abstract
The development of programming languages involves complex theoretical and practical challenges, particularly when addressing modularity and reusability through language extensions. While language workbenches aim to enable modular development under the constraints of the language extension problem, one critical constraint -- separate compilation -- is often relaxed due to its complexity. However, this relaxation undermines artifact reusability and integration with common dependency systems. A key difficulty under separate compilation arises from managing attribute grammars, as extensions may introduce new attributes that invalidate previously generated abstract syntax tree structures. Existing approaches, such as the use of dynamic maps in the Neverlang workbench, favor flexibility at the cost of compile-time correctness, leading to potential runtime errors due to undefined attributes.…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Logic, programming, and type systems · Model-Driven Software Engineering Techniques
