![Page 2: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/2.jpg)
www.xactium.com
Overview
Developments in Modelling Technology
xDSLs – A Modelling Methodology
Xactium.
xDSL Technology.
Details of an Application: The Xactium BMS Product.
Conclusion
![Page 3: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/3.jpg)
www.xactium.com
Modelling Technology Development
Assembler
HLLs
Symbolic OO
Scripting
StructuredDesign
OOD FormalExecutable
UML
MDA
DSLAgile
xDSL
![Page 4: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/4.jpg)
www.xactium.com
Generate Code From Models
CompilerCompiler
Platform
SourceCode
SourceCode
bin
System Model
System Model
![Page 5: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/5.jpg)
www.xactium.com
Run the Model
SystemModel
SystemModel
Platform
xDSL EngineCompilerCompiler
SourceCode
SourceCode
![Page 6: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/6.jpg)
www.xactium.com
Code Generation
Pros– Stand-alone.– Arbitrary extension.– No-proprietary platform.– Efficiency.
Cons– Complexity.– Platform Dependence.– Two Representations.– No Domain Specific Semantics.– Difficult to provide tool support.– Difficult to dynamically update.
![Page 7: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/7.jpg)
www.xactium.com
xDSLsPros:
Complete Model of application.Mix of graphical and textual syntax.Can be used for simulation, analysis, real app or code gen.High fidelity.Single representation.Dynamic updates.Reduced time and increased agility.Technology agnostic.
Cons: Careful about proprietary engines.Careful about efficiency.Careful about expertise.More effort up front.
![Page 8: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/8.jpg)
www.xactium.com
Xactium
Provide model-based solutions.
Eclipse based applications.
Started in 2003.
Developed an xDSL engine – XMF.
New product for 2007: Business Motivation Solution (BMS)
Require model based technology to be agile and flexible.
![Page 9: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/9.jpg)
www.xactium.com
Xactium -Applications
Applications:
Aerospace Integrated Modular Avionics – configuration checking.
Testing – run the test case models against application.
Application Simulations – e.g. satellite payload.
Business Management Information – match goals and information system to progress.
Service Oriented Architecture – executable design of component interfaces.
Interactive Applications – agile system development through incremental process definition.
Transformation: XMI transformation against a proprietary API.
![Page 10: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/10.jpg)
www.xactium.com
An xDSL ExampleXactium-BMS answers questions WHAT and WHY in business planning.
Applications include: – Mergers and Acquisitions.– Verification of Standards.– Business Plan Analysis.– Impact Analysis.– Planning and Monitoring Business Change.
BMS based on emerging BMM OMG standard that includes many business concepts.
BMS-Solutions rely on technology for flexible and complex analysis of the concepts.
![Page 11: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/11.jpg)
www.xactium.com
BMS Concepts: Goals
![Page 12: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/12.jpg)
www.xactium.com
BMS Concepts: Sub-Goals
![Page 13: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/13.jpg)
www.xactium.com
BMS Concepts: Tactics
![Page 14: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/14.jpg)
www.xactium.com
BMS Concepts: Units
![Page 15: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/15.jpg)
www.xactium.com
BMS Solution Rules
A business goal g is OK when:– It has at least one supporting tactic t; and– The tactic is established by an organization unit.
A business goal g is OK when all its child goals are OK.
An organization unit uses a single unit of resource for each tactic it establishes.
An organization unit cannot use more resource than it owns.
![Page 16: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/16.jpg)
www.xactium.com
Demo
![Page 17: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/17.jpg)
www.xactium.com
BMS as an xDSL Application
BMS has DSL syntax: the diagrams.
Code generation not appropriate – want to interact with the models.
Interaction and analysis involves an engine that processes BMM data.
Example is just one of many different ways of analysing BMM information.
Require technology that supports flexible dynamic processing of BMM models.
![Page 18: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/18.jpg)
xDSL Technology
xDSL can be implemented in any technology. Some are better than others. Xactium uses the following components:
An xDSL architecture consisting of:
Eclipse as a tool platform for standards and inter-operability.
EMF as a basic data format and to generate data editors.
GMF as a means of generating GEF-based diagram editors.
XMF as an xDSL engine.
![Page 19: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/19.jpg)
Graphical Editor(GMF)
Graphical Editor(GMF)
Technology
RepositoryRepository
TextualxDSL Information
TextualxDSL Information
Model DataModel Editors
(EMF)
Model DataModel Editors
(EMF)
xDSLxDSL
EclipseEclipse
Model Execution Engine(XMF)
OutputOutputGraphical xDSLFunctionality
![Page 20: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/20.jpg)
EMF/GMF/XMF Connectivity
EMFModel
GMFModel
MenusPlugin
MenuHandlers XMF
xDSLDef
![Page 21: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/21.jpg)
BMS Tool with xDSL
![Page 22: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/22.jpg)
BMM Model
![Page 23: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/23.jpg)
BMS Results Model
![Page 24: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/24.jpg)
XMF Features
Meta-programming engine.Object-oriented.Extensive high-level programming features.Rich model processing facilities.Language extension facilities.Open architecture.Seamless Java integration.Dynamic.Written in itself.Can be embedded
![Page 25: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/25.jpg)
BMM Class Definitions in XMF
context Root
@Class Goal metaclass JavaClass extends BMM_Element
EMF_Descriptor("BMM.impl.GoalImpl")
@Operation pprintString(model) "Goal " + self.getName() + " is supported by: " + self.getSupported_by().asSeq() ->collect(t | t.getName()) ->separateWith(", ") end
@Operation toString() "Goal(" + self.getName() + ")" end
end
![Page 26: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/26.jpg)
Language Fragments
Selection from a collection:
@Select x:T from Collection when Guard do Bodyelse Alternativeend
Produce a result:
@Result (Goal,Tactic,Unit) Bodyend
![Page 27: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/27.jpg)
Language FragmentsCheck each element in a collection:
@ForAll x in Collection do Bodyend
Use a unit of resource:
@Use(unit)end
Guarded expressions:
@Unless Condition do Bodyend
![Page 28: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/28.jpg)
xDSL Engine@Operation ok(goal,resources,results,succ,fail) @Select tactic:Tactic from goal.getSupported_by() do @Select unit:Organization_Unit from self.getElements() when unit.establishes(tactic) and resources.lookup(unit.getName()) > 0 do @Result(goal,tactic,unit) @Use(unit) end end end else @Unless goal.getComposed_of().isEmpty() do @ForAll child in goal.getComposed_of() do self.ok(child.getName(),resources,results,succ,fail) end end end end end
![Page 29: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/29.jpg)
xDSL Language EngineeringOK manages a table of resources.Use, increments a usage count for a resource.
@Use(Unit) Bodyend
is shorthand for...
let name = Unit.getName() then usage = resources.lookup(name) then resources = resources.bind(name,usage – 1)in Bodyend
![Page 30: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/30.jpg)
Syntax Class
Syntax classes extend the XMF engine:
@Class Use extends Sugar
@Attribute unit : Performable end
@Attribute body : Performable end
@Constructor(unit,body) ! end
end
![Page 31: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/31.jpg)
Grammars
Define a grammar for the syntax class:
context Use
@Grammar extends OCL.grammar
Use ::= '(' u = Exp ')' b = Exp 'end' {
Use(u,b)
}.
end
![Page 32: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/32.jpg)
Desugar the Syntax
Translate Use to the basic language:
context Use @Operation desugar() [| let name = <unit>.getName() then usage = resources.lookup(name) then resources = resources.bind(name,usage - 1) in <body> end |] end
![Page 33: Www.xactium.com Xactium xDSLs Run Models Not Code Tony Clark tony.clark@xactium.com](https://reader035.vdocument.in/reader035/viewer/2022062717/56649e255503460f94b14912/html5/thumbnails/33.jpg)
Review
xDSLs is an approach to system development.
xDSLs provide advantages over code gen.
xDSLs can be built using any technology, but…
… some technologies make it easier than others…
…XMF has been designed to support xDSLs
Integrated with EMF/GMF
Xactium planning XMF Open Source edition in 2007.
BMS is an xDSL application based on XMF available in 2007.