Summary

This part of the course covers the elements of EXPRESS-G:

  • History

  • Design goals

  • Language elements and examples

Introduction

EXPRESS-G is a graphical subset of EXPRESS lexical language and has evolved from a variety of sources.

EXPRESS-G may be used anywhere EXPRESS is used. It can be used alone in its own right, but more usually employed with EXPRESS lexical to fill in any missing details.

It is created to achieve:

  • Graphical display of EXPRESS models.

  • Stand-alone information modeling iconic language.

  • Model display at varying levels of abstraction.

  • Model display at varying levels of granularity.

History

There were three main proposals for a graphical version of EXPRESS before the EXPRESS Committee started work in earnest. This meant that they had some user experiences to guide them.

  • 1988-10: EXPRESSAM (Bruce Lownsbery of Lawrence Livermore Lab) based on NIAM.

  • 1989-02: GREXP (Peter Wilson of General Electric), a BLA language ("boxes, lines, annotation") with multiple levels of abstraction and any amount of text.

  • 1989-11: ExpressGraph (Curt Parks of NIST, John Zimmerman of Allied Bendix) simplified version of EXPRESSAM.

  • 1990-02: EXPRESS-G (EXPRESS Committee)

The final result is yet another member of the BLA (boxes, lines, and annotations) family. Unlike practically any other BLA language it was based on an existing lexical language — the others were stand-alone.

EXPRESS-G is a subset that is limited to the structural parts of EXPRESS — no representation of constraints, no FUNCTIONs.

  • Drafted by EXPRESS Committee in January 1990

  • A combination of ExpressGraph and GREXP.

  • A subset of EXPRESS.

  • Modeling of Entity, Attribute, Cardinality, Supertype, Type and Schema.

  • Limited levels of abstraction.

  • No ISO ballot issues in mid 1990 (Informative Annex).

  • February 1991 —  Normative Annex to EXPRESS document and extended.

  • Same standardization status as EXPRESS.

Design goals

The design goals of EXPRESS-G included:

  • Subset of EXPRESS.

  • Intuitive understanding of diagrams.

  • Support different levels of abstraction.

  • Mechanism for multi-page models.

  • Minimal graphic capabilities needed.

  • Potential automatic EXPRESS-G display of EXPRESS models.

As there was a full lexical language available EXPRESS-G was limited to those things that could be easily represented graphically.

It was hoped that the diagrams could be understood with (practically) no training. (Hopefully even non-technical managers would feel comfortable).

Different levels of abstraction (detail) would be available.

Importantly, it was known that EXPRESS-G models would be published in reports on normal sized paper, so there had to be a means of splitting a large diagram across a number of pages.

The icons had to be simple so simple drawing programs could be used (at one time diagrams were drawn using ASCII art on lineprinters).

It would be useful to be able to develop software to go between EXPRESS and EXPRESS-G modeling.

Example EXPRESS-G model

This is meant to be understandable by the audience — at least the general tenor of the model.

TYPE date = ARAY [1:3] OF INTEGER; END_TYPE;

TYPE hair_type = ENUMERATION OF
  (blonde, brown, black, red, white, bald);
END_TYPE;

ENTITY person;
  first_name : STRING;
  last_name : STRING;
  nickname : 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;

SUBTYPE_CONSTRAINT sc_person FOR person;
  ONEOF(male, female);
END_SUBTYPE_CONSTRAINT;

ENTITY female SUBTYPE OF (person);
INVERSE
  husband : SET [0:1] OF male FOR wife;
END_ENTITY;

ENTITY male SUBTYPE OF (person);
  wife : OPTIONAL female;
END_ENTITY;

FUNCTION years(past : date): INTEGER
  (* returns number of years between past and current date *)
END_FUNCTION;
Example 1. Example model in EXPRESS-G
02 models 1
02 models 2

EXPRESS-G symbols

Definition symbols

These are the symbols for representing the structural elements of EXPRESS, principally TYPE, ENTITY and SCHEMA.

SUBTYPE_CONSTRAINT is a late addition.

Example 2. EXPRESS-G base types
02 symbols 1
02 symbols 4
02 symbols 8
Figure 1. EXPRESS-G defined types
02 symbols 9
Figure 2. EXPRESS-G ENTITY
02 symbols 17
Figure 3. EXPRESS-G SUBTYPE_CONSTRAINT
02 symbols 13
Figure 4. EXPRESS-G SCHEMA

Relationship symbols

Lines are used to indicate relationships between definitions.

The thickness of the line is meant to be indicative of the strength of the relationship.

  • Thick lines for supertype/subtype relationship

  • Dashed line for an optional attribute of an ENTITY.

02 symbols 14
Figure 5. EXPRESS-G line styles

Composition symbols

There are 2 kinds of composition symbols:

  • Page connectors, where a relationship line crosses to or from another page.

  • Inter-schema references where something is defined in some other schema than the current one.

