ISO/IEC 11756:1999 情報技術—プログラミング言語— M | ページ 3

※一部、英文及び仏文を自動翻訳した日本語訳を使用しています。

序章

セクション 1 は、MUMPS 言語を説明する 9 つの節で構成されています。条項 1 では、静的構文のセクション 1 の残りの部分で使用されるメタ言語について説明します。残りの節では、言語の静的構文と全体的なセマンティクスについて説明します。 「静的」構文と「動的」構文の違いは次のとおりです。静的構文は、ルーチン交換のテープまたはリストに表示されるルーチン内の文字シーケンスを記述します。動的構文は、ルーチンの実行中にインタープリターが検出する一連の文字を記述します。 (MUMPS を実際に解釈する必要はありません)動的構文では、制御の転送と間接化によって生成される値が考慮されます。

条項 10 から 21 は、実装者とアプリケーション プログラマーの利益のために、M プログラムの転送可能性 (つまり、さまざまな M 実装間でのソース コードの移植性) を実現する場合に特別な注意を払わなければならない言語の側面を強調しています。移植性を除外しない場合、実装者とプログラマーの両方が遵守しなければならない制限の仕様を提供します。この目的のために、実装者はこれらの制限を満たすか超える必要があり、それらを最小要件として扱います。現在未定義の領域に定義を提供する実装者は、M 言語仕様のその後の改訂時に、このアクションが実装の上位互換性を危険にさらすリスクがあることを考慮に入れる必要があります。移植可能なプログラムを開発しようとするアプリケーション プログラマーは、実装者によって利用可能にされた言語に「一方的な拡張」を採用する危険性を考慮に入れる必要があります。

次の定義は、このドキュメント内での明示的制限および暗黙的制限という用語の使用に適用されます。明示的な制限は、参照される言語構造に直接適用される制限です。言語構造に対する暗黙の制限は、他の言語構造に対する明示的な制限から生じる二次的な影響です。たとえば、明示的なコマンド ラインの長さの制限は、単一のコマンド ライン内で完全に表現する必要がある構造の長さに暗黙の制限を課します。

条項 22 から 24 では、M と ANSI X3.64 の間のバインディングについて説明します。 ANSI X3.64 は、2 次元文字イメージ入力および/または出力デバイスとのデータ交換のための追加制御機能の機能標準です。これは ANSI 規格ですが、ほぼ同様の特性を持つ ISO 規格も存在します (ISO 2022)そのため、世界中の多くのデバイスに実装されています。 M は、これらの実装に簡単に適応できることが期待されます。

ANSI X3.64 として定義されている規格は、デバイス制御のフォーマットを定義しています。可能なすべての制御機能を実行できる物理デバイスは必要ありません。実際には、一部の機能は特定のデバイスの特定の物理的特性に依存しているため、すべての機能を実行できるデバイスはありません。ただし、標準では、デバイスが実行できる機能は指定されていませんが、機能を実行できる場合は、この機能の制御情報をどのように指定するかが指定されています。

このバインディングは、X3.64 に含まれる機能定義に対するものです。 M 実装とデバイス間の実際の対話は、実装者に任されています。

Introduction

Section 1 consists of nine clauses that describe the MUMPS language. Clause 1 describes the metalanguage used in the remainder of Section 1 for the static syntax. The remaining clauses describe the static syntax and overall semantics of the language. The distinction between"static" and"dynamic" syntax is as follows. The static syntax describes the sequence of characters in a routine as it appears on a tape in routine interchange or on a listing. The dynamic syntax describes the sequence of characters that would be encountered by an interpreter during execution of the routine. (There is no requirement that MUMPS actually be interpreted). The dynamic syntax takes into account transfers of control and values produced by indirection.

Clauses 10 through 21 highlight, for the benefit of implementors and application programmers, aspects of the language that must be accorded special attention if M program transferability (i.e., portability of source code between various M implementations) is to be achieved. It provides a specification of limits that must be observed by both implementors and programmers if portability is not to be ruled out. To this end, implementors must meet or exceed these limits, treating them as a minimum requirement. Any implementor who provides definitions in currently undefined areas must take into account that this action risks jeopardizing the upward compatibility of the implementation, upon subsequent revision of the M Language Specification. Application programmers striving to develop portable programs must take into account the danger of employing"unilateral extensions" to the language made available by the implementor.

The following definitions apply to the use of the terms explicit limit and implicit limit within this document. An explicit limit is one which applies directly to a referenced language construct. Implicit limits on language constructs are second-order effects resulting from explicit limits on other language constructs. For example, the explicit command line length restriction places an implicit limit on the length of any construct which must be expressed entirely within a single command line.

Clauses 22 through 24 describe the binding between M and ANSI X3.64. ANSI X3.64 is a functional standard for additional control functions for data interchange with twodimensional character-imaging input and/or output devices. It is an ANSI standard, but also an ISO standard with roughly similar characteristics exists (ISO 2022). As such, it has been implemented in many devices worldwide. It is expected that M can be easily adapted to these implementations.

The standard defined as ANSI X3.64 defines a format for device-control. No physical device is required to be able to perform all possible control-functions. In reality, as some functions rely on certain physical properties of specific devices, no device will be able to perform all functions. The standard, however, does not specify which functions a device should be able to do, but if it is able to perform a function, how the control-information for this function is to be specified.

This binding is to the functional definitions included in X3.64. The actual dialogue between the M implementation and the device is left to the implementor.