1 / 76

Software Engineering II

Software Engineering II. Metamodeling. di. Simon Lepore. 22/05/2002. Index. Index Terminology Scope What is Metamodeling - Metamodeling - L evel architectures - Modeling levels - Modeling in one framework - Kernel metamodel - In last Mof Case Study. 22/05/2002.

grahamb
Télécharger la présentation

Software Engineering II

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. Software Engineering II Metamodeling di Simon Lepore 22/05/2002

  2. Index • Index • Terminology • Scope • What is Metamodeling - Metamodeling - Level architectures - Modeling levels - Modeling in one framework - Kernel metamodel - In last • Mof • Case Study 22/05/2002

  3. Terminology • Model = A semantically closed abstraction of a system • Meta-model = A semantic information model • Meta-metamodel = The language in which to express meta-models • Metamodeling = Is an activity, and this activity produces • meta-models 22/05/2002

  4. Index • Index • Terminology • Scope • What is Metamodeling - Metamodeling - Level architectures - Modeling levels - Modeling in one framework - Kernel metamodel - In last • Mof • Case Study 22/05/2002

  5. An attempt at describing the world around us for a particular purpose As a schema for data that needs to be exchanged or that needs to be stored As a language that supports a particular methodology or process(the original purpose of the UML meta-model) As a language to make information on the web more semantic Scope 22/05/2002

  6. Index • Index • Terminology • Scope • What is Metamodeling - Metamodeling - Level architectures - Modeling levels - Modeling in one framework - Kernel metamodel - In last • Mof • Case Study 22/05/2002

  7. What is Metamodeling • To express kinds of things in order to model them in a particular system • To define our concepts in terms of other concepts • It expresses various models that it wants to define (the RELATIONSHIP are instances of E-R diagram) • Then model dictate the way in which the next level would be expressed 22/05/2002

  8. What is Metamodeling Some traditional types of users for meta-models: • CASE tool vendor / modeling tool vendor: In essence, what the chief architect does is extending the meta-model.The data structures in the tool are the physical representation of the meta-model. • Repository vendor: For example, you may sell a repository (or database, or directory, ...) to customers who want to store software/systems development information in it. They may call it "meta-data". • Systems integrator: One the first activities in such a project is to understand the meaning of the data in all the systems that need to be integrated: which data has the same meaning, which data is complementary, and how everything relates. Performing this analysis yields a semantic model for the types of data to be integrated, in other words, a meta-model. • End user: Functionality is one aspect ("this one has a nice shiny button over here"), but the supported meta-model is even more important. After all, the meta-model determines what you can express with the software 22/05/2002

  9. Index • Index • Terminology • Scope • What is Metamodeling - Metamodeling - Level architectures - Modeling levels - Modeling in one framework - Kernel metamodel - In last • Mof • Case Study 22/05/2002

  10. Metamodeling meta-metamodel level] Obj.Type … metamodel level ProcessType Attribute Type EntityType model level … Product Employee … data & process level Bob Betty 22/05/2002

  11. Metamodeling • A metamodel is a model of models. • It contains meta-obj. type. • Object types whose istances are also object types. 22/05/2002

  12. Index • Index • Terminology • Scope • What is Metamodeling - Metamodeling - Level architectures - Maintaining modeling levels - Modeling in one framework - Kernel metamodel - In last • Mof • Case Study 22/05/2002

  13. Levels • Each level is supposed to define the basis for instantiating the next • The number of the levels adapted depends on the points of view. • OMG organized hierarchies in four levels: • meta-meta-model level : description of the structure and semantics of meta-meta-data • meta-model level : the descriptions (i.e., meta-meta-data) that define the structure and semantics of meta-data • model level : meta-data that describes information • user level : the information that we wish to describe 22/05/2002

  14. Levels Obj.Type … ProcessType meta-model level AttributeType EntityType … model level Person Inventoryclerk’ s view Product … data & process level model level B&OTurnt SonyCDp Saleperson’s view data & process level ? V45728 V45729 22/05/2002

  15. Levels • Metamodeling can define many levels of types whose instances are also types • Two various needs of approach: salesperson’s object is the clerk’s object type 22/05/2002

  16. Index • Index • Terminology • Scope • What is Metamodeling - Metamodeling - Level architectures - Modeling levels - Modeling in one framework - Kernel metamodel - In last • Mof • Case Study 22/05/2002

  17. Modeling levels • For change the kinds of object types that can be defined at the model level, a metamodel must be modified. • These rigid structures are implemented in the most CASEtool : this is a problem 22/05/2002

  18. Modeling levels • Most CASE tools maintain models and metamodels as physically separate levels. Metamodel Model defines Instances of Data and process defines Instances of 22/05/2002

  19. Modeling levels • Problem solution : Model level Metamodel level Object Object type Metamodel level Model level Object type is now an Object and Object is an Object type 22/05/2002

  20. Modeling levels • This cannot be supported by most CASE tools. • Secondly, modifying separately maintained metamodels is often impossible. • No metamodel customization features from sw vendors or may consider the contents of its metamodel to be proprietary. • Exist implicity as program code(difficult to modify). 22/05/2002

  21. Modeling levels • Level modeling falters when the bottom level also instances(such as exsample)and so on • The ability to instantiate at the model level were allowed, any number of levels, could be defined within it • This ability could be supported by defining Object is an instance of one or more Object types. 22/05/2002

  22. Modeling levels • Each Object type classifies any number of Objects. • Each Object instance is an instance of one or more Object type. Object Type classifies Is an instance of Object 22/05/2002

  23. Modeling levels • In other worlds, by defining the is an instanced of mapping at the metamodel level, all levels can have types and instances. • Only difference between the model and the metamodel levels is that one has instances of the other. 22/05/2002

  24. Modeling levels Obj.Type … Process Type Is an instances of Attribute Type Entity Type … Is an instances of Person Product … Is an instances of B&OTurnt SonyCDp V45728 Is an instances of V45729 22/05/2002

  25. Index • Index • Terminology • Scope • What is Metamodeling - Metamodeling - Level architectures - Modeling levels - Modeling in one framework - Kernel metamodel - In last • Mof • Case Study 22/05/2002

  26. Modeling in rigid, physically separate levels can create problems. These can remedied by modeling within a single frame- work instead. Model maintenance is performed on one coherent and integrated model, not fragmented by levels. Object type and instances share the same model. Any numbers of instantiates levels is possible. since a rigid number of levels is not required. Modeling in one framework 22/05/2002

  27. Modeling in one framework • A single framework model can be used to decribe it self • If a model is sufficently descriptive, it should be able to specify its own object types. • A small subset of the model can then describe a much larger subset and so on. • If a model can be a metamodel to describe itself, it can be a metamodel to describe other models. 22/05/2002

  28. Index • Index • Terminology • Scope • What is Metamodeling - Metamodeling - Level architectures - Modeling levels - Modeling in one framework - Kernel metamodel - In last • Mof • Case Study 22/05/2002

  29. Kernel Metamodel • An approach of this kind can both describe different models and provide a common framework for expressing and comparing models. Kerenel metamodel 22/05/2002

  30. Kernel Metamodel • The kernel metamoddel with which the model describes itdelf would contain such primitive obj types as Object Type, Object, Relation and Function. • Also contain Operation, Trigger Rule, Control- Condition… for support processing requirements. • These primitives, can be used to form foundational construct for other structures. 22/05/2002

  31. Index • Index • Terminology • Scope • What is Metamodeling - Metamodeling - Level architectures - Modeling levels - Modeling in one framework - Kernel metamodel - In last • Mof • Case Study 22/05/2002

  32. In last • In a single framework model, the boundaries are non- existent. • The only reason for inhibiting changes to the kernel meta- level is to maintain standardization. • The standards for the future are most important for the interoperability 22/05/2002

  33. Index • Index • Terminology • Scope • What is Metamodeling - Metamodeling - Level architectures - Modeling levels - Modeling in one framework - Kernel metamodel - In last • Mof • Case Study 22/05/2002

  34. MOF(Meta Object Facility) • It is a Standard of Object Management Group(OMG). • In September of 1997, finalized a standard. • MOF is the M3 levels (meta-meta-model) • Is Object Oriented. Meta-meta-model M3 Meta-model M2 Model M1 Object M0 22/05/2002

  35. Four levels(OMG) • M0 it represents the data busines level (client n° 1234.)used from DBMS, SO. • M1(model) describes the structure of M0 level (identifier client=1234)1234 is an instances of M1 level. • M2(metamodel) describes the structures of M1 level (atribute=identifier client) identifier client is an instances of M2. • M3(meta-metamodel)its a model to decribe another model and the structures of m2 level(i.e.meta-atr = atribute). 22/05/2002

  36. OMG levels M3 Specify meta-meta classes for metamodel. Specify meta classes for metamodel. i.e. Class M2 UML Package notation M1 Specify classes for UML model of designer. <<instanceOf>> M0 Object Secify a pure Object 22/05/2002

  37. OMG levels MOF Meta-metamodel Meta-Attributes Meta-Classes MetaOperation <<use>> <<instanceOf>> <<instanceOf>> UML metamodel Atributes Classes Operation <<instanceOf>> <<instanceOf>> <<use>> Girl Name:String Analisys model UML Age : Integer GetName(): String GetAge(): Integer <<instanceOf>> <<use>> Object Maria : Girl 22/05/2002

  38. Goal of MOF • M3 describe itself (MOF Model is formally defined using its own meta-modeling constructs). • UML is an instancies of MOF. • Defines a set of CORBA IDL interfaces that can be used to define and manipulate metamodels and their models • provides the infrastructure for implementing CORBA-based design and reuse repositories • specifies precise mapping rules to automatically generate CORBA interfaces for metamodels,thus encouraging consistency in manipulating metadata in all phases of the distributed application development cycle 22/05/2002

  39. Goal of MOF • Interoperability, interchange of meta data in distribuited systems, distribuited object systems. • Beyond to the repository MOF-based we can use(for inter- change meta-data)the format stream-based(standard XMI). • XMI defines the rules for mapping from MOF to XML to generate automatic XML code. • Essentially a subset of the UML core: • Class • attributes • operations (only name and functionality, no associated method) • Generalization • sub-Class inherits all features of its super-Classes • any explicit Constraints that apply to a super-Class and • any implicit behavior for the super-Class apply equally to the sub-Class • At the M1 level, an instance of an M2-level Class is type substitutable for instances of its M2-level super-Classes • Abstract classes • Root and leaf classes 22/05/2002

  40. Goal of MOF • Association • Association links • Multiplicity specification • Navigability setting • Aggregationasymmetrical association Component is part of at most one composite • A component cannot be part of itself (also indirectly) • When a composite is deleted, all its components are deleted • References(attributes corresponding to navigable associations ends to offer a simple way to update links) • DatatypesMeta-model definitions often need to use attribute and operation parameter values that have “ordinary” types • Packages • Groups elements into a meta-model • Mechanisms to compose packages • Constraints • Used to attach consistency rules to other meta-model components • A Constraint comprises: constraint name, a language used to express the consistency rules 22/05/2002

  41. Description of Mof • Can be described by using the MOF model itself • circularity problem • Direct “description” by natural language and UML diagrams • Abstract and Concrete Mappings 22/05/2002

  42. Description of Mof • The Abstract mapping (defined in“The MOF Abstract Mapping” chapter) fleshes out a MOF meta-model into an abstract information model (i.e., by spelling out the logical structure of the meta-data described by the meta-model). • The IDL Mapping (Section 2.4.2, “CORBA Meta-data Services - The MOF IDL Mapping,” on page 2-22) produces the standard OMG IDL and associated behavioral semantics for meta-objects that can represent meta-data conforming to the meta-model. • The XML Mapping (see Section 2.4.3, “Meta-data Interchange - The MOF XML Mapping,” on page 2-22) produces the standard XML DTD for interchanging metadata conforming to the meta-model. 22/05/2002

  43. Index • Index • Terminology • Scope • What is Metamodeling - Metamodeling - Level architectures - Modeling levels - Modeling in one framework - Kernel metamodel - In last • Mof • Case Study 22/05/2002

  44. Case study • Introduction • Feasibility Study • W2000 as a profilable MOF Meta-model • Technological solution • A p-meta-model for W2000 • An example W2000 model • Conclusions and future work 22/05/2002

  45. Introduction • Web-based hypermedia systems are becoming more and more sophisticated,new modeling requirementsconstantly arise, and design models mustconstantly evolve.(an example of this evolutions is HDMHyper text design model) • Since design tools should complement models to support an efficient design process, model evolution raises technological issue: Designtools must be modifiedwhentheir underlying model changes. This is why thepaper proposes a general approach to efficiently update design tools in response to model evolutions. 22/05/2002

  46. Introduction The key ideas are: • the description of a hypermedia model in terms of a general meta-model, powerful enough to expressthe semantics ofcurrent and future designconstructs. • the transformation of a hypermedia designtool into ameta-CASE tool, able to cope with model updateswithout requiringto be redefined and rebuil fromscratch. 22/05/2002

  47. Introduction • The approach is presented by discussing a case study, that is, the feasibility studyto transform the design toolkit, Jweb, into a meta-CASE tool (Jweb3). • Thistool will support the latest version of our model (called W2000), andwill easilyevolve with the model it supports. • In this document it comes discussedthe adoption of the OMG metamodelingstandards MOF and XMI as enablingtechnology a sampleofthe representation of W2000 in terms of MOF, and the sketch of thearchitectureof the under-implementation Jweb3. 22/05/2002

  48. Case study • Introduction • Feasibility Study • W2000 as a profilable MOF Meta-model • Technological solution • A p-meta-model for W2000 • An example W2000 model • Conclusions and future work 22/05/2002

  49. Feasibility Study • As to the first aspect, they decided to probe the possibilities of using existing UMLCASE tools as temporary front-ends for the forthcoming schema editor. The idea wasnot to select “the best” available tool, but simply do some experiments and delay theimplementation of aspecial purpose editor to better refine W2000 constructs.As sideeffect, this implied that they did not want to work with proprietary formats to store models(W2000 schemas), but they needed a cross-platform standard to be able to change thefront-end according to our needs. • They decided to exploit the OMG novel way to meta-modelingto find a cumulative solution. 22/05/2002

  50. Feasibility Study • Using the OMG jargon, they cansay that eachmodel(i.e.artifact) must be compliant to a given meta-model (i.e., notation). • This definition allows their to decompose a CASE tool into a provider of modeling features, which depends on the supported meta-model, and a consistency checker betweendefined models and their meta-model. Meta-CASE toolsdo a similar jobat a meta-meta-level. Meta-CASE tools let the developer define his own meta-modeland express the semantics of the primitives of thismeta-model in terms of a meta-metamodel. 22/05/2002

More Related