rgen 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. data/CHANGELOG +20 -1
  2. data/MIT-LICENSE +1 -1
  3. data/README +12 -9
  4. data/lib/instantiators/ea_instantiator.rb +36 -0
  5. data/lib/metamodels/uml13_metamodel.rb +559 -0
  6. data/lib/metamodels/uml13_metamodel_ext.rb +26 -0
  7. data/lib/mmgen/metamodel_generator.rb +5 -5
  8. data/lib/mmgen/mm_ext/ecore_ext.rb +95 -0
  9. data/lib/mmgen/mmgen.rb +6 -4
  10. data/lib/mmgen/templates/annotations.tpl +37 -0
  11. data/lib/mmgen/templates/metamodel_generator.tpl +171 -0
  12. data/lib/rgen/ecore/ecore.rb +190 -0
  13. data/lib/rgen/ecore/ecore_instantiator.rb +25 -0
  14. data/lib/rgen/ecore/ecore_transformer.rb +85 -0
  15. data/lib/rgen/environment.rb +9 -24
  16. data/lib/rgen/find_helper.rb +68 -0
  17. data/lib/rgen/{instantiator.rb → instantiator/abstract_instantiator.rb} +6 -2
  18. data/lib/rgen/instantiator/abstract_xml_instantiator.rb +59 -0
  19. data/lib/rgen/instantiator/default_xml_instantiator.rb +117 -0
  20. data/lib/rgen/instantiator/ecore_xml_instantiator.rb +144 -0
  21. data/lib/rgen/instantiator/nodebased_xml_instantiator.rb +157 -0
  22. data/lib/rgen/instantiator/xmi11_instantiator.rb +164 -0
  23. data/lib/rgen/metamodel_builder.rb +103 -9
  24. data/lib/rgen/metamodel_builder/build_helper.rb +26 -4
  25. data/lib/rgen/metamodel_builder/builder_extensions.rb +285 -88
  26. data/lib/rgen/metamodel_builder/builder_runtime.rb +7 -1
  27. data/lib/rgen/metamodel_builder/data_types.rb +67 -0
  28. data/lib/rgen/metamodel_builder/intermediate/annotation.rb +30 -0
  29. data/lib/rgen/metamodel_builder/metamodel_description.rb +232 -0
  30. data/lib/rgen/metamodel_builder/mm_multiple.rb +23 -0
  31. data/lib/rgen/metamodel_builder/module_extension.rb +33 -0
  32. data/lib/rgen/model_comparator.rb +56 -0
  33. data/lib/rgen/model_dumper.rb +5 -5
  34. data/lib/rgen/name_helper.rb +17 -1
  35. data/lib/rgen/template_language.rb +148 -28
  36. data/lib/rgen/template_language/directory_template_container.rb +56 -38
  37. data/lib/rgen/template_language/output_handler.rb +93 -77
  38. data/lib/rgen/template_language/template_container.rb +186 -143
  39. data/lib/rgen/transformer.rb +19 -14
  40. data/lib/transformers/uml13_to_ecore.rb +75 -0
  41. data/redist/xmlscan/ChangeLog +1301 -0
  42. data/redist/xmlscan/README +34 -0
  43. data/redist/xmlscan/THANKS +11 -0
  44. data/redist/xmlscan/doc/changes.html +74 -0
  45. data/redist/xmlscan/doc/changes.rd +80 -0
  46. data/redist/xmlscan/doc/en/conformance.html +136 -0
  47. data/redist/xmlscan/doc/en/conformance.rd +152 -0
  48. data/redist/xmlscan/doc/en/manual.html +356 -0
  49. data/redist/xmlscan/doc/en/manual.rd +402 -0
  50. data/redist/xmlscan/doc/ja/conformance.ja.html +118 -0
  51. data/redist/xmlscan/doc/ja/conformance.ja.rd +134 -0
  52. data/redist/xmlscan/doc/ja/manual.ja.html +325 -0
  53. data/redist/xmlscan/doc/ja/manual.ja.rd +370 -0
  54. data/redist/xmlscan/doc/src/Makefile +41 -0
  55. data/redist/xmlscan/doc/src/conformance.rd.src +256 -0
  56. data/redist/xmlscan/doc/src/langsplit.rb +110 -0
  57. data/redist/xmlscan/doc/src/manual.rd.src +614 -0
  58. data/redist/xmlscan/install.rb +41 -0
  59. data/redist/xmlscan/lib/xmlscan/encoding.rb +311 -0
  60. data/redist/xmlscan/lib/xmlscan/htmlscan.rb +289 -0
  61. data/redist/xmlscan/lib/xmlscan/namespace.rb +352 -0
  62. data/redist/xmlscan/lib/xmlscan/parser.rb +299 -0
  63. data/redist/xmlscan/lib/xmlscan/scanner.rb +1109 -0
  64. data/redist/xmlscan/lib/xmlscan/version.rb +22 -0
  65. data/redist/xmlscan/lib/xmlscan/visitor.rb +158 -0
  66. data/redist/xmlscan/lib/xmlscan/xmlchar.rb +441 -0
  67. data/redist/xmlscan/memo/CONFORMANCE +1249 -0
  68. data/redist/xmlscan/memo/PRODUCTIONS +195 -0
  69. data/redist/xmlscan/memo/contentspec.ry +335 -0
  70. data/redist/xmlscan/samples/chibixml.rb +105 -0
  71. data/redist/xmlscan/samples/getxmlchar.rb +122 -0
  72. data/redist/xmlscan/samples/rexml.rb +159 -0
  73. data/redist/xmlscan/samples/xmlbench.rb +88 -0
  74. data/redist/xmlscan/samples/xmlbench/parser/chibixml.rb +22 -0
  75. data/redist/xmlscan/samples/xmlbench/parser/nqxml.rb +29 -0
  76. data/redist/xmlscan/samples/xmlbench/parser/rexml.rb +62 -0
  77. data/redist/xmlscan/samples/xmlbench/parser/xmlparser.rb +22 -0
  78. data/redist/xmlscan/samples/xmlbench/parser/xmlscan-0.0.10.rb +62 -0
  79. data/redist/xmlscan/samples/xmlbench/parser/xmlscan-chibixml.rb +22 -0
  80. data/redist/xmlscan/samples/xmlbench/parser/xmlscan-rexml.rb +22 -0
  81. data/redist/xmlscan/samples/xmlbench/parser/xmlscan.rb +99 -0
  82. data/redist/xmlscan/samples/xmlbench/xmlbench-lib.rb +116 -0
  83. data/redist/xmlscan/samples/xmlconftest.rb +200 -0
  84. data/redist/xmlscan/test.rb +7 -0
  85. data/redist/xmlscan/tests/deftestcase.rb +73 -0
  86. data/redist/xmlscan/tests/runtest.rb +47 -0
  87. data/redist/xmlscan/tests/testall.rb +14 -0
  88. data/redist/xmlscan/tests/testencoding.rb +438 -0
  89. data/redist/xmlscan/tests/testhtmlscan.rb +752 -0
  90. data/redist/xmlscan/tests/testnamespace.rb +457 -0
  91. data/redist/xmlscan/tests/testparser.rb +591 -0
  92. data/redist/xmlscan/tests/testscanner.rb +1749 -0
  93. data/redist/xmlscan/tests/testxmlchar.rb +143 -0
  94. data/redist/xmlscan/tests/visitor.rb +34 -0
  95. data/test/array_extensions_test.rb +2 -2
  96. data/test/ea_instantiator_test.rb +41 -0
  97. data/test/ecore_self_test.rb +53 -0
  98. data/test/environment_test.rb +11 -6
  99. data/test/metamodel_builder_test.rb +404 -245
  100. data/test/metamodel_roundtrip_test.rb +52 -0
  101. data/test/metamodel_roundtrip_test/TestModel.rb +65 -0
  102. data/test/metamodel_roundtrip_test/TestModel_Regenerated.rb +64 -0
  103. data/test/metamodel_roundtrip_test/houseMetamodel.ecore +32 -0
  104. data/test/metamodel_roundtrip_test/houseMetamodel_from_ecore.rb +39 -0
  105. data/test/rgen_test.rb +3 -3
  106. data/test/template_language_test.rb +65 -39
  107. data/test/template_language_test/expected_result.txt +24 -3
  108. data/test/template_language_test/templates/code/array.tpl +11 -0
  109. data/test/template_language_test/templates/content/author.tpl +7 -0
  110. data/test/template_language_test/templates/content/chapter.tpl +1 -1
  111. data/test/template_language_test/templates/root.tpl +17 -8
  112. data/test/template_language_test/testout.txt +24 -3
  113. data/test/testmodel/class_model_checker.rb +119 -0
  114. data/test/{xmi_instantiator_test/testmodel.eap → testmodel/ea_testmodel.eap} +0 -0
  115. data/test/{xmi_instantiator_test/testmodel.xml → testmodel/ea_testmodel.xml} +81 -14
  116. data/test/testmodel/ea_testmodel_partial.xml +317 -0
  117. data/test/testmodel/ecore_model_checker.rb +101 -0
  118. data/test/testmodel/manual_testmodel.xml +22 -0
  119. data/test/testmodel/object_model_checker.rb +67 -0
  120. data/test/transformer_test.rb +18 -10
  121. data/test/xml_instantiator_test.rb +81 -8
  122. data/test/xml_instantiator_test/simple_ecore_model_checker.rb +94 -0
  123. data/test/xml_instantiator_test/simple_xmi_ecore_instantiator.rb +53 -0
  124. data/test/xml_instantiator_test/simple_xmi_metamodel.rb +49 -0
  125. data/test/xml_instantiator_test/simple_xmi_to_ecore.rb +75 -0
  126. metadata +126 -28
  127. data/lib/ea/xmi_class_instantiator.rb +0 -46
  128. data/lib/ea/xmi_helper.rb +0 -26
  129. data/lib/ea/xmi_metamodel.rb +0 -34
  130. data/lib/ea/xmi_object_instantiator.rb +0 -46
  131. data/lib/ea/xmi_to_classmodel.rb +0 -78
  132. data/lib/ea/xmi_to_objectmodel.rb +0 -92
  133. data/lib/mmgen/mm_ext/uml_classmodel_ext.rb +0 -71
  134. data/lib/mmgen/templates/uml_classmodel.tpl +0 -63
  135. data/lib/rgen/xml_instantiator.rb +0 -132
  136. data/lib/uml/objectmodel_instantiator.rb +0 -53
  137. data/lib/uml/uml_classmodel.rb +0 -92
  138. data/lib/uml/uml_objectmodel.rb +0 -65
  139. data/test/metamodel_generator_test.rb +0 -44
  140. data/test/metamodel_generator_test/TestModel.rb +0 -40
  141. data/test/metamodel_generator_test/expected_result.txt +0 -40
  142. data/test/xmi_class_instantiator_test.rb +0 -24
  143. data/test/xmi_instantiator_test/class_model_checker.rb +0 -97
  144. data/test/xmi_object_instantiator_test.rb +0 -65
  145. data/test/xml_instantiator_test/testmodel.xml +0 -7
