Presentation is loading. Please wait.

Presentation is loading. Please wait.

Daniel Amyot and Jun Biao Yan

Similar presentations


Presentation on theme: "Daniel Amyot and Jun Biao Yan"— Presentation transcript:

1 Daniel Amyot and Jun Biao Yan
Flexible Verification of User-Defined Semantic Constraints in Modelling Tools Daniel Amyot and Jun Biao Yan CASCON, October 28, 2008

2 Overview Motivations Tool Requirements
Illustration with a URN Tool: jUCMNav Applications Related Work, Conclusions and Future Work URN and jUCMNav, CASCON Workshop, 2008 p. 2

3 Why Constraints? Person
Name Gender biologicalFather 0..1 0..* child The syntax of modelling languages is not always sufficient to describe user models precisely Can we ensure the biological father of a person is a male? URN and jUCMNav, CASCON Workshop, 2008 p. 3

4 Constraints in Metamodels?
Class Name superClass 0..1 0..* subClass Similar needs for metamodels, which define modelling languages such as UML, BPMN, URN… Can we prevent circular relationships in class inheritance? Can we enforce uniqueness of names in a given scope? URN and jUCMNav, CASCON Workshop, 2008 p. 4

5 Semantic Constraints Provide precision in language definitions
“Well-formedness” of models Can be expressed in many ways e.g. with the Object Constraint Language (OCL) Typically, semantic constraints are provided with the language Tools can verify them URN and jUCMNav, CASCON Workshop, 2008 p. 5

6 User-Defined Semantic Constraints
Not provided in the definition of a language Needed to better support: Different modelling styles and standards Checking inputs to analysis algorithms Verifying (cumulative) assumptions on chains of transformation tools, for interoperability Such constraints vary from models to models, and their relevance may vary over time Modelling tools must offer flexible and usable mechanisms for the verification of customizable semantic constraints. URN and jUCMNav, CASCON Workshop, 2008 p. 6

7 Overview Motivations Tool Requirements
Illustration with a URN Tool: jUCMNav Applications Related Work, Conclusions and Future Work URN and jUCMNav, CASCON Workshop, 2008 p. 7

8 Tool Requirements (I) Goals: Flexibility, Usability, Scalability
The tool shall allow users to create, modify, and delete constraints, without having to recompile or restart report constraints syntax errors allow users to enable and disable individual constraints verify, upon the user’s request, all enabled constraints on the model URN and jUCMNav, CASCON Workshop, 2008 p. 8

9 Tool Requirements (II)
The tool shall report constraint violations to the user allow loading & saving constraints (for sharing & updates) allow users to create, modify, and delete groups of constraints. allow users to add/remove a constraint to/from one or many groups. allow users to enable and disable groups of constraints URN and jUCMNav, CASCON Workshop, 2008 p. 9

10 Overview Motivations Tool Requirements
Illustration with a URN Tool: jUCMNav Applications Related Work, Conclusions and Future Work URN and jUCMNav, CASCON Workshop, 2008 p. 10

11 User Requirements Notation - URN
Graphical language standardized by ITU-T Supports goal and scenario modelling Goal-oriented Requirement Language (GRL) Use Case Map (UCM) notation Defined by a metamodel (More in workshop on Wednesday afternoon) URN and jUCMNav, CASCON Workshop, 2008 p. 11

12 jUCMNav: URN Editor URN and jUCMNav, CASCON Workshop, 2008 p. 12

13 EMF-Based Implementation Metamodel
URN and jUCMNav, CASCON Workshop, 2008 p. 13

14 Groups and Constraints in Preferences
URN and jUCMNav, CASCON Workshop, 2008 p. 14

15 Constraint Structure Name Context (e.g. Package::ClassName)
OCL query expression returns a sequence of objects of the type specified in the rule context. OCL constraint expression (invariant to be verified) Description (also used as error message) Enabling indicator Utility definitions (simplify invariant logic, optional) URN and jUCMNav, CASCON Workshop, 2008 p. 15

