1 / 23

A Formal Foundation Supporting MDD

A Formal Foundation Supporting MDD. --- ZOOM Approach. Hongming Liu Lizhang Qin 11/08/2003. Agenda. Background of MDD A formal foundation for meta-modeling Formal OO Model Tools Support Comparison to other approaches. Model Driven Development(MDD).

kirk-walsh
Télécharger la présentation

A Formal Foundation Supporting MDD

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Formal Foundation Supporting MDD --- ZOOM Approach Hongming Liu Lizhang Qin 11/08/2003

  2. Agenda • Background of MDD • A formal foundation for meta-modeling • Formal OO Model • Tools Support • Comparison to other approaches

  3. Model Driven Development(MDD) • MDD is the notion of constructing a model that can then be transformed into a real system • MDD moves the development focus from code to model • Advantages of MDD

  4. Requirements of MDD the models must capture information from three dimensions: • The functional requirements • The architectural requirements • The target environment requirements

  5. Characteristics of MDD we argue that an MDD infrastructure requires models to be • precise • analyzable • transformable • executable

  6. Meta-Modeling • meta-model: a model of the modeling language • OMG’s MDA(Model Driven Architecture) framework • self-defined meta-meta-model: MOF(Meta-Object Facility)

  7. OMG Meta-Modeling Architecture • M3: the meta-meta-model level (contains only the MOF) • M2: the meta-model level (contains any kind of meta-model, including the UML meta-model. • M1: the model level (any model with a corresponding meta-model from M2) • M0: the concrete level (any real situation represented by a given model from M1)

  8. A Formal Foundation for Meta-Modeling • limitations of MOF • need a meta-modeling language that provides both formal syntax and semantics. • an alternative approach to MOF that uses the ZOOM as its meta-modeling language

  9. Z-based Object-Oriented Modeling(ZOOM) • based on the formal specification notation Z • extends Z to support these object-oriented concepts. • providing textual and graphical representations of models that are consistent with UML • adopts a syntax that is similar to commonly used programming languages such as Java or C++.

  10. Core ZOOM(ZOOM-C) Core ZOOM(ZOOM-C) is based on Z, and can be used to describe UML semantics. Similarly, UML semantics can be formally reduced to ZOOM and thus to Z. This provides a formal foundation to UML meta-modeling.

  11. ZOOM as a Meta-Modeling Language Part of MOF Model Structure from OMG MOF Specification

  12. ZOOM as a Meta-Modeling Language typedef MM = ModelElement <=> ModelElement; //a relationship between ModelElements typedef MN = ModelElement -> NameSpace;//a function map from ModelElement to NameSpace MM Depends_On; //declare a global variable of type MM MN Contain; //declare a global variable of type MN struct ModelElement { //struct definition Public String name, annotation; Public : noaccess String qualifiedName; Set[ModelElement] dependent, provider; NameSpace container; Invariant { //invariant definition dependent == DependsOn.image(this); provider == DependsOn.invert().image(this); container == Contain.invert(this); } } struct NameSpace extends ModelElement { Set[modelElement] containElement { containElement == contain.invert(this)} } ZOOM Specification of core structure of MOF model

  13. ZOOM Models Structural Model Behavioral Model UI Model Event Model ZOOM Models

  14. Structural Model • Defines the functional part of the system using object-oriented concepts • Consists of a series of diagrams along with the formal specifications described by ZOOM-C module zoom.examples.addressbook; class AddressBook { String title; List[AddressBookEntry] entries; delegates entries; // delegates the operations to entries Set[AddressBookEntry] search(SearchCriterion criterion) { requires { criterion != null; } ensures { search! = { AddressBookEntry entry in entries | entry.matchAddressBookEntry(criterion) @ entry } } } }

  15. Behavior Model • The central communication mechanism that links the structural models and UI models • Uses a formalized state diagram to specify the dynamic aspects of a system fsm MachineserviceStat() { state inService { fsm MachineopStat () { state standingBy; state turningOnMotor; state accelerating; state running; state decelerating; transition standingBy to turningOnMotor : operatorStartsMachine(runSpeed) {safetyBrake.turnOff(), mainMotor.turnOn(runSpeed, out runSpeedOK)}; transition turningOnMotor to standingBy : standBy [runSpeedOK != TRUE] {mainMotor.turnOff(), safetyBrake.turnOn()}; transition turningOnMotor to accelerating : accelarate [runSpeedOK == TRUE]; } }; state inRepair; state waitingForRepair; transition inRepair to inService : returnToService(fixDate); transition waitingForRepair to inRepair : beginMaintenance(maintDate); transition inService to waitingForRepair : removeFromService(reason) {maintShop.notify(self, reason)}; }

  16. UI Model and Event Model • UI Model • Define a hierarchical description framework containing a set of predefined UI components • Designers can specify related visual attributes and the events that can be generated or consumed by the component Event Model Event UI Event FSM Event Standard Event User-Defined Event

  17. Tools Support For Automation • Basic Language Support Tools • Model Validation Tools • Model Verification Tools • Transformation Tools

  18. Basic Language Support Tools • Lexer • Parser • Type Checker • UML Mapping Tools • Model Editing Tools

  19. Model Validation Tools • Interpreter • ZOOM-E • A subset of ZOOM • Provides imperative features similar to those in Java. • Not used frequently in ZOOM model. • Be used to exhibit the behavior of implementation specified by ZOOM-E • Animator • Provides a way for designers to verify their formal model. • “virtually” executes models without an implementation • Introduces a default model implementation that is consistent with the formal specification using ZOOM-E • Calls interpreter to execute the implementation.

  20. Model Verification Tools • Automated Theorem Prover • Static Analyzer • Unit Test Generator

  21. Transformation Tools • Code Generator • Generates the implementation conforming the formal models, for example, a method body based on the formal pre- and post-conditions • Select different target runtime environments • Adjust XFR(Non-functional Reuqirement) parameters, for example, security/performance.

  22. Comparison • ZOOM provides a high level of abstraction • ZOOM separates views from models • ZOOM provides a set of automated tools to support the design and development process

  23. THANK YOU Questions and Comments?

More Related