18. STEP Architecture Application Protocols and Abstract Test Suites Parts 2 XX & 3 XX Generic Resources Parts 41-99 A IC / Implementation modules Parts 4XX, 5 XX Integrated Resources Application Resources Parts 101+ Implementation Methods Part 21 Exchange File, Parts 22-29 Description Methods Part 11 EXPRESS Framework Part 13 STEP Development Methodology Conformance Methods Part 31 Conformance Testing Methods: General Concepts Parts 32-39 Application Modules Parts 1 XXX
19. STEP Architecture Part 439 - AP239 product life cycle support * Part 1287 - AP239 activity recording * Part 1297 - AP239 document management * Part 1289 - AP239 management resource information * Part 1293 - AP239 part definition information * Part 1292 - AP239 product definition information * Part 1304 - AP239 product status recording * Part 1295 - AP239 properties * Part 1306 - AP239 task specification resourced * Part 1307 - AP239 work definition Application Protocols (AP) Implementation modules Application Modules
34. EXPRESS ENTITY employee; name : person_name; END_ENTITY; ENTITY person_name; last_name : STRING; first_name : STRING; INVERSE link : employee FOR name; END_ENTITY
35.
36. EXPRESS mammal human cat dog 1 ENTITY mammal ABSTRACT SUPERTYPE OF (OneOf(human,dog,cat)); weight : REAL; END_ENTITY; ENTITY human SUBTYPE OF (mammal); (* human attributes *) END_ENTITY; ENTITY dog SUBTYPE OF (mammal); (* dog attributes *) END_ENTITY; ENTITY cat SUBTYPE OF (mammal); (* cat attributes *) END_ENTITY; OneOf Property
37. EXPRESS person student business owner employee ENTITY person ssn : STRING; END_ENTITY; ENTITY student SUBTYPE OF (person); (*student attributes*) END_ENTITY; ENTITY employee SUBTYPE OF (person); (*employee attributes*) END_ENTITY; ENTITY business_owner SUBTYPE OF (person); (*business_owner atts*) END_ENTITY; Subtypes/Supertypes (AndOr)
40. EXPRESS RULE max_number_of_students FOR (student); WHERE max_is_40 : SIZEOF(student) <= 40; END_RULE; RULE rule_name FOR ( entity_type_1 ,…, entity_type_N ); (* executable statements *) WHERE (* some expression that returns TRUE or FALSE *) END_RULE; Global Rules
41.
42. EXPRESS FUNCTION days_between( d1 : date, d2 : date ) : INTEGER; (* returns the number of days between the two input dates. If d1 is earlier than d2, a positive number is returned *) END_FUNCTION; ENTITY destroyed_part; production_date : date; destruction_date : date; WHERE dates_ok : days_between(production_date,destruction_date) >=0; END_ENTITY;
43. EXPRESS ENTITY closed_planar_curve ABSTRACT SUPERTYPE; area : REAL; END_ENTITY; ENTITY circle SUBTYPE OF (closed_planar_curve); center : point; radius : REAL; DERIVE SELFlosed_planar_curve.area : REAL := PI*radius**2; END_ENTITY; Attribute Redeclaration
44.
45. EXPRESS-G Simple types symbols Type definition symbols BOOLEAN LOGICAL BINARY NUMBER INTEGER REAL STRING anEnumeration aSelect userDefinedType
46. EXPRESS-G Entity symbol Relationship line styles attribute Optional attribute subtype-supertype
47.
48. Example of EXPRES S SCHEMA example; TYPE hair_type = ENUMERATION OF (blonde, black, brown, white); END_TYPE; TYPE date = ARRAY [1:3] of integer; END TYPE; ENTITY person SUPERTYPE OF (ONEOF(female, male)); first_name : STRING; last_name : STRING; nickname : OPTIONAL STRING; birth_date : date; children : SET [0:?] OF person; hair : hair_type; DERIVE age : INTEGER := years(birth_date); INVERSE parents : SET [0:2] OF person FOR children; END_ENTITY; ENTITY female SUBTYPE OF (person); INVERSE husband : SET [0:1] OF male FOR wife; ---husband is optional! END_ENTITY; ENTITY male SUBTYPE OF (person); wife : OPTIONAL female; END_ENTITY; FUNCTION years(past : date): INTEGER; (*This function calculates years from birthdate and current date.) END_FUNCTION; END_SCHEMA;
50. ISO 10303-21 File Example ISO-10303-21 ; HEADER ; FILE_DESCRIPTION ((‘This is a sample person schema’),’1’); FILE_NAME (‘Example P21 File’,’1999-08-08 T15:30:00’,(‘J.Doe’), (PDES, Inc.’), ‘ Version 1’,’APPROVED BY P.H. Boss’); FILE_SCHEMA; ENDSEC; DATA; #1=PERSON(‘Dilbert’,’Jones’,$,(30,5,1962),(),.WHITE.); #2=PERSON(‘Wally’,’Smith’,$,(30,5,1960),(#11,#20),.BROWN.); ... #10=MALE(‘Pointy’,’Boss’,$,(29,05,1961),(),.BLACK.,#21); #11=MALE(‘Atos’,’Smith’,$,(16,03,1990),(),.BROWN.,$); ... #20=FEMALE(‘Ellen’,’Smith’,$,(08,03,1992),().BLONDE.); #21=FEMALE(‘Francis’,’Boss’,’Fran’,(18,6,1962),(),.BROWN.); . . ENDSEC; END-ISO-10303-21; MetaData Data
51. Example 2 SCHEMA example1; ENTITY point; x : REAL; y : REAL; END_ENTITY; ENTITY line; end1 : point; end2 : point; END_ENTITY; END_SCHEMA; Primitive attributes Complex attributes x y line point REAL end1 end2
52. Example 2 – cont. Instance Model Fragment Part 21 (p21) format #10 = POINT (2.0, 2.0); #20 = POINT (5.0, 2.0); #30 = POINT (5.0, 4.0); #110 = LINE (#10, #20); #150 = LINE (#10, #30); Reference to another instance Instance identifier (arbitrary number within a given p21 model) Attribute values (in order as given in schema)