ISO/IEC TR 10176:2003 情報技術—プログラミング言語標準の準備のためのガイドライン | ページ 6

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

3 用語と定義

このドキュメントでは、次の用語と定義が適用されます。

この条項には、このテクニカル レポートで特定の専門的な意味で使用される用語が含まれています。すべての言語標準が、ここで定義された意味で用語を使用する必要があると主張しているわけではありません。特定のケースでこれらのガイドラインを適用する際には、必要に応じて、必要な解釈と変換を実行する必要があります。また、すべての言語標準が ISO/IEC 2382-15 の用語を使用しているわけではありません。ここで定義された用語は、場合によっては ISO/IEC 2382-15 の用語とは異なりますが、そのような違いから生じる可能性のある混乱を最小限に抑えるために導入されました。さらに明確にするために、ISO/IEC 2382-15 からの特定の相違点について以下にいくつかのコメントを示します。

3.1 プログラミング言語プロセッサー(プロセッサーと曖昧でない場合は省略)

プログラミング言語のユーザーがその言語で書かれたプログラムを翻訳および実行できるようにするコンピューティング システム全体を指し、一般にハードウェアと関連する関連ソフトウェアの両方で構成されます。

注記 1したがって、このテクニカル レポートの意味での「プロセッサ」は、単に (たとえば) 「コンパイラ」または従来の用語での「実装」以上のもので構成されます。一般に、それは機能のパッケージで構成されており、従来の意味での「コンパイラ」はそのうちの1つにすぎない場合があります。また、プロセッサがモノリシックなエンティティで構成されていることを意味するものではありません。たとえば、プロセッサ ソフトウェアは、構文チェッカー、コード ジェネレーター、リンクローダー、およびランタイム サポート パッケージで構成され、それぞれが論理的に異なるエンティティとして存在します。この場合の「プロセッサ」は、これらすべてと関連するハードウェアの集合体になります。規格への適合は、集合体の個々の部分ではなく、集合体全体に適用されます。

注記 2 ISO/TR 9547 では、「プロセッサ」という用語は、より限定された意味で使用されています。 ISO/TR 9547 では、「プロセッサ」と「構成」を区別する必要があります。このテクニカル レポートではその区別は必要ありません。両方のテクニカル レポートを使用する場合は、少なくともこの用語の違いを理解する必要があります.用語の違いの別の例については、3.3.4 を参照してください。

3.2 構文とセマンティクス

言語の文法規則を示します。構文という用語は、プログラム テキストが整形式かどうかを判断する規則を指します。構文規則は完全に「文脈自由」である必要はありませんが、プロセッサがプログラム テキストを検査するだけで、実行可能な量の労力と実行可能な時間内に、そのテキストが規則に準拠しているかどうかを判断できるようにする必要があります。 .エラー (3.3.1 を参照) は、構文規則の違反です。

セマンティクス という用語は、適切な形式のプログラムを実行する際のプロセッサの動作を決定する規則を指します。 例外 (3.3.2 を参照) は、プログラムの非構文要件の違反です。

ISO/IEC 2382-15 では、 静的 という用語 (02/15/09) は「プログラムの実行前に確立できるプロパティに関連する」と定義され、 動的 (02/15/10) は「プロパティに関連する」と定義されています。これは、プログラムの実行中にのみ確立できます。」したがって、これらは、このテクニカル レポートで定義されている用語「構文」と「意味論」にそれぞれ近いようです。 ISO/IEC 2382-15 は「構文」または「意味論」を定義していませんが、これらはプログラミング言語コミュニティで非常に一般的に使用されている用語です。

さらに、ISO/IEC 2382-15 での「静的」および「動的」(およびその他の用語) の使用は、すべての言語ではなく、単一の言語内で使用するように設計されているように見えますが、その用語はほとんどの場合、単一の言語内で一貫して適用できます。言語の場合、このテクニカル レポートで必要とされる言語の一般性全体でこれを行うのははるかに難しくなります。この問題は「構文/セマンティクス」で完全になくなるわけではありませんが、それほど深刻ではありません。

3.3 エラー、例外、条件

3.3.1

エラー

実行せずにプログラム テキストを検査するだけで、言語構文の知識から静的に判断できる誤ったプログラム構成。 致命的なエラー とは、回復が不可能なエラーです。つまり、プログラムの実行に進む (または続行する) ことができません。 致命的でないエラー は、そのような回復が可能なエラーです。

注記1:致命的エラーは、プロセッサがプログラムの実行を伴わない方法でプログラムの処理を続行することを必ずしも妨げない場合があります(たとえば、プログラムテキストのさらなる静的分析)

3.3.2

例外

一般に、プログラムの実行を通じて動的にのみ決定できる不正なプログラム機能のインスタンス。 致命的な例外 とは、回復が不可能な例外です。つまり、プログラムの実行を続行する (または続行する) ことができません。致命的でない例外は、回復可能な例外です。

注記 1:疑問がある場合、このセクション内の「可能」は、「規格内の定義または要件に違反することなく可能」と解釈する必要があります。たとえば、言語プロセッサのハードウェア要素は、ゼロによる除算後にプログラムの実行を継続する技術的能力を備えている場合がありますが、ゼロによる除算を致命的な例外として定義する言語標準に関しては、そのような継続的な実行の結果は次のようにはなりません。意味があります。

注記2: 3.3.4も参照。

3.3.3

条件

検出時に通常の処理の中断を引き起こす、プログラムの実行中の発生。言語に応じて、条件は例外である場合もあれば、言語定義またはユーザー定義のオカレンスである場合もあります。

注記 1例えば、入力時にファイルの終わりに到達することは、ある言語では常に例外である可能性があり、別の言語では常に条件である可能性があります。プログラムで指定されているが、その発生が予期されていない場合は例外です。

3.3.4

他の用語との関係

ISO/TR 9547 では、「エラー」という用語は、このテクニカル レポートで「例外」および「エラー」と呼ばれるものを含む、より一般的な意味で使用されています。 ISO/TR 9547 の目的上、ここでの差別化は必要ありません。両方のテクニカル レポートを使用する場合は、少なくともこの用語の違いを理解する必要があります.用語の違いの別の例については、3.1 の注 2 を参照してください.ISO/TR 9547 では区別が必要ですが、このテクニカル レポートでは必要ありません. .
ISO/IEC 2382-15 は「エラー」を定義していませんが、「(プログラミング言語での) 例外」を定義しています (06/15/12)定義は、「実行中に発生する可能性があり、異常と見なされ、通常の実行シーケンスからの逸脱を引き起こす可能性があり、それを定義、発生、認識、無視、および処理する機能がプログラミング言語に存在する特別な状況」と書かれています。 . PL/I の ON 条件と Ada の例外が例として挙げられます。
このテクニカル レポートでこの用語を使用しない理由は、単一の言語ではなく、既存の潜在的な標準化言語の一般性を扱うためです。 「純粋な」例外、より一般的な条件、および言語に組み込まれている例外処理のプロセッサ オプション (すべてこのテクニカル レポートで定義されている意味で)また、ON 条件が有効か無効か (グローバルまたはローカル) を十分に区別したり、条件ハンドラーがシステムのデフォルトであるか、プログラマーによって提供されているかを十分に区別するのにも役立ちません。

3.4 プロセッサへの依存

このテクニカル レポートでは、次の定義を前提としています。

このテクニカル レポートで、標準で 定義 されていない機能について言及している場合 (標準内では言及されていますが)、これは、その規定に関する要件が指定されておらず、その機能を使用しようとした場合の影響を予測できないことを意味します。

このテクニカル レポートで機能が プロセッサに依存する ことに言及している場合、これは、標準ではプロセッサがその機能を提供することを要求しているが、提供方法に関してそれ以上の要件がないことを意味します。

このテクニカル レポートが プロセッサ定義 の機能に言及している場合、これは、その定義が標準によってプロセッサに依存したままになっていることを意味しますが、定義は明示的に指定され、何らかの適切な形式でユーザーが利用できるようにする必要があります (プロセッサーに付属の文書、または環境照会機能の使用による)

注記 1 「機能」という用語は、ここでは、言語機能 (変更によってプログラムのテキストが変更される構文要素) とプロセッサ機能 (たとえば、プロセッサ オプション、または付随するドキュメント。プログラムのテキスト)一般的に未定義、プロセッサ依存、またはプロセッサ定義のままにされる機能の例としては、サポートされている文字セットの照合シーケンス (言語機能) や、例外検出時のプロセッサ アクション (プロセッサ機能) があります。

注記 2特定の場合において、これらの用語の使用の正確な効果は、関連する機能の性質および用語が使用される文脈によって影響を受ける可能性があります。

注記 3上記の用語はいずれも、機能への参照が規格から完全に省略されている場合を具体的にカバーしていません。一般に、これは「暗黙的な未定義」と見なされる可能性がありますが、プロセッサを使用できるようにするために、言及されていない機能を必ず提供する必要がある可能性があります (したがって、プロセッサに依存します)機能を使用できるようにするには、プロセッサで定義する必要があります。

3.5 二次的、追加的、および補足的基準

3.5.1

二次基準

このテクニカル レポートでは、二次規格とは、別の (「一次」) 規格 (または場合によっては複数の一次規格) への厳密な適合を要求するものですが、適合製品にさらに要件を課すものです (たとえば、このテクニカル レポートの文脈では、言語について)プロセッサーまたはプログラム)

注記適合プログラムの二次標準として考えられるものは、コメントとインデントの使用、文書の提供、ユーザー定義識別子の命名規則の使用などに関する追加要件を指定する場合があります。
プロセッサを適合させるための可能な二次標準は、エラーと例外の処理、演算の範囲と精度、処理できるプログラムの複雑さなどに関する追加要件を指定する可能性があります。

3.5.2

増分基準

このテクニカル レポートでは、内容を変更せずに既存の標準に増分標準を追加します。その目的は、その範囲外の既存の標準に準拠する製品にさらに要件を追加する (二次標準と同様に、3.5.1 を参照) のではなく、その範囲内の既存の標準の適用範囲 (言語定義など) を補足することです。場合によっては、「増分」(言語機能の観点から) と「二次的」(製品に対するその他の要件の観点から) の両方である既存の標準に追加する標準を作成することが望ましい場合があることが認識されています。

3.5.3

補足基準

このテクニカル レポートでは、補足標準は、構文構造の範囲を拡張することなく、既存の標準に機能を追加します。たとえば、言語を特定の関数セットにバインドすることによって。補足規格は、それらが補足するベース言語に関して表現されることが期待されていますが、主要規格の要素を置き換えるものではありません。

3.6 文字と国際化に関する用語

3.6.1

オクテット

1 つの単位と見なされる 8 ビットの順序付けられたシーケンス。

3.6.2

バイト

文字、文字の一部、またはその他のデータを格納するために使用される、個別にアドレス指定可能なデータ ストレージの単位。

3.6.3

キャラクター

データの編成、制御、または表現に使用される一連の要素のメンバー。

注記 1上記の定義は、ISO/IEC JTC 1/SC2 によって開発された規格によるものです。これにより、この TR で使用される「文字」という用語が、コード化された文字セット標準と一致することが保証されます。 ISO/IEC 10646 の複合シーケンスは文字とは見なされません。複合シーケンスの各要素 (ISO/IEC 10646 と同様) は、この TR では「文字」と見なされます。

3.6.4

結合文字

ISO/IEC 10646 のコード化文字セットの識別されたサブセットのメンバーであり、先行する非結合グラフィック文字、または非結合文字が先行する一連の結合文字との結合を意図しています。

3.6.5

複合シーケンス

非結合文字の後に 1 つ以上の結合文字が続くグラフィック文字のシーケンス。

注記 1複合配列の図記号は,一般に,配列中の各文字の図記号の組み合わせで構成される。

注記2複合シーケンスは文字ではないため、ISO/IEC 10646のレパートリーのメンバーではありません。

3.6.7

コード化された文字

文字とそのコード化された表現。

3.6.8

基本キャラセット

ISO/IEC 646 の不変セットなど、プログラミング言語のすべての実行環境で共通の文字セット。

3.6.9

拡張文字セット

ISO/IEC 10646-1 などの実行環境で使用される文字セット。ほとんどの場合、拡張文字セットのレパートリーは基本文字セットよりも大きくなります。

3.6.10

文字データ型

文字データ型は、値空間が文字セットであるデータ型のファミリです。

注記 1文字データ型に格納される文字のレパートリー リストが明示的に指定されていない場合、文字データ型の値空間は、拡張文字セットのすべてのメンバーを表すのに十分な広さでなければなりません。

3.6.11

オクテットのデータ型

オクテット データ型は、文字セットとプライベート エンコーディングに使用される 8 ビット コードのデータ型です。

注記 1:オクテット データ型の値空間は、基本文字セットのすべてのメンバーを表すのに十分な広さがありますが、拡張文字セットのすべてのメンバーには十分な広さではない場合があります。

3.6.12

オクテット文字列データ型

オクテット文字列データ型は、8 ビット コードを使用した可変長エンコーディングのデータ型です。

注記 1オクテット文字列データ型を使用して、拡張文字セットのメンバーを表すことができます。

3.6.13

文字のマルチバイト表現

一連のバイト (1 オクテット バイト、2 オクテット バイト、または 4 オクテット バイト) を使用して表されるコード化文字。

注記 1 ISO/IEC 10646-1 の DAM によって指定された UTF-8 (UCS 変換形式) によってエンコードされ、オクテット文字列データ型で格納される文字は、文字列のマルチバイト表現の例です。キャラクター。 UTF-8 でエンコードされたコード化文字のサイズは最大 6 オクテットであるため、オクテット文字列データ型で最大 6 つの 1 オクテット バイトを占める場合があります。

注記 2オクテット文字列データ型で文字のマルチバイト表現を正しく処理するには、文字境界をオクテット境界と区別する必要があります。そうしないと、文字のマルチバイト表現がオクテットベース文字列操作の結果として二分され、文字ではなくなる可能性があります。次のリファレンスでは、文字のマルチバイト表現はマルチバイト文字と省略されます。

3.6.14

文字のマルチオクテット表現

サイズが 2 オクテット以上で、値が複数のオクテットである文字データ型に格納されたコード化文字。

注記 1文字データ型に格納された UCS-2 によってエンコードされた文字は、文字の複数オクテット表現の例です。 UCS-2 でエンコードされたコード化文字のサイズは常に 2 オクテットであるため、単一の 2 オクテット バイトで表されるコード化文字と見なすことができます。

注記2以下の参考文献では、文字のマルチオクテット表現はマルチオクテット文字と省略されます。

注記3 UTF-16のバイトサイズは2オクテットであるが、文字は2オクテットの1つまたは2つを占める可能性があるため、UTF-16で表されるコード化文字は、マルチバイト文字とマルチオクテット文字の両方に分類される。オクテット文字列データ型のバイト。

3.6.15

照合

定義された優先順位規則に従った文字列の論理的な順序付け。

3.6.16

文化大会

文化間で機能的に同等であるが、表現、操作動作、または重要度が異なる場合がある情報システムの規則。

注記 1:時間帯、夏時間、日付と時刻の形式、数値形式、通貨形式、照合順序、および文字分類は、文化的慣習の例です。

3.6.17

文化大会セット

各プログラミング言語標準によって参照される一連のカルチャ規則。

3.6.18

実行環境

プログラムが実行される環境。

注記 1プログラムの実行環境は、プログラムのコンパイル環境と必ずしも同じではありません。

注記 2:実行環境でサポートされるコード化文字セットと、環境からプログラムへの入力は、それぞれ異なる場合があります。たとえば、ISO/IEC 8859-1 はある環境でサポートされ、ISO/IEC 10646-1 は別の環境でサポートされる場合があります。

3.7 この TR で使用される助動詞

3.7.1

しなければならない

プログラミング言語標準またはプロセッサに関する要件の表示。

3.7.2

したほうがいい

プログラミング言語標準またはプロセッサへの推奨事項の表示。

3.7.3

5月

プログラミング言語標準またはプロセッサのオプション機能の表示。このテクニカル レポートが、特定のオプション機能をサポートするプログラミング言語標準に推奨事項を提供する場合、その条件を説明する文で助動詞「may」が使用されます。

3 Terms and definitions

For the purposes of this document, the following terms and definitions apply.

This clause contains terminology which is used in particular specialized senses in this Technical Report. It is not claimed that all language standards necessarily use the terminology in the senses defined here; where appropriate, the necessary interpretations and conversions would need to be carried out when applying these guidelines in a particular case. Also, not all language standards use the terminology of ISO/IEC 2382-15; the terminology defined here, itself divergent in some cases from that in ISO/IEC 2382-15, has been introduced to minimize confusion which might result from such difference. Some remarks are made below about particular divergences from ISO/IEC 2382-15, for further clarification.

3.1 programming language processor (abbreviated where there is no ambiguity to processor)

