1、 Reference number ISO 10303-11:2004(E) ISO 2004INTERNATIONAL STANDARD ISO 10303-11 Second edition 2004-11-01 Industrial automation systems and integration Product data representation and exchange Part 11: Description methods: The EXPRESS language reference manual Systmes dautomatisation industrielle
2、 et intgration Reprsentation et change de donnes de produits Partie 11: Mthodes de description: Manuel de rfrence du langage EXPRESS ISO 10303-11:2004(E) PDF disclaimer This PDF file may contain embedded typefaces. In accordance with Adobes licensing policy, this file may be printed or viewed but sh
3、all not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In downloading this file, parties accept therein the responsibility of not infringing Adobes licensing policy. The ISO Central Secretariat accepts no liability in this area
4、. Adobe is a trademark of Adobe Systems Incorporated. Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by
5、 ISO member bodies. In the unlikely event that a problem relating to it is found, please inform the Central Secretariat at the address given below. ISO 2004 All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means, electro
6、nic or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or ISOs member body in the country of the requester. ISO copyright office Case postale 56 CH-1211 Geneva 20 Tel. + 41 22 749 01 11 Fax + 41 22 749 09 47 E-mail copyrightiso.org
7、 Web www.iso.org Published in Switzerland ii ISO 2004 All rights reservedISO 10303-11:2004(E) Contents Page 0 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii 0.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8、xii 0.2 Language overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii 1 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 Normative references . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3 Terms
9、 and denitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3.1 Terms dened in ISO 103031. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3.2 Terms dened in ISO/IEC 10646 . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3.3 Other terms and denitions . . . . .
10、 . . . . . . . . . . . . . . . . . . . . . . . . 2 4 Conformance requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4.1 Formal specications written in EXPRESS . . . . . . . . . . . . . . . . . . . . 5 4.1.1 Lexical language . . . . . . . . . . . . . . . . . . . . . . . .
11、. . . . . . . . 5 4.1.2 Graphical form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4.2 Implementations of EXPRESS . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4.2.1 EXPRESS language parser . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4.2.2 Graphical editin
12、g tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 5 Fundamental principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 6 Language specication syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 6.1 The syntax of the specication . . . . .
13、. . . . . . . . . . . . . . . . . . . . . . 8 6.2 Special character notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 7 Basic language elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 7.1 Character set . . . . . . . . . . . . . . . . . . . . . . . .
14、 . . . . . . . . . . . . . 10 7.1.1 Digits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 7.1.2 Letters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 7.1.3 Special characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15、11 7.1.4 Underscore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 7.1.5 Whitespace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 7.1.6 Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 7.2 Reserved words . . . . .
16、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 7.2.1 Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 7.2.2 Reserved words which are operators . . . . . . . . . . . . . . . . . . . . . 14 7.2.3 Built-in constants . . . . . . . . . . . . . . . . .
17、 . . . . . . . . . . . . . . 15 7.2.4 Built-in functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 7.2.5 Built-in procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 7.3 Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18、 . . 15 7.4 Identiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 7.5 Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 7.5.1 Binary literal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 7.5.2 Int
19、eger literal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 7.5.3 Real literal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 7.5.4 String literal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 7.5.5 Logical literal . . . . .
20、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 8 Data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 8.1 Simple data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 c ISO 2004 | All rights reserved iiiISO 10303-11
21、:2004(E) 8.1.1 Number data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 8.1.2 Real data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 8.1.3 Integer data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 8.1.4 Logical data typ
22、e. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 8.1.5 Boolean data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 8.1.6 String data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 8.1.7 Binary data type . . . . . . . . . . . . . . .
23、. . . . . . . . . . . . . . . . . 22 8.2 Aggregation data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 8.2.1 Array data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 8.2.2 List data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
24、 . . 25 8.2.3 Bag data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 8.2.4 Set data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 8.2.5 Value uniqueness on aggregates . . . . . . . . . . . . . . . . . . . . . . . . 27 8.3 Named data types . .
25、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 8.3.1 Entity data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 8.3.2 Dened data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 8.4 Constructed data types . . . . . . . . . . . . . .
26、. . . . . . . . . . . . . . . . . 29 8.4.1 Enumeration data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 8.4.2 Select data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 8.5 Generalized data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27、 . . 35 8.6 Data type usage classication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 8.6.1 Instantiable data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 8.6.2 Parameter data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 8.6.3 Underlying data t
28、ypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 9 Declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 9.1 Type declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 9.2 Entity declaration . . . . . . . . .
29、 . . . . . . . . . . . . . . . . . . . . . . . . . 40 9.2.1 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 9.2.2 Local rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 9.2.3 Subtypes and supertypes . . . . . . . . . . . . . . . . .
30、 . . . . . . . . . . 48 9.2.4 Abstract entity data type . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 9.2.5 Subtype/supertype constraints . . . . . . . . . . . . . . . . . . . . . . . . 55 9.2.6 Implicit declarations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 9.2.7 Spe
31、cialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 9.3 Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 9.4 Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 9.5 Algorithms . . . . . . .
32、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 9.5.1 Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 9.5.2 Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 9.5.3 Parameters . . . . . . . . . . . . . . . . . . .
33、 . . . . . . . . . . . . . . . . 65 9.5.4 Local variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 9.6 Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 9.7 Subtype constraints . . . . . . . . . . . . . . . . . . . . . . . . . . .
34、 . . . . . . 74 9.7.1 Abstract supertype constraint . . . . . . . . . . . . . . . . . . . . . . . . 75 9.7.2 Total coverage subtypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 9.7.3 Overlapping subtypes and their specication . . . . . . . . . . . . . . . . 76 10 Scope and visibility.
35、 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 10.1 Scope rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 10.2 Visibility rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 10.3 Explicit item rules . . .
36、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 10.3.1 Alias statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 iv c ISO 2004 | All rights reservedISO 10303-11:2004(E) 10.3.2 Attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
37、. 81 10.3.3 Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 10.3.4 Enumeration item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 10.3.5 Entity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 10.3.6 Function . . .
38、. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 10.3.7 Parameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 10.3.8 Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 10.3.9 Query expression . . . . . . . . . . . .
39、. . . . . . . . . . . . . . . . . . . . 83 10.3.10 Repeat statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 10.3.11 Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 10.3.12 Rule label . . . . . . . . . . . . . . . . . . . . . . . . . . .
40、. . . . . . . . . 85 10.3.13 Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 10.3.14 Subtype constraint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 10.3.15 Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 10.
41、3.16 Type label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 10.3.17 Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 11 Interface specication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 11.1 Use interface
42、specication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 11.2 Reference interface specication . . . . . . . . . . . . . . . . . . . . . . . . . . 87 11.3 The interaction of use and reference . . . . . . . . . . . . . . . . . . . . . . . . 88 11.4 Implicit interfaces . . . . . . . .
43、 . . . . . . . . . . . . . . . . . . . . . . . . . . 89 11.4.1 Constant interfaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 11.4.2 Dened data type interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . 90 11.4.3 Entity data type interfaces . . . . . . . . . . . . . . .
44、 . . . . . . . . . . . 90 11.4.4 Function interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 11.4.5 Procedure interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 11.4.6 Rule interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
45、 11.4.7 Subtype constraint interfaces . . . . . . . . . . . . . . . . . . . . . . . . . 91 12 Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 12.1 Arithmetic operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 12.2 Relational
46、 operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 12.2.1 Value comparison operators . . . . . . . . . . . . . . . . . . . . . . . . . . 95 12.2.2 Instance comparison operators . . . . . . . . . . . . . . . . . . . . . . . . 99 12.2.3 Membership operator . . . . . . . .
47、. . . . . . . . . . . . . . . . . . . . . 101 12.2.4 Interval expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 12.2.5 Like operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 12.3 Binary operators . . . . . . . . . . . . . . . . . . . . . . . .
48、 . . . . . . . . . . . 103 12.3.1 Binary indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 12.3.2 Binary concatenation operator . . . . . . . . . . . . . . . . . . . . . . . . 104 12.4 Logical operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49、104 12.4.1 NOT operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 12.4.2 AND operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 12.4.3 OR operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 12.4.4 XOR operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 12.5 String operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 12.5.1 String indexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .