Skip to main content
summaryrefslogtreecommitdiffstats
blob: ae92a630fe5787029ebba525cad8b65c84f669a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
h1. Overview and Getting Started

For a quick demonstration of QVTc or QVTr editing and execution go to "Getting Started":#GettingStarted.

A PDF version of this documentation is available at "QVTd 0.13.0 Documentation":http://download.eclipse.org/qvtd/doc/0.13.0/qvtd.pdf.

h2. What is QVT(Query/View/Transformation)?

The "Query/View/Transformation language":http://www.omg.org/spec/QVT/ is the model transformation language specified by the OMG(Object Management Group) (Object Management Group). Or rather it is three specified languages to which Eclipse QVTd adds five intermediate languages.

* QVTo - Operation Mappings is an imperative transformation language supported by the "Eclipse QVTo project":https://projects.eclipse.org/projects/modeling.mmt.qvt-oml.

* QVTr - Relations is a rich declarative transformation language.

* QVTc - Core is a simple core declarative transformation language.

QVTc and QVTr, generically referred to as QVTd, are supported the "Eclipse QVTd project":https://projects.eclipse.org/projects/modeling.mmt.qvtd (QVT Declarative) and documented here.

!{width:55%}images/QVThorizontalAlphabet.png(QVT Horizontal alphabet)!

The Eclipse QVTd support involves a transformation chain from QVTr via QVTc to executable form. The stages in this chain are:

* QVTu - a unidirectional declarative transformation language - a simplification of QVTc.

* QVTm - a minimal declarative transformation language - a further simplification of QVTc.

* QVTs - a graphical declarative transformation language suitable for schedule determination.

* QVTi - an executable imperative transformation language - a variant of QVTc.

* Java - the ultimate executable form

Note that QVTu, QVTm, QVTs and QVTi are not defined by the current OMG specification. It is possible that they may contribute to a future specification.

h3. Modeling Layers

* _EMF is Modeled Structure_

The Eclipse Modeling Framework (EMF(Eclipse Modeling Framework)) supports the definition of structural meta-models and the subsequent use of models conforming to these meta-models. EMF also supports generating of Java code to represent the meta-models. Additional Java code can be provided to add behavior to the structural meta-models.

* _OCL is EMF and Modeled Behavior_

OCL(Object Constraint Language) provides a modeling language that allows the behavior to be embedded within the structural meta-models or provided as a complement to those meta-models. As a modeling language, OCL understands the models and so OCL code is much more compact than the equivalent Java. OCL code can be statically checked, whereas the corresponding Java code often uses reflection and so cannot be checked.  

* _QVT is Modeled Model Execution_

Eclipse QVTd is an implementation of the OMG QVT 1.3 specification for use with Ecore and UML meta-models.

Eclipse QVTd exploits the extensibility of the Eclipse OCL Pivot model.

h2. How Does It Work?

QVTr and QVTc are programming languages, so you will want to edit them, execute them and debug them.

h3. Editing

Eclipse QVTd provides QVTr, QVTc and QVTi editors developed using Xtext. The QVTc editor may be used to view or maintain the intermediate QVTu and QVTm models.

The editor may be opened conventionally by double clicking a *.qvtr, *.qvtc, or *.qvti text file name in an Explorer view. This displays the source text with syntax highlighting and an outline of the Abstract Syntax.

The QVTc and QVTi editors may also be used to view *.qvtcas and *.qvtias XMI files as source text. 

h4. Status

These editors have been available since QVTd 0.9.0. They are useful, but currently have only limited well-formedness validation.

Editing *.qvtcas and *.qvtias files should be possible but is not recommended in the current release.

Hopefully 1.0.0 (Oxygen) will offer UMLX as a graphical alternative to the QVTr textual exposition of a transformation.

h3. Execution

The 0.13.0 release provides one QVTr and one QVTc example project that be installed and executed. However execution functionality is very new and not suitable for more than experimental use.

h4. Status

QVTi execution has been available since 0.11.0 (Luna). It demonstrates the extensibility of the Eclipse OCL interpreter, Java code generator and debugger. QVTi is a low level intermediate; it is not intended as a primary programming language.

A very preliminary form of QVTc execution was available in 0.12.0 (Mars) using an Epsilon prototype of the transformation chain.

