The document discusses domain-specific languages (DSLs) and model-driven development using the Meta Programming System (MPS). It provides examples of DSL concepts like abstract syntax trees, language modularization, projectional editing, and static semantics. It also outlines features for defining a language in MPS, including structure, editor, code generation, and integration with Java. MPS allows focusing languages on specific domains and processes models instead of text.
9. DSL
A DSL is a focussed, processable language for describing a
specific concern when building a system in a specific domain.
The abstractions and notations used are natural/suitable for the
stakeholders who specify that particular concern.
Markus Voelter
10. Cypher for Neo4j
START john=node:node_auto_index(name = 'John')
MATCH john-[:friend]->()-[:friend]->fof
RETURN john, fof
http://docs.neo4j.org/chunked/milestone/cypher-query-lang.html
33. Closures
{int => long} fact = {int n =>
if (n == 1) {
return 1L;
} else {
return n * invoke(n - 1);
}
};
34. Date/Time
datetime start = now in (Europe/Berlin);
......
period processingTime = now in (Europe/Berlin) – start;
datetime meeting = now in (GMT) + 2 days
with (hours = 11)
with (minutes = 0)
with (seconds = 0)
35. And a lot more
Tuples
Regular expressions
Builders
XML processing
Unit testing
Custom operators
And others ...
56. Code generation
Custom 2
Custom 1
Model to model transformation
Closures
Date/Time
Model to model transformation
MPS BaseLang
Text generation
Java source