210 likes | 359 Views
Levels of Independence in Aspect-Oriented Modeling. Workshop on Model-driven Approaches to Middleware Applications Development June 17, 2003 Jeff Gray, Yuehua Lin, Jing Zhang gray (at) cis.uab.edu http://www.gray-area.org. This research is funded by DARPA/IXO, under the PCES program.
E N D
Levels of Independence in Aspect-Oriented Modeling Workshop on Model-driven Approaches to Middleware Applications DevelopmentJune 17, 2003 Jeff Gray, Yuehua Lin, Jing Zhanggray (at) cis.uab.eduhttp://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
ComputePositionC++ ComputePositionwith LockingC++ Current Focus: New model weaver (C-SAW) integrated within GME NavDisplayC++ 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 Current Focus: Vertical transformation – higher level models transform existing code base (rather than synthesize new code orconfiguration information)
Multiple Levels of Hierarchy Replicated Structures • Constraints that are related to some global property are dispersed across the model Context Sensitive Crosscutting Constraints Motivating Problem – Crossccuting Constraints in Real-Time/Embedded Models Changeability??? • Base models become constrained to capture a particular design A B F c d e B B c d e c d e
“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.
Domain-Specific Strategies strategy ApplyConstraint(constraintName : string, expression : string) { addAtom("OCLConstraint", "Constraint", constraintName).addAttribute("Expression", expression); } strategy RemoveConstraint(constraintName : string) ApplyConstraint(constraintName, expression); } 3 • Domain-specific strategies (encoded in a DSL) are used to instantiate a new model weaver B Meta-weaverFramework Strategies (C++) B • Specification aspects and base model are sent through the weaver 2 1 c e Domain-specific Models d Specification Aspects c e d 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); } • The weaver distributes constraints across the base model Constrained Models Previous Work (Solution)
<?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> Eager Eager Eager Sensor Compute Position Weapon Release Aspect Code Generation Processor #1 Lazy Lazy UpdateMap LocDisplay Processor #2 Two levels of weaving 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 Rose GME Cadena MetaEdit
JBuilder Netbeans/FORTE Eclipse emacs Not unlike AspectJ AJDT 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 inextricably • combined • Need for adaptability to changing environment • and 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
Meta-Modeling Framework META-MODEL Meta-Model of Stateflow using UML/OCL as meta-modeling language. DOMAIN-MODEL Model instance of Stateflow
Metaprogramming Interface Application Domain Environment Evolution Application Evolution App. 1 App. 2 App. 3 DSME Model Builder Meta-Level Translation Model Interpretation Formal Specifications Model Interpreters Models Model Integrated Computing