Denotes the entire computing system which enables the programming language user to translate and execute programs written in the language, in general consisting both of hardware and of the relevant associated software.

NOTE 1 A “processor” in the sense of this Technical Report therefore consists of more than simply (say) a “compiler” or an “implementation” in conventional terminology; in general it consists of a package of facilities, of which a “compiler” in the conventional sense may be only one. There is also no implication that the processor consists of a monolithic entity, however constituted. For example, processor software may consist of a syntax checker, a code generator, a link-loader, and a run-time support package, each of which exists as a logically distinct entity. The “processor” in this case would be the assemblage of all of these and the associated hardware. Conformity to the standard would apply to the assemblage as a whole, not to individual parts of it.

NOTE 2 In ISO/TR 9547 the term “processor” is used in a more restricted sense. For the purposes of ISO/TR 9547, a differentiation is necessary between “processor” and “configuration”; that distinction is not necessary in this Technical Report. Those using both Technical Reports will need to bear this difference in terminology in mind. See 3.3.4 for another instance of a difference in terminology, where a distinction which is not necessary in ISO/TR 9547 has to be made in this Technical Report.

3.2 syntax and semantics

Denote the grammatical rules of the language. The term syntax refers to the rules that determine whether a program text is well-formed. The syntactic rules need not be exclusively “context-free”, but must allow a processor to decide, solely by inspection of a program text, with a practicable amount of effort and within a practicable amount of time, whether that text conforms to the rules. An error (see 3.3.1) is a violation of the syntactic rules.

The term semantics refers to the rules which determine the behaviour of processors when executing well-formed programs. An exception (see 3.3.2) is a violation of a non-syntactic requirement on programs.

NOTE In ISO/IEC 2382-15 the term static is defined (15.02.09) as “pertaining to properties that can be established before the execution of a program” and dynamic (15.02.10) as “pertaining to properties that can only be established during the execution of a program”. These therefore appear to be close to the terms “syntax” and “semantics” respectively as defined in this Technical Report. ISO/IEC 2382-15 does not define “syntax” or “semantics”, though these are terms very commonly used in the programming language community.

Furthermore, the uses of “static” and “dynamic” (and other terms) in ISO/IEC 2382-15 seem designed for use within a single language rather than across all languages, but while that terminology can mostly be applied consistently within a single language, it becomes much harder to do so across the generality of languages, which is the need in this Technical Report. This problem is not totally absent with “syntax/semantics” but is much less acute.

3.3 errors, exceptions, conditions

3.3.1

errors

The incorrect program constructs which are statically determinable solely from inspection of the program text, without execution, and from knowledge of the language syntax. A fatal error is one from which recovery is not possible, i.e. it is not possible to proceed to (or continue with) program execution. A non-fatal error is one from which such recovery is possible.

Note 1 to entry: A fatal error may not necessarily preclude the processor from continuing to process the program, in ways which do not involve program execution (for example, further static analysis of the program text).

3.3.2

exceptions

The instances of incorrect program functioning which in general are determinable only dynamically, through execution of the program. A fatal exception is one from which recovery is not possible, i.e. it is not possible to continue with (or to proceed to) program execution. A non-fatal exception is one from which recovery is possible.

Note 1 to entry: In case of doubt, “possible” within this section should be interpreted as “possible without violating definitions within or requirements of the standard”. For example, the hardware element of a language processor may have the technical capability of continuing program execution after division by zero, but in terms of a language standard which defines division by zero as a fatal exception, the consequences of such continued execution would not be meaningful.

Note 2 to entry: See also 3.3.4.

3.3.3

conditions

Occurrences during execution of the program which cause an interruption of normal processing when detected. A condition may be an exception, or may be some language-defined or user-defined occurrence, depending on the language.

Note 1 to entry: For example, reaching end-of-file on input may always be an exception in one language, may always be a condition in another, while in a third it may be a condition if action to be taken on detection is specified in the program, but an exception if its occurrence is not anticipated.

3.3.4

relationship to other terminology

