26.12.2012 Views

ATL: Atlas Transformation Language Specification of the ... - Eclipse

ATL: Atlas Transformation Language Specification of the ... - Eclipse

ATL: Atlas Transformation Language Specification of the ... - Eclipse

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Content<br />

Figure List .................................................................................................................................. 4<br />

Table List.................................................................................................................................... 4<br />

1 Introduction ....................................................................................................................... 5<br />

2 <strong>ATL</strong> Programming <strong>Language</strong> Concepts ........................................................................... 6<br />

2.1 OCL Types and OCL Expressions in <strong>ATL</strong>................................................................... 6<br />

2.1.1 OCL Primitive Types.......................................................................................... 6<br />

2.1.2 OCL Collections ................................................................................................. 7<br />

2.1.3 OCL Model Elements ....................................................................................... 10<br />

2.1.4 Enumerations .................................................................................................... 11<br />

2.1.5 OCL If Expression ............................................................................................ 11<br />

2.1.6 OCL Let Expression ......................................................................................... 11<br />

2.1.7 OCL Comment.................................................................................................. 11<br />

2.1.8 OCL Tips and Tricks ........................................................................................ 12<br />

2.2 <strong>ATL</strong> Modules.............................................................................................................. 12<br />

2.2.1 Preparation ........................................................................................................ 13<br />

2.2.2 Header Section.................................................................................................. 13<br />

2.2.3 Import Section................................................................................................... 14<br />

2.2.4 Helpers .............................................................................................................. 14<br />

2.2.5 Rules ................................................................................................................. 15<br />

2.3 <strong>ATL</strong> Advanced Features............................................................................................. 16<br />

2.3.1 Queries and <strong>the</strong> Generation <strong>of</strong> Text.................................................................. 16<br />

2.3.2 Libraries ............................................................................................................ 17<br />

2.3.3 Complex Headers.............................................................................................. 17<br />

2.3.4 Rules with Multiple Instantiations.................................................................... 18<br />

2.3.5 Navigation and Multiple Instantiations............................................................. 18<br />

2.3.6 Flexible Runtime Instantiation <strong>of</strong> Target Elements.......................................... 19<br />

3 The Structure <strong>of</strong> <strong>the</strong> <strong>ATL</strong> Virtual Machine..................................................................... 21<br />

3.1 Data Types .................................................................................................................. 21<br />

3.1.1 Primitive Types................................................................................................. 21<br />

3.1.2 Composite Types .............................................................................................. 21<br />

3.2 Runtime Data Structures............................................................................................. 22<br />

3.2.1 The pc Register ................................................................................................ 22<br />

3.2.2 The <strong>ATL</strong> Virtual Machine Stack ...................................................................... 22<br />

3.3 Frames......................................................................................................................... 22<br />

3.3.1 Local Variables ................................................................................................. 23<br />

3.3.2 Operand Stack................................................................................................... 23<br />

3.4 Representation <strong>of</strong> Model Elements............................................................................. 23<br />

3.5 Instruction Set Summary............................................................................................. 23<br />

3.5.1 Operand Stack Handling Instructions ............................................................... 24<br />

3.5.2 Control Instructions .......................................................................................... 24<br />

3.5.3 Model Handling Instructions ............................................................................ 24<br />

4 The <strong>ATL</strong> Virtual Machine Instruction Set ...................................................................... 26<br />

4.1 Format <strong>of</strong> Instruction Description............................................................................... 26<br />

4.2 Stack Handling Instructions........................................................................................ 26<br />

4.2.1 The push instruction.......................................................................................... 26

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!