This document proposes an approach called Syntax Classes for defining domain-specific languages (DSLs) in an extensible way within Java. It allows new languages to be defined as classes that implement a standard interface for abstract syntax trees. This provides a modular and conservative approach to DSL definition that fully integrates new languages into the Java platform and tooling. Syntax classes provide a standardized mechanism for defining the syntax, static processing, and execution of DSL code through grammar definitions, AST manipulation, and language import capabilities. Examples of DSL constructs that could be defined include vector operations, data mapping, and entity definitions.
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Scam 08
1. 1 Beyond Annotations:A Proposal for Extensible Java(XJ) Tony Clark, Thames Valley University Paul Sammut, HSBC James Willans, Ceteva tony.clark@tvu.ac.uk www.ceteva.com/home/tony.html
2. 2 Domain Specific Languages Aims: to provide a tailored language; to support mixed languages; language evolution. Pros: declarative; maintenance; reuse; verification Cons: specialist skills; no standard technology; lack of integration. Technologies: macros; pre-processing; roll-your-own; chained calls.
3. 3 DSLs: Technology Problems Communication: distributing new languages. Integration: IDEs; Analysis Tools. Modularity: clear definition of syntax and semantics. DSL Types: Internal and External. Syntax (concrete and abstract): standard extension mechanisms.
4. 4 DSLs: An OO Proposal Syntax Classes Modular: class-based language constructs. Conservative: extends base language. Fully Integrated: static; dynamic; IDE. Standardized: syntax extension; AST manipulation; static processing; execution.
9. 7 Syntax Classes: Technologies Grammars: basic library; synthesizes abstract syntax; various languages possible. AST interface: factories; types; eval; compile;… Quasi-quotes: working with concrete/abstract syntax: [| <o>.m(<a>,1) |] Language: import; @; grammar; [| … |].
10. 8 Review Implemented in XMF: commercial tool; open-source (www.ceteva.com) Superlanguages book: (www.ceteva.com/docs/Superlanguages.pdf) DSLs require standard technology. Open up Java to define new languages. Issues: language interaction; IDE support; analysis tool requirements.
11. 9 Statement New languages and constructs can/should implement a standard interface to facilitate program analysis.