02 symbols 15
Figure 6. EXPRESS-G page references
02 symbols 16
Figure 7. EXPRESS-G inter-schema references

Usage examples

Expressing a supertype tree

In this example we model a tree of entities composed through subtypes/supertypes.

SCHEMA simple_tree;

ENTITY super; END_ENTITY;

ENTITY sub1 SUBTYPE OF (super); END_ENTITY;

ENTITY sub2 SUBTYPE OF (super); END_ENTITY;

SUBTYPE_CONSTRAINT sc_sub2 FOR sub2;
  ABSTRACT;
  ONEOF(sub3, sub4);
END_SUBTYPE_CONSTRAINT;

ENTITY sub5 SUBTYPE OF (super); END_ENTITY;

ENTITY sub3 SUBTYPE OF (sub2); END_ENTITY;

ENTITY sub4 SUBTYPE OF (sub2); END_ENTITY;

END_SCHEMA; -- simple_tree
02 models 5
Figure 8. Example EXPRESS-G supertype tree

Expressing retyped attributes

A retyped attribute can be shown in the following diagram.

ENTITY sup_a;
  attr : sub_b;
END_ENTITY;

ENTITY sub_a SUBTYPE OF (sup_a);
  SELF\sup_a.sub_b : sub_b;
END_ENTITY;

ENTITY sup_b;
  num : OPTIONAL NUMBER;
END_ENTITY;

ENTITY sub_b SUBTYPE OF (sup_b);
  SELF\sup_b.num : REAL;
END_ENTITY;
02 models 6
Figure 9. EXPRESS-G of the

Expressing partial and complete ENTITY models

ENTITY super; END_ENTITY;

ENTITY sub_1 SUBTYPE OF (super);
  attr : from_ent;
END_ENTITY;

ENTITY sub_2 SUBTYPE OF (super);
  pick : choice;
END_ENTITY;

ENTITY an_ent;
  int : INTEGER;
END_ENTITY;

ENTITY from_ent;
  description : OPTIONAL to_ent;
  values      : ARRAY [1:3] OF UNIQUE REAL;
END_ENTITY;

ENTITY to_net;
  text : strings;
END_ENTITY;

TYPE choice = SELECT
  (an_ent, name);
END_TYPE;

TYPE name = STRING; END_TYPE;

TYPE strings  LIST [1:?] OF STRING; END_TYPE;
02 models 3
Figure 10. EXPRESS-G PARTIAL ENTITY LEVEL MODEL
02 models 4
Figure 11. EXPRESS-G COMPLETE ENTITY LEVEL MODEL

Expressing schema and entity models

SCHEMA "top"
SCHEMA top;
  USE FROM geom (curve, point AS node);
  REFERENCE FROM geom (surface);

  ENTITY face;
    bounds : LIST [1:?] OF loop;
    loc    : surface;
  END_ENTITY;

  ENTITY loop; END_ENTITY;

  SUBTYPE_CONSTRAINT sc_loop FOR loop;
    ABSTRACT;
    ONEOF(eloop, vloop);
  END_SUBTYPE_CONSTRAINT;

  ENTITY eloop SUBTYPE OF (loop);
    bound : LIST [1:?] OF edge;
  END_ENTITY;

  ENTITY vloop SUBTYPE OF (loop);
    bound : vertex;
  END_ENTITY;

  ENTITY edge;
    start, end : vertex;
    loc   : curve;
  END_ENTITY;

  ENTITY vertex;
    loc : node;
  END_ENTITY;
END_SCHEMA; -- top
SCHEMA "geom"
SCHEMA geom;
  ENTITY lcs; END_ENTITY;
  ENTITY surface; END_ENTITY;
  ENTITY curve; END_ENTITY;
  ENTITY point; END_ENTITY;
END_SCHEMA; -- geom
02 models 8
Figure 12. EXPRESS-G schema level model
02 models 7
Figure 13. EXPRESS-G entity level model

Expressing subtype constraints

ENTITY p; END_ENTITY;  -- person

SUBTYPE_CONSTRAINT p_subs FOR p;
  TOTAL_OVER(m, f);
  ONEOF(m, f) AND ONEOF(c, a);
END_SUBTYPE_CONSTRAINT;

ENTITY m SUBTYPE OF (p); END_ENTITY; -- male

ENTITY f SUBTYPE OF (p); END_ENTITY; -- female

ENTITY c SUBTYPE OF (p); END_ENTITY; -- citizen

ENTITY a SUBTYPE OF (p); END_ENTITY; -- alien

SUBTYPE_CONSTRAINT no_li FOR a;
  ABSTRACT SUPERTYPE;
  ONEOF(l, i);
END_SUBTYPE_CONSTRAINT;

ENTITY l SUBTYPE OF (a); END_ENTITY; -- legal

ENTITY i SUBTYPE OF (a); END_ENTITY; -- illegal
02 models 10
Figure 14. EXPRESS-G with SUBTYPE_CONSTRAINTs