|
|
pl:miw:miw08_hekateatl [2008/05/20 11:07] gjn |
pl:miw:miw08_hekateatl [2019/06/27 15:50] |
====== Opis ======= | |
| |
Marek Mierzwa, <mierzwa.marek@gmail.com> | |
Jakub Ostrowski, <kubaostrowski@gmail.com> | |
| |
How we could use Atlas for ARD, XTT, design and integration? ATL: Atlas Transformation.... eclipse | |
* input | |
* output | |
| |
====== Spotkania ====== | |
| |
| |
| |
===== 08.02.26 ===== | |
* szto eta atlas? demo | |
| |
| |
| |
===== 08.03.11 ===== | |
* model [[hekate:hekate_concepts#ard|ARD]] w ATL | |
| |
| |
| |
===== 080318 ===== | |
* próba opisu całego ARD z TPH przy pomocy [[https://ai.ia.agh.edu.pl/wiki/hekate:hekate_markup_language|HML]] jako p. wyjścia dla XMI | |
| |
===== 080401 ===== | |
* co to jest [[http://en.wikipedia.org/wiki/XML_Metadata_Interchange | |
|XMI]]? jakie ogr. nakłada [[http://www.omg.org/technology/documents/formal/xmi.htm|specyfikacja]] | |
* jak stworzyć model XMI dla ARD (opierając się na HML) | |
* zrobić KM3 dla ARD | |
| |
| |
| |
| |
| |
| |
====== Projekt ====== | |
| |
* przyklad kodu KM3 (Source Metamodel) | |
| |
<code java> package ARD { | |
| |
class Wlasnosc { | |
| |
attribute name : String; | |
| |
reference atrybuty[*] container : Atrybut opposite of wlasnocAtrybut; | |
| |
reference dependency container : Wlasnosc opposite of dependencyAtrybut; | |
| |
reference dependencyWlasnosc[*] : Wlasnosc opposite of dependency; | |
} | |
| |
class Atrybut { | |
| |
attribute name : String; | |
| |
reference wlasnoscAtrybut[0-1] : Wlasnosc opposite of atrybuty; | |
} | |
} | |
| |
package Primitive Types { | |
| |
datatype String; | |
} | |
</code> | |
* kod XMI (Source Model) (the lowest level) | |
| |
<code> | |
<Ard name="thermostat"> | |
| |
<property name="month"/> | |
| |
<property name="day"/> | |
| |
<property name="hour"/> | |
| |
<property name="today"> | |
| |
<dependency name="day"/> | |
| |
</property> | |
| |
<property name="operation"> | |
| |
<dependency name="today"/> | |
| |
<dependency name="hour"/> | |
| |
</property> | |
... | |
</Ard> | |
</code> | |
* opis ARD z TPH przy pomocy HML jako p. wyjścia dla XMI | |
<code> | |
<hml name = "termostat"> | |
<attribute_set> | |
<att name = "thermostat" id = "att_0"/> | |
<att name = "time" id = "att_1"/> | |
<att name = "temperature" id = "att_2"/> | |
<att name = "date" id = "att_3"/> | |
<att name = "thermostat_settings" id = "att_4"/> | |
<att name = "operation" id = "att_5"/> | |
<att name = "season" id = "att_6"/> | |
<att name = "today" id = "att_7"/> | |
<att name = "hour" id = "att_8"/> | |
<att name = "month" id = "att_9"/> | |
<att name = "day" id = "att_10"/> | |
</attribute_set> | |
| |
<property_set> | |
<property name = "thermostat_pr" id="prp_0"> | |
<attref ref = "att_0"/> | |
</property> | |
<property name = "time_temp_pr" id="prp_1"> | |
<attref ref = "att_1"/> | |
<attref ref = "att_2"/> | |
</property> | |
<property name = "time_pr" id="prp_2"> | |
<attref ref = "att_1"/> | |
</property> | |
<property name = "temperature" id="prp_3"> | |
<attref ref = "att_2"/> | |
</property> | |
<property name = "date_hour_seasion_operation_pr" id="prp_4"> | |
<attref ref = "att_3"/> | |
<attref ref = "att_8"/> | |
<attref ref = "att_6"/> | |
<attref ref = "att_5"/> | |
</property> | |
<property name = "date_hour_pr" id="prp_5"> | |
<attref ref = "att_3"/> | |
<attref ref = "att_8"/> | |
</property> | |
<property name = "season_operation_pr" id="prp_6"> | |
<attref ref = "att_6"/> | |
<attref ref = "att_5"/> | |
</property> | |
<property name = "day_month_today_pr" id="prp_7"> | |
<attref ref = "att_10"/> | |
<attref ref = "att_9"/> | |
<attref ref = "att_7"/> | |
</property> | |
<property name = "day_today_pr" id="prp_8"> | |
<attref ref = "att_10"/> | |
<attref ref = "att_7"/> | |
</property> | |
<property name = "thermostat_settings_pr" id="prp_9"> | |
<attref ref = "att_0"/> | |
</property> | |
<property name = "operation_pr" id="prp_10"> | |
<attref ref="att_1"/> | |
</property> | |
<property name = "season_pr" id="prp_11"> | |
<attref ref="att_2"/> | |
</property> | |
<property name = "today_pr" id="prp_12"> | |
<attref ref="att_3"/> | |
</property> | |
<property name = "hour_pr" id="prp_13"> | |
<attref ref="att_4"/> | |
</property> | |
<property name = "month_pr" id = "prp_14"> | |
<attref ref = "att_5"/> | |
</property> | |
<property name = "day_pr" id = "prp_15"> | |
<attref ref = "att_6"/> | |
</property> | |
<property name = "date" id = "prp_16"> | |
<attref ref = "att_3"/> | |
</property> | |
</property_set> | |
| |
<tph> | |
<trans src="prp_0" dst="prp_1"/> | |
<trans src="prp_1" dst="prp_2"/> | |
<trans src="prp_1" dst="prp_3"/> | |
<trans src="prp_2" dst="prp_4"/> | |
<trans src="prp_3" dst="prp_9"/> | |
<trans src="prp_4" dst="prp_5"/> | |
<trans src="prp_4" dst="prp_6"/> | |
<trans src="prp_5" dst="prp_13"/> | |
<trans src="prp_5" dst="prp_16"/> | |
<trans src="prp_6" dst="prp_10"/> | |
<trans src="prp_6" dst="prp_11"/> | |
<trans src="prp_16" dst="prp_7"/> | |
<trans src="prp_7" dst="prp_14"/> | |
<trans src="prp_7" dst="prp_8"/> | |
<trans src="prp_8" dst="prp_15"/> | |
<trans src="prp_8" dst="prp_12"/> | |
</tph> | |
| |
<ard> | |
<dep independent="prp_15" dependent="prp_12"/> | |
<dep independent="prp_14" dependent="prp_11"/> | |
<dep independent="prp_13" dependent="prp_10"/> | |
<dep independent="prp_12" dependent="prp_10"/> | |
<dep independent="prp_10" dependent="prp_9"/> | |
<dep independent="prp_11" dependent="prp_9"/> | |
</ard> | |
</hml> | |
</code> | |
| |
* KM3 (opis ARD z TPH przy pomocy HML) | |
<code> | |
package HML { | |
abstract class Node { | |
reference parent[0-1] : Element oppositeOf children; | |
} | |
class Element { | |
reference children[*] ordered container : Node oppositeOf parent; | |
} | |
//Ard | |
class Ard extends Node { | |
} | |
class Dep extends Element { | |
attribute independent : String; | |
attribute dependent : String; | |
} | |
//Tph | |
class Tph extends Node { | |
} | |
class Trans extends Element { | |
attribute src : String; | |
attribute dst : String; | |
} | |
//Property_set | |
class Property_set extends Node { //czy bez extends, bo reference ma byc do Property a nie Element | |
// (a moze moze zostac, bo Property dziedziczy z Element?)? | |
} | |
class Property extends Element { | |
attribute name : String; | |
attribute id : String; | |
reference parent[0-1] : Element oppositeOf children; | |
} | |
class Attref extends Element { | |
attribute ref : String; | |
} | |
//Attribute_set | |
class Attribute_set extends Node { | |
} | |
class Att extends Element { | |
attribute name : String; | |
attribute id : String; | |
} | |
| |
} | |
| |
package PrimitiveTypes { | |
datatype Boolean; | |
datatype Integer; | |
datatype String; | |
} | |
</code> | |
| |
====== Sprawozdanie ====== | |
| |
| |
| |
| |
| |
====== Materiały ====== | |
| |
[[http://modelware.inria.fr/rubrique.php3?id_rubrique=12|Co nieco o ATL]] | |
| |
[[http://en.wikipedia.org/wiki/ATLAS_Transformation_Language|ATL Wikipedia eng]] | |
| |
[[http://www.eclipse.org/m2m/atl/|ATLAS i Eclipse]] | |
| |
[[http://www.eclipse.org/m2m/atl/doc/ATL_User_Manual%5Bv0.7%5D.pdf|ATL User Manual]] | |
| |
[[http://www.eclipse.org/m2m/atl/doc/ATLUseCase_Families2Persons.pdf |Prezentacja prostego przykladu uzycia ATL(takie "Hello World" dla ATL)]] | |
| |
[[http://www.eclipse.org/m2m/atl/usecases/index.php|Przyklady uzycia]] | |
| |
[[http://www.eclipse.org/m2m/atl/publication.php|Publikacje o ATL]] | |
| |
[[http://www.eclipse.org/gmt/am3/km3/doc/KernelMetaMetaModel%5Bv00.06%5D.pdf|KM3 Manual]] | |
| |
| |