Upload
jewel-manning
View
217
Download
0
Tags:
Embed Size (px)
Citation preview
Levels of Independence in Aspect-Oriented Modeling
Workshop on Model-driven Approaches to Middleware Applications Development
June 17, 2003
Jeff Gray, Yuehua Lin, Jing Zhanggray (at) cis.uab.edu
http://www.gray-area.org
This research is funded by DARPA/IXO, under the PCES program.
Shameless Plug for CFPs
Workshop on Domain-Specific Visual Languages September 22, 2003 (GPCE Conference - Erfurt, Germany) Papers due: 30 June
http://www.cis.uab.edu/info/GPCE-DSVL3/
3rd OOPSLA Workshop on Domain-Specific Modeling(Domain-Driven Development Track) October 26, 2003 (OOPSLA - Anaheim, CA) Papers due: 15 August
http://www.cis.uab.edu/info/OOPSLA2003-DSM
Shameless Plug for CFPs
Aspect-Oriented Modeling Workshop October 20-24, 2003 UML Conference (San Francisco, CA) Papers due: 25 August
http://www.cs.iit.edu/~oaldawud/AOM/index.htm
Types of Transformation & Translation
Horizontal transformation Transformation within the same
representation level of abstraction
e.g., MDA PIM->PSM, model weaving (VEST, C-SAW), code refactoring
Vertical translation Typically, translation, or
synthesis, between layers of abstraction
e.g., MIC interpreters, CASE-tool scripting and reverse engineering, PSM->PSI
ComputePositionC++
ComputePositionwith Locking
C++
NavDisplayC++
Current Focus: Vertical transformation – higher level models transform existing code base (rather than synthesize new code orconfiguration information)
Current Focus: New model weaver (C-SAW) integrated within GME
Multiple Levels
of HierarchyReplicatedStructures
ContextSensitive
Motivating Problem – Crossccuting Constraints in Real-Time/Embedded Models
Base models become constrained to capture a particular design
A
B
c d eB
c d e
F
B
c d e
Changeability???
Crosscutting Constraints
Constraints that are related to some global property are dispersed across the model
“Small changes in requirements entail large changes in the structure and configuration”
[Sussman, 1999] Gerald Jay Sussman, “Robust Design through Diversity,” DARPA Amorphous Computing Workshop, 1999..
Motivation
Problems: Difficult to specify and manage cross-
cutting concerns (e.g., constraints) in model-based systems;
Lack of tool support for automatically weaving constraints into models;
New: Lack of a core weaving engine that is independent of modeling environments.
Previous Work (Solution)
Strategies (C++)
Meta-weaverFramework
Domain-SpecificStrategies
strategy ApplyConstraint(constraintName : string, expression : string)
{
addAtom("OCLConstraint", "Constraint", constraintName).addAttribute("Expression", expression);
}
strategy RemoveConstraint(constraintName : string)
ApplyConstraint(constraintName, expression);
}
Domain-specific strategies (encoded in a DSL) are used to instantiate a new model weaver
SpecificationAspects
Domain-specific Models
B
c d e
constraint FOOB2
{
// apply a specific constraint to “B2” only
in Structural models("ProcessingCompound")->
// apply a specific constraint to all nodes beginning with “B” - use wildcard
in Structural models("ProcessingCompound")->
select(p | p.name() == "B*")->PowerStrategy(1, 100);
}
Specification aspects and base model are sent through the weaver
ConstrainedModels
B
c d e1
3
2
The weaver distributes constraints across the base model
Two levels of weaving
WeaponRelease
Sensor
LocDisplay
ComputePosition
Processor#1
Eager Eager
UpdateMap
Eager
LazyLazy
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE project SYSTEM "mga.dtd">
<project guid="{00000000-0000-0000-0000-000000000000}" cdate="Thu Nov 30 14:15:40 2000" mdate="Thu Nov 30 14:15:40 2000" metaguid="{00000000-0000-0000-0000-000000000000}" metaname="PCES"><name>bit1</name><comment></comment><author></author><folder id="id-006a-00000001" kind="RootFolder"><name>bit1</name><folder id="id-006a-00000002" kind="Structural"><name>Structural</name><model id="id-0065-00000001" kind="ProcessingCompound"><name>ProcessingCompound</name><attribute kind="Description" status="meta"><value></value></attribute><atom id="id-0066-00000007" kind="Attribute" role="Attrib"><name>GatesPerBit</name><regnode name="PartRegs"><value></value>
</regnode>
AspectCode
Generation
Processor#2
Aspect Model Weaving
Aspect Code Weaving/Program Transformation
Levels of Independence in Model Weaving Domain independence:
GME meta-models and weaver strategies determine domain of discourse
Platform independence: GME interpreters and weaver strategies map to
platform specific synthesis Tool independence (new):
Separation of core weaving engine with tool-specific adapters
Tool Independence
Requires an exposed API for accessing internal model data structures
Tool-specific adapters written for each new supported tool
Cadena
GME
MetaEdit
Rose
Adaptive Core Weaving Engine
Not unlike AspectJ AJDT
JBuilderEclipse
emacs
Netbeans/FORTE
AJDT
More Info
Representative Publications: Comm. of the ACM, October 2001, “Handling Crosscutting
Constraints in Domain-Specific Modeling” GPCE 2003 (forthcoming), “An Approach for Supporting
Aspect-Oriented Domain Modeling” AOSD Book Chapter (forthcoming), “Two-Level Weaving to
Support Evolution of Model-Based Software”
Demo Prepared to give a very brief demo of:
GME Example weaving of processor assignment constraints into an
avionics system model
Demo
Very brief intro to GME Entire course on this, so very superficial demo
Weaving of constraints into GME models I’ll have to talk fast…
Model Integrated Computing (MIC)
Grew out of over 14 years of research on computer-based systems in aerospace, instrumentation, manufacturing and robotics.
Common challenges:
• “Software” and “environment” are inextricablycombined
• Need for adaptability to changing environmentand end-user needs
• Complex, heterogeneous applications• Stringent reliability and dependability requirements
Domain-Specific Modeling at ISIS:Model Integrated Computing The Generic Modeling Environment (GME) is a
domain-specific modeling tool (>20-person years) It can be utilized in many different domains by
providing a meta-level paradigm description Paradigm describes all of the entities of the
domain, as well as valid relationships
Freely available: http://www.isis.vanderbilt.edu
See November 2001 issue of IEEE Computer
DOMAIN-MODEL
Meta-Modeling Framework
META-MODEL Meta-Model of Stateflow using UML/OCL as meta-modeling language.
Model instance of Stateflow
Model Integrated Computing
Environment Evolution
Meta-Level
Translation
Metaprogramming
Interface
Formal Specifications
Model Interpreters
Models
DSME
Model Builder
ModelInterpretation
ApplicationDomain
App.1
App.2
App.3
Application Evolution
GME
MICApplications