Abstract form
code generation and, 154–156
defined, 185
template language targeting, 157–158
Abstract machines
modeling with operational semantics, 139–140
runtime environment of, 141
semantics and, 138–139
states in, 142–143
transitions in, 143–144
Abstract syntax, 75–91
abstract form of a mogram, 78
as focus of language design, 7
as gateway to semantics, 76–77
hidden, underlying, unifying nature of, 75–76
mogram/language relationship and, 77
summary, 90–91
syntactic vs. semantic correctness, 79
syntactically incorrect mograms, 80
Abstract syntax graphs. See ASGs (abstract syntax graphs)
Abstract syntax models. See ASM (abstract syntax model)
Abstract syntax trees
abstract form of a mogram and, 41
building, 49
compilers and, 96
defined, 185
textual languages and, 98
Abstraction, 27–29
abstract vs. incomplete, 29
defined, 29
expressiveness and, 29
hardware level and, 28–29
raising the level of, 29–31
ranges of, 32–33
semantic analysis, 98
Abstraction levels
code generation and, 150
defined, 185
hardware level, 28–29
raising, 29–31
ranges of, 32–33
Accidental complexity, software construction and, 113–114
Active languages, combining multiple languages and, 174–175
Acyclic constraint, 64
Alan (a language)
abstract syntax model, 86–90
concrete syntax model, 106–110, 118–120
GCSM example, 106–110
generic types in, 85
Observer pattern in, 84–85
overview of, 83
standard library, 86
TCSM example, 118–120
Analyzers, in tool set of language user, 17–18
APIs (application programming interfaces), 37
Application-centered processes, vs. language-centered processes, 15
Application developers. See Language users
binding and, 98–99
defined, 185
forming, 98
static checking and, 99–100
transforming a parse tree into, 115
abstract-to-concrete transformation, 117–121
creating, 80–81
domain modeling for vertical DSLs, 81–82
Grasland generator and, 115
language specification parts, 41
pattern finding for horizontal DSLs, 82–83
summary, 90–91
ASM (abstract syntax model), Alan example
expressions, 87–89
Observer pattern in, 89–90
overview of, 86
standard library, 90
types, 86–87
asm2tcsm transformations, 117–121
Alan example, 118–120
designer input to, 120–121
reference handling and, 117–118
Attributed grammars, language specification, 49–51
Attributes
Alan and, 86
context-free grammars and, 49
Backus-Naur Form. See BNF (Backus-Naur Form)
Bidirectionality constraint, 62–63
Bidirectionality, in code generation, 163–164
Binding
complex, 127–128
overview of, 126
semantic analysis and, 98–99
simple, 127
background on, 116
context-free grammars and, 47
creating BNF rule set in textual language creation, 114
study of grammars and, 10
Business expectations, gap with IT development, 31–32
C# partial classes, techniques for extending or overriding generated code, 162
CASE (computer-aided software engineering), 101
Change management, combining multiple languages and, 180–181
COBOL (COmmon Business-Oriented language), 30
Code-completion editors, 100
Code generation, 149–170
abstraction levels and, 150
bidirectionality in, 163–164
building code generator, 151
combining multiple languages and, 181–182
concrete or abstract form of target, 154–156
CreateOrFind pattern, 159–160
extension points in generated code, 161–163
flexibility of off the shelf software vs. custom, 167, 169
hard-coded or model-transformation rules, 151–153
language design and, 149–150
mappers, 160–161
modularization of, 167–168
multiple semantics, 150–151
patterns, 158
source-driven or target-driven translation, 153–154
summary, 169–170
target platforms and, 164–167
template language targeting abstract form, 157–158
treewalker or visitor pattern, 158–159
Code generators
accidental complexity and, 114
compilers compared with, 161–162
concrete or abstract form of target, 154–156
hard-coded or model-transformation rules, 151–153
multiple semantics and, 150–151
overview of, 151
source-driven or target-driven translation, 153–154
template language targeting abstract form, 157–158
Commercial off the shelf (COTS) software, 167, 169
COmmon Business-Oriented language (COBOL), 30
Compilers
background of compiler technology, 96–97
code generators compared with, 161–162
multiple semantics and, 150–151
recognition process and, 94
scanning and parsing, 97
Complex binding, 127–128
Complexity crisis, software languages and, 7–8
Computer-aided software engineering (CASE), 101
Computer experts, vs. domain experts, 33–34
Concepts, in abstract syntax models, 76–77
Conceptual models. See ASM (abstract syntax model)
Concrete form
of a mogram, 78–79
Concrete syntax, 93–111
Alan and, 83
editors, 100
of graphical languages, 107–109. See GCSMs (graphical concrete syntax models)
optical recognition, 94–96
overview of, 93
recognition process and, 94
scanning and parsing, 97
semantic analysis, 98–100
summary, 110–111
textual-graphical mismatches (blind spots), 101–103
of textual languages. See TCSMs (textual concrete syntax models)
tool support, 93–94
Concrete syntax model. See CSMs (concrete syntax model)
Concrete targets, code generator and, 154–156
Constraints, 62–66
overview of, 62
types of, 62–66
UML class diagrams, 58
Context-free grammars, 47–49
COTS (commercial off the shelf) software, 167, 169
CreateOrFind pattern, code generation, 159–160
abstract-to-concrete transformation, 117–121
Alan example, 106–110
creating, 105–106
language specification parts, 41
overview of, 104–105
summary, 110–111
transforming to ASM, 109–110
Cycles, graphs and trees and, 50
Denotational semantics
defined, 135
overview of, 134–135
Denotations, 135
Derivation graphs, 51
Derivation trees
defined, 186
underlying structure of context-free grammar, 47
Derivations, in formal language theory, 25
Derived elements, OCL, 121
Design engineers. See Language engineers
disobserve operation, Alan, 83
Display format, 186
Domain-driven design, 81
Domain experts, vs. computer experts, 33–34
Domain modeling, for vertical DSLs, 81–82
Domain-specific modeling languages (DSMLs), 2
DSLs (domain-specific languages)
distinguishing from other software languages, 37–38
domain experts vs. computer experts, 33–34
domain modeling for vertical DSLs, 81–82
frameworks and APIs compared with, 37
vs. general languages, 33
horizontal vs. vertical, 35–37
increasing dominance of, 1
large user group vs. small user group, 34–35
overview of, 33
pattern finding for horizontal DSLs, 82–83
summary, 38
DSMLs (domain-specific modeling languages), 2
Editors
concrete syntax, 100
graphical, 102–103
in tool set of language user, 17–18
Empty subclasses, techniques for extending or overriding generated code, 162–163
End states, transitions and, 144
Essential complexity, in software construction, 113–114
Executers, in tool set of language user, 17–18
Expressions
Alan ASM, 87–89
confusion regarding terminology and, 24
Expressiveness, abstraction and, 29
Extension points, in generated code, 161–163
Flexibility, off the shelf vs. custom software, 167, 169
Forests, 50
Formal language theory, 25
Formalisms
attributed grammars, 49–51
context-free grammars, 47–49
defined, 186
graph grammars, 51–52
language workbench and, 19–20
languages developed by meta-language engineers, 16
metamodeling, 53–54
overview of, 47
UML profiling, 52–53
Forms, creating mograms with, 102
Formula Translating System (Fortran), 34
Fortran (Formula Translating System), 34
Frame graphs, 143
Frameworks
DSLs compared with, 37
tackling complexity with, 8
target platforms with/without, 164–167
techniques for extending or overriding generated code, 162
Free-format editors (symbol-directed), 100
GCSMs (graphical concrete syntax models), 107–109
Generic types, in Alan, 85
attributed, 49–51
background on, 48
context-free, 47–49
defined, 186
formal language theory and, 25
graph, 51–52
metamodels compared with, 53–54, 125–126
traditional language theory and, 10
visual-languages and, 11–12
Graph grammars, 51–52
Graph transformations, 144
Graphical concrete syntax model (GCSM), 107–109
Graphical editors, 102–103
defined, 186
graph theory and, 10
non-graph-grammar based, 11–12
overview of, 11
textual-graphical mismatches (blind spots), 101–103
vs. textual languages, 5–6
Graphs
background on, 50
labeled, 58–59
mapping UML class and object diagrams to, 67–68
metamodeling and, 58–61
operational semantics using, 138–139
type graphs, 60
Grasland generator, 113–116
accidental complexity and, 113–114
binding and, 126–128
generating IDE from a language specification, 115–116
implementation of asm2tcsm transformation, 120–121
implementation of tcsm2bnf transformation, 122–126
keywords and, 125
look-aheads and, 126
need for SSA generator, 114
static checking and, 128–129
Guarded blocks, techniques for extending or overriding generated code, 163
Hard-coded rules, code generators, 151–153
Hard references, combining multiple languages and, 173–174
Hardware level, abstraction and, 28–29
Hidden descriptor, abstract syntax, 75–76
Hiding elements, 175–176
Hybrid syntax transformations, 73
IDEs (Integrated Development Environments)
change handling, 180–181
elements of, 17
generating from a language specification, 115–116
language workbench compared with, 19–20
multilanguages and, 179
structure editors and, 101
In-place transformations, 72
Incompleteness, abstraction compared with, 29
Instances, of models, 58, 61–62
Invariant constraint, 62
JavaCC parser, 115
JET templates, 73
Keywords
Grasland generator and, 125
vs. primitive elements, 26
Labeled graphs, 58–59
LALR parsing, 97
Language-centered processes, vs. application-centered processes, 15
Language design, code generation and, 149–150
Language-design environment, 186. See also language specification
defined, 186
role of, 15–16
tasks of, 19
tool generators, 20–21
tool set of, 19–20
Language interfaces
combining multiple languages and, 176–177
language specification parts, 42
offered or required language interfaces, 177–179
Language specification, 39–46
attributed grammars, 49–51
context-free grammars, 47–49
example of, 43–46
formalisms, 47
generating IDE from, 115–116
graph grammars, 51–52
metamodeling, 53–54
overview of, 39–40
parts of, 41–42
process of creating, 42–43
rules for structuring mograms, 40–41
steps in, 43
summary, 54–55
UML profiling, 52–53
defined, 186
role of, 15–16
tasks of, 16–17
tool set of, 17–19
defined, 187
language engineering and, 19
Languages
abstract vs. incomplete, 29
abstraction levels and expressiveness, 27–29
active, 174–175
business expectations and, 31–32
DSLs (domain-specific languages) compared with general languages, 33
vs. formalisms, 16
mograms or linguistic utterances and, 24–26
passive, 174–175
primitives (predefined elements) and libraries, 26–27
raising the level of abstraction, 29–31
ranges of abstraction and, 32–33
summary, 38
Libraries
primitive and standard, 26–27
Linear structures, textual languages and, 5–6
Linguistic utterances
deciding when it belongs to a language, 79
defined, 187
in definition of a language, 23
language interfaces and, 176
mogram as term for, 25–26
semantics and, 133
LL parsing, 97
Look-aheads, 126
LR parsing, 97
Mappers, code generation and, 160–161
Mapping
UML class and object diagrams to graphs, 67–68
Mathematical expression language, 43–46
MDD (model-driven development), 69
code generators for dealing with accidental complexity, 114
domain-driven design compared with, 81
DSMLs (domain-specific modeling languages) and, 2
platforms and, 69–70
tacking complexity and, 8
transformations and, 70–73
Meaning triangle
applying to software, 134
overview of, 131–132
translational semantics and, 137
Meanings, 135. See also Semantics
Meta-language engineer, 16
Metaclass
binding and, 126–127
Metamodels, 57–74
constraint types, 62–66
defined, 187
formalisms for language specification, 53–54
foundations of, 57–58
grammars compared with, 125–126
graphs and, 58–61
metamodel-to-metamodel transformation, 121–126
models and instances, 61–62
models conforming to, 77
platforms and, 69–70
summary, 73–74
transformations, 70–73
UML diagrams as notation, 66–68
Microsoft Visio, 102–103
Model-driven development. See MDD (model-driven development)
Model transformations. See Transformations
Modeling languages, programming languages compared with, 3
Models
conforming to its metamodel, 77
instances of, 61–62
metamodel as a model to specify a language, 68
metamodel-to-metamodel transformation, 121–126
platform independence and, 70
vs. programs, 24–25
semantics and, 139–140
type graphs and, 58
Modularization, of code generation, 167–168
Mograms
abstract form, 78
advantages of multiple, 172
Alan CSM example, 106–107
as alternative term for linguistic utterance, 25–26
code generation and, 149
combining multiple, 171
concept of, 4
concrete form, 78–79
defined, 187
forms for creation of, 102
intermogram references, 173
model transformation and, 70
mogram/language relationship, 77
multiple mograms in one or more languages, 172–173
passive and active languages and, 174–175
role of concrete syntax and, 93
rules for structuring, 40–41
runtime system and semantic mapping, 134–135
syntactically incorrect, 80
Multiple languages, combining, 171–183
change management, 180–181
code generation, 181–182
hard and soft references, 173–174
information hiding, 175–176
intermogram references, 173
language interfaces, 176–177
multiple mograms for one application, 171–173
offered or required language interfaces, 177–179
passive and active languages, 174–175
resolving/checking references, 179–180
summary, 183
support for language evolution, 182
tool support and, 179
Multiple mograms
advantages of, 172
intermogram references, 173
for one or more languages, 172–173
passive and active languages and, 174–175
Multiple semantics, code generation, 150–151
Multiplicities, constraints and, 62–63
Namespaces, binding and, 126–127
Natural languages
abstract syntax and, 75
defined, 187
development of software languages and, 9–10
syntactically, but not semantically correct, 79
NLP (neurolinguistic programming), 133
Nodes (vertices), graphs composed of, 58
Nonlinear structures, graphical languages and, 5–6
Notation, guidelines for, 106
Notifications, techniques for extending or overriding generated code, 162
Object Management Group (OMG), 69–70
Object-oriented modeling, 81
observe operation, Alan, 83
Observer pattern, Alan, 84–85, 89–90
OCL
Alan and, 83
derived elements, 121
Octopus tool and, 157
required language interface, 178–179
simple binding and, 127
well-formedness rules, 128–129
OCR (optical character recognition), 94
Octel, code generator, 157–158
Octopus, 157
Offered language interfaces
combining multiple languages and, 177–179
parts of language specification, 42
OMG (Object Management Group), 69–70
openArchitectureWare, 179
Operational semantics
defined, 135
graphs for, 138–139
modeling, 139–140
overview of, 137–138
semantic data model, 142
semantic process model, 143
transitions, 143–144
Von Neumann architecture, 141–142
Operations, Alan, 86
Optical character recognition (OCR), 94
Optical recognition, concrete syntax, 94–96
Ordering constraint, 63
Parse graph, 97–98
Parser generators, 114
Parsing
comparing grammars and metamodels and, 125–126
recognition processes and, 97
tokens and, 5
transforming a parse tree into a ASG, 115
Passive languages, combining multiple languages and, 174–175
Patterns
finding for horizontal DSLs, 82–83
tacking complexity with, 8
Patterns, code generation
CreateOrFind pattern, 159–160
Mappers, 160–161
overview of, 158
Treewalker or Visitor pattern, 158–159
Platforms, metamodels and, 69–70
Plug-ins, techniques for extending or overriding generated code, 162
Posyms, 95
Pragmatic semantics
defined, 135
overview of, 135–136
Primitive libraries, 27
Primitives (predefined elements), 26–27
Process support tools, 22
Production rules. See also Grammars
formal language theory, 25
grammars as sets of, 48
Programming languages, modeling languages compared with, 3
Programs
defined, 187
vs. models, 24–25
QVT (Query/View/Transformation), 73, 151
Recognition processes, concrete syntax
optical, 94–96
overview of, 94
scanning and parsing, 97
semantic analysis, 98–100
Redefinition constraint, 65
References
asm2tcsm transformations and, 117–118
binding and, 126–127
checking, 180
hard vs. soft, 173–174
information hiding and, 175–176
intermogram, 173
pragmatic semantics and, 135–136
resolving, 179–180
Required language interfaces
combining multiple languages and, 177–179
parts of language specification, 42
Roles, in language engineering, 15–22
different processes requiring different actors, 15–16
language engineer, 19–21
language user, 16–19
overview of, 15
summary, 21–22
Round-trip engineering, 163
Rules
BNF rule set in textual language creation, 114
hard-coded or model-transformation rules, 151–153
production rules. See Production rules
for structuring mograms, 40–41
well-formedness, 128–129
Runtime system
executing mograms and, 134–135
operational semantics and, 140–141
Scanning process, concrete syntax, 97
Semantic analysis, 98–100. See also SSA (static semantic analyzer)
Semantic data model, 142
Semantic domain model
applying, 42
defined, 187
of object-oriented language, 145
overview of, 140
semantic data model as component of, 142
Semantic mapping
executing mograms and, 134–135
translational semantics and, 137
Semantic process model, 143
Semantics, 131–148
abstract syntax as gateway to, 76–77
code generation. See Code generation
denotational, 134–135
modeling and, 139–140
multiple semantics in code generation, 150–151
nature of a semantics description, 133–134
operational, 137–139
personal (subjective) nature of, 131–133
pragmatic, 135–136
semantic data model, 142
semantic process model, 143
simple example, 144–148
software languages and, 134–135
summary, 148
symbol attributes and, 11
syntactic vs. semantic correctness, 79
transitions, 143–144
translational, 136–137
Von Neumann architecture and, 141–142
Semantics description
defined, 187
nature of, 133–134
Sentences, confusion regarding terminology and, 24
Serialisation syntax, 188
Service Oriented Architecture (SOA), 2
Set of positioned symbols, 95
Snapshots, operational semantics as series of, 138
SOA (Service Oriented Architecture), 2
Soft references, combining multiple languages and, 173–174
Software applications, complexity crisis and, 7–8
Software languages
changes in, 4
complexity crisis and, 7–8
graph theory, 10
graphical vs. textual languages, 5–6
increasing number of, 1–2
multiple languages. See Multiple languages, combining
multiple syntaxes, 6–7
natural-language studies and, 9–10
semantics and, 134–135
summary, 12–13
support for language evolution, 182
traditional language theory, 10
visual-languages community, 11–12
Source-driven transformation, code generator and, 153–154
Spatial relationship graphs, 12, 97
SSA (static semantic analyzer), 126–129
analysis with, 98
binding and, 126–128
checking and, 128–129
creating generator for, 114
Standard libraries
Alan, 86
Alan ASM, 90
defined, 27
Start states, transitions and, 144
State transition system, 135, 138
Statements, confusion regarding terminology and, 24
States, in abstract machines, 142–143
Grasland generator and, 128–129
semantic analysis, 99–100
Static semantic analyzer. See SSA (static semantic analyzer)
Stream-based transformation, 72
Structure editors (syntax-directed), 100–101
Structure transformations, 72–73
Subset constraint, 66
Symbol-directed editors, 100
compilers and, 96
defined, 188
derivation trees and, 47
Symbolic identifiers, labeled graphs, 59
Symbols
building blocks of graphical expressions, 5
graphical, 11
set of positioned, 95
Syntax
multiple syntaxes, 6–7
syntactic vs. semantic correctness, 79
syntactically incorrect mograms, 80
Syntax-directed editors, 100
Syntax mapping
defined, 188
parts of language specification, 42
Target-driven transformation, code generator and, 154
Target languages, in translations
code generation and, 164–167
concrete or abstract form of target, 154–156
source-driven or target-driven translation, 153–154
template language targeting abstract form, 157–158
Target metaclass, 126
Target platforms, code generation, 164–167
TCSMs (textual concrete syntax models), 113–129
abstract-to-concrete transformation, 117–121
Alan example, 118–120
Grasland generator, 113–116
metamodel-to-metamodel transformation, 121–126
static semantic analyzer, 126–129
summary, 126–129
tcsm2bnf transformation
designer input to, 122–126
generating BNFset, 121–122
Template languages
hard-coded or model-transformation rules, 151–153
targeting abstract form, 157–158
Text editors, 100
Textual concrete syntax model. See TCSM (textual concrete syntax model)
Textual-graphical mismatches (blind spots), 101–103
Textual languages
context-free grammars and, 49
vs. graphical languages, 5–6
textual-graphical mismatches (blind spots), 101–103
traditional language theory, 10
TogetherJ, 6
Tokens, parser design, 5
Tool generators, language engineers and, 20–21
Tool support, multiple languages and, 179
Traditional language theory, 10
Transformations, 70–73
asm2tcsm and tcsm2bnf, 115
building code generator and, 151–153
CMS to ASM, 109–110
code generation. See Code generation
formal notion of a model and, 70–71
graph transformations, 144
metamodel-to-metamodel, 121–126
taxonomy of, 71–72
Transformers
tool generators and, 20–21
in tool set of language user, 17–18
Transitions, semantics, 143–144
Translational semantics
code generation as form of. See Code generation
defined, 135
overview of, 136–137
Traversal algorithms, 159
Trees, as directed graphs, 50
Treewalker pattern, code generation, 158–159
Treewalkers, creating textual languages and, 114–115
Type graphs
defined, 60
Types
Alan, 85
Alan ASM, 86–87
TypeVar class, Alan ASM, 86
UML (Unified Modeling Language)
Alan and, 83
concrete representation of UML association class, 104
example of language interface, 177
examples of multiple syntax languages, 6
generating Java application from, 160
mapping class diagrams to graphs, 67
mapping object diagrams to graphs, 67–68
metamodeling and, 53
OCL requiring language interface for, 178–179
Octopus tool and, 157
profiling, 52–53
Underlying descriptor, abstract syntax, 76
Unified Modeling Language. See UML (Unified Modeling Language)
Unifying descriptor, abstract syntax, 76
Union constraint, 66
Uniqueness constraint, 63–64
Unshared constraint, 65
User groups, DSLs, 34–35
Values, semantic data model, 142
Vector graphics editors, 100
Velocity templates, 73
Vertices (nodes), graph, 58
View transformations, 72
Visio, 102–103
Visitor pattern, code generation, 158–159
Visual languages. See Graphical languages
Von Neumann architecture, 141–142
Web applications, complexity crisis and, 7
Well-formedness rules, 128–129. See also Static checking
xText, 179
18.117.100.118