16 Constraints Definition (with MDT-OCL)
URN and jUCMNav, CASCON Workshop, 2008 p. 16

17 Violations Reported in Problems View
URN and jUCMNav, CASCON Workshop, 2008 p. 17

18 Overview Motivations Tool Requirements
Illustration with a URN Tool: jUCMNav Applications Related Work, Conclusions and Future Work URN and jUCMNav, CASCON Workshop, 2008 p. 18

19 Language and Style Compliance
Modelling tools deviate from standards… Extended subsets! For example, for jUCMNav jUCMNav implements a subset of the “standard” URN jUCMNav extends URN with KPI and AoURN Define constraints to verify that extension are not used in a given URN model URN’s GRL builds on the i* framework Define constraints to restrict the usage of GRL to an i* style Appearance of diagrams Define constraints to prevent certain colours in GRL diagrams reserved for analysis results (green, yellow, red) URN and jUCMNav, CASCON Workshop, 2008 p. 19

20 Analysis of Models Analysis procedures make assumptions about input models! Might be cheaper to define constraints externally to the analysis procedure For example: URN allows for structural alternatives to be explored in a model Inconsistencies in the use of components are allowed across UCM diagrams Define constraints to detect such inconsistencies when undesirable by an analysis procedure Some completeness aspects of a model could be analysed directly using semantic constraints jUCMNav allows modellers to create traceability links between GRL goals and UCM scenarios. Define constraints to detect the absence of links for specific types of elements URN and jUCMNav, CASCON Workshop, 2008 p. 20

21 Transformation of Models
Semantic constraints can act as large-scale preconditions to ensure a model is compatible with a transformation algorithm Possibly cheaper than running a complex transformation to realize the model was not as expected More importantly: Constraints accumulate when we start combining transformations in sequence! URN and jUCMNav, CASCON Workshop, 2008 p. 21

22 Transformation of Models
Define constraints to check that important elements (e.g. actors, responsibilities) have non-empty descriptions URN and jUCMNav, CASCON Workshop, 2008 p. 22

23 Transformation of Models
Constraints to check proper use of metadata in UCM responsibilities Further constraints… Further constraints… URN and jUCMNav, CASCON Workshop, 2008 p. 23

24 Overview Motivations Tool Requirements
Illustration with a URN Tool: jUCMNav Applications Related Work, Conclusions and Future Work URN and jUCMNav, CASCON Workshop, 2008 p. 24

25 Related Work General Modeling Environment (GME) and Generic Eclipse Modeling System (GEMS) OCL at model and metamodel levels Sophisticated constraint manager MOMENT-OCL EMF Validation Framework Better start point for implementing our approach Support for live constraints (on-the-fly evaluation) URN and jUCMNav, CASCON Workshop, 2008 p. 25

26 Conclusions Need for flexible and usable mechanisms for the verification of customizable semantic constraints in modelling tools Requirements and proof of concept with URN/jUCMNav Applications to modeling styles, inputs of analysis algorithms, and preconditions on chains of transformation tools Approach independent from target modelling language, constraint language, and implementation frameworks, but works well with EMF and OCL! URN and jUCMNav, CASCON Workshop, 2008 p. 26

27 Future Work Is the approach beneficial? Empirical studies are needed…
Is the approach usable? Knowledge of OCL and of the modelling language’s metamodel is required to create constraints… Partial generation of OCL query expressions from metamodel Use to define customizable metrics on models (queries) URN and jUCMNav, CASCON Workshop, 2008 p. 27

28 URN Virtual Library: http://www.UseCaseMaps.org/pub/
For More Information URN Virtual Library: Over 210 papers and theses jUCMNav: URN and jUCMNav, CASCON Workshop, 2008 p. 28


Download ppt "Daniel Amyot and Jun Biao Yan"

Similar presentations


Ads by Google