📰 newsreader

twostopbits score 0.13 好み 0.00 en

EXPRESS言語の40周年を祝して (github.com)

原題: Celebrating the 40th anniversary of the EXPRESS language (github.com)

express languageiso 10303information modelingstep standarddata schemasformal verificationcad/camdata exchange
原文 ↗

日本語訳

# タイトル

EXPRESS言語の40周年を祝して (github.com)

# 本文

このプロジェクトの目的は、STEP (ISO 10303) 標準シリーズによって公開されている様々なモデルを研究し、この言語の興味深い代替用途を実験するのに適した、EXPRESSパーサー、コードモデル、ナビゲーター(https://github.com/rochus-keller/ActiveOberon に類似)、およびその他のツールを構築することです。

このプロジェクトは現在進行中のものです。

EXPRESSは、1982年から開発・使用され、最終的に1994年にISO 10303-11として標準化された、形式的な情報モデリング言語です。これはSTEP (STandard for the Exchange of Product model data) のデータ定義のバックボーンであり、データスキーマを指定するための、厳密でマシンプロセッサ可能な方法を提供します。スキーマは、型付き属性、継承階層、集約型、制約ルール、およびアルゴリズム関数を持つエンティティで構成され、産業製品データのライフサイクル全体をカバーしています。

当時の「競合」には、例えばIDEF1X(米国国防総省向けに開発されたグラフィカルな実体関連モデル手法)や、ASN.1(通信プロトコルおよびデータ用の標準化された仕様言語)、そして後年ではUML(OCL:Object Constraint Languageを含む)、XML Schema、またはOWL(Web Ontology Language)などがありました。

EXPRESSはもともと、マクドネル・ダグラス社における米国空軍のPDDI (Product Definition Data Interface) プログラムの一部として、Douglas Schenckの指揮の下で始まりました。この言語は当初「PDDI DSL」 (Data Specification Language) と呼ばれていました。PDDI、および後のPDES (Product Data Exchange using STEP) は、先駆的なCAD/CAMデータ交換プログラムであり、今日の製品データ交換に使用されている国際的なSTEP標準シリーズのメソッド論的な基礎を築きました。

汎用プログラミング言語とは異なり、EXPRESSはデータがどのようなものであるか、および満たすべき不変条件(invariants)を定義するために特化して作られています。その構文はPascalに似ています。スキーマ、エンティティ、型、関数、手続き、およびルールが、Wirthの伝統を直接継承した、ブロック構造化された強型付けのスタイルで構成されています。キーワードはグローバルに予約されており、識別子はケースインセンティブ(大文字小ellen小文字を区別しない)です。型システムには、SELECT(エンティティ型に対する判別共用体)、ONEOF/AND/ANDORの型の上位制約、および境界指定を持つ組み込みの集約型(SET, BAG, LIST, ARRAY)などの新しい機能が含まれています。

```pascal

SCHEMA calendar;

TYPE months = ENUMERATION OF (January, February, March, April, May, June,

July, August, September, October, November, December);

END_TYPE;

ENTITY date;

day : INTEGER;

month : months;

year : INTEGER;

WHERE

days_ok : {1 <= day <= 31};

year_ok : year > 0;

date_ok : valid_date(SELF);

END_ENTITY;

FUNCTION valid_date (par : date) : BOOLEAN;

(* 入力が有効な日付でない場合はFALSEを返す *)

RETURN(FALSE); -- stub

END_FUNCTION;

END_SCHEMA; -- calendar

```

SchenckとWilsonによる1994年の著書 "Information Modeling the EXPRESS Way" からの例(改変)

私は数年前、システムエンジニアリングのコンサルタントおよび政府プロジェクトのマネージャーとして働いていた際、ISO 10303とEXPRESS言語に出会いました。EXPRESSはさまざまな理由で魅力的です。私は一般的にプログラミング言語の設計に関心があり、長

原文(英語)を表示

The goal of this project is to build an EXPRESS parser, code model, navigator (similar to https://github.com/rochus-keller/ActiveOberon) and other tools suitable to study the various models published by the STEP (ISO 10303) standard series, and to experiment with interesting alternative uses of the language.

This project is work in progress.

EXPRESS is a formal information modeling language in development and use since 1982 and eventually standardized as ISO 10303-11 in 1994. It is the data definition backbone of STEP (STandard for the Exchange of Product model data), and provides a rigorous, machine-processable way to specify data schemas. Schemas are entities with typed attributes, inheritance hierarchies, aggregation types, constraint rules, and algorithmic functions, covering the full lifecycle of industrial product data.

Its "contenders" at the time were e.g. IDEF1X (a graphical entity-relationship method developed for the US Department of Defense), or ASN.1 (a standarized specification language for telecommunications protocols and data), and in later years UML with OCL (Object Constraint Language), XML Schema or OWL (Web Ontology Language).

EXPRESS originally started as part of the PDDI (Product Definition Data Interface) program by the US Air Force at the McDonnell Douglas Corporation, headed by Douglas Schenck. The language was first called “PDDI DSL” (Data Specification Language). PDDI and later PDES (Product Data Exchange using STEP) were pioneering CAD/CAM data exchange programs, which laid the methodological foundation for the international STEP standard series, which is used today for product data exchange.

Unlike general-purpose programming languages, EXPRESS is purpose-built for defining what data looks like and what invariants it must satisfy. Its syntax is Pascal-like: schemas, entities, types, functions, procedures, and rules compose in a block-structured, strongly typed style directly descended from the Wirth tradition. Keywords are globally reserved, identifiers are case-insensitive, and the type system includes novel features such as SELECT (discriminated union over entity types), ONEOF/AND/ANDOR supertype constraints, and built-in aggregation types (SET, BAG, LIST, ARRAY) with bound specifications.

SCHEMA calendar;

TYPE months = ENUMERATION OF (January, February, March, April, May, June,

July, August, September, October, November, December);

END_TYPE;

ENTITY date;

day : INTEGER;

month : months;

year : INTEGER;

WHERE

days_ok : {1 <= day <= 31};

year_ok : year > 0;

date_ok : valid_date(SELF);

END_ENTITY;

FUNCTION valid_date (par : date) : BOOLEAN;

(* returns FALSE if its input is not a valid date *)

RETURN(FALSE); -- stub

END_FUNCTION;

END_SCHEMA; -- calendar

Example (modified) from the 1994 book "Information Modeling the EXPRESS Way" by Schenck and Wilson

I came in contact with ISO 10303 and the EXPRESS language many years ago when I was working as a systems engineering consultant and mangager for government projects. EXPRESS is fascinating for different reasons. I'm generally interested in programming language design and implemented many parsers and compilers over the years, particularly in the Algol and Wirth lineage of programming languages (such as Oberon, ActiveOberon, Simula 67, and more recently Luon and Micron). So EXPRESS was on my list for a long time for this reason, but also because I wanted a tool to do specific analyses on the STEP models.

And 2026 also marks the 40th anniversary of EXPRESS: in January 1986, Douglas Schenck submitted the first complete language specification bearing the EXPRESS name to ISO/TC 184/SC 4/WG 1. The grammar and core semantics were already stable by 1986; what followed was documentation and consensus, not redesign.

For many years I'm also interested in MUMPS (Massachusetts General Hospital Utility Multi-Programming System, which celebrates 60th anniversary in 2026!) and the integration of programming languages with (no-sql) databases (see e.g. Udb and Sdb). I want to explore EXPRESS as a typed counterpart to MUMPS: a language that unifies data definition, data manipulation, and query within a single formally specified notation, but with the strong typing, declarative constraints, and algebraic rigor that MUMPS deliberately omitted. EXPRESS already provides data definition (schemas, entities, types) and constraint specification (WHERE rules, UNIQUE constraints, global RULE declarations). Extending it with behavioral semantics would yield a language occupying a unique point in the design space: Wirth-style syntactic clarity, MUMPS-like integration of data and computation, and formal verification capabilities enabled by its declarative constraint system.

Yet a further goal is to study extensions of EXPRESS with enhanced constraint capabilities and behavioral semantics sufficient for formal verification: proving that schema invariants are preserved under all valid state transitions, that derived attributes are consistent, and that subtype constraints are satisfiable, and from that to eventually generate formally verified business applications, all based on an established language accessible to "normal" people (i.e. without a PhD in formal methods).

In that context, it is interesting to note that a parallel and equally instructive story unfolded in ISO 15926, the standard for lifecycle data integration of process plants (oil, gas, chemical, nuclear). Its Part 2 data model (ISO 15926-2:2003), the generic upper ontology of classes, relationships, and temporal parts is written in EXPRESS. When the community later pursued Semantic Web implementation, they created Part 7 (template methodology based on first-order logic) and Part 8 (OWL/RDF implementation, ISO/TS 15926-8:2011), which translates the EXPRESS-native data model into OWL declarations. The OWL version is explicitly described as a derived representation, not a replacement. The original EXPRESS specification remains the normative source.

The lesson from both STEP and ISO 15926 is consistent: every attempt to replace EXPRESS has either failed outright, produced a partial mapping that loses essential semantics, or ended up using EXPRESS as the underlying normative substrate.

The parser finally works and generates an AST (ready for validation and further processing). It is able to parse my ~1000 EXPRESS files (~37 MB of code) in ~5 seconds on my Lenovo T480. I even found a good dozen syntax errors in these files (some of which from the official standards). The grammar was derived from the one included with ISO 10303-11:2004 using my EbnfStudio. I even added exact LL(k) calculation to EbnfStudio to make sure it doesn't overlook an ambiguity. Next I will implement a cross-referencing tool with semantic navigation.

Not available at this time.

Follow these steps if you want to build the application yourself:

- Make sure a Qt 5.x (libraries and headers) version compatible with your C++ compiler is installed on your system.

- Download the source code from https://github.com/rochus-keller/Express/archive/master.zip and unpack it.

- Goto the unpacked directory and execute

QTDIR/bin/qmake ExpTest.pro

(see the Qt documentation concerning QTDIR). - Run make; after a couple of seconds you will find the executable in the build directory.

Alternatively you can open the *.pro files using QtCreator and build everything there.

If you need support or would like to post issues or feature requests please use the Github issue list at https://github.com/rochus-keller/Express/issues or send an email to the author.

← 一覧に戻る