Welcome to the exff Pages |
NEWS | ABOUT | SOFTWARE | FAQ | GUIDES | PAPERS | LINKS |
Resources
|
Abstract EXPRESS is a "data specification" language. It is used in various industries but most significantly, it is the language in which a series of ISO standards known as STEP are written. This guide explains the EXPRESS language concepts and syntax and describes the similarity between EXPRESS concepts and UML concepts. This first Release 0.1 does not address all of EXPRESS. It only addresses those EXPRESS concepts covered by the EXPRESS/UML transformations supported in exff Release 0.1. Contents An Overview of the EXPRESS
Concepts An Overview of the EXPRESS ConceptsEXPRESS is a structurally object-oriented data specification language. EXPRESS is not specific to any particular implementation technology - ISO standardizes bindings of EXPRESS into text files, XML and programming interfaces. In many ways, EXPRESS concepts are similar in nature to those that can be defined on UML Static Class Diagrams. SchemasThe EXPRESS concept that acts as the partition for all other EXPRESS concepts is the schema. Schemas group a set of declarations applicable to a subject, domain or topic area. Declarations in one schema may be re-used in another schema. A schema is named and provides a namespace for everything defined within it. A schema is similar in nature to a UML Package.Entities and attributesThe main concept in EXPRESS is that of an entity data type. An entity data type is defined within a schema. An entity data type is a class governing a set of entity instances. One entity data type may be a specialization of one or more other entity data types. The entity data type that is the specialization is called the subtype in EXPRESS. The more general entity data type is called the supertype. An entity data type may be declared to be abstract - that is not directly instantiable. The default relationship between multiple subtypes of the same supertype is that they are not mutually exclusive. An EXPRESS entity data type is similar in nature to a UML Class. Note that the default relationship between UML Classes that are specializations of the same Class is that they are mutually exclusive. Here EXPRESS and UML differ. An entity data type may have attributes defined within it. Attributes are the properties, relationships and/or characteristics of the entity data type. Attributes have a value domain. An explicit attribute may have its value set. An explicit attribute may be declared to be optional. In UML, there is a syntactic distintion is made between UML Attributes and UML Associations. No such distinction is made in EXPRESS. NOTE - There are actually three types of attribute: explicit, inverse and derived. Only explicit attributes are addressed in exff Release 0.1. Defined typesDefined types are an important aspect of the EXPRESS language that are not supported in exff Release 0.1 and so they are not yet addressed in this guide.ConstraintsNone of the powerful EXPRESS constraint language is supported in exff Release 0.1 and so it is not yet addressed in this guide. This includes unique rules, where rules, global rules, constants, functions, procedures and the expression language itself. Data typesSimple data typesThe EXPRESS simple data types are "integer", "real", "number", "logical", "Boolean", "binary" and "string". The integer data type is exactly what you would think it is. The real data type is rational, irrational and scientific numbers. NOTE - In exff Release 0.1 the precision of a real data type is not addressed. The number data type is a type that includes both integers and reals. The number data type is not often used. The Boolean data type is an enumeration of false and true. The logical data type is an enumeration of false, true and unknown. The false and true values are compatible with Boolean. The string data type is a varying length, unless otherwise stated, Unicode string. NOTE - A maximum length may be specified and a string data type may alse be declared to have a fixed length but these are not addressed in exff Release 0.1. The binary data type is a varying length, unless otherwise stated, string of 1s and 0s. NOTE - A maximum length may be specified and a binary data type may alse be declared to have a fixed length but these are not addressed in exff Release 0.1. Aggregation data typesEXPRESS allows the definition of an aggregation data type called "set". A set may have one or more elements and a minimum and maximum number of elements may be specified. The elements or members of an aggregation data type are all of the same base type. The base type of a set may be an entity data type. NOTE - EXPRESS supports much more capability than simple sets of entity data types. It also supports "bag", "array" and "list" that may be multi-dimensional and there are many possible base types for the aggregation data type elements. These concepts are not addressed in exff Release 0.1. StructuresThe structural aspects of EXPRESS include the concepts of schema, entity data type, subtyping, explicit attributes and sets of entity data types. NOTE - EXPRESS also supports select data types, enumeration data types and many kinds of aggregation data types that are not addressed in exff Release 0.1. EXPRESS namesThe names of EXPRESS model elements have a defined format. A name is a set of letters, numbers and the underscore character. The name cannot contain blanks or any special character other than underscore "_". The name must start with a letter. EXPRESS names are not case sensitive.In this document, EXPRESS keywords are in upper case and the names of elements of the EXPRESS model are all in lower case. NOTE - This is the convention adopted by the STEP community. It is different from that adopted in the UML community where conventions like ClassName and attributeName are often used. SchemasA schema is declared as follows, :
where schema_name is the name of the schema. Note the semi-colon ending a statement in an EXPRESS declaration and the END_xxx closing the declaration. This syntax is common in many EXPRESS declarations. It should also be noted that whitespace and new lines are not important in EXPRESS. The following is equivalent to the above declaration:
Entity data typesAn entity data type is declared as follows, :
where entity_name is the name of the entity. An entity data type only appears within a schema so, in fact, the following is required:
The syntax for declaring that an entity data type is abstract is as follows.
It should be noted that newlines within EXPRESS declarations are allowed as well so the following is an equivalent declaration.
The syntax for declaring that one entity data type is a subtype, or specialization, of another is as follows.
where comma_separated_supertype_names is a comma separated list of the entity data types of which this entity data type is a subtype. Note that the list is enclosed in parentheses. Explicit attributesAn explicit attribute is declared as follows, :
where entity_name is the name of the entity, attibute_name is the name of the attribute and attribute_domain is the type of the domain of the attribute. For exff Release 0.1 an attribute_domain may be a simple data type, an entity data type or a set of entity data types. An explicit attribute may be declared to be optional. A better example follows.
The syntax of the cardinality, or multiplicity in UML terms, of the domain that is a set is [lower:upper]. "?" means unbounded. Examples of EXPRESSPeopleSCHEMA people;
|