0.13.0 (Neon) introduces a Java re-implementation of the full transformation chain so that QVTr and QVTc transformations can be executed. It is only suitable for researchers.

The current execution supports only creation of output models. Checking, updated, incremental, in-place execution and views are work in progress.

Hopefully 1.0.0 (Oxygen) will have more substantial functionality and will be used internally to replace some of the manual Java transformations by QVTr / UMLX transformations.

h3. Debugger

The QVTi debugger extends the OCL debugger.

h4. Status

The further extension to provide QVTc and QVTr debugging is work in progress.


h2. Who is Behind Eclipse QVTd?

Eclipse QVTd is an Open Source project. All code has been developed under the auspices of Eclipse.

Eclipse QVTd is a largely one man development by Ed Willink who has been the OMG QVT RTF(Revision Task Force) (Revision Task Force) chair since QVT 1.2. Expect further revisions of the QVT specification to exploit feedback from the Eclipse QVTo and QVTd projects.

There is now a significant personnel and corporate overlap between the Eclipse QVTd committers and the OMG QVT RTF and so Eclipse OCL is pioneering solutions to many of the under-specification problems in the OCL specification.

Ed Willink is also project lead of the Eclipse OCL where the new pivot-based implementation prototypes solutions to many problems with the OMG OCL specification for which Ed Willink has been the RTF chair since OCL 2.4.

The many aspects of OCL and QVTd are converging; help welcome.
 
h2(#GettingStarted). Getting Started

*Warning: Eclipse QVTd 0.13.0 execution is not sufficiently mature for more than experimental/research usage.*

For a very quick demonstration of QVTc or QVTr you may install the appropriate example project.

h3. QVTr Example Project

Invoke *File->New->Example...* then select *Examples* then *QVT (Query/View/Transformation Language) Projects* then select either *QVTr HSTM2FSTM Project* then *Finish* to create a small example project called *org.eclipse.qvtd.examples.qvtrelation.hstm2fstm*.

A QVTr or QVTc editor opens to show the transformation.

!{width:50%}images/QVTrEditor.png(QVTr Editor)!

The image shows one of the mappings with hovertext elaborating the declaration referenced by *name*.

The QVT editors extend the OCL editor and so the OCL context menu provides useful functionality such as saving the transformation in Abstyract Syntax form.

A QVTr project is currently just a normal Java project. (A QVTd nature may be added in the future to support auto-building.)

!{width:60%}images/QVTrProject.png(QVTr Project)!

The QVTr Hierarchical to Flat State Machine example contains
* *HierarchicalStateMachine2FlatStateMachine.qvtr* - the transformation
* *HierarchicalStateMachine.ecore* - the source metamodel
* *FlatStateMachine.ecore* - the target metamodel
* *hier.xmi* - an example model to exercise the execution
* *expected.xmi* - the expected execution result
* *HierarchicalStateMachine2FlatStateMachine.qvtr.launch* - a launch configuration for execution

You may execute the transformation on the *hier.xmi* input by invoking *Run->Run Configurations...* then *QVTr (Relations) transformation* then *HierarchicalStateMachine2FlatStateMachine.qvtr*.

!{width:40%}images/QVTrLaunch.png(QVTr Launch)!

The launch is currently cluttered by an excess of development information and not yet implemented facilities. The important fields are:

h4. Project / Transformation

The project name provides a default name against which other filenames are resolved to reduce screen clutter.

The transformation name is the transformation to be executed.

The mode can only be enforce creation/overwrite of the output model at present.

The direction selects the output direction when executing a multi-directional transformation.

h4. Inputs

The file bound to each input domain must be specified.

h4. New outputs

The file bound to each output domain must be specified.

h4. Intermediates

The location of each intermediate file in the transformation chain is identified. Their default location is a *temp* subfolder of the transformation's parent folder. You can change them.

If you click *Compile* you can see the compilation progress as the grey *Stale* texts change to green *Ready* text.

h4. Build

The *Interpreted* check box selects between interpreted execution (fast start, slow run) or code generated execution (slow start, fast run).

The interpreted compilation synthesizes a QVTc middle metamodel and a genmodel.

* *HierarchicalStateMachine2FlatStateMachine.ecore*
* *HierarchicalStateMachine2FlatStateMachine.genmodel*

The code generated compilation additionally synthesizes a Java class to implement the transformation and the Java classes for the QVTc middle model.

* *HierarchicalStateMachine2FlatStateMachine.java*

The generated files are generated to a distinct *src-gen* tree which you may need to refresh to see all files. Java problem markers come and go during the synthesis and build. The errors should all be gone before execution proceeds. Elimination of warnings is a work in progress.

h5. Run

Clicking on *Run* will *Compile* automatically if you have not already done so.

The result should be a *flat.xmi* file that is similar to the *expected.xmi* file.
 
h3. QVTc Example Project

The OMG QVTc variant of the traditional UML to RDBMS transformation may be installed by:

Invoke *File->New->Example...* then select *Examples* then *QVT (Query/View/Transformation Language) Projects* then select either *QVTc UML2RDBMS Project* then *Finish* to create a small example project called *org.eclipse.qvtd.examples.qvtcore.uml2rdbms*.

The QVTc editor opens to show the transformation.

The QVTc tooling is very similar to the QVTr tooling. The main difference is that for QVTc the middle model and its genmodel are designed by the user, whereas the QVTr middle model and genmodel are synthesized automatically. If code generated Java execution is required, using the genmodel to generate Java code for the middle model is again a manual user responsibility. 

h2(#Extensions). Extensions

h3(#Import). Import

The Eclipse support for OCL, QVTc and QVTr adds an import statement to define the location of the metamodels.

bc. 
import SimpleUML : 'SimpleUml.ecore'::umlMM;

This specifies that the *SimpleUml.ecore* metamodel is loaded. The metamodel root prefixes a navigation to select an imported element. In the example above the *umlMM* package is selected and made available with a *SimpleUML* alias. If alias-name and colon separator are omitted, the imported element is accessible by its own name.

The quoted name may be importing-file-relative file name as above, or a an absolute path such as *platform:/resource/org.eclipse.emf.examples.library/model/extlibrary.ecore* or a registered namespace URI such as *http://www.eclipse.org/emf/2002/Ecore*.

h3(#Packages). Packages

The Eclipse support for QVTc and QVTr supports declaration of transformations within a package hierarchy. A Transformation therefore extends just a Class, not a Class and a Package as specified by OMG. The Transformation is declared nested within one of more Packages by qualifying the transformation name with one of more package names. For compatibility, if no Package is declared, the Transformation is contained by a Package with a blank name.

The package hierarchy declared for the Transformation is re-used to define the Java package hierarchy when Java code is generated from the Transformation.

bc. 
transformation org::eclipse::qvtd::xtext::qvtrelation::tests::hstm2fstm::HierarchicalStateMachine2FlatStateMachine(hier:hierMM, flat:flatMM)
{
    ...
}

Alternatively a package declaration may be used. This may also optionally define the package URI and/or namespace prefix.

bc. 
package org::eclipse::qvtd::xtext::qvtrelation::tests::hstm2fstm : nsPrefix = 'nsURI'
{
    transformation HierarchicalStateMachine2FlatStateMachine(hier:hierMM, flat:flatMM)
    {
        ...
    }
}

h3(#Contextual Operations and Properties). Contextual Operations and Properties

A *package* declaration may contain nested packages, classes or transformations. Within class declarations operations and properties may be declared analoguously to QVTo's contextual operatuions and properties, or to additional declarations from an imported Complete OCL document. The syntax is the same as OCLinECore which emulates typical OMG specification source text.

bc. 
package MyPackage
{
    class MyClass
    {
        operation op(p : String[1]) : String[1]
        {
            body: p.toUpper();
        }
        property name : String[1];
    }
    transformation MyTx(...)
    {
        ...
    }
}

h3(#QVTc Middle Model). QVTc Middle Model

The QVTc part of the specification is unclear as to how the middle metamodel is defined.

Eclipse QVTc imports the middle metamodel in the same way as any other metamodel. This is then used as a used-package of an unnamed domain.

bc. 
import SimpleUML : 'SimpleUml.ecore'::umlMM;
import SimpleUMLtoRDBMS : 'SimpleUMLtoRDBMS.ecore'::uml2rdbms;
import SimpleRDBMS : 'SimpleRdbms.ecore'::rdbmsMM;

bc. 
transformation umlRdbms {
	uml imports SimpleUML;
	rdbms imports SimpleRDBMS;
	imports SimpleUMLtoRDBMS;
}

h3(#QVTr Middle Model). QVTr Middle Model

The QVTr part of the specification appears to specify how the middle metamodel is synthesized. The specification however ignores details such as Models, Packages and Collections. There is also a lack of clarity as to whether the trace is the minimum required to support non-re-invocation of mappings or whether it should contain everything necessary for minimal incremental re-execution. The Eclipse QVTd implementation is work-in-progress.

h3(#Collection Templates). QVTr Collection Templates

The QVTr part of the specification omits almost all detail of the semantics of Collections and in particular Collection Templates. The implementation in Eclipse QVTd is therefore language design work-in-progress rather than implementation work-in-progress.

h3(#OCL/EMOF Metamodels). OCL/EMOF Metamodels

The QVT specification provides layered metamodels for QVTrelation, QVTtemplate, QVTcore and QVTbase layered on top of EssentialOCL and EMOF. The EssentialOCL and EMOF metamodels are very strongly influenced by OCL and MOF specifications, but are ot formally compliant.

Eclipse QVTd provides layered metamodels for QVTrelation, QVTtemplate, QVTcore and QVTbase layered on top of Pivot which is derived from the UML 2.5 metamodel and work towards a future OCL specification. (QVTimperative shares some QVTcore functionality through a QVTcoreBase abstraction.)

A consequence of extending the Eclipse OCL Pivot is that Eclipse QVTd has preliminary support for templated types, extensible libraries and safe navigation.

h3(#this). this

QVTo defines *this* as a reserved variable for the instance of the executing transformation.

Eclipse QVTd provides *this* for QVTc and QVTr and thereby solves an OCL compatibility problem with respect to the source of an operation call of a query. In Eclipse QVTd, queries, using the Function class, are operations of the Transformation class and are invoked with an implicit *this*. An explicit *this* can be used, and is used when viewing the equivalent source text for the Abstract Syntax model.






h1(#pivot). **@pivot@**


h2(#OCLExpression). **@OCLExpression@**

*Associations*

@AddStatement : qvtimperative::AddStatement[?]@

@BufferStatement : qvtimperative::BufferStatement[?]@

@CheckStatement : qvtimperative::CheckStatement[?]@

@DeclareStatement : qvtimperative::DeclareStatement[?]@

@MappingLoop : qvtimperative::MappingLoop[?]@

@NewStatement : qvtimperative::NewStatement[?]@

@SetStatement : qvtimperative::SetStatement[?]@

@SimpleParameterBinding : qvtimperative::SimpleParameterBinding[?]@

h2(#Property). **@Property@**

*Attributes*

@ObservableStatement : Bag(qvtimperative::ObservableStatement)@

@SetStatement : Bag(qvtimperative::SetStatement)@

h2(#VariableDeclaration). **@VariableDeclaration@**

*Attributes*

@SetStatement : Bag(qvtimperative::SetStatement)@

h1(#qvtimperative). **@qvtimperative@**

The Package for an Imperative QVT transformation.

An Imperative QVT trabsformation is expected to be created by an autogenerator that observes the following run-time restrictions:

A mapping that my be re-invoked must have MappingCall.isInfinite set for every possible invocation.

A mapping that reads object slots before they are guaranteed to have been assigned must declare the slots property in a corresponding ImperativeArea.checkedProperties entry.

A mapping that assigns an object slot that any mapping may access before assignment is guaranteed must declare declare the slots property in a corresponding ImperativeArea.enforcedProperties entry.

All reads by Functions/Queries must be guaranteed to succeed; i.e. the invoking mapping must check readiness before calling the query.

All writes to multi-valued properties must be guaranteed to occur before any read of the property.


h2(#AddStatement). **@AddStatement@**

An AddStatement appends the value of an expression to a connection.

syntax: @add connection := expression;@

conformsTo "@MappingStatement@":#MappingStatement, "@ObservableStatement@":#ObservableStatement

*Attributes*

@isEnforcedUnique : Boolean[?]@

True if the append is suppressed after a check for uniqueness of the value.

*Associations*

@ownedExpression : OCLExpression[1]@

The expression whose evaluation yields the value to append.

@targetVariable : ::ConnectionVariable[1]@

The connection to be appended.

h2(#AppendParameter). **@AppendParameter@**

An AppendParameter of a Mapping defines an output connection to which values may be appended.

syntax: @append name : type;@

conformsTo "@ConnectionVariable@":#ConnectionVariable, "@MappingParameter@":#MappingParameter

h2(#AppendParameterBinding). **@AppendParameterBinding@**

An AppendParameterBinding binds an AppendParameter of an invoked Mapping to a connection of the invoker.
Execution of the mapping may append to the connection.

syntax: @formalName appendsTo connection;@

conformsTo "@MappingParameterBinding@":#MappingParameterBinding

*Associations*

@value : ::ConnectionVariable[1]@

The value or collection of values to bind to boundVariable

h2(#BufferStatement). **@BufferStatement@**

A BufferStatement declares a connection buffer and optionally assigns initial content.

syntax: @buffer name : type := expression;@

@type@ or @expression@ but not both may be omitted. An omitted type is deduced from the initial expression values.

conformsTo "@ConnectionVariable@":#ConnectionVariable, "@VariableStatement@":#VariableStatement, "@ObservableStatement@":#ObservableStatement

*Associations*

@ownedExpression : OCLExpression[?]@

The optional expression computing initial content values.

h2(#CheckStatement). **@CheckStatement@**

A CheckStatement evaluates a predicate. If the evaluation is false, the mapping execution
terminates fails and does nothing.

syntax: @check expression;@

conformsTo "@ObservableStatement@":#ObservableStatement

*Associations*

@ownedExpression : OCLExpression[1]@

h2(#ConnectionVariable). **@ConnectionVariable@**

A ConnectionVariable identifes a variable used as a connection buffer.

conformsTo "@VariableDeclaration@":#VariableDeclaration

*Attributes*

@AddStatement : Bag(qvtimperative::AddStatement)@

@AppendParameterBinding : Bag(qvtimperative::AppendParameterBinding)@

@GuardParameterBinding : Bag(qvtimperative::GuardParameterBinding)@

h2(#DeclareStatement). **@DeclareStatement@**

A DeclareStatement declares a variable and initial value.

syntax: @check var name : type := expression;@

@type@ or @expression@ but not both may be omitted. An omitted type is deduced from the initial expression values.

@check@ may be omitted when the expression type is necessarily conformant.

conformsTo "@VariableStatement@":#VariableStatement, "@ObservableStatement@":#ObservableStatement

*Attributes*

@isCheck : Boolean[?]@

True if the initial expression's type must be  checked for conformance with the variable's type.
A non-conforming vlaue is a predicate failure causing the mapping to fail without doing anything.
This is a derivation of not ownedInit.type.conformsTo(self.type).

*Associations*

@ownedExpression : OCLExpression[1]@

The expression computing the variable's value.

h2(#GuardParameter). **@GuardParameter@**

A GuardParameter of a Mapping defines a input at which a value is consumed from a connection.

syntax: @guard:typedModel name : type;@

conformsTo "@MappingParameter@":#MappingParameter

*Associations*

@referredTypedModel : ::ImperativeTypedModel[1]@

The TypedModel that contains the passed value.

h2(#GuardParameterBinding). **@GuardParameterBinding@**

A GuardParameterBinding binds a guard parameter of an invoked Mapping to a value of a connection.
Execution of the mapping may use the value. A distinct Mapping invocation occurs for each value
in the connection.

syntax: @formalName consumes expression;@

conformsTo "@MappingParameterBinding@":#MappingParameterBinding

*Attributes*

@isCheck : Boolean[?]@

True if each consumed value must be checked for conformance with the variable's type.
A non-conforming vlaue is a predicate failure causing the mapping invocation to fail without doing anything.
This is a derivation of not ownedInit.type.conformsTo(self.type).

*Associations*

@value : ::ConnectionVariable[1]@

The connection providing the invocation values.

h2(#ImperativeModel). **@ImperativeModel@**

The Model of an Imperative QVT transformation.

conformsTo "@BaseModel@":#BaseModel

h2(#ImperativeTransformation). **@ImperativeTransformation@**

An ImperativeTransfornmation distinguishes a QVTi transformation from other transformations.

conformsTo "@Transformation@":#Transformation

h2(#ImperativeTypedModel). **@ImperativeTypedModel@**

An ImperativeTypedModel defines an input,middle or output modek for the transformation.

conformsTo "@TypedModel@":#TypedModel

*Attributes*

@GuardParameter : Bag(qvtimperative::GuardParameter)@

@NewStatement : Bag(qvtimperative::NewStatement)@

@SimpleParameter : Bag(qvtimperative::SimpleParameter)@

@isChecked : Boolean[?]@

True for an input model.

@isEnforced : Boolean[?]@

True for an output model.

h2(#LoopParameterBinding). **@LoopParameterBinding@**

A LoopParameterBinding binds a guard parameter of an invoked Mapping to the value of a loop variable
in the invoker. Execution of the mapping may use the value.

syntax: @formalName iterates expression;@

Deprecated - WIP for a consuming stream

conformsTo "@MappingParameterBinding@":#MappingParameterBinding

*Attributes*

@isCheck : Boolean[?]@

Whether the variable initialization needs to be checked as a predicate. This is a derivation of not ownedInit.type.conformsTo(self.type).

*Associations*

@value : ::LoopVariable[1]@

The value or collection of values to bind to boundVariable

h2(#LoopVariable). **@LoopVariable@**

A LoopVariable defines the iterator of a MappingLoop.

conformsTo "@VariableDeclaration@":#VariableDeclaration

*Attributes*

@LoopParameterBinding : Bag(qvtimperative::LoopParameterBinding)@

*Associations*

@owningMappingLoop : ::MappingLoop[1]@

h2(#Mapping). **@Mapping@**

An Imperative Mapping extends the abstract declarative mapping to support
explicit nested invocation of mappings with bindings for the invoked mapping's
bound variables.

conformsTo "@Rule@":#Rule

*Attributes*

@MappingCall : Bag(qvtimperative::MappingCall)@

@ownedParameters : Set(qvtimperative::MappingParameter)[*|1]@

@ownedStatements : OrderedSet(qvtimperative::Statement)[*|1]@

h2(#MappingCall). **@MappingCall@**

A MappingCall specifies the invocation of a referredMapping with a set of bindings.
An installed mapping is invoked asynchronously whenever suitable values are available on consumed connections.
An invoked mapping is invoked synchronously with values provided by the caller.

conformsTo "@MappingStatement@":#MappingStatement, "@ReferringElement@":#ReferringElement

*Attributes*

@binding : OrderedSet(qvtimperative::MappingParameterBinding)[*|1]@

The Set of bindings of variables or expressions to forma parameters.

@isInfinite : Boolean[?]@

An infinite MappingCall requires re-invocation of the called mapping to be suppressed to avoid an infinite loop.

Deprecated ?? not needed once install works.

@isInstall : Boolean[?]@

An install MappingCall declares a MappingCall that consumes one or more connections and appends to zero or more connections.
Invocations of the mapping are driven by the availability of values in the connection.

@isInvoke : Boolean[?]@

An invoke MappingCall invokes a Mapping that uses one or more values and appends to zero or more connections.
Invocations of the mapping is requested by the caller.

*Associations*

@referredMapping : ::Mapping[1]@

The Mapping invoked by the MappingCall.

h2(#MappingLoop). **@MappingLoop@**

A MappingLoop supports an iteration of mapping invocations.

syntax: @for name : type in expression {...}@

conformsTo "@MappingStatement@":#MappingStatement, "@ObservableStatement@":#ObservableStatement

*Attributes*

@ownedIterators : OrderedSet(qvtimperative::LoopVariable)[*|1]@

The iterator loop variable.

@ownedMappingStatements : OrderedSet(qvtimperative::MappingStatement)[*|1]@

The statements to be iterated, typically a single MappingCall.

*Associations*

@ownedExpression : OCLExpression[1]@

The expression whose values provide the iterator values.

h2(#MappingParameter). **@MappingParameter@**

A MappingParameter defines a formal parameter of a mapping. The parameter is bound by the
mapping invocation to satisfy the requirements of the derived parameter class.

conformsTo "@VariableDeclaration@":#VariableDeclaration

*Attributes*

@MappingParameterBinding : Bag(qvtimperative::MappingParameterBinding)@

*Associations*

@Mapping : ::Mapping[?]@

h2(#MappingParameterBinding). **@MappingParameterBinding@**

A MappingCallBinding specifies the binding of a single variable or value to
the formal parameter of a mapping as part of its inviocatuon or installation.

conformsTo "@Element@":#Element

*Associations*

@boundVariable : ::MappingParameter[1]@

The formal parameter bound by the call.

@mappingCall : ::MappingCall[?]@

The containing MappingCall.

h2(#MappingStatement). **@MappingStatement@**

A MappingCall specifies the invocation of a referredMapping with a set of bindings
of the bound variables of the referredMapping to values provided in the invocation.
Where Collections of values are provided for isLoop bindings, a distinct invocation
is performed for each distinct permutation of Collection elements.

conformsTo "@Statement@":#Statement

*Associations*

@MappingLoop : ::MappingLoop[?]@

h2(#NewStatement). **@NewStatement@**

A NewStatement creates an instance of a class and binds a name to it.

syntax: @new:typedModel name : type := expression;@

If expression is omitted, a new instance if the tyope is created. If expression is provided, it
computes the 'new' object, typically a singlton supervisor fpr a QVTr key.

conformsTo "@VariableStatement@":#VariableStatement, "@ObservableStatement@":#ObservableStatement

*Associations*

@ownedExpression : OCLExpression[?]@

Optional expression that constructs the new object.

@referredTypedModel : ::ImperativeTypedModel[1]@

The TypedModel to which the new object is added.

h2(#ObservableStatement). **@ObservableStatement@**

An ObservableStatement may involve evaluation of an expression that accesses object properties whose
values may not be available. If not ready,the mapping execution is suspended until the required value
is made available by a notifying SetStatement.

syntax: @observe class::property ...@

conformsTo "@Statement@":#Statement

*Attributes*

@observedProperties : Set(Property)[*|1]@

The properties whose accesses must be checked for readiness.

h2(#SetStatement). **@SetStatement@**

A SetStatement sets an object property to a computed value.

syntax: @notify set name : type := expression;@

If @notify@ is specified, execution defines the property as ready enabling
mappings whose ObservableStatements are waiting for the value to resume.

conformsTo "@ObservableStatement@":#ObservableStatement

*Attributes*

@isNotify : Boolean[?]@

@isOpposite : Boolean[?]@

*Associations*

@ownedExpression : OCLExpression[1]@

@targetProperty : Property[1]@

@targetVariable : VariableDeclaration[1]@

h2(#SimpleParameter). **@SimpleParameter@**

A SimpleParameter of a Mapping defines an input at which a value is passed to the mapping.

syntax: @in:typedModel name : type;@

conformsTo "@MappingParameter@":#MappingParameter

*Associations*

@referredTypedModel : ::ImperativeTypedModel[1]@

The TypedModel that contains the passed value.

h2(#SimpleParameterBinding). **@SimpleParameterBinding@**

A SimpleParameterBinding binds a simple parameter of an invoked Mapping to the value of an expression
computed by the invoker. Execution of the mapping may use the value.

syntax: @formalName uses expression;@

conformsTo "@MappingParameterBinding@":#MappingParameterBinding

*Attributes*

@isCheck : Boolean[?]@

Whether the variable initialization needs to be checked as a predicate. This is a derivation of not ownedInit.type.conformsTo(self.type).

*Associations*

@value : OCLExpression[1]@

The value or collection of values to bind to boundVariable

h2(#Statement). **@Statement@**

A Statement is the basis for all execution by a Mapping.

conformsTo "@NamedElement@":#NamedElement

*Associations*

@Mapping : ::Mapping[?]@

h2(#VariableStatement). **@VariableStatement@**

A VariableStatement is the basis for a Mapping execution that makes a name available to subsequent starements.

conformsTo "@VariableDeclaration@":#VariableDeclaration, "@Statement@":#Statement

Back to the top