240 likes | 244 Views
Dr. Oscar Slotosch, Validas AG. Model Projector. Content. Motivation Tool: Model Projector Examples Summary Backup: Usage Details. Motivation. Content of a given model is often unclear (and needs time to explore): Which elements are used? Which relations are used?
E N D
Dr. Oscar Slotosch, Validas AG Model Projector
Content • Motivation • Tool: Model Projector • Examples • Summary • Backup: Usage Details
Motivation • Content of a given model is often unclear (and needs time to explore): • Which elements are used? • Which relations are used? • Which attributes are used? • Which values of attributes are used? • Which “features” are used? • Model-based tools are often only “partially tested” from the tool provider, i.e. for a subset of the possible models • Are the user models within this subset? • Which are the tested features in a test suite? • How can the tool provider inform the users on the tested subsets? • Which are the untested features? • Navigation in models (with textual search) is difficult, e.g. find an element “E” with attribute “A” and value “V1” • All kinds of model-based tools have this problems (AUTOSAR,…)
Content • Motivation • Tool: Model Projector • Examples • Summary • Backup: Usage Details
Model Projector: Idea & Requirements • Provide a model statistic with used • Model elements • Attributes & values • Features • Defined exchange format • Allow to “project” one/many model(s) • Compare model projections and find uncovered • Model elements • Attribute & values • Features • Allow to ignore some unimportant values • Allow to define features (combinations of elements) • Implementation • Generic for all EMF models • Integration as plugin into any model-based tool A feature can be described by a certain combination of elements
Example Projection Artifact 1: Executable Artifact 2: Test Report Artifact 3: Test Stimuli Projection:
Model Projection View • Shows the “Model Projection” of all selected (and contained) elements Projection View Modeling Tool Projectedelement(s) Classes Label of projected element
Model Information • Statistics on (number of occurrences) • Packages • Classes • Properties • Values • Navigateable references to the model Attributes Values References (with Sub-Projections)
Differences • Process • Define reference by • Set the current selection • Add the current selection • Load a (stored) reference • Select model elements for projection • Analyze the differences using colors • Red: selected element (class, property and value) covered by reference • Green: selected element (class, property and value) NOT covered by reference • Yellow (pink): selected element (class, property and value) partly covered by reference • Reference can be saved • Properties (for comparison) can be filtered UncoveredValue
Filtering • A filter consists of • Name • Package-PatternClass-Pattern • Property Pattern • Value Pattern • All values that match the pattern are removed from the statistics • Filters can be loaded as part of User Definitions • Several Files can be loaded / combined • Filters are displayed in the browser
User Properties (“Features” Step 1) • A User Property consists of • A name • A path sequence describing the property. • The following path sequence operators are allowed: • Class-Name: Determine the home of the property (if omitted the property is evaluated in all classes) • /: directly contained elements • /Type: contained elements of the type • //: all contained elements (recursive) • //Type: all contained elements of the type • .: the (direct) container • .Type the direct container of the type • ..: all containing containers • ..Type: all containers of the type • =>Rel: All elements in the relation Rel • ->Attr: the value of the attribute Attr • The result of a user defined property is a (empty) set of defined elements • User Defined Properties are listed in the browser • User Defined Properties and Values have a special (yellow) icon • Examples (text to be imported): Path Sequence Property Values • There are some special attributes available: • eInstanceClassSimpleName • eInstanceClassName • eInstancePackageName • eReferencesName • eReferencesSimpleName
User Terms (“Features” Step 2) • A User Term is a user-defined property. It consists of • Name: the name of the property • Class-Pattern: the class in which the property is defined (or .* for all classes) • A list of property terms separated by , • The following term operators are allowed in terms: • Property-name: the name of the property in the class • binary operators: <,>,<=,>=,=,!= • Logical operators: !,||,&&, • Arithmetic operators +,-,*,/,%,&,| • Strings operators: length(), startsWith(), • endsWith(),substring(N), substring(N,M) • Constant Values: true, false, int-numbers, float numbers • Use (brackets) to express priorities! • User Defined Terms are listed in the browser • User Defined Terms/Values have a special (yellow) icon • Examples (text to be imported): Function Application Property (Constant) Value Description Check;.*;[Name.length()<(Description.length())*2]
Content • Motivation • Tool: Model Projector • Examples • Summary • Backup: Usage Details
Example AUTOSAR-Types Datatype? Int8 / Int16 / … ? • Datatype of a Port SWC1: Application SwComponentType Out:PPortProtoype Where is the Datatype? In the Interface?
AUTOSAR-Features Feature (1): User DefinedProperty We found a Client-Server Port with several data types Feature (2): User DefinedTerm How are the Features defined?
AUTOSAR-Features • Textual Definitions (Properties and Terms): • Store many knowledge on AUTOSAR • Allow to describe features
Content • Motivation • Tool: Model Projector • Examples • Summary • Backup: Usage Details
Summary: Model Projection • Can be applied to every EMF • Model Projection provides a view with • Information on used models • Comparison with reference • Way to define/verify model sets/subsets • Way to exchange properties • Formalization of features • AUTOSAR-Examples • Does not provide • Relevant properties • Next steps • Collect feedback • Decide on publication & contribution
Content • Motivation • Tool: Model Projector • Examples • Summary • Backup: Usage Details
Model Projector: Features • Model Projection View: Shows the projection results • Class Statistics: Statistics for every element with • Class-Properties consisting of all • Attributes in the class • Relations from the class • Every Property has a list of Values assigned with • occurring values • References to their occurrences • Property Statistics: Properties of all Classes (including values) • Value Statistics: Values of all Properties in the model • Further Features: • Compare with reference set • Green: All projections contained in the reference set • Red: All Projections NOT contained in the reference set • Yellow (Pink): Some projections contained and some not • User Configurations • Filtering: Define projections that shall not be listed/compared • User Defined Properties: Define complex properties (like xpath) • Persistency: Save / Load / Add Reference Sets • Input changes on selection of elements (in any tool/browser)
Installation • Model Projector consists of five plugins (contained in distributed plugins.zip) required: • Projector, • Projector.edit, • Projector.editor, • Projector.parser • de.validas.tca.util • Unzip plugins.zip • Copy jar files into tool directory • dropins or • Plugins or • Pluglets (in ARbuilder) • If not working: Extend config.ini (contained in configurations)by the five plugins • Installation verification: • Start your tool • Check if • View can be opened or • Projection menu is available
Starting Model Projector • Select EMF elements in your tool, e.g. in the browser • Use popup menus on selected elements • Open Projection View • Choose Projection View
Thank You! Arnulfstraße 27 80335 München www.validas.de info@validas.de