1 / 40

LinTraP : Primitive Operators for the Execution of Model Transformations with LinTra

LinTraP : Primitive Operators for the Execution of Model Transformations with LinTra. Loli Burgueño 1 , Eugene Syriani 2 , Manuel Wimmer 3 , Jeff Gray 2 and Antonio Vallecillo 1 1 Atenea Research Group, University of Malaga 2 Software Engineering Research Group, University of Alabama

keith
Download Presentation

LinTraP : Primitive Operators for the Execution of Model Transformations with LinTra

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LinTraP: Primitive Operators for the Execution ofModel Transformationswith LinTra Loli Burgueño1, Eugene Syriani2, Manuel Wimmer3, Jeff Gray2 and Antonio Vallecillo1 1 Atenea Research Group, University of Malaga 2 Software Engineering Research Group, University of Alabama 3 Business Informatics Group, Vienna University of Technology

  2. Model-DrivenEngineering • Both because of the • model size • and the transformation logic LinTraP: Primitive Operators for the Execution of MTs with LinTra • Hence the problems being addressed using MDE approaches are increasingly complex: • From “FamiliesToPersons”to DNA Models • From small databases in a PC to Big Data in the Cloud

  3. Model-DrivenEngineering • MDE tools and mechanisms are lagging behind • Do not scale well • Do not support concurrency • Do not support distribution • Etc. • They are not up to the current requirements from real industrial practices LinTraP: Primitive Operators for the Execution of MTs with LinTra The current tools we are using do not even deal with medium-size models that do not fit into the RAM memory of a single machine

  4. Motivation LinTraP: Primitive Operators for the Execution of MTs with LinTra • In practice, we need to • Store and handle models with millions of instances • Transform these models in reasonable amount of time • Make better use of our current IT infrastructure • Networks of distributed computers • Multi-core machines

  5. LinTra • Proposal: • Make use of Linda, a mature and widely used Coordination language for concurrent and distributed programming • It uses the “blackboard” approach, based on “shared” tuple spaces • Every tuple space can be distributed over sets of machines, in a user-transparent way LinTraP: Primitive Operators for the Execution of MTs with LinTra • LinTra[Burgueno 2013, Burgueno et al. 2013] • Brings concurrency and distributioninto the Model Transformations area • Addresses the problem of storing and handling large and very large models (memory allocation, execution times)

  6. Linda read(?, “World”) Tuple(25, “dollars”) write(“Bye”, “World”) Tuple(“Bye”, “World”) write(25, “dollars”) Blackboard (tuple space) LinTraP: Primitive Operators for the Execution of MTs with LinTra Linda: coordination language for parallel processes

  7. LinTra: Architecture • Architecture (coarse-grained) HMTL (high-level MTL) LMTL (low-level MTL: Java) Linda Blackboard LinTraP: Primitive Operators for the Execution of MTs with LinTra • Mature Linda implementations available • For different general purpose languages (GPL) • GPL are too low level languages to write MTs • We will place another language (MTL) on top that compiles to GPLs

  8. LinTra: Architecture HMTL (high-level MT) LMTL (low-level MT: Java) Linda Blackboard … Linda Blackboard Interface implements Adapter Adapter Adapter GigaSpaces Coherence HazelCast LinTraP: Primitive Operators for the Execution of MTs with LinTra • No common interface shared by all Linda implementations but we want the technology to be independent of our language • we build an interface to abstract the blackboard access • it deals with the synchronization mechanisms

  9. LinTra: Architecture HMTL (high-level MT) LMTL (low-level MT: Java) Linda Blackboard • partitions the input model • organizes the tasks to be executed by the slaves • Slaves • read (a subset of) the input model from the Blackboard • transform the submodel assigned • write the output model LinTraP: Primitive Operators for the Execution of MTs with LinTra • LMTL: jLinTra • Out-place MTs • LMTL for MT execution/engine • MTs written in Java • Representation of metamodels and models in Java • Traceability • Master-Slave • Master

  10. LinTra: Performance LinTraP: Primitive Operators for the Execution of MTs with LinTra Ubuntu 12.04 64 bits 11.7 Gb of RAM 16 cores of 2.67GHz

  11. LinTra: Architecture HMTL (high-level MT) LinTraP LMTL (low-level MT: Java) Linda Blackboard HMTL … ATL QVT-O ETL ATL-2-LinTraP QVTO-2-LinTraP ETL-2-LinTraP compiles to LinTraP LinTraP: Primitive Operators for the Execution of MTs with LinTra • HMTL • Existing MTL compile to LinTraP • Existing MTs or MTs written in existing languages can be executed with LinTra

  12. LinTraP These primitive operators encapsulate the LinTra implementation code that makes the parallel and distributed execution possible Refactor the code to make it reusable for the compilations from HMTL to LMTL An abstraction of the implementation details of the general-purpose language in which LinTra is implemented LinTraP: Primitive Operators for the Execution of MTs with LinTra LinTraP: collection of minimal, yet sufficient, primitive operators that can be composed to (re-)construct any out-place and unidirectional MTL

  13. LinTraP LinTraP: Primitive Operators for the Execution of MTs with LinTra • Primitives(continuation of [Syriani et al. 2013]) • For MT setup • PartitionCreator • For MT execution • Composer • Creator • Finder • Tracer • CondChecker • Declarer • Assigner

  14. LinTraP • Syntax: • PartitionCreator(input : Model, OE : OclExpression, maxSize : Integer) • e.g.: PartitionCreator(myModel, ‘’, 3) p1 myModel p2 p4 p3 LinTraP: Primitive Operators for the Execution of MTs with LinTra • Primitives for the Concurrent Platform • PartitionCreator • Model entities are independent from each other • Sizeof every partition is required • Possibility of specifying which elements belong to each partition

  15. LinTraP myModel p2 p1 p3 • The purpose of OE is to give the user the possibility to optimize the MT execution. LinTraP: Primitive Operators for the Execution of MTs with LinTra • Primitives for the Concurrent Platform • PartitionCreator • Model entities are independent from each other • Sizeof every partition is required • Possibility of specifying which elements belong to each partition • Syntax: • PartitionCreator(input : Model, OE : OclExpression, maxSize : Integer) • e.g.: PartitionCreator(myModel, ‘Figure.allInstances->select(f | f.isSquare)’, 2)

  16. LinTraP • Syntax: • Tracer (composer : Composer, e : [ Entity | Collection(Entity)], creatorName : String ) : Collection(Entity) Tracer(Triangle2Circle, 2, circleCreator) circ=8 20 1 tr = 2 2 8 LinTraP: Primitive Operators for the Execution of MTs with LinTra • Primitives for the MTL • Tracer • The Tracer provides access to the trace model needed by out-place MT engines for linking the entities in the output model • Given an input entity or set of entities that match the pre-condition of a rule, the traces give access to the entities that were created in the post-condition, and vice versa.

  17. LinTraP • Finder • allows the retrieval of elements from the Blackboard that satisfy a constraint • Syntax: • Finder(expr : OclExpression) : Collection(Entity) LinTraP: Primitive Operators for the Execution of MTs with LinTra • Primitives for the MTL • CondChecker • allows the querying of the input model in the Blackboard with an OCL expression that evaluates to a boolean value • Syntax: • CondChecker(expr : OclExpression) : Boolean

  18. LinTra Transformation Process LinTraP: Primitive Operators for the Execution of MTs with LinTra

  19. Case Study:Activity Diagrams to Petri Nets [Syriani & Ergin 2012] LinTraP: Primitive Operators for the Execution of MTs with LinTra

  20. Case Study:Activity Diagrams to Petri Nets [Syriani & Ergin 2012] LinTraP: Primitive Operators for the Execution of MTs with LinTra

  21. Case Study:Activity Diagrams to Petri Nets [Syriani & Ergin 2012] LinTraP: Primitive Operators for the Execution of MTs with LinTra ComposerActNode { if (CondChecker(e.oclIsTypeOf(ActivityNode))) { Creator(Transition, {[name, e.name], [net, pNet]}, 't1') Creator(Arc, {[transition, Tracer(ActNode, e, 't1')], [place, Tracer(ActNode, e, 'p')], [toPlace, true], [net, pNet]}) Creator(Place, {[name, e.name], [net, pNet], [token, 0]}, 'p') Creator(Arc, {[transition, Tracer(ActNode, e, 't2')], [place,Tracer (ActNode, e, 'p')], [toPlace, false], [net, pNet]}) Creator(Transition, {[name, e.name], [net, pNet]}, 't2') } }

  22. Conclusions and Future Work • Create compilers HMTL (high-level MT) • Annotations • Complete implementation of the primitives LinTraP LMTL (low-level MT: Java) Linda Blackboard • New MTL • Further benchmarking LinTraP: Primitive Operators for the Execution of MTs with LinTra Next steps

  23. References LinTraP: Primitive Operators for the Execution of MTs with LinTra [Burgueno 2013] L. Burgueño. Concurrent Model Transformations based on Linda. Doctoral Symposium @ MODELS, pages 9-16, 2013. [Burgueno et al. 2013] L. Burgueño, J. Troya, M. Wimmer, and A. Vallecillo. On the Concurrent Execution of Model Transformations with Linda. In BigMDE Workshop @STAF, 2013. [Syriani & Ergin 2012] E. Syriani and H. Ergin. Operational semantics of UML activity diagram: An application in project management. In Proceedings of MoDRE Workshop @ RE, pages 1-8, 2012. [Syriani et al. 2013] E. Syriani, H. Vangheluwe, and B. LaShomb. T-core: a framework for custom-built model transformation engines. Software & Systems Modeling, pages 1-29, 2013.

  24. LinTraP: Primitive Operators for the Execution ofModel Transformationswith LinTra Thanks! Loli Burgueño1, Eugene Syriani2, Manuel Wimmer3, Jeff Gray2 and Antonio Vallecillo1 1 Atenea Research Group, University of Málaga 2 Software Engineering Research Group, University of Alabama 3 Business Informatics Group, Vienna University of Technology

  25. Metamodels and Models representation package classMM; public class Attribute extends NamedElt { String id; Boolean multivalued; String typeID; Boolean typeIsComposed = false; String ownerID; Boolean ownerIsComposed = false; public Attribute (String id, String name, Boolean multiValued, String ownerId, String typeId){ super(name); this.id = id; this.multivalued = multiValued; this.ownerID = ownerId; this.typeID = typeId; } public String getId() { returnid; } public void setId(String id) { this.id = id; } public Boolean getMultivalued() { returnmultivalued; } public void setMultivalued(Boolean multivalued) { this.multivalued = multivalued; } LinTraP: Primitive Operators for the Execution of MTs with LinTra MMs are represented by means of Java classes Models are composed of class instances (objects)

  26. Metamodels and Models representation • Relationships • Traces • F: Stringn Stringn Type id = “1_Dt2T” F DataType id = “1” Type id = “2_Dt2T” F DataType id = “2” Column id = “3_A2C” F Attribute id = “3” LinTraP: Primitive Operators for the Execution of MTs with LinTra Why does every model element need an ID?

  27. Metamodels and Models representation ATL Column id = “1_A2C” F Column id = “2_A2C” Attribute id = “1” F Attribute id = “2” Column id = “3_C2C.1” F Class id =“3” att ={“1”, “2”} F Table id = “3_C2C.2” Table id = “3_C2C.2” key= {“3_C2C.1”} col= {“1_A2C”,“2_A2C”} F F F LinTraP: Primitive Operators for the Execution of MTs with LinTra • Why to use IDs? • Efficiency

  28. Model Transformation • MT Execution config.:Master/Slave+Shared Memory • Master organizes the work specifying the model portions to be transform at once by a thread and puts them in one specific zone of the tuple space • Every slave access to that specific zone takes one piece of work, and transforms the elements the piece of work specifies • Needed synchonization mechanisms: a semaphore LinTraP: Primitive Operators for the Execution of MTs with LinTra • Out-place transformation • Blackboard split in different areas • One area per each input model • One area per each output model • One area reserved to internal transformation purposes

  29. Model Transformation Master Slaves Notify ? Serialization LinTraP: Primitive Operators for the Execution of MTs with LinTra • Transformation execution: Master/Slave+Shared Memory

  30. Model transformation type.name := datatype.name LinTraP: Primitive Operators for the Execution of MTs with LinTra

  31. Model transformation type.name := datatype.name WorkExcerpt we = lookForWork();while (we!=null){ Collection<Objects> in = retrieveElements(we, srcTS);            Collection<Objects> out = (new Class2Relational()).transforms(in);trgTS.putAll(out);            we = lookForWork(); }     Collection<Object> out = new ... for(Object o : in) { if(o instanceof Class){ ruleClass2Table((Class)o, out); } else if (o instanceofDataType){ ruleDataType2Type((DataType)o, out); } else if... } return out; Type t = new Type(f(dt.getId()), dt.getName()); out.add(t); LinTraP: Primitive Operators for the Execution of MTs with LinTra

  32. Overview HMTL • Input Metamodels • Ecore, KM3, ... • Output Metamodels • Ecore, KM3, ... conforms to conforms to Input Models • Output Models • XMI, data flow… • In a single machine, • distributed • Transfo • ATL, QVT, • own language, … • XMI, data flow, … • In a single machine, • distributed LMTL Input Metamodels (Java) OutputMetamodels (Java) conforms to conforms to Input Model • Output Model • Blackboard format • In the cloud Transfo(java) • Blackboard format • In the cloud Thread 1 Thread 2 … Thread N Linda Linda Blackboard Implementation LinTraP: Primitive Operators for the Execution of MTs with LinTra

  33. LinTraP LinTraP: Primitive Operators for the Execution of MTs with LinTra • Primitives for the MTL • Composer • allows the grouping of a combination of primitives • Syntax: • Composer<composerName> { <combination of primitives> }

  34. LinTraP LinTraP: Primitive Operators for the Execution of MTs with LinTra • Primitives for the MTL • Creator • creates an entity given its data type and its features (attributes and bindings) and writes it in the Blackboard • Syntax • Creator(type : Factory, features : Dictionary<feature : String, value: [OclDataType | Entity ]>) • Creator(type : Factory, features : Dictionary<feature : String, value: [OclDataType | Entity ]>, name: String) • e.g.: Creator(Family, {[name, ‘Smith’]}, ‘f1’)

  35. LinTraP LinTraP: Primitive Operators for the Execution of MTs with LinTra • Primitives for the MTL • Declarer • allows to create a global variable • that can be accessed by its name from any other primitive • that is accessed by all the Slaves involved in the transformation process • Syntax: • Declarer(type : [OclDataType | Entity], name : String)

  36. LinTraP LinTraP: Primitive Operators for the Execution of MTs with LinTra • Primitives for the MTL • Assigner • sets the value of a variable defined by a Declarer • Syntax: • Assigner(varName : String, value : [OclDataType | Entity | Creator]) • if value : Creator • the element is stored in the Blackboard • the variable points to it • every time the variable is updated, the corresponding value in the Blackboard is overwritten • if value : [ OclDataType | Entity ] • the variable is stored in memory and accessed while the MT is executed • it is not a persistent value in the Blackboard

  37. Integration with LinTra LinTraP: Primitive Operators for the Execution of MTs with LinTra LinTra class diagram metamodel

  38. Integration with LinTra LinTraP: Primitive Operators for the Execution of MTs with LinTra • MT setup • Extract rule scheduling • All rules belonging to the same rule layer can be executed in parallel • All rules in one layer must have terminated before rules in a subsequent layer can begin • Compile MT to LinTraP

  39. Case Study:Activity Diagrams to Petri Nets LinTraP: Primitive Operators for the Execution of MTs with LinTra Composer Signal { if (CondChecker(e.oclIsTypeOf(SignalNode))) Creator(Transition, {[name, e.name], [net, pNet]}, 't') Creator(Arc, {[transition, Tracer(Signal, e, 't')], [place, Tracer(Signal, e, 'p')], [toPlace, true], [net, pNet]}) Creator(Place, {[name, e.name], [net, pNet]}, 'p') }

  40. Case Study:Activity Diagrams to Petri Nets LinTraP: Primitive Operators for the Execution of MTs with LinTra Composer MatchSignals { if (CondChecker(e.oclIsTypeOf(SignalNode))) for(a in Finder(‘AcceptSignalNode.allInstances->select(as| e.activityDiag= as.activityDiagand e.signalId = a.signalId’) Creator (Arc, {[place, Tracer (Signal, e, 'p')], [transition, Tracer (MatchSignals, {e, a}, 't')], [toPlace, false], [net, pNet]}) Creator (Transition, {[name, e.name+'-'+a.name], [net, pNet]}, 't') Creator (Arc, {[place, Tracer (AcceptSignal, e, 'p')], [transition, Tracer (MatchSignals, {e, a}, 't')], [toPlace, true], [net, pNet]}) }

More Related