240 likes | 448 Views
Model-Integrated Computing: Foundations. DSML Composition Model Synthesis and Model Transformation Janos Sztipanovits March 11, 2003. Application. Tools. Application-Specific Models. Sensor System. Control. User Interface. Decision Support. DS Model Libraries/
E N D
Model-Integrated Computing:Foundations DSML Composition Model Synthesis and Model Transformation Janos Sztipanovits March 11, 2003
Application Tools Application-Specific Models Sensor System Control User Interface Decision Support DS Model Libraries/ Patterns Domain-Specific Modeling Technology DI Model Libraries/ Patterns Domain-Independent Models (models of computations: SDF, FSM, CSP, …) Auto-Generated Code Model-based Generators Generator Technology Library Components Library Components Library Components Library Components Component Libraries Framework Libraries Replication API CORBA IDL QoS API POSIX API QoS ORB OS Scheduling Fault Tolerance Middleware OS Platform Middleware Services and OS Model-Based Design andComposition
Platforms(There are many…) Time-Triggered Architecture (distributed, hard real-time, safe) Servo Controller Servo Controller Servo Controller Servo Controller CNI CNI CNI CNI TTP Controller TTP Controller TTP Controller TTP Controller Control Data Control Data Processor Processor Control Data Control Data Processor Processor BG BG BG BG BG BG BG BG TTP Bus Integration framework, composition mechanisms, components QoS Middleware (such as CORBA) Application Application Application QoS parameters QoS Middleware QoS Middleware Control Algorithm Operating System Operating System Strong isolation between SW and HW by Active Control Control vars. Measured vars. Hardware CPU, MEM, I/O Hardware CPU, MEM, I/O OS
OtherModel XML/SOAPModel Java/EJBModel CORBA Model Other XML/SOAP Java/EJB CORBA MDA View of Model-Based Design Map a PIM to Specific Middleware Technologies via OMG Standard Mappings Map PSM to application interfaces, code, GUI descriptors, SQL queries, etc. A Detailed Model, stating Pre- and Post-Conditions in OCL, and Semantics in Action Language Map a PIM to Many Middleware Technologies via OMG Standard Mappings Platform-Independent Model MDA Tool generates all or most of the implementation code for deployment technology selected by the developer. Richard Mark Soley, Model Driven Architecture: An Introduction
Model-Based Design Model-Based Design of Embedded Systems Pi-1 FSM ODE D S M L Application Models Pi FM SYNL HY ARCH Gen./ Synth. Pi+1 CON IMP D S M L Implement. Models Model-Based Design for Embedded Systems Design Application Space Mapping Implementation Space • Challenges: • Domain Specific Modeling Languages (DSML) • Model Synthesis • Model Transformation
Specification of Domain Specific Modeling Languages (DSML) L = < C, A, S, MS, MC> Concepts Relations Well formed-nessrules Abstract Syntax A Semantic DomainS MS Mathematical abstraction for specifying the meaning of models Semantics parses to MC Concrete Syntax C Notation forrepresenting models
Concepts, Relations Well formed-ness rules: Mathematical abstraction for specifying the meaning of models But What About S? UML-CD/OCL Self.InputPorts()forAll(ipip.src()forAll(x1,x2x1=x2)) Notation forrepresenting models:E.g.: Block Diagram Concrete Syntax and Abstract Syntax Signal Flow Language (SF) Abstract Syntax A Semantic DomainS MS Semantics parses to MC Concrete Syntax C
Meta-Model of StateFlow using uml/OCLas meta modeling language. META-MODEL Structural Semantics DSML: StateFlow Meta-model DOMAIN-MODEL Semantics via Meta-Modeling Meta-modeling language with well-defined semantics Abstract Syntax Semantic Domain Semantics parses to Concrete Syntax Represented by Meta-model Semantics Abstract Syntax Semantic Domain Semantics parses to DSML Concrete Syntax
Synchronous Dataflow (SDF) ASF Behavioral Semantics translator Hierarchical Signal Flow (HSF) Semantics via Translation Modeling language with well-defined semantics Abstract Syntax Semantics Semantic Domain parses to Lee, Sangiovanni-Vincentelli Concrete Syntax Semantics translator Abstract Syntax Semantic Domain Semantics parses to Concrete Syntax DSML
Composed Behavioral Semantics: HYBRIDSYSTEM L1||L2 Consistency! Semantic domain impact! DSML Composition SDF+Cont.Dyn HSF+ Semantic Domain Abstract Syntax Semantic Domain Semantics Semantics Abstract Syntax translation AL1 parses to parses to Concrete Syntax Concrete Syntax Structural Semantics AL2 Semantic Domain Abstract Syntax Semantic Domain Semantics Semantics Abstract Syntax translation parses to parses to Concrete Syntax Concrete Syntax CSP FSM
Support for Compositional Meta-Modeling Metamodel composition with GME Composition Operators
Model-Based Design of Embedded Systems Pi-1 FSM ODE Pi FM SYNL HY ARCH Pi+1 CON IMP Model Synthesis and Transformations Domain-Specific Modeling Languages Matlab Code-Gen. Matlab Code-Gen. Generator Model-Based Generator Technology- Modeling of generators - Generating generators - Provably correct generators - Embeddable generators if (inactiveInterval != -1) { int thisInterval = (int)(System.currentTimeMillis() - lastAccessed) / 1000; if (thisInterval > inactiveInterval) { invalidate(); ServerSessionManager ssm = ServerSessionManager.getManager(); ssm.removeSession(this); } } } private long lastAccessedTime = creationTime; /** * Return the last time the client sent a request associated with this * session, as the number of milliseconds since midnight, January 1, 1970 * GMT. Actions that your application takes, such as getting or setting * a value associated with the session, do not affect the access time. */ public long getLastAccessedTime() { return (this.lastAccessedTime); } this.lastAccessedTime = time; /** * Update the accessed time information for this session. This method * should be called by the context when a request comes in for a particular * session, even if the application does not reference it. */ public void access() { this.lastAccessedTime = this.thisAccessedTime; this.thisAccessedTime = System.currentTimeMillis(); this.isNew=false; } lastAccessedTime = 0L; lastAccessedTime = ((Long) stream.readObject()).longValue(); maxInactiveInterval = ((Integer) stream.readObject()).intValue(); isNew = ((Boolean) stream.readObject()).booleanValue(); • Model Synthesis • Model Transformation ConfigurationSpecification Code Analysis Tool
Generator Specification ASF ASDF G: ASF→ASDF Meta-model-1 Meta-model-2 Meta-Programmable Model Builder (GME) GEN Instance of instance of Transformer lSDF LSDF SDF Executable model SDF Platform lSFLSF HSF Domain model Ongoing Work:Meta-generators
CORBA Component CORBA Component CORBA Component CORBA Component CORBA Component CORBA Component CORBA Component www.omg.org/mda Ongoing Work:Combining MIC & Component Middleware CCM Component Library CCM Model Library Server/Peer Application Code Select Component Model-Based Generator Component Home Container QoS Policies Synthesize & Assemble QoS Property Adaptor Real-time POA Client/Peer ORB QoS Interfaces
Summary Embedded Computing Applications Tools for Model-Integrated Computing Technology Domain Specific Tools Domain Independent Tools Application Specific Models Sensor System Models Vehicle Controllers Security Models Fault Models Meta Modeling Environment DS Model Libraries/ Patterns Meta Model Libraries Domain- Specific Modeling & Analysis Environment Component & Platform Models Tool Metadata Metamodel Repository Platform Specific Models (SDF, FSM, CSP, …) Integrated Tools Domain Independent Tools Model-based Generators Meta Genererator Generator Technology Meta- Generator Technology Auto-Generated Code Library Components Library Components Library Components Library Components Middleware Component Libraries Application Component Libraries Component Libraries OTIF Libraries CORBA IDL QoS API POSIX API REPLICATION API OTIF Tool Integration Platform Middleware Technology Open Tool Integration Framework Services ORB OS Scheduling Fault Tolerance ECLIPSE Middleware Services and OS
Research Agenda on DomainSpecific Modeling Languages • Precise, compositional meta-modeling • Multiple aspect modeling in the compositional meta-modeling framework • Practical issues: • Examples, meta-model libraries • Meta-programmable tools • Link to UML-2
Meta-generators:Model Transformations in Tool Integration Domain-specific model Meta- model for source Approach (Karsai): Meta-models for source and target models plus transformations, then generating the transformer • Roles transformations play in model-based design: • Refining a design into an implementation • Code generation • PIM -> PSM mapping • Support for model interchange for tool integration Meta- model for transform Transformer GEN Target model Meta- model for target
Generative modeling: Extensions to Meta-Modeling Languages Iterative (“for”) and conditional (“if”)constructs in models can greatly enhance expressiveness while reducing complexity. Input design: with “for” loop What it means: Replicate the middle of pipeline “Order” times! Transformer Order = 3
Other Uses of Transforms on Models:Design Patterns Design patterns capture prototypical solutions to a design problem. As such, they are parametric and reusable. Input design Design with pattern applied Design pattern (as a transform) Transformer
Research Agenda on ModelTransformations • Languages and tools for meta generators • Model synthesis using explicit design patterns • Model synthesis using constraint-based design-space exploration • Generative modeling extensions to languages • Embeddable generators
Conclusion • The hard problems of building large embedded systems are Semantics and Compositionality • Model-based integration technology has the power to solve the problem • Model-Integrated Computing evolves to be a mature technology for the development of complex applications