data/CHANGELOG CHANGED
@@ -15,4 +15,23 @@
15
15
  * Added attribute reflection to MMBase (one_attributes, many_attributes)
16
16
  * Added +copy+ method to Transformer
17
17
  * Added simple model dumper module
18
- * Fixed mmgen/mmgen.rb
18
+ * Fixed mmgen/mmgen.rb
19
+
20
+ =0.4.0 (Aug 8th, 2007)
21
+
22
+ * Added ECore metamodel and use it as the core metametamodel
23
+ * Revised and extended MetamodelBuilder language
24
+ * There is an ECore instance describing each metamodel built using MetamodelBuilder now
25
+ * Metamodel generator is now ECore based
26
+ * Added Ruby implementation of Boolean and Enum types
27
+ * Switched XML Instantiator to xmlscan for performance reasons
28
+ * Cleaned up instantiator file structure
29
+ * Renamed RGen::XMLInstantiator into RGen::Instantiator::DefaultXMLInstantiator
30
+ * Included xmlscan as a redistributed module
31
+ * Added support for chardata within XML tags
32
+ * Added (Enterprise Architect) XMI to ECore instantiator
33
+ * Some minor fixes in NameHelper
34
+ * Some fixes to template language
35
+ * Added UML1.3 Metamodel
36
+ * Added tranformation from UML1.3 to ECore
37
+
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2006 Martin Thiede
1
+ Copyright (c) 2007 Martin Thiede
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README CHANGED
@@ -6,13 +6,15 @@ and transform Models and finally generate arbitrary textual content from it.
6
6
 
