WEKO3
アイテム
CCC-データの内部表現に依存しないオブジェクト指向
https://ipsj.ixsq.nii.ac.jp/records/16896
https://ipsj.ixsq.nii.ac.jp/records/16896ca098861-e778-4aea-a952-251f4db1555b
| 名前 / ファイル | ライセンス | アクション |
|---|---|---|
|
|
Copyright (c) 2001 by the Information Processing Society of Japan
|
|
| オープンアクセス | ||
| Item type | Trans(1) | |||||||
|---|---|---|---|---|---|---|---|---|
| 公開日 | 2001-02-15 | |||||||
| タイトル | ||||||||
| タイトル | CCC-データの内部表現に依存しないオブジェクト指向 | |||||||
| タイトル | ||||||||
| 言語 | en | |||||||
| タイトル | CCC - An Object Oriented C Extention with Conditonally Defined Classes | |||||||
| 言語 | ||||||||
| 言語 | jpn | |||||||
| キーワード | ||||||||
| 主題Scheme | Other | |||||||
| 主題 | 通常論文 | |||||||
| 資源タイプ | ||||||||
| 資源タイプ識別子 | http://purl.org/coar/resource_type/c_6501 | |||||||
| 資源タイプ | journal article | |||||||
| 著者所属 | ||||||||
| さきがけ21,科学技術振興事業団 | ||||||||
| 著者所属 | ||||||||
| NTT未来ねっと研究所 | ||||||||
| 著者所属(英) | ||||||||
| en | ||||||||
| Presto JST | ||||||||
| 著者所属(英) | ||||||||
| en | ||||||||
| NTT Network Innovation Laboratories | ||||||||
| 著者名 |
原田, 康徳
山崎, 憲一
× 原田, 康徳 山崎, 憲一
|
|||||||
| 著者名(英) |
Yasunori, Harada
Kenichi, Yamazaki
× Yasunori, Harada Kenichi, Yamazaki
|
|||||||
| 論文抄録 | ||||||||
| 内容記述タイプ | Other | |||||||
| 内容記述 | C,C++ でリストを表現する際に,NULLでリストの終端を表現することが多い.しかしNULLはC++ のオブジェクトの構造をしていないので,クラスとして定義することはできない.そのためC++ では,if (pointer) pointerエverb|->|message();のように,if文でチェックしてから呼び出さなければならない.C++ が提供するオブジェクトの構造に従わないデータをクラスとして定義することはできない.CCCはクラス階層を条件式を記述することで定義する.クラスに定義されたメソッドはそれが呼び出される前に,クラスに特徴付けている条件式を試され,それが真のときのみ呼び出される.クラス階層はそのまま条件式の階層となり,親クラスから順に条件式を調べられ,自分が真で真の子クラスがないクラスのメソッドが実行される.以上により,NULLのクラス化などが実現できる.CCCはCまたはC++ へのプリプロセッサとして実装され,条件式によるクラス定義のほかに,クラス内に閉じたマクロ,後からプログラムの断片をソース上の特定の位置に挿入する機構,クラスとは独立なモジュール構造などの拡張がなされている.これらの設計ポリシーは,単純な仕組みで,生成されるコードをプログラマが容易に想像できるようにした点である.現在CCCではある記号処理言語の処理系を記述している.CCCの特徴をそれらの経験もふまえて述べる. | |||||||
| 論文抄録(英) | ||||||||
| 内容記述タイプ | Other | |||||||
| 内容記述 | We sometimes use a NULL pointer to indicate a list structure termination in C or C++ programming. Because NULL is not an object of a C++, we can not define a NULL class. So in C++ programming, an if statement, if (pointer) pointer->|message(ノ); is used for a NULL related method call. This problem is because of C++ and other object oriented languages use their own object structure for object implementation. When a programmer wants to treat a special data structure (ex. NULL, data packet, system call ノ) as an object, such kind of problem occurrs. We propose a new language, CCC, that extends C and C++ to overcome the above problem. In CCC, a class is define by a condition, and a class hierarchy is a condition hierarchy. When a message is sent the system checks conditions that define classes, finds a class whose condition is satisfied and has no subclass whose condition is satisfied, and executes the method that is associated with the class. Using such a mechanism, we can treat a NULL pointer as a NULL class. CCC compiler is implemented as a C and C++ preprocesser. Its other features are class-local macro definition/extraction, a source modifying mechanism for inserting blocks, and class independent modules. This paper also describes an experience using CCC to develop a symbol manipulating language whose pointers include tag information. | |||||||
| 書誌レコードID | ||||||||
| 収録物識別子タイプ | NCID | |||||||
| 収録物識別子 | AA11464814 | |||||||
| 書誌情報 |
情報処理学会論文誌プログラミング(PRO) 巻 42, 号 SIG02(PRO9), p. 48-60, 発行日 2001-02-15 |
|||||||
| ISSN | ||||||||
| 収録物識別子タイプ | ISSN | |||||||
| 収録物識別子 | 1882-7802 | |||||||
| 出版者 | ||||||||
| 言語 | ja | |||||||
| 出版者 | 情報処理学会 | |||||||