In ISO/TR 9547 the term “error” is used in a more general sense to encompass what this Technical Report terms “exceptions” as well as “errors”. For the purposes of ISO/TR 9547, the differentiation made here is not necessary. Those using both Technical Reports will need to bear this difference in terminology in mind. See Note 2 of 3.1 for another instance of a difference in terminology, where a distinction has to be made in ISO/TR 9547 which is not necessary in this Technical Report.
ISO/IEC 2382-15 does not define “error” but does define “exception (in a programming language)” (15.06.12). The definition reads “A special situation which may arise during execution, which is considered abnormal, which may cause a deviation from the normal execution sequence, and for which facilities exist in the programming language to define, raise, recognize, ignore and handle it”. ON-conditions in PL/I and exceptions in Ada are cited as examples.
The reason for not using this terminology in this Technical Report, which deals with the generality of existing and potential standardized languages rather than just a single one, is that it makes it difficult to distinguish (as this Technical Report needs to do) between “pure” exceptions, more general conditions, and processor options for exception handling which are built into the language (all in the senses defined in this Technical Report). It also does not aid making sufficient distinction between ON-conditions being enabled or disabled (globally or locally), nor whether the condition handler is the system default or provided by the programmer.

3.4 processor dependence

For the purposes of this Technical Report, the following definitions are assumed.

If this Technical Report refers to a feature being left undefined in a standard (though referred to within the standard), this means that no requirement is specified concerning its provision and the effect of attempting to use the feature cannot be predicted.

If this Technical Report refers to a feature being processor-dependent , this means that the standard requires the processor to supply the feature but that there are no further requirements upon how it is provided.

If this Technical Report refers to a feature being processor-defined , this means that its definition is left processor-dependent by the standard, but that the definition shall be explicitly specified and made available to the user in some appropriate form (such as part of the documentation accompanying the processor, or through use of an environmental enquiry function).

NOTE 1 The term “feature” is used here to encompass both language features (syntactic elements a change to which would change the text of a program) and processor features (e.g. processor options, or accompanying documentation, a change to which would not change the text of a program). Examples of features which are commonly left undefined, processor-dependent or processor-defined are the collating sequence of the supported character set (a language feature) and processor action on detection of an exception (a processor feature).

NOTE 2 In any particular instance the precise effect of the use of any of these terms may be affected by the nature of the feature concerned and the context in which the term is used.

NOTE 3 None of the above terms specifically covers the case where reference to a feature is omitted altogether from the standard. While in general this might be regarded as “implicit undefined”, it is possible that an unmentioned feature might necessarily have to be supplied for the processor to be usable (and would hence be processor-dependent) and that some aspects of the feature might in turn have to be processor-defined for the feature to be usable.

3.5 secondary, incremental and supplementary standards

3.5.1

secondary standards

In this Technical Report, a secondary standard is one which requires strict conformity with another (“primary”) standard - or possibly more than one primary standard - but places further requirements on conforming products (e.g. in the context of this Technical Report, on language processors or programs).

Note 1 to entry: A possible secondary standard for conforming programs might specify additional requirements with respect to use of comments and indentation, provision of documentation, use of conventions for naming user-defined identifiers, etc.
A possible secondary standard for conforming processors might specify additional requirements with respect to error and exception handling, range and accuracy of arithmetic, complexity of programs which can be processed, etc.

3.5.2

incremental standards

In this Technical Report, an incremental standard adds to an existing standard without modifying its content. Its purpose is to supplement the coverage of the existing standard within its scope (e.g. language definition) rather than (as with a secondary standard, see 3.5.1) to add further requirements upon products conforming with an existing standard which are outside that scope. It is recognized that in some cases it might be desirable to produce a standard additional to an existing one which was both “incremental” (in terms of language functionality) and “secondary” (in terms of other requirements upon products).

3.5.3

supplementary standards

In this Technical Report, a supplementary standard adds functionality to an existing standard without extending its range of syntactic constructs; such as by the binding of a language to a specific set of functions. Supplementary standards are expected to be expressed in terms of the base language which they supplement, but do not replace any elements of the primary standard.

3.6 terms related to character and internationalization

3.6.1

octet

An ordered sequence of eight bits considered as a unit.

3.6.2

byte

An individually addressable unit of data storage used to store a character, portion of a character or other data.

3.6.3

character

A member of a set of elements used for the organization, control, or representation of data.

Note 1 to entry: The definition above is that from the standard developed by ISO/IEC JTC 1/SC2. This ensures that the term “character” used in this TR is consistent with the coded character set standard. The composite sequence of ISO/IEC 10646 is not considered as a character. Each element of a composite sequence (as it is in ISO/IEC 10646) is considered as a “character” in this TR.

