= openEHR Eiffelに関するよくある質問 = openEHR Eiffel FAQ ---- [[TOC]] == openEHRとEiffelはどういう関係ですか? == What is it with openEHR and Eiffel? 多くの人はopenEHRがEiffel言語を使っていることを知っているが,どうしてEiffelでopenEHRが記述される必要があるのか,EiffelがopenEHRでどのような特別な役割をはたしているのか不思議に思っているでしょう。Eiffelは公開の場で定義された言語であり,Eiffelに対する国際的な非営利コンソーシアム(国際的なユーザーグループ)とECMAが公式な標準化プロセスを担っています。数多くの商用実装があり([http://www.eiffel.com/ ISE], [http://www.object-tools.com/ Object Tools])があり,[http://smarteiffel.loria.fr/ 公式オープンソースコンパイラ]("!SmartEiffel")と数多くのライブラリがあります。 Many people have noticed that openEHR uses the Eiffel language, and wonder whether openEHR needs to be written in Eiffel, or whether Eiffel is in some way special in openEHR. By way of background, Eiffel is an openly defined language, has its own Non-profit International Consortium for Eiffel (an international user group) and ECMA formal standardisation process. It has a number of commercial implementations (ISE, Object Tools), an official open source compiler ("!SmartEiffel") and large numbers of libraries. EiffelはopenEHRでは主にCASEツールとして使われています。どうしてプログラミング言語をCASEツールとして使うのか,どのように使っているのか,少し奇妙に感じるかもしれません。実際には,Eiffelは他のプログラミング言語とは少し違うところがあります。まず,型付けが完全になされており、完全なオブジェクト指向言語です。それはUMLのすべてのセマンティクス(特に「総称」(genericity)クラスや多重継承,ポリモルフィズム,selective export)を実装できるという意味で生産性の高い言語であり、C++を除いてこうしたことが可能な唯一の言語です。しかしながら,C++とは異なり、メモリ構造のような実装の詳細には拘束されません。さらに,他に普及している生産的な言語とは異なり,OCL(OMG Object Constraint Language)と同等の実装がなされています。「同等」というのは,OCLが誕生する15年も前からEiffelが実現していたことですから。openEHRに関係のあるOCLの重要な特徴は「表明(アサーション)」とよばれるもので,事前条件,事後条件とクラス表明を含みます。これらの命令文によりクラスモデルの状態を正確に定義することができます。 Eiffel is used in openEHR as its primary CASE tool. This may sound a little strange - why use a programming language as a CASE tool; how? In truth, Eiffel is a little bit different from other programming languages. Firstly, it is a fully formal, fully object-oriented language, the only production language apart from C++ which implements all the semantics of UML (in particular, genericity (i.e. 'template' classes), multiple inheritance, polymorphism, selective export). However, unlike C++, it has no connection with implementation details, such as memory structures. In addition, unlike any other production language available, it implements the equivalent of OCL, the OMG Object Constraint Language. "Equivalent" because Eiffel did this 15 years ago, long before OCL came into existence. The key features of OCL which are relevant to openEHR are called "assertions", which include function pre-conditions, post-conditions, and class assertions. These statements allow us to define the correctness conditions of a class model. これらの特徴によって Eiffel言語は、openEHRの仕様で用いられている形式クラスモデルを表現し、それらを表明を含めて完全に検証することができるのです。 These features allow it to be used as a language for expressing formal class models, of the kind used in the specifications written by openEHR, and to completely validate them, including assertions. == openEHRはEiffelで実装しないといけないの? == Does openEHR have to be implemented in Eiffel? そんなことはありません。言語の選択は開発者の属する組織次第で決まるものですし,通常は利用可能な人的資源などの条件に一層強く依存しています。openEHRにはJavaやC#.net,Oracle, VB.netで実装されたものがあり,将来的にはPythonや他の言語での実装もされるでしょう。 No, it doesn't. The choice of language is completely up to the developer organisation, and usually relates more strongly to available human resources and so on. There are parts of openEHR being developed in Java, C#.net, Oracle, VB.net, and in the future, it is expected that Python will be used, among others. しかし,Eiffelには実装の選択肢として優れている理由が二つあります。 However, Eiffel does happen to be an excellent choice for implementation, for two reasons: * 医療情報(たとえば,ソフトウェアのバグにより「左腎」を表すコードが「右腎」になった場合のような重大な場面を考えてみてください)を扱う上での正確性に対する要求。Eiffelだけが表明を実装しています[[FootNote(今ではJavaやRubyでもassertionが実装されています)]]。 * the need for correctness when processing health information (e.g. consider the consequences of a software bug causing the coded term for "kidney, left" to be changed to "kidney, right"). Only Eiffel implements assertions * 現在の2「大」言語,つまりJavaとC#に対応して適切に連携できる機能。これは10年前のCORBA/COMの状況と同じように,現在のIT環境では重要であると考えられます。多くの会社や組織で,この2大言語が相互に接続できるだろうと口をそろえていいますが,実際には適切に接続されたことはありません。この背景には、開発者がもう一方の言語に容易に乗り換えたり、これらの言語で書かれたソフトウェアをうまく統合することに対して企業(特に、Sunとマイクロフソフト社)が積極的になれないといった政治的な理由もあります。Eiffelはこの問題に対して一つの解決法を示します。ISEによって既にEiffelのコードをネイティブの.Netバイトコードにコンパイルするツールが構築されています。これによってEiffelのコンポーネントを他の.Net言語で書かれたコンポーネントとシームレスに展開することができます。医療に関するソフトウェア製品にはJavaのためのEiffelのラッパーがあり、EiffelのコードをJava環境に安全に配置することができます。要するにEiffelで重要なコンポーネントを一度書いておけば,Javaや.Netの世界だけではなく,すべてのプラットフォームで利用することができます。 * the ability to bind properly to the two "big" languages around today, namely C# and Java. It is worth considering that we are now in an IT environment somewhat like the CORBA/COM situation of a decade ago. Many companies and other organisations promised that the two would talk together; they never did, properly. Similarly, there are political reasons why companies (particularly Sun and Microsoft) are unlikely to make it easy for developers to jump to the other side, or integrate software written in the two languages properly. Eiffel does offer one solution to this problem. Tools have already been built by ISE which compile Eiffel code to native .Net bytecode, meaning that Eiffel components can be deployed seamlessly with components written in other .Net languages. Eiffel has also be wrapped for Java in production software in health, and can be reliably deployed in Java environments. The upshot of this is that a single code base for an important component could be written in Eiffel and deployed on all platforms, not just in one or other of the .Net or Java worlds. 将来私たちが予見している実装様式は多言語によるコンポーネントで構成されるシステムで,単一の言語によるシステムではありません。例えば,openEHRのカーネルはEiffelで記述されていて,既存のインターフェース技術を使って.NetやJavaの世界でも利用することができ,適切なアプリケーションサーバ環境で利用されるなどそれぞれの環境で利用されるといったものです。例えば,J2EEやそれに類似したような環境です。他のシステムは様々な言語を用いてユーザーインターフェイスを構築したり、多様なデータベースをバックエンドとして利用することでしょう。 The types of implementation which we foresee in the future are multi-language component-based systems, not single language systems. For example, a reference openEHR kernel implemented in Eiffel could be deployed in both .Net and Java worlds via interfacing solutions which already exist; in each environment they would be used in the appropriate application server environment, e.g. J2EE or similar. Other systems are likely to use a diversity of languages for presentation and back-end databases as well. 最終的にはどのような技術を選択して実装してもいいのですが,Eiffelで書かれたopenEHRコンポーネントをまだまだ活用できるでしょう。 The bottom line is: implement in whatever technology you choose, you will still most likely to be able to take advantage of any openEHR components that happen to be in Eiffel. == どうしたらEiffelで書かれたopenEHRの参照モデルを見ることができるの? == How can I look at the openEHR Reference Model in Eiffel? IDEを使ってEiffelのコピーをダウンロードしたり閲覧したりすることができます。しかし,ダウンロードしたり新しいIDEの使い方を勉強したりすることに不満があるのですね。もっと簡単な方法もあります。openEHRのウェブサイトにある[http://www.openehr.org/repositories/spec-dev/latest/publishing/architecture/reference_model/computable/openehr_root/openehr_spec/openehr_rm/index.html HTMLツリー]からハイパーリンクでopenEHRの仕様をすべて見ることができます。 You could download a copy of Eiffel and browse using the IDE. But you'd probably complain about having to do the download, and learn a new IDE! So there is a much easier way. The entire openEHR specifications are available in a completely hyperlinked HTML tree, on the openEHR website. == 自分で書いたJavaやC#のソフトウェアからどうやってEiffelのコンポーネントに接続させることができますか? == How can I interface my Java or C# software to Eiffel components? まず最初に,これについてはあまり心配する必要はありません。ネイティブのJavaやC#によるopenEHRの実装が増えてきており,あなた自身があなたの好きな言語で書いていくことを阻害するものは全くありません。ADLの参照パーサのようにEiffelで書かれた参照コンポーネントはC#のラッパーをすでに持っていますし,Javaのラッパーもすぐにできるでしょう。 First of all, you might not care about this, since there are a growing number of native Java and C# implementations of openEHR - and there is absolutely nothing stopping you writing all your software in your favourite language. Some reference components written in Eiffel already have a C# wrapper, and will soon have a Java wrapper, such as the ADL reference parser. それでも心配というのなら,C#なら簡単です。Eiffelベンダーの一つであるISEは直接VB.netやC#.netなどの.net言語から直接利用できる.netのDLLをEiffelのソフトウェアの一部分として利用できる安定した.netツールを作成しました。これはC#とVB.netのいずれのグラフィカルなフロントエンドでも利用できるADLツールでテストされてきており,C#でプログラムされた関数をEiffelへディスパッチする機能もあります。 For those who do care...C# is easy. ISE, one of the Eiffel vendors has produced a solid set of .net tools which enable any Eiffel piece of software to be made available as a .net DLL, directly usable by VB.net, C#.net, and any other .net language. This has been tested in the ADL tools with both C# and VB.net graphical front-ends, including the ability to dispatch C# -programmed functions in Eiffel. Javaへの接続はもう少し手間がかかります。EiffelからJavaへのインターフェースはスウェーデンのENEA-dataをはじめ様々な会社が医療ソフトウェアとして開発しています。よく知られた方法もたくさんありますが、それらはさらにもう少し手間がかかります。Javaラッパーは、openEHRのADL参照パーサのために現在開発中です。 Interfacing to Java is somewhat more work. Eiffel to Java interfacing has already been done in production health software by various companies, including ENEA-data in Sweden. There are well-known methods for doing it, but it requires a little work. A java wrapping is in development for the openEHR ADL reference parser. == オープンソース版のEiffelはありますか? == Is there an open source version of Eiffel? [http://smarteiffel.loria.fr/ SmartEiffel]があります。私たちの知る限りEiffelの仕様をすべて実装しており,「agents」のような有名な拡張も実装されています。 Yes, it's called !SmartEiffel, and as far as we know, it implements everything in the Eiffel specification, plus well-known extensions such as "agents". そのほかのリソース: * [news://comp.lang.eiffel ニュースグループ] * たくさんある書籍; Amazon.comで探してみてください * たくさんあるライブラリ(たとえば[http://directory.google.com/Top/Computers/Programming/Languages/Eiffel/Libraries/ Google Eiffel directory]を参照してください) Other resources include: * newsgroup * numerous books; try searching Amazon.com * numerous libraries (see e.g. Google Eiffel directory) 日本語参考サイト[[FootNote(翻訳者補記)]]: * [http://kapibara.hp.infoseek.co.jp/ Eiffel入門] * [http://www.geocities.co.jp/SiliconValley/8632/advanced.html Eiffel:一歩進んだ入門] * [http://ja.wikipedia.org/wiki/Eiffel Wikipedia:Eiffel] [[FootNote]]