Download ATL User Manual - first version

Transcript
4.3.4
Expressions tips & tricks............................................................................................................... 30
4.4
ATL Helpers ....................................................................................................................................... 31
4.4.1
Helpers .......................................................................................................................................... 31
4.4.2
Attributes....................................................................................................................................... 32
4.4.3
Limitations .................................................................................................................................... 33
4.5
ATL Rules........................................................................................................................................... 34
4.5.1
ATL imperative code .................................................................................................................... 34
4.5.1.1
The assignment statement.................................................................................................... 34
4.5.1.2
The if statement ................................................................................................................... 35
4.5.1.3
The for statement ................................................................................................................. 36
4.5.1.4
Current limitations ............................................................................................................... 36
4.5.2
Matched Rules............................................................................................................................... 36
4.5.2.1
Source pattern ...................................................................................................................... 37
4.5.2.2
Local variables section ........................................................................................................ 38
4.5.2.3
Simple target pattern element .............................................................................................. 38
4.5.2.4
Iterative target pattern element ............................................................................................ 40
4.5.2.5
Imperative block section...................................................................................................... 42
4.5.3
Called Rules .................................................................................................................................. 43
5
4.6
ATL Queries ....................................................................................................................................... 44
4.7
ATL Keywords.................................................................................................................................... 45
4.8
ATL Tips & Tricks.............................................................................................................................. 45
The ATL Tools........................................................................................................................................... 47
5.1
Installation ......................................................................................................................................... 47
5.1.1
Installing ATL............................................................................................................................... 47
5.1.2
Installing AM3 .............................................................................................................................. 48
5.1.2.1
Installing AM3 from binaries .............................................................................................. 48
5.1.2.2
Installing AM3 from sources ............................................................................................... 48
5.2
Perspectives ....................................................................................................................................... 49
5.2.1
ATL perspective............................................................................................................................ 49
5.2.1.1
Navigator ............................................................................................................................. 50
5.2.1.2
Editors.................................................................................................................................. 52
5.2.1.3
Outline ................................................................................................................................. 54
5.2.1.4
Problems .............................................................................................................................. 55
5.2.1.5
Properties ............................................................................................................................. 55
5.2.1.6
Error Log ............................................................................................................................. 57
5.2.1.7
Console ................................................................................................................................ 57
5.2.2
ATL Debug perspective ................................................................................................................ 57
5.2.2.1
Debug .................................................................................................................................. 58
5.2.2.2
Variables.............................................................................................................................. 59
5.2.2.3
Breakpoints.......................................................................................................................... 59
5.2.2.4
Editors.................................................................................................................................. 59
5.2.2.5
Outline ................................................................................................................................. 59
5.2.2.6
Console ................................................................................................................................ 60
5.2.2.7
Tasks.................................................................................................................................... 60
5.2.3
AM3 perspective ........................................................................................................................... 60
5.3
Programming ATL ............................................................................................................................. 61
5.3.1
Creating an ATL project ............................................................................................................... 62
5.3.2
Designing metamodels with KM3................................................................................................. 63
5.3.3
Creating an ATL file ..................................................................................................................... 65
5.3.3.1
The ATL File Wizard .......................................................................................................... 65
5.3.3.2
Creating an ATL file from scratch....................................................................................... 67
5.3.4
Compiling an ATL file.................................................................................................................. 67
5.3.5
Setting up an ATL run launch configuration................................................................................. 68
5.3.5.1
The ATL Configuration tab ................................................................................................. 70
5.3.5.2
The Model Choice tab ......................................................................................................... 70