1 / 67

An Introduction to EXPRESS

An Introduction to EXPRESS. MARVIN WP1 meeting, Hamburg - April, 1999, U. Rabien based on a tutorial given by M. Grau, J. Haenisch, U. Langbecker March 19, 1996. Information modelling EXPRESS and EXPRESS-G EXPRESS for data exchange and data sharing. Contents.

shira
Download Presentation

An Introduction to EXPRESS

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. An Introduction to EXPRESS MARVIN WP1 meeting, Hamburg - April, 1999, U. Rabien based on a tutorial given by M. Grau, J. Haenisch, U. Langbecker March 19, 1996

  2. Information modelling EXPRESS and EXPRESS-G EXPRESS for data exchange and data sharing Contents

  3. Information is facts, concepts or instructions. An information model is a formal description of a bounded set of information. Abstraction - concepts, not data. Information model - what and why? What ? Why ? • for requirements analysis and systems design • a formal language leaves less room for interpretation • independence from implementation constraints Data model

  4. STEP - ISO 10303 PartLib - ISO 13584 Mandate - ISO 15531 What is STEP? Activities in ISO TC184/SC4 Standard for the Exchange of Product Model Data Goal • To support exchange • sharing • archiving of industrial data.

  5. Ship Product Model Data Exchange Requirements Ship Product Model Exchange Requirements TC 184/SC 4 Part Libraries Ship Structures (Common Model) ISO 13584 ISO 10303, Part 102 (Withdrawn) ISO TC 184/SC 4/WG 2 ISO TC 184/SC 4/WG 3/T 23 Mission Subsystems/Equipm. Ship Core Structure Distribution Systems Miscellaneous Ship Arrangements Electrical Ship Mechanical Systems Operational Logs, ISO AP 215 ISO AP 212 ISO AP 226 Records & Messages JWG 9 WG 3/T 23 WG 3/T 23 ISO AP 234 JWG with TC 8 Ship Hull Forms Piping Outfit and Furnishings ISO AP 216 ISO AP 227 and AP 217 WG 3/T 23 WG 3/T 20 and T 23 Ship Structures HVAC Electronics ISO AP 218 ISO AP 227 WG 3/T 20 WG 3/T 23 Hydraulics/Pneumatics Weapons

  6. Classification inheritance Grouping arbitrary clustering Aggregation composition, ordering Encapsulation shielding from details Abstraction mechanisms

  7. Class the type of an object Object an identifiable thing in the real world Entity a class in a model, the type of an instance Instance an object in a model Constraint restriction on entities, instances and relations Terminology

  8. ISO 10303-11 EXPRESS Language Reference Manual machine compilable object oriented baseline several incarnations also in use outside of STEP EXPRESS ENTITY cartesian_point; SUBTYPE OF (point); coordinates : LIST [1:3] OF length_measure; END_ENTITY;

  9. A formal graphical notation of a subset of EXPRESS For human communication A normative Annex to ISO 10303 - Part 11 EXPRESS - G

  10. SCHEMA TYPE ENTITY RULE FUNCTION PROCEDURE CONSTANT EXPRESS Constructs

  11. A grouping/partitioning mechanism for an area of interest All other EXPRESS declarations must occur within a schema Declarations in one schema can be “used” in other schemes by means of interface statements SCHEMA

  12. SCHEMA example_main; ... END_SCHEMA; example_main EXAMPLE Schema definition

  13. (* Building_Bolck example_main *) SCHEMA example_main_export; USE FROM example_main_model ( ... ); END_SCHEMA; SCHEMA example_main_model; USE FROM example_main_import; ENTITY xxx; END_ENTITY; END_SCHEMA; SCHEMA example_main_import; USE FROM “schemaname” END_SCHEMA; example_main_export example_main_model example_main_import Building Block - BB

  14. Definition: “A representation of a thing of interest” (classifying objects) TYPE

  15. NUMBER INTEGER REAL LOGICAL TRUE FALSE UNKNOWN BOOLEAN TRUE FALSE STRING BINARY Built-in types

  16. A type declaration creates a new type (a ‘defined type’) based on another type (the ‘underlying type’) Used to increase the semantic weight of the underlying type Used to distinguish conceptually different collections of values that happen to have similar representations Increase the maintainability of the model User-defined type

  17. TYPE Simple_identifier = STRING; END_TYPE; Example - defined TYPE Simple_identifier STRING

  18. TYPE Global_coordinate_system_orientation = ENUMERATION OF (aft_pointing, forward_pointing); END_TYPE; Example - Enumerated type Global_coordinate_system_orientation

  19. TYPE Local_or_global = SELECT (Local_co_ordinate_system, Global_axis_placement); END_TYPE; Local_or_global Example - SELECT TYPE Local_co_ordinate_system Global_axis_placement

  20. Definition “A class of information which represents conceptual or real world physical objects which have common properties” describes the data and a domain of values specify relationship between the data generalization/specialization for describing the data-structures required ENTITY

  21. ENTITY Local_co_ordinate_system;. . .END_ENTITY; ENTITY Item. . .END_ENTITY; Example - ENTITY definition Local_co_ordinat_system Point

  22. Definition: “A trait, quality or property that is a characteristic of an entity” Attribute type defines the domain of values that may be used to represent that attribute Attribute

  23. ENTITY Point x : REAL; y : REAL; z : REAL;END_ENTITY; Example - ENTITY definition Point

  24. ENTITY Item placement : OPTIONAL Local_or_global; id : Simple_identifier; END_ENTITY; Example - Attributes Local_co_ordinate_system ; Global_axis_placement placement Local_or_global Item Simple_identifier id STRING

  25. Definition: “A trait, quality or property that is a characteristic of an entity which may be derived from other attributes in the representation” DERIVED Attributes

  26. ARRAY [-3:3] OF INTEGER SET [0:?] OF Point LIST [2:?] OF Part BAG [0:100] OF Nuts_and_bolts ENTITY Item documentation : OPTIONAL SET OF Document; END_ENTITY; ENTITY Document; END_ENTITY; Aggregate types Item documentation SET [0:?] Document

  27. ordered collection of elements fixed size (lower and upper bound) bounds are integers, upper bound - lower bound + 1 elements elements may be optional REAL Frame Collection data types - ARRAY point: ARRAY [1:3] OF REAL; frame_grid: ARRAY[0:10] OF OPTIONAL UNIQUE Frame; optional: optional, unique array elements point A[1:3] *frame_grid A[0:10]

  28. unordered collection of elements position not significant duplicates NOT permitted if not specified, any number of elements can be hold optional elements not allowed Ship Curve Collection data types - SET vessels: SET OF Ship; boundary: SET [1:?] OF Curve; optional: min. and max. number of elements boundary S[1:?] vessels S

  29. ordered collection of elements duplicates permitted unless restricted if not specified, any number of elements can be hold optional elements not allowed Curve Collection data types - LIST cross_section : LIST [1:?] OF UNIQUE Curve; optional: min. and max. number of elements, unique elements cross_section L[1:?]

  30. unordered collection of elements position not significant duplicates permitted unless restricted if not specified, any number of elements can be hold optional elements not allowed Pump Collection data types - BAG optional: min. and max. number of elements water_pumps: BAG [1:50] OF Pump; oil_pumps: BAG OF UNIQUE Pump; optional: unique elements water_pumps B[1:50] *oil_pumps B

  31. Collection data types - Summary

  32. A supertype is a generalization of its subtypes and, conversely, a subtype is a specialization of its supertype(s); that is, a subtype is a particular more limited kind of its supertype. Either through constraints or limited domain values Multiple inheritance allowed. Super- and Subtypes

  33. ENTITY Item ABSTRACT SUPERTYPE; id : Simple_identifier;END_ENTITY; ENTITY Ship SUBTYPE OF(Item);END_ENTITY; ENTITY Panel SUBTYPE OF (Item);END_ENTITY; Panel Ship Example - Sub/Supertype STRING Simple_identifier id (ABS)Item

  34. As a means for specializing properties/ characteristics or constraining domain values EXPRESS allows for redefinition of attribute types of inherited attributes. Redefined types

  35. TYPE Local_or_global = SELECT (Local_co_ordinate_system, Global_axis_placement); END_TYPE; ENTITY Item ABSTRACT SUPERTYPE; placement : OPTIONAL Local_or_global; END_ENTITY; ENTITY Ship SUBTYPE OF(Item); SELF\Item.placement : Global_axis_placement; END_ENTITY; Global_axis_placement Example - redefined type Local_co_ordinate_system Local_or_global placement (ABS)Item (RT)placement Ship

  36. Rules are restrictions on values, types, relations. Rules evaluate to logicals (TRUE, FALSE, UNKNOWN). Rules Rules local global UNIQUE WHERE RULE / END_RULE

  37. Requires an attribute not to reference the same value more than once. ... or: that the combination of attribute values is unique. * in Express-G. UNIQUE

  38. UNIQUE ENTITY pump; SUBTYPE OF (machinery); pname : STRING; made_by : supplier; . . . END_ENTITY; ENTITY supplier; SUBTYPE OF (manufacturer); name : STRING; UNIQUE unique_name : name; END_ENTITY;

  39. Used to validate each instance of an entity type. Limited to the scope of the entity (no reference to other entities and their attributes). Use of SELF or of local attributes required. * in Express-G. WHERE-rule

  40. WHERE TYPE fuel_consumption = REAL; WHERE range: { 4.0 <= SELF <= 25.0 }; END_TYPE;

  41. May apply to one or more entity types within a schema. The rule header provides of the entity types that are listed all instances within the schema. * in Express-G. Global rule

  42. ENTITY Ship; SUBTYPE OF(Item); ENTITY Item; . . . ABSTRACT SUPERTYPE; context : Ship; ENTITY Panel; . . . SUBTYPE OF(Item); . . . RULE no_loose_panels FOR (Panel, Ship); WHERE WR1: SIZEOF (QUERY (panel_inst <* Panel | (SIZEOF (QUERY (ship_inst <* Ship | panel_inst.context :=: ship_inst)) = 0))) = 0; END_RULE;

  43. Similar as in programming languages. Support the writing of constraints. Procedures may have side-effects, functions not. RETURN (value); Functions and procedures

  44. Executable statements SKIP null assignment ALIAS CASE RETURN compound (BEGIN/END) ESCAPE IF...THEN...ELSE procedure call REPEAT /BY; WHILE; UNTIL

  45. local_u : Direction; local_v : Direction; DERIVE local_w: Vector := cross_product(local_u, local_v); FUNCTION cross_product (arg1, arg2 : direction) : Vector; LOCAL mag : REAL; res : Direction; v1,v2 : LIST[3:3] OF REAL; result : Vector; END_LOCAL; IF ( NOT EXISTS (arg1) OR (arg1.dim = 2)) OR ( NOT EXISTS (arg2) OR (arg2.dim = 2)) THEN RETURN(?); ELSE

  46. ELSE BEGIN v1 := normalise(arg1).direction_ratios; v2 := normalise(arg2).direction_ratios; res.direction_ratios[1] := (v1[2]*v2[3] - v1[3]*v2[2]); res.direction_ratios[2] := (v1[3]*v2[1] - v1[1]*v2[3]); res.direction_ratios[3] := (v1[1]*v2[2] - v1[2]*v2[1]); mag := 0.0; REPEAT i := 1 TO 3; mag := mag + res.direction_ratios[i]*res.direction_ratios[i]; END_REPEAT; IF (mag > 0.0) THEN result.orientation := res; result.magnitude := SQRT(mag); ELSE result.orientation := arg1; result.magnitude := 0.0; END_IF; RETURN(result); END; FUNCTION normalise (arg : vector_or_direction) : vector_or_direction; END_IF; END_FUNCTION;

  47. ENTITY direction; direction_ratios : LIST [2:3] OF REAL; WHERE WR1: SIZEOF(QUERY(tmp <* direction_ratios | tmp <> 0.0)) > 0; END_ENTITY; ENTITY vector; orientation : direction; magnitude : length_measure; WHERE WR1 : magnitude >= 0.0; END_ENTITY;

  48. Built-in functions Abs ACos ASin ATan BLength Cos Exists Exp Format HiBound HiIndex Length LoBound Log Log2 Log10 LoIndex NVL Odd RolesOf Sin SizeOf Sqrt Tan TypeOf UsedIn Value Value_in Value_unique Insert Remove

  49. to make definitions from other schemas visible in the current schema USE / REFERENCE have Express-G notation have alias functionality Interface specifications

  50. does NOT give you a complete copy! only entities and defined types but those as if locally defined USE FROMs are chained USE FROM NOT: SCHEMA example_copy; USE FROM example_main; END_SCHEMA; constants functions procedures rules schemas

More Related