7
7
  RGen features include:
8
8
  * Programmatic definition of Metamodels
9
+ * ECore as Metametamodel with an ECore instance available for every Metamodel
10
+ * Generator for programmatic Metamodel from ECore instance
9
11
  * Instantiation of Metamodels, i.e. creation of Models (e.g. from XML)
10
12
  * Model Transformations
11
13
  * Powerful template based generator language
12
14
  * A growing set of included Metamodels, Transformations, Generators:
13
- * UML Class and Object Diagram Metamodel
14
- * Instantiation of UML Models from XMI
15
- * Metamodel Generator generating programmatic Metamodel definitions from UML Class Models
15
+ * UML 1.3 Metamodel
16
+ * XMI 1.1 Instantiator
17
+ * XMI 2.0 Instantiator, currently use to read ECore instances only
16
18
 
17
19
 
18
20
  = Download
@@ -53,16 +55,17 @@ These are the main parts already documented:
53
55
  There are several examples of using RGen within the framework itself.
54
56
 
55
57
  Metamodel Definition:
56
- lib/uml/uml_classmodel.rb
57
- lib/uml/uml_objectmodel.rb
58
+ lib/rgen/ecore/ecore.rb
59
+ lib/metamodels/uml13_metamodel.rb
58
60
 
59
61
  Instantiation:
60
- lib/ea/xmi_class_instantiator.rb
61
- lib/ea/xmi_object_instantiator.rb
62
+ lib/rgen/instantiator/xmi11_instantiator.rb
63
+ lib/rgen/instantiator/ecore_xml_instantiator.rb
64
+ lib/instantiators/ea_instantiator.rb
62
65
 
63
66
  Transformations:
64
- lib/ea/xmi_to_classmodel.rb
65
- lib/ea/xmi_to_objectmodel.rb
67
+ lib/rgen/ecore/ecore_transformer.rb
68
+ lib/transformers/uml13_to_ecore.rb
66
69
 
67
70
  Generators:
68
71
  lib/mmgen/metamodel_generator.rb
