Patterns to Review
: Nested Function
; Method Chaining
; Expression Builders
; Symbol Table
; Notification
- The Krikri Mapping DSL does have a
Semantic Model
it is just a data structure rather than aDoman Model
. - The mapping
Semantic Model
forms the basis for our notion of using a GUI front-end. We did this naturally because we were working in an OO language & thoughtful about separation of concerns. - We should look closely at
Expression Builders
as a pattern to be introduced in Krikri. - An internal DSL might be thought of as an added parsing layer, following the main language.
- jneen advocates introducing such layers liberally for external languages, too, in How to Tell When You've Written a Language.
- I need script tests in
heidrun-mappings
.- It should be easy to do this at the parsing level; but
- harder to run it as an "integration test" since overall success will depend on the records processed which are unknown until the mapping task runs.
- Push syntactic information into the semantic model
- The KriKri Mapping DSL is categorized as a declarative language.
- It should have maintaining this status through all levels of expressions as a design goal.
- There are some good readings on definitions for a DSL in the links from the preface notes below. A rigorous definition is hard to come by.
- KriKri does not follow the
Semantic Model
pattern. Most of its expressions are captured by thePropertyDeclaration
orChildDeclaration
classes. Its engine is essentially aDeclaration
parser.
- Other reading I've been taking on related to DSLs:
- Fowler makes some comments about learning about DSL's from others.
- I'm remembering seeing this in the spring: How to Tell When You've Written a Language. I remember appreciating the candor and personal nature of the talk, and Fowler's comments reminded me of that. Though I knew I was designing a DSL when I started, I may have neglected to appreciate the last letter of the acronym."Improving"
- "Improving communications with domain experts". My goal transcends this: Domain experts already write XSLT, I want to give them a language that expresses their domain problem directly.
- Regex as a language is an interesting perspective---and nicely completes the circle with a view of regexes as automata/grammar.
- "Often, when people start experimenting with DSLs, they pick up only one technique." I feel a little like this.
- Fowler acknowledges a gap in the book around diagnostics. I'll be looking for information to fill that gap.