Upload
conrad-sullivan
View
215
Download
0
Embed Size (px)
Citation preview
UDM An Infrastructure for Implementing Domain-Specific Modeling Languages
Endre Magyari, Arpad Bakay,
Andras Lang, Tamas Paka,
Attila Vizhanyo, Aditya Agarwal, and
Gabor Karsai
Institute for Software-Integrated Systems
PO.Box 1829B
Vanderbilt University
Nashville, TN 37235, USA
Overview
Domain-Specific MDA – Model-driven Development + Tool Integration
UDM: Unified Data Model– Framework architecture
Metamodeling, generator, back-ends
– Capabilities Metaprogrammability, multiple backends, reflection
Lessons learned
Model-Driven ArchitectureA Transformational Paradigm for Software Development
Development process:•Platform Independent Model: a view of the
system from a platform independent viewpoint•Platform Specific Model: a view of the system
from a platform-specific viewpoint Key points:
1.Relevant issue: platform-independence 2.Platform Specific information is used 3.Transformations are models
Source: MDA Guide V 1.0.1 (www.omg.org)
MDA in a Domain-Specific context:1.Models are not accidental but essential to
system development2.Models are expressed in modeling languages
which are, in turn, defined in terms of a meta-model
3.Models undergo transformations during development that lead to executables
Domain-Specific MDADomain-Specific MDA - Model-Integrated Computing
Tool Integration
Metamodeling
Analysis
Execution
Metamodels
Domainmodels
Translation
Synthesis & Generation
Model-ModelTransformations
Domain-specific modeling
Need: uniform, configurable “data layer”
Need: uniform, configurable “data layer”
The UDM Framework
GME UML
GME/UML Interpreter
UDM.exe XML (Meta) <Uml.dtd>
.cpp .h .dtd
User Program
UDM Generated code
API Meta-objects
XML data file
Validates
UdmCopy
XML MEM MGA
GME
Backends
Binary file
CORBA
Network
Generic API OCL Eval
Metamodeling of data:
UML class diagrams
API Code Generator:Builds C++ “handle” classes
Backends:Generic object implementation
Constraint checker:
OCL evaluator
Reflection:Meta-objects
UDM: Metamodeling and generation
namespace utest {
class A; class Rel; class B; class C;
class A : public Object {
public:
static Uml::Class meta;
A(); // + Other constructors
static A Create(...);
Udm::ChildrenAttr<utest::C> children() const;
};
class Rel : public Object {
public:
static Uml::Class meta;
Rel() // + Other constructors
static Rel Create(...);
};
class B : public A {
public:
static Uml::Class meta;
B(); // + Other constructors
static B Create(...);
Udm::AssocAttr<utest::C> dst() const;
};
class C : public Object {
public:
static Uml::Class meta;
C(); // + Other constructors
static C Create(...);
Udm::AssocAttr<utest::B> src() const;
Udm::ParentAttr<utest::A> parent() const;
}; }
UDM: Backends
GEN
C++ API:•Classes•Attributes•Associations•…
Custom Interface
UDM BACK-END
DOM
GME
MEM
XML
GME
DTDMETAMODEL
CORBA
METADATA
FILE
NETWORK
Uniform Interface
UDM: Capabilities
Metaprogrammability:• Data structures are fully defined by the (meta)model• Consistency rules define well-formednessMultiple backends:• DOM/XML: Data is persisted as XML files• GME/MGA: Direct access to model databases• MEM: Fast/simple objects + binary files• CORBA/NET: Compact network format for data exchangeReflection:• All UDM Objects have a “meta” attribute pointing to a “meta”
objects (instance of Uml::Class or Uml::Assoc…)• The Uml metamodel is always included• APIs are available for discovery and generic operations
UDM: UML meta-metamodel
Lessons learned
Generic packages (like UDM) are essential if a large number of data models are used
– Example: tool integration framework Performance penalty is acceptable Uniform access means no change when switching backends
(XML, GME, CORBA, etc.) Generic text interface (parsers and unparsers) are also feasible
and useful Consistency checking of data structures (via OCL) offers new
ways for ensuring data integrity Generic (internal) APIs allow generic tools
Generic packages (like UDM) are essential if a large number of data models are used
– Example: tool integration framework Performance penalty is acceptable Uniform access means no change when switching backends
(XML, GME, CORBA, etc.) Generic text interface (parsers and unparsers) are also feasible
and useful Consistency checking of data structures (via OCL) offers new
ways for ensuring data integrity Generic (internal) APIs allow generic tools