@@ -0,0 +1,36 @@
1
+ require 'rgen/instantiator/xmi11_instantiator'
2
+ require 'metamodels/uml13_metamodel'
3
+
4
+ class EAInstantiator < XMI11Instantiator
5
+
6
+ #TODO add element names to make feature names unique
7
+ FIXMAP = {
8
+ :tags => {
9
+ "EAStub" => proc { |tag, attr| UML13::Class.new(
10
+ :name => attr["name"]
11
+ )}
12
+ },
13
+ :feature_names => {
14
+ "isOrdered" => "ordering",
15
+ "subtype" => "child",
16
+ "supertype" => "parent",
17
+ "changeable" => "changeability"
18
+ },
19
+ :feature_values => {
20
+ "ordering" => {"true" => "ordered", "false" => "unordered"},
21
+ "aggregation" => {"shared" => "aggregate"},
22
+ "changeability" => {"none" => "frozen"},
23
+ "multiplicity" => proc { |v| UML13::Multiplicity.new(
24
+ :range => [UML13::MultiplicityRange.new(
25
+ :lower => v.split("..").first,
26
+ :upper => v.split("..").last
27
+ )])}
28
+ }
29
+ }
30
+
31
+ def initialize(env, loglevel)
32
+ super(env, FIXMAP, loglevel)
33
+ add_metamodel("omg.org/UML1.3", UML13)
34
+ end
35
+
36
+ end
@@ -0,0 +1,559 @@
1
+ require 'rgen/metamodel_builder'
2
+
3
+ module UML13
4
+ extend RGen::MetamodelBuilder::ModuleExtension
5
+ include RGen::MetamodelBuilder::DataTypes
6
+
7
+ AggregationKind = Enum.new([ :none, :aggregate, :composite ])
8
+ ChangeableKind = Enum.new([ :changeable, :frozen, :addOnly ])
9
+ OperationDirectionKind = Enum.new([ ])
10
+ ParameterDirectionKind = Enum.new([ :in, :inout, :out, :return ])
11
+ MessageDirectionKind = Enum.new([ ])
12
+ ScopeKind = Enum.new([ :instance, :classifier ])
13
+ VisibilityKind = Enum.new([ :public, :protected, :private ])
14
+ PseudostateKind = Enum.new([ :initial, :deepHistory, :shallowHistory, :join, :fork, :branch, :junction, :final ])
15
+ CallConcurrencyKind = Enum.new([ :sequential, :guarded, :concurrent ])
16
+ OrderingKind = Enum.new([ :unordered, :ordered, :sorted ])
17
+
18
+ class Element < RGen::MetamodelBuilder::MMBase
19
+ end
20
+
21
+ class ModelElement < Element
22
+ has_attr 'name', String
23
+ has_attr 'visibility', UML13::VisibilityKind, :defaultValueLiteral => "public"
24
+ has_attr 'isSpecification', Boolean
25
+ end
26
+
27
+ class Namespace < ModelElement
28
+ end
29
+
30
+ class GeneralizableElement < ModelElement
31
+ has_attr 'isRoot', Boolean
32
+ has_attr 'isLeaf', Boolean
33
+ has_attr 'isAbstract', Boolean
34
+ end
35
+
36
+ class Classifier < RGen::MetamodelBuilder::MMMultiple(GeneralizableElement, Namespace)
37
+ end
38
+
39
+ class Class < Classifier
40
+ has_attr 'isActive', Boolean
41
+ end
42
+
43
+ class DataType < Classifier
44
+ end
45
+
46
+ class Feature < ModelElement
47
+ has_attr 'ownerScope', UML13::ScopeKind, :defaultValueLiteral => "instance"
48
+ end
49
+
50
+ class StructuralFeature < Feature
51
+ has_attr 'changeability', UML13::ChangeableKind, :defaultValueLiteral => "changeable"
52
+ has_attr 'targetScope', UML13::ScopeKind, :defaultValueLiteral => "instance"
53
+ end
54
+
55
+ class AssociationEnd < ModelElement
56
+ has_attr 'isNavigable', Boolean, :defaultValueLiteral => "false"
57
+ has_attr 'ordering', UML13::OrderingKind, :defaultValueLiteral => "unordered"
58
+ has_attr 'aggregation', UML13::AggregationKind, :defaultValueLiteral => "none"
59
+ has_attr 'targetScope', UML13::ScopeKind, :defaultValueLiteral => "instance"
60
+ has_attr 'changeability', UML13::ChangeableKind, :defaultValueLiteral => "changeable"
61
+ end
62
+
63
+ class Interface < Classifier
64
+ end
65
+
66
+ class Constraint < ModelElement
67
+ end
68
+
69
+ class Relationship < ModelElement
70
+ end
71
+
72
+ class Association < RGen::MetamodelBuilder::MMMultiple(GeneralizableElement, Relationship)
73
+ end
74
+
75
+ class Attribute < StructuralFeature
76
+ end
77
+
78
+ class BehavioralFeature < Feature
79
+ has_attr 'isQuery', Boolean
80
+ end
81
+
82
+ class Operation < BehavioralFeature
83
+ has_attr 'concurrency', UML13::CallConcurrencyKind, :defaultValueLiteral => "sequential"
84
+ has_attr 'isRoot', Boolean
85
+ has_attr 'isLeaf', Boolean
86
+ has_attr 'isAbstract', Boolean
87
+ end
88
+
89
+ class Parameter < ModelElement
90
+ has_attr 'kind', UML13::ParameterDirectionKind, :defaultValueLiteral => "inout"
91
+ end
92
+
93
+ class Method < BehavioralFeature
94
+ end
95
+
96
+ class Generalization < Relationship
97
+ has_attr 'discriminator', String
98
+ end
99
+
100
+ class AssociationClass < RGen::MetamodelBuilder::MMMultiple(Class, Association)
101
+ end
102
+
103
+ class Dependency < Relationship
104
+ end
105
+
106
+ class Abstraction < Dependency
107
+ end
108
+
109
+ class PresentationElement < Element
110
+ end
111
+
112
+ class Usage < Dependency
113
+ end
114
+
115
+ class Binding < Dependency
116
+ end
117
+
118
+ class Component < Classifier
119
+ end
120
+
121
+ class Node < Classifier
122
+ end
123
+
124
+ class Permission < Dependency
125
+ end
126
+
127
+ class Comment < ModelElement
128
+ has_attr 'body', String
129
+ end
130
+
131
+ class Flow < Relationship
132
+ end
133
+
134
+ class TemplateParameter < RGen::MetamodelBuilder::MMBase
135
+ end
136
+
137
+ class ElementResidence < RGen::MetamodelBuilder::MMBase
138
+ has_attr 'visibility', UML13::VisibilityKind, :defaultValueLiteral => "public"
139
+ end
140
+
141
+ class Multiplicity < RGen::MetamodelBuilder::MMBase
142
+ end
143
+
144
+ class Expression < RGen::MetamodelBuilder::MMBase
145
+ has_attr 'language', String
146
+ has_attr 'body', String
147
+ end
148
+
149
+ class ObjectSetExpression < Expression
150
+ end
151
+
152
+ class TimeExpression < Expression
153
+ end
154
+
155
+ class BooleanExpression < Expression
156
+ end
157
+
158
+ class ActionExpression < Expression
159
+ end
160
+
161
+ class MultiplicityRange < RGen::MetamodelBuilder::MMBase
162
+ has_attr 'lower', String
163
+ has_attr 'upper', String
164
+ end
165
+
166
+ class Structure < DataType
167
+ end
168
+
169
+ class Primitive < DataType
170
+ end
171
+
172
+ class Enumeration < DataType
173
+ end
174
+
175
+ class EnumerationLiteral < RGen::MetamodelBuilder::MMBase
176
+ has_attr 'name', String
177
+ end
178
+
179
+ class ProgrammingLanguageType < DataType
180
+ end
181
+
182
+ class IterationExpression < Expression
183
+ end
184
+
185
+ class TypeExpression < Expression
186
+ end
187
+
188
+ class ArgListsExpression < Expression
189
+ end
190
+
191
+ class MappingExpression < Expression
192
+ end
193
+
194
+ class ProcedureExpression < Expression
195
+ end
196
+
197
+ class Stereotype < GeneralizableElement
198
+ has_attr 'icon', String
199
+ has_attr 'baseClass', String
200
+ end
201
+
202
+ class TaggedValue < Element
203
+ has_attr 'tag', String
204
+ has_attr 'value', String
205
+ end
206
+
207
+ class UseCase < Classifier
208
+ end
209
+
210
+ class Actor < Classifier
211
+ end
212
+
213
+ class Instance < ModelElement
214
+ end
215
+
216
+ class UseCaseInstance < Instance
217
+ end
218
+
219
+ class Extend < Relationship
220
+ end
221
+
222
+ class Include < Relationship
223
+ end
224
+
225
+ class ExtensionPoint < ModelElement
226
+ has_attr 'location', String
227
+ end
228
+
229
+ class StateMachine < ModelElement
230
+ end
231
+
232
+ class Event < ModelElement
233
+ end
234
+
235
+ class StateVertex < ModelElement
236
+ end
237
+
238
+ class State < StateVertex
239
+ end
240
+
241
+ class TimeEvent < Event
242
+ end
243
+
244
+ class CallEvent < Event
245
+ end
246
+
247
+ class SignalEvent < Event
248
+ end
249
+
250
+ class Transition < ModelElement
251
+ end
252
+
253
+ class CompositeState < State
254
+ has_attr 'isConcurrent', Boolean
255
+ end
256
+
257
+ class ChangeEvent < Event
258
+ end
259
+
260
+ class Guard < ModelElement
261
+ end
262
+
263
+ class Pseudostate < StateVertex
264
+ has_attr 'kind', UML13::PseudostateKind, :defaultValueLiteral => "initial"
265
+ end
266
+
267
+ class SimpleState < State
268
+ end
269
+
270
+ class SubmachineState < CompositeState
271
+ end
272
+
273
+ class SynchState < StateVertex
274
+ has_attr 'bound', Integer
275
+ end
276
+
277
+ class StubState < StateVertex
278
+ has_attr 'referenceState', String
279
+ end
280
+
281
+ class FinalState < State
282
+ end
283
+
284
+ class Collaboration < RGen::MetamodelBuilder::MMMultiple(GeneralizableElement, Namespace)
285
+ end
286
+
287
+ class ClassifierRole < Classifier
288
+ end
289
+
290
+ class AssociationRole < Association
291
+ end
292
+
293
+ class AssociationEndRole < AssociationEnd
294
+ end
295
+
296
+ class Message < ModelElement
297
+ end
298
+
299
+ class Interaction < ModelElement
300
+ end
301
+
302
+ class Signal < Classifier
303
+ end
304
+
305
+ class Action < ModelElement
306
+ has_attr 'isAsynchronous', Boolean
307
+ end
308
+
309
+ class CreateAction < Action
310
+ end
311
+
312
+ class DestroyAction < Action
313
+ end
314
+
315
+ class UninterpretedAction < Action
316
+ end
317
+
318
+ class AttributeLink < ModelElement
319
+ end
320
+
321
+ class Object < Instance
322
+ end
323
+
324
+ class Link < ModelElement
325
+ end
326
+
327
+ class LinkObject < RGen::MetamodelBuilder::MMMultiple(Object, Link)
328
+ end
329
+
330
+ class DataValue < Instance
331
+ end
332
+
333
+ class CallAction < Action
334
+ end
335
+
336
+ class SendAction < Action
337
+ end
338
+
339
+ class ActionSequence < Action
340
+ end
341
+
342
+ class Argument < ModelElement
343
+ end
344
+
345
+ class Reception < BehavioralFeature
346
+ has_attr 'isPolymorphic', Boolean
347
+ has_attr 'specification', String
348
+ end
349
+
350
+ class LinkEnd < ModelElement
351
+ end
352
+
353
+ class Call < RGen::MetamodelBuilder::MMBase
354
+ end
355
+
356
+ class ReturnAction < Action
357
+ end
358
+
359
+ class TerminateAction < Action
360
+ end
361
+
362
+ class Stimulus < ModelElement
363
+ end
364
+
365
+ class ActionInstance < RGen::MetamodelBuilder::MMBase
366
+ end
367
+
368
+ class Exception < Signal
369
+ end
370
+
371
+ class AssignmentAction < Action
372
+ end
373
+
374
+ class ComponentInstance < Instance
375
+ end
376
+
377
+ class NodeInstance < Instance
378
+ end
379
+
380
+ class ActivityGraph < StateMachine
381
+ end
382
+
383
+ class Partition < ModelElement
384
+ end
385
+
386
+ class SubactivityState < SubmachineState
387
+ has_attr 'isDynamic', Boolean
388
+ end
389
+
390
+ class ActionState < SimpleState
391
+ has_attr 'isDynamic', Boolean
392
+ end
393
+
394
+ class CallState < ActionState
395
+ end
396
+
397
+ class ObjectFlowState < SimpleState
398
+ has_attr 'isSynch', Boolean
399
+ end
400
+
401
+ class ClassifierInState < Classifier
402
+ end
403
+
404
+ class Package < RGen::MetamodelBuilder::MMMultiple(GeneralizableElement, Namespace)
405
+ end
406
+
407
+ class Model < Package
408
+ end
409
+
410
+ class Subsystem < RGen::MetamodelBuilder::MMMultiple(Classifier, Package)
411
+ has_attr 'isInstantiable', Boolean
412
+ end
413
+
414
+ class ElementImport < RGen::MetamodelBuilder::MMBase
415
+ has_attr 'visibility', UML13::VisibilityKind, :defaultValueLiteral => "public"
416
+ has_attr 'alias', String
417
+ end
418
+
419
+ class DiagramElement < PresentationElement
420
+ has_attr 'geometry', String
421
+ has_attr 'style', String
422
+ end
423
+
424
+ class Diagram < PresentationElement
425
+ has_attr 'name', String
426
+ has_attr 'toolName', String
427
+ has_attr 'diagramType', String
428
+ has_attr 'style', String
429
+ end
430
+
431
+ end
432
+
433
+ UML13::Classifier.many_to_many 'participant', UML13::AssociationEnd, 'specification'
434
+ UML13::Classifier.one_to_many 'associationEnd', UML13::AssociationEnd, 'type'
435
+ UML13::Classifier.contains_many 'feature', UML13::Feature, 'owner'
436
+ UML13::StructuralFeature.contains_one_uni 'multiplicity', UML13::Multiplicity
437
+ UML13::StructuralFeature.has_one 'type', UML13::Classifier, :lowerBound => 1
438
+ UML13::Namespace.contains_many 'ownedElement', UML13::ModelElement, 'namespace'
439
+ UML13::AssociationEnd.contains_one_uni 'multiplicity', UML13::Multiplicity
440
+ UML13::AssociationEnd.contains_many 'qualifier', UML13::Attribute, 'associationEnd'
441
+ UML13::Association.contains_many 'connection', UML13::AssociationEnd, 'association', :lowerBound => 2
442
+ UML13::Constraint.contains_one_uni 'body', UML13::BooleanExpression
443
+ UML13::Constraint.many_to_many 'constrainedElement', UML13::ModelElement, 'constraint', :lowerBound => 1
444
+ UML13::GeneralizableElement.one_to_many 'specialization', UML13::Generalization, 'parent'
445
+ UML13::GeneralizableElement.one_to_many 'generalization', UML13::Generalization, 'child'
446
+ UML13::Attribute.contains_one_uni 'initialValue', UML13::Expression
447
+ UML13::Operation.one_to_many 'occurrence', UML13::CallEvent, 'operation'
448
+ UML13::Operation.one_to_many 'method', UML13::Method, 'specification'
449
+ UML13::Parameter.contains_one_uni 'defaultValue', UML13::Expression
450
+ UML13::Parameter.many_to_many 'state', UML13::ObjectFlowState, 'parameter'
451
+ UML13::Parameter.has_one 'type', UML13::Classifier, :lowerBound => 1
452
+ UML13::Method.contains_one_uni 'body', UML13::ProcedureExpression
453
+ UML13::BehavioralFeature.many_to_many 'raisedSignal', UML13::Signal, 'context'
454
+ UML13::BehavioralFeature.contains_many_uni 'parameter', UML13::Parameter
455
+ UML13::ModelElement.one_to_many 'behavior', UML13::StateMachine, 'context'
456
+ UML13::ModelElement.many_to_one 'stereotype', UML13::Stereotype, 'extendedElement'
457
+ UML13::ModelElement.one_to_many 'elementResidence', UML13::ElementResidence, 'resident'
458
+ UML13::ModelElement.many_to_many 'sourceFlow', UML13::Flow, 'source'
459
+ UML13::ModelElement.many_to_many 'targetFlow', UML13::Flow, 'target'
460
+ UML13::ModelElement.many_to_many 'presentation', UML13::PresentationElement, 'subject'
461
+ UML13::ModelElement.many_to_many 'supplierDependency', UML13::Dependency, 'supplier', :lowerBound => 1
462
+ UML13::ModelElement.contains_many 'taggedValue', UML13::TaggedValue, 'modelElement'
463
+ UML13::ModelElement.contains_many_uni 'templateParameter', UML13::TemplateParameter
464
+ UML13::ModelElement.many_to_many 'clientDependency', UML13::Dependency, 'client', :lowerBound => 1
465
+ UML13::ModelElement.many_to_many 'comment', UML13::Comment, 'annotatedElement'
466
+ UML13::ModelElement.one_to_many 'elementImport', UML13::ElementImport, 'modelElement'
467
+ UML13::Abstraction.contains_one_uni 'mapping', UML13::MappingExpression
468
+ UML13::Binding.has_many 'argument', UML13::ModelElement, :lowerBound => 1
469
+ UML13::Component.contains_many 'residentElement', UML13::ElementResidence, 'implementationLocation'
470
+ UML13::Component.many_to_many 'deploymentLocation', UML13::Node, 'resident'
471
+ UML13::TemplateParameter.has_one 'modelElement', UML13::ModelElement
472
+ UML13::TemplateParameter.has_one 'defaultElement', UML13::ModelElement
473
+ UML13::Multiplicity.contains_many_uni 'range', UML13::MultiplicityRange, :lowerBound => 1
474
+ UML13::Enumeration.contains_many_uni 'literal', UML13::EnumerationLiteral, :lowerBound => 1
475
+ UML13::ProgrammingLanguageType.contains_one_uni 'type', UML13::TypeExpression
476
+ UML13::Stereotype.has_many 'requiredTag', UML13::TaggedValue
477
+ UML13::UseCase.has_many 'extensionPoint', UML13::ExtensionPoint
478
+ UML13::UseCase.one_to_many 'include', UML13::Include, 'base'
479
+ UML13::UseCase.one_to_many 'extend', UML13::Extend, 'extension'
480
+ UML13::Extend.contains_one_uni 'condition', UML13::BooleanExpression
481
+ UML13::Extend.has_many 'extensionPoint', UML13::ExtensionPoint, :lowerBound => 1
482
+ UML13::Extend.has_one 'base', UML13::UseCase, :lowerBound => 1
483
+ UML13::Include.has_one 'addition', UML13::UseCase, :lowerBound => 1
484
+ UML13::StateMachine.contains_many_uni 'transitions', UML13::Transition
485
+ UML13::StateMachine.contains_one_uni 'top', UML13::State, :lowerBound => 1
486
+ UML13::Event.contains_many_uni 'parameters', UML13::Parameter
487
+ UML13::State.contains_one_uni 'doActivity', UML13::Action
488
+ UML13::State.contains_many_uni 'internalTransition', UML13::Transition
489
+ UML13::State.has_many 'deferrableEvent', UML13::Event
490
+ UML13::State.contains_one_uni 'exit', UML13::Action
491
+ UML13::State.contains_one_uni 'entry', UML13::Action
492
+ UML13::TimeEvent.contains_one_uni 'when', UML13::TimeExpression
493
+ UML13::SignalEvent.many_to_one 'signal', UML13::Signal, 'occurrence', :lowerBound => 1
494
+ UML13::Transition.many_to_one 'target', UML13::StateVertex, 'incoming', :lowerBound => 1
495
+ UML13::Transition.many_to_one 'source', UML13::StateVertex, 'outgoing', :lowerBound => 1
496
+ UML13::Transition.has_one 'trigger', UML13::Event
497
+ UML13::Transition.contains_one_uni 'effect', UML13::Action
498
+ UML13::Transition.contains_one_uni 'guard', UML13::Guard
499
+ UML13::CompositeState.contains_many 'subvertex', UML13::StateVertex, 'container', :lowerBound => 1
500
+ UML13::ChangeEvent.contains_one_uni 'changeExpression', UML13::BooleanExpression
501
+ UML13::Guard.contains_one_uni 'expression', UML13::BooleanExpression
502
+ UML13::SubmachineState.has_one 'submachine', UML13::StateMachine, :lowerBound => 1
503
+ UML13::Collaboration.has_one 'representedOperation', UML13::Operation
504
+ UML13::Collaboration.has_one 'representedClassifier', UML13::Classifier
505
+ UML13::Collaboration.has_many 'constrainingElement', UML13::ModelElement
506
+ UML13::Collaboration.contains_many 'interaction', UML13::Interaction, 'context'
507
+ UML13::ClassifierRole.contains_one_uni 'multiplicity', UML13::Multiplicity
508
+ UML13::ClassifierRole.has_many 'availableContents', UML13::ModelElement
509
+ UML13::ClassifierRole.has_many 'availableFeature', UML13::Feature
510
+ UML13::ClassifierRole.has_one 'base', UML13::Classifier, :lowerBound => 1
511
+ UML13::AssociationRole.contains_one_uni 'multiplicity', UML13::Multiplicity
512
+ UML13::AssociationRole.has_one 'base', UML13::Association
513
+ UML13::AssociationEndRole.has_many 'availableQualifier', UML13::Attribute
514
+ UML13::AssociationEndRole.has_one 'base', UML13::AssociationEnd
515
+ UML13::Message.has_one 'action', UML13::Action, :lowerBound => 1
516
+ UML13::Message.has_one 'communicationConnection', UML13::AssociationRole
517
+ UML13::Message.has_many 'predecessor', UML13::Message
518
+ UML13::Message.has_one 'receiver', UML13::ClassifierRole, :lowerBound => 1
519
+ UML13::Message.has_one 'sender', UML13::ClassifierRole, :lowerBound => 1
520
+ UML13::Message.has_one 'activator', UML13::Message
521
+ UML13::Interaction.contains_many 'message', UML13::Message, 'interaction', :lowerBound => 1
522
+ UML13::Interaction.contains_many_uni 'link', UML13::Link
523
+ UML13::Instance.contains_many_uni 'slot', UML13::AttributeLink
524
+ UML13::Instance.one_to_many 'linkEnd', UML13::LinkEnd, 'instance'
525
+ UML13::Instance.has_many 'classifier', UML13::Classifier, :lowerBound => 1
526
+ UML13::Signal.one_to_many 'reception', UML13::Reception, 'signal'
527
+ UML13::CreateAction.has_one 'instantiation', UML13::Classifier, :lowerBound => 1
528
+ UML13::Action.contains_one_uni 'recurrence', UML13::IterationExpression
529
+ UML13::Action.contains_one_uni 'target', UML13::ObjectSetExpression
530
+ UML13::Action.contains_one_uni 'script', UML13::ActionExpression
531
+ UML13::Action.contains_many_uni 'actualArgument', UML13::Argument
532
+ UML13::AttributeLink.has_one 'value', UML13::Instance, :lowerBound => 1
533
+ UML13::AttributeLink.has_one 'attribute', UML13::Attribute, :lowerBound => 1
534
+ UML13::CallAction.has_one 'operation', UML13::Operation, :lowerBound => 1
535
+ UML13::SendAction.has_one 'signal', UML13::Signal, :lowerBound => 1
536
+ UML13::ActionSequence.contains_many_uni 'action', UML13::Action
537
+ UML13::Argument.contains_one_uni 'value', UML13::Expression
538
+ UML13::Link.contains_many_uni 'connection', UML13::LinkEnd, :lowerBound => 2
539
+ UML13::Link.has_one 'association', UML13::Association, :lowerBound => 1
540
+ UML13::LinkEnd.has_one 'associationEnd', UML13::AssociationEnd, :lowerBound => 1
541
+ UML13::LinkEnd.has_one 'participant', UML13::Instance, :lowerBound => 1
542
+ UML13::Stimulus.has_one 'dispatchAction', UML13::Action, :lowerBound => 1
543
+ UML13::Stimulus.has_one 'communicationLink', UML13::Link
544
+ UML13::Stimulus.has_one 'receiver', UML13::Instance, :lowerBound => 1
545
+ UML13::Stimulus.has_one 'sender', UML13::Instance, :lowerBound => 1
546
+ UML13::Stimulus.has_many 'argument', UML13::Instance
547
+ UML13::ComponentInstance.has_many 'resident', UML13::Instance
548
+ UML13::NodeInstance.has_many 'resident', UML13::ComponentInstance
549
+ UML13::ActivityGraph.contains_many_uni 'partition', UML13::Partition
550
+ UML13::Partition.has_many 'contents', UML13::ModelElement
551
+ UML13::SubactivityState.contains_one_uni 'dynamicArguments', UML13::ArgListsExpression
552
+ UML13::ObjectFlowState.has_one 'type', UML13::Classifier, :lowerBound => 1
553
+ UML13::ObjectFlowState.has_one 'available', UML13::Parameter, :lowerBound => 1
554
+ UML13::ClassifierInState.has_one 'type', UML13::Classifier, :lowerBound => 1
555
+ UML13::ClassifierInState.has_many 'inState', UML13::State
556
+ UML13::ActionState.contains_one_uni 'dynamicArguments', UML13::ArgListsExpression
557
+ UML13::Package.contains_many 'importedElement', UML13::ElementImport, 'package'
558
+ UML13::Diagram.contains_many 'element', UML13::DiagramElement, 'diagram'
559
+ UML13::Diagram.has_one 'owner', UML13::ModelElement, :lowerBound => 1