3.6.4

combining character

A member of an identified subset of the coded character set of ISO/IEC 10646 intended for combination with the preceding non-combining graphic character, or with a sequence of combining characters preceded by a non-combining character.

3.6.5

composite sequence

A sequence of graphic characters consisting of a non-combining character followed by one or more combining characters.

Note 1 to entry: A graphic symbol for a composite sequence generally consists of the combination of the graphic symbols of each character in the sequence.

Note 2 to entry: A composite sequence is not a character and therefore is not a member of the repertoire of ISO/IEC 10646.

3.6.7

coded character

A character together with its coded representation.

3.6.8

basic character set

A character set that is common across every execution environment of a programming language, e.g. The invariant set of ISO/IEC 646.

3.6.9

extended character set

A character set that is used in an execution environment, e.g. ISO/IEC 10646-1. In most cases, the repertoire of the extended character set is larger than the basic character set.

3.6.10

character datatype

Character datatype is a family of datatypes whose value spaces are character sets.

Note 1 to entry: The value space of the character datatype should be wide enough to represent every member of extended character set, if the repertoire list of characters to be stored in the character datatype is not specified explicitly.

3.6.11

octet datatype

Octet datatype is the datatype of 8-bit codes, as used for character sets and private encodings.

Note 1 to entry: The value space of the octet datatype is wide enough to represent every member of basic character set, but may not be wide enough to every member of extended character sets.

3.6.12

octet string datatype

Octet string datatype is the datatype of variable-length encoding using 8-bit codes.

Note 1 to entry: The octet string datatype may be used to represent a member of extended character sets.

3.6.13

multi-byte representation of character

A coded character represented by using a sequence of bytes (one-octet byte, two-octet byte, or four-octet byte).

Note 1 to entry: A character that is encoded by UTF-8 (UCS Transformation format) specified by a DAM of ISO/IEC 10646-1 and stored in an octet-string datatype is an example of the multi-byte representation of a character. The size of a coded character encoded by UTF-8 is up to six octets, therefore it may occupy up to 6 one-octet bytes in the octet string datatype.

Note 2 to entry: To handle the multi-byte representation of character correctly in an octet string datatype, the character boundary needs to be distinguished from the octet(s) boundary. Otherwise a multi-byte representation of character may be bisected as the result of octet base string manipulation, thus becoming no longer a character. In following reference the multi-byte representation of a character will be abbreviated as multi-byte character.

3.6.14

multi-octet representation of character

A coded character stored in a character datatype that size is equal to or larger than two octets with whose values are multiple octets.

Note 1 to entry: A character that is encoded by UCS-2 stored in a character datatype is an example of the multi-octet representation of character. The size of a coded character encoded by UCS-2 is always two octets, therefore it can be considered as a coded character that is represented by single two-octet byte.

Note 2 to entry: In following reference the multi-octet representation of a character will be abbreviated as the multi-octet character.

Note 3 to entry: A coded character represented by UTF-16 is categorized in both multi-byte and multi-octet character, because the byte size of UTF-16 is two-octet, but a character may occupy 1 or 2 two-octet bytes in a octet string datatype.

3.6.15

collation

The logical ordering of strings according to defined precedence rules.

3.6.16

cultural convention

A convention of an information system which is functionally equivalent between cultures, but may differ in presentation, operation behaviour or degree of importance.

Note 1 to entry: Time zone, Summer time, Date and time format, Numeric format, Monetary format, Collation sequence, and Character classification, are examples of cultural convention.

3.6.17

cultural convention set

A set of cultural conventions to be referred to by each programming language standard.

3.6.18

execution environment

An environment where a program is executed.

Note 1 to entry: An execution environment of program is not always the same as the compilation environment of the program.

Note 2 to entry: Coded character sets supported by execution environment and input from the environment to program may vary from one to another. For example, ISO/IEC 8859-1 may be supported by an environment, and ISO/IEC 10646-1 may be supported by another environment.

3.7 auxiliary verbs used in this TR

3.7.1

shall

An indication of a requirement on programming language standard or processors.

3.7.2

should

An indication of a recommendation to programming language standard or processors.

3.7.3

may

An indication of an optional feature of programming language standard or processors. When this Technical Report provides a recommendation to the programming language standard that supports a specific optional feature, the auxiliary verb “may” is used in the sentence explaining the condition.