JP2006221556A - Program execution device, program execution method and program - Google Patents

Program execution device, program execution method and program Download PDF

Info

Publication number
JP2006221556A
JP2006221556A JP2005036564A JP2005036564A JP2006221556A JP 2006221556 A JP2006221556 A JP 2006221556A JP 2005036564 A JP2005036564 A JP 2005036564A JP 2005036564 A JP2005036564 A JP 2005036564A JP 2006221556 A JP2006221556 A JP 2006221556A
Authority
JP
Japan
Prior art keywords
structured data
program
instruction sequence
executing
execution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2005036564A
Other languages
Japanese (ja)
Inventor
Koichi Sakagami
公一 阪上
Yasunori Nakamura
保則 中村
Masatoshi Mogi
正敏 茂木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kozo Keikaku Engineering Inc
Original Assignee
Kozo Keikaku Engineering Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kozo Keikaku Engineering Inc filed Critical Kozo Keikaku Engineering Inc
Priority to JP2005036564A priority Critical patent/JP2006221556A/en
Publication of JP2006221556A publication Critical patent/JP2006221556A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To achieve a scenario-oriented program developing environment having high developing productivity. <P>SOLUTION: Only the order relationship of desired processing is described in an XML document, and processing is transferred to an external program. This XML document is stored in a structured data storage part 121 in a storage part 120. A control part 110 verifies whether or not there is no error on a sentence structure in the XML document stored in the structured data storage part 121 by a verifying skimmer file stored in a verifying file storage part 122 in the storage part 120. The control part 110 executes a command row recorded on the XML document without an error on the sentence structure. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、プログラム実行装置、プログラム実行方法およびプログラムに関し、特に、情報処理装置上で構造化データに記述された命令列を解釈して実行するプログラム実行装置、プログラム実行方法およびプログラムに関する。   The present invention relates to a program execution device, a program execution method, and a program, and more particularly, to a program execution device, a program execution method, and a program that interpret and execute an instruction sequence described in structured data on an information processing device.

従来より、基本的な処理(以下、コンポーネントと称する)を組み合わせて所望の処理を容易に記述することのできる手法が望まれており、そのための手法が提案されている(例えば、特許文献1)。
特開2004−102436号公報
Conventionally, a method capable of easily describing a desired process by combining basic processes (hereinafter referred to as components) has been desired, and a technique for that purpose has been proposed (for example, Patent Document 1). .
JP 2004-102436 A

しかし、従来の提案手法では、コンポーネントの組み合わせ方が余りに柔軟すぎて、プログラミング経験が無いような者には、所望の処理をプログラムのロジックに落とし込むことが困難である。また、そのような者は得てしてプログラミング上の些細なミスを犯しやすいという傾向がある。   However, in the conventional proposed method, it is difficult for a person who has no programming experience to combine desired components into the logic of the program because the combination of components is too flexible. Also, such people tend to gain and make minor programming mistakes.

また、コンポーネントの作成者は、そのコンポーネントの利用形態を考慮して作成しなければならず、作成時に慎重さを要求され、結果として作成時間が延びてしまうという問題が生じている。   In addition, the creator of the component has to create it in consideration of the usage form of the component, and requires carefulness at the time of creation, resulting in a problem that the creation time is extended.

本発明は、上記問題点に鑑みてなされたもので、構造化して記述された命令列を解釈して実行するプログラム実行装置、プログラム実行方法およびプログラムを提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a program execution device, a program execution method, and a program that interpret and execute a structured instruction sequence.

上記目的を達成するため、本発明の第1の観点にかかるプログラム実行装置は、
複数の要素ブロック間に階層関係を有する構造化データに記述された命令列により記載された処理を実行するプログラム実行装置であって、
前記構造化データに出現する要素ブロック間の階層関係と各要素ブロックの出現順序関係とを定義したスキーマデータを格納するスキーマ格納手段と、
前記スキーマ格納手段に格納されたスキーマデータに従って、前記構造化データにおける記述の構文上の妥当性を判別する判別手段と、
前記判別手段により記述が妥当であると判別された前記構造化データに記述された命令列を解釈実行する実行手段と、
を具備する。
In order to achieve the above object, a program execution device according to a first aspect of the present invention includes:
A program execution device for executing a process described by an instruction sequence described in structured data having a hierarchical relationship between a plurality of element blocks,
Schema storage means for storing schema data defining a hierarchical relationship between element blocks appearing in the structured data and an appearance order relationship of each element block;
Discriminating means for discriminating the syntactic validity of the description in the structured data according to the schema data stored in the schema storage means;
Execution means for interpreting and executing an instruction sequence described in the structured data, the description of which is determined to be valid by the determination means;
It comprises.

この発明によれば、スキーマデータに従って構造化データの記載を構文上から検証した上で、この構造化データに記述された命令列が解釈・実行される。したがって、構文上誤った記載がされた構造化データは実行されない。構造化データは、XML形式等のテキストデータであり、構造化データに記述された命令列は容易に確認できる。この構造化データの作成者は、構造化データに出現する要素ブロックの階層関係と出現順序関係とにさえ気をつけていればよく、命令列の記述に注力できる。   According to the present invention, the description of the structured data is verified from the syntax according to the schema data, and the instruction sequence described in the structured data is interpreted and executed. Therefore, structured data that is erroneously described in syntax is not executed. The structured data is text data in the XML format or the like, and the instruction sequence described in the structured data can be easily confirmed. The creator of the structured data need only pay attention to the hierarchical relationship and the appearance order relationship of the element blocks that appear in the structured data, and can concentrate on the description of the instruction sequence.

上記プログラム実行装置において、
前記命令列は、所定の処理を実行する外部実行手段を呼び出す命令を含む。
この場合、前記実行手段は、
命令列を解釈し、解釈した命令に対応する前記外部実行手段を呼び出して実行させ、実行結果を受け取ることにより命令列を実行することが望ましい。
In the above program execution device,
The instruction sequence includes an instruction for calling external execution means for executing a predetermined process.
In this case, the execution means is
It is desirable to execute the instruction sequence by interpreting the instruction sequence, calling and executing the external execution means corresponding to the interpreted instruction, and receiving the execution result.

この発明によれば、所定の処理を実行する外部実行手段を追加するだけで構造化データで記述可能な処理のバリエーションを増やすことができる。また、外部実行手段の作成の際も、構造化データからの呼び出し形態を考慮する必要性がなくなり、外部実行手段の作成の手間が短くて済む。   According to the present invention, it is possible to increase variations of processing that can be described by structured data simply by adding external execution means for executing predetermined processing. Also, when creating the external execution means, it is not necessary to consider the calling form from the structured data, and the effort for creating the external execution means can be shortened.

上記プログラム実行装置において、
前記実行手段は、
前記構造化データに記述された命令列のうち、分離して実行されるべき部分を判別し、該分離して実行されるべき部分をコンパイルするコンパイル手段を具備してもよい。この場合、実行手段は、
前記コンパイル手段でコンパイルされた分離して実行されるべき部分を、前記構造化データに記述された命令列のうち分離して実行されるべきではない部分とは別の構造化データとして実行する。
In the above program execution device,
The execution means includes
Compile means for determining a part to be executed separately from the instruction sequence described in the structured data and compiling the part to be executed separately may be provided. In this case, the execution means is
The portion that is compiled and executed separately by the compiling means is executed as structured data different from the portion that should not be executed separately in the instruction sequence described in the structured data.

本発明の第2の観点にかかるプログラム実行方法は、
複数の要素ブロック間に階層関係を有する構造化データに記述された命令列により記載された処理を実行するプログラム実行方法であって、
前記構造化データに出現する要素ブロック間の階層関係と各要素ブロックの出現順序関係とを定義したスキーマデータに従って、前記構造化データにおける記述の構文上の妥当性を判別する判別ステップと、
前記判別ステップにより記述が妥当であると判別された構造化データに記述された命令列を解釈実行する実行ステップと、
を備える。
A program execution method according to a second aspect of the present invention includes:
A program execution method for executing processing described by an instruction sequence described in structured data having a hierarchical relationship between a plurality of element blocks,
A determination step of determining the syntactic validity of the description in the structured data according to schema data that defines a hierarchical relationship between element blocks appearing in the structured data and an appearance order relationship of each element block;
An execution step of interpreting and executing an instruction sequence described in the structured data determined to be valid by the determination step;
Is provided.

さらに、本発明の第3の観点にかかるプログラムは、
コンピュータ装置を、
構造化データに出現する要素ブロック間の階層関係と各要素ブロックの出現順序関係とを定義したスキーマデータに従って、前記構造化データにおける記述の構文上の妥当性を判別し、
記述が妥当であると判別された構造化データに記述された命令列を解釈実行する、
プログラム実行装置として機能させる。
Furthermore, a program according to the third aspect of the present invention is:
Computer equipment,
According to the schema data that defines the hierarchical relationship between the element blocks that appear in the structured data and the appearance order relationship of each element block, determine the syntactic validity of the description in the structured data,
Interprets and executes an instruction sequence described in structured data whose description is determined to be valid,
It functions as a program execution device.

本発明によれば、スキーマデータに従って各種処理を記載した構造化データを解釈して実行することができる。   According to the present invention, structured data describing various processes according to schema data can be interpreted and executed.

以下、図面を参照して、本発明の実施の形態にかかる情報処理システムとその動作とを説明する。
図1に示すように、本実施の形態にかかる情報処理システム1は、複数の情報処理装置100A、100B、100Cが通信ネットワークCを介して接続されている。
Hereinafter, an information processing system and its operation according to an embodiment of the present invention will be described with reference to the drawings.
As shown in FIG. 1, in the information processing system 1 according to the present embodiment, a plurality of information processing apparatuses 100A, 100B, and 100C are connected via a communication network C.

通信ネットワークCは、例えば、TCP/IP(Transmission Control Protocol/Internet Protocol)などの所定の通信プロトコルに基づくLAN(Local Area Network)などの通信ネットワークである。   The communication network C is a communication network such as a LAN (Local Area Network) based on a predetermined communication protocol such as TCP / IP (Transmission Control Protocol / Internet Protocol).

情報処理装置100A、100B、100Cは、格納している構造化データを読み出して解釈・実行し、一定の処理を実行する。他の構造化データや外部プログラム(以下、「エージェント」と称する)を呼び出し、処理結果を受け取れるように、構造化データ中に命令列を記述できる。   The information processing apparatuses 100A, 100B, and 100C read the stored structured data, interpret and execute them, and perform certain processing. An instruction sequence can be described in the structured data so that other structured data or an external program (hereinafter referred to as “agent”) can be called and a processing result can be received.

図2に示すように、本実施の形態にかかる情報処理装置100Aは、制御部110と、記憶部120と、入力制御部130と、出力制御部140と、通信制御部150とを備える。そして、入力制御部130に入力装置13が、出力制御部140に出力装置14がそれぞれ接続されている。他の情報処理装置100B、100Cも100Aと同じ構成、機能を有する。   As illustrated in FIG. 2, the information processing apparatus 100A according to the present embodiment includes a control unit 110, a storage unit 120, an input control unit 130, an output control unit 140, and a communication control unit 150. The input device 13 is connected to the input control unit 130, and the output device 14 is connected to the output control unit 140. Other information processing apparatuses 100B and 100C have the same configuration and function as 100A.

制御部110は、例えば、中央演算処理装置(CPU、Central Processing Unit)やワークエリアとなる記憶装置(RAM(Random Access Memory)等)などを備える。制御部110は、記憶部120に格納されている動作プログラムを読み出して実行することにより、制御部110は情報処理装置100の各部を制御しつつ、後述する実行処理などを実行する。   The control unit 110 includes, for example, a central processing unit (CPU) and a storage device (RAM (Random Access Memory)) serving as a work area. The control unit 110 reads out and executes the operation program stored in the storage unit 120, so that the control unit 110 controls each unit of the information processing apparatus 100 and executes an execution process and the like described later.

記憶部120は、ハードディスク装置などの記憶装置から構成され、情報処理システム1内で解釈・実行される構造化データや、構造化データの構文上の誤りを検証する検証用スキーマファイル、制御部110の動作プログラムなどを格納する。図2に示すように、記憶部120は、構造化データ格納部121と、検証用ファイル格納部122と、プログラム格納部123とを備える。   The storage unit 120 includes a storage device such as a hard disk device. The storage unit 120 is structured data that is interpreted and executed in the information processing system 1, a verification schema file that verifies syntax errors in the structured data, and the control unit 110. Stores the operation program and so on. As shown in FIG. 2, the storage unit 120 includes a structured data storage unit 121, a verification file storage unit 122, and a program storage unit 123.

構造化データ格納部121は、「構造化データ」を格納する。構造化データは、情報処理装置100で実行されるスクリプト的なファイルで、後述する「パーサプログラム」による検証後に、「基盤プログラム」(同じく後述)により実行される。図3に、この構造化データの記述例を示す。この記述例に示した構造化データは、ネットワークを介して参照可能なデータベースからデータを取得するためのものである。   The structured data storage unit 121 stores “structured data”. The structured data is a script-like file executed by the information processing apparatus 100, and is executed by a “base program” (also described later) after verification by a “parser program” described later. FIG. 3 shows a description example of the structured data. The structured data shown in this description example is for acquiring data from a database that can be referred to via a network.

図3の1行目の記載はこの構造化データがXML文書であることを示すXML宣言である。
2行目の記載では検証用スキーマファイルを指定する。なお、所定の拡張子(例えば、「XSD」)が省略されている。
「<xap:Information>」で始まる要素ブロックには、この構造化データの属性情報(作成日時、版数、コメントなど)が記載されている。
「<xap:Agents>」で始まる要素ブロックには、この構造化データの実行に必要となる「エージェント」が指定される。
「<xap:Embedding」で始まる要素ブロック(以下、「実行可能要素ブロック」と称する)には、この構造化データの実行に必要となる命令列であって、「エージェント」として実行される命令列が記載される。この「実行可能要素ブロック」には、「エージェント」に記述される一般的なメソッドと異なるような例外的な振る舞いやこの構造化データだけで実行されるようなメソッドが記述される。
The description on the first line in FIG. 3 is an XML declaration indicating that the structured data is an XML document.
In the description on the second line, a verification schema file is designated. A predetermined extension (for example, “XSD”) is omitted.
In the element block starting with “<xap: Information>”, attribute information (creation date, version number, comment, etc.) of the structured data is described.
In the element block starting with “<xap: Agents>”, “agent” necessary for executing the structured data is specified.
An element block beginning with “<xap: Embedding” (hereinafter referred to as “executable element block”) is an instruction sequence necessary for executing the structured data, and is executed as an “agent”. Is described. In this “executable element block”, an exceptional behavior different from the general method described in “agent” and a method that is executed only by this structured data are described.

「<xap:Scenarios>」で始まる要素ブロックには、この構造化データで実行される命令列と、実行時に参照される定数や文字列とが記載される。
この中で、「<xap:Define」で始まる要素ブロックには、この構造化データで参照される定数や文字列が記載される。
この中で、「<xap:Scene」で始まる要素ブロックには、いくつかの命令列で定義されるメソッドが記載される。ここで、個々の命令は「<xap:Setting」(図示なし)、「<xap:Action」、「<xap:Waiting」のいずれかで始まる要素ブロックで記述される。これらの要素ブロックでは、「エージェント」に定義されたメソッドを呼び出す。「エージェント」の呼び出し規約(呼び出し方)は定められている。例えば、図3の「<xap:Action」で始まるブロックでは、実行時に「Function=」で指定されるメソッドが呼び出される。このメソッドの処理結果(返り値)は、「Return=」で指定される変数に格納される。ただし、この指定が空の場合、返り値を後で使用しない。
「<xap:Scene」で始まる各要素ブロックは、条件分岐や繰り返しを示す要素ブロック(例えば、図3の「<xap:If」で始まる要素ブロック)内に記述された遷移条件により関連付けされる。
「<xap:Scene」で始まる要素ブロックや条件分岐や繰り返しを示す要素ブロック内に「<xap:Scenarios>」で始まる要素ブロックを記述することができる。従って、「エージェント」の呼び出し規約、要素ブロックの記述体系(階層関係や出現順序関係)を知っている必要があるものの、利用者は命令列と条件分岐や繰り返しとの組み合わせにより様々な処理を構造化データ内に記述することができる。
In the element block starting with “<xap: Scenarios>”, an instruction sequence executed with the structured data and constants and character strings referred to at the time of execution are described.
Among these, constants and character strings referred to by the structured data are described in the element block starting with “<xap: Define”.
Among these, an element block starting with “<xap: Scene” describes methods defined by several instruction sequences. Here, each instruction is described by an element block starting with one of “<xap: Setting” (not shown), “<xap: Action”, and “<xap: Waiting”. In these element blocks, the method defined in “Agent” is called. Calling rules (calling methods) for “agents” are defined. For example, in the block starting with “<xap: Action” in FIG. 3, the method specified by “Function =” is called at the time of execution. The processing result (return value) of this method is stored in the variable specified by “Return =”. However, if this specification is empty, the return value will not be used later.
Each element block starting with “<xap: Scene” is associated by a transition condition described in an element block indicating a conditional branch or repetition (for example, an element block starting with “<xap: If” in FIG. 3).
An element block starting with “<xap: Scenarios>” can be described in an element block starting with “<xap: Scene” or an element block indicating conditional branching or repetition. Therefore, although it is necessary to know the calling convention of "agent" and the element block description system (hierarchical relationship and appearance order relationship), the user can construct various processes by combining instruction sequences with conditional branches and repetitions. Can be described in the data.

なお、要素ブロックの組み合わせ方により、構造化データは、
(1)単に「エージェント」に定義されたいくつかのメソッドの呼び出し順序を記述した要素ブロック(「<xap:Scenarios>」で始まる要素ブロックが該当する):「シナリオ部」
(2)基本的なメソッドを定義した「コンポーネント」の呼び出し順序を記述し、不要なメソッドを隠蔽したり、新たなメソッドとして定義した要素ブロック(「<xap:Agents」で始まる要素ブロックと「<xap:Embedding」で始まる要素ブロックとが該当する):「エージェント部」
とに分類することができる。プログラミング経験のない者は、(1)「シナリオ部」の作成に専念することができる。また、プログラミング経験の豊富な者は、(1)「シナリオ部」の作成だけでなく、(2)「エージェント部」で定義される「エージェント」の作成も可能である。
このように、プログラミングの技能に応じて作成する構造化データの複雑さに差をつけることができる。
Depending on how the element blocks are combined, the structured data is
(1) An element block that simply describes the calling order of some methods defined in the “agent” (element blocks starting with “<xap: Scenarios>”): “scenario part”
(2) Describe the calling order of “components” that define basic methods, hide unnecessary methods, and define element blocks that are defined as new methods (element blocks beginning with “<xap: Agents” and “< (Applicable to element blocks starting with “xap: Embedding”): “Agent part”
And can be classified. Those who have no programming experience can (1) concentrate on creating a “scenario section”. In addition, those who have extensive programming experience can create not only (1) “scenario part” but also (2) “agent” defined in “agent part”.
In this way, it is possible to make a difference in the complexity of structured data created according to programming skills.

検証用ファイル格納部122は、構造化データ格納部121に格納されている構造化データの記述が所定の記述仕様に則っているか否かを制御部110が判別するために必要となるXMLスキーマを記述したファイルを格納する。このXMLスキーマを記述したファイルには、後述の「基盤プログラム」を提供する側であらかじめ用意され、すべての構造化データの検証に適用されるものと、サードパーティや利用者が用意した構造化データ単位で適用を切り換えられるものとがある。構造化データ単位で適用するXMLスキーマを切り換えることができるため、「エージェント」の動作仕様に応じて検証内容を変更することができる。   The verification file storage unit 122 stores an XML schema necessary for the control unit 110 to determine whether the description of the structured data stored in the structured data storage unit 121 conforms to a predetermined description specification. Store the described file. The file describing the XML schema is prepared in advance on the side of providing the “base program” described later, and is applied to the verification of all structured data, and structured data prepared by a third party or a user. Some applications can be switched in units. Since the XML schema to be applied can be switched for each structured data unit, the verification content can be changed according to the operation specification of the “agent”.

プログラム格納部123には、情報処理装置100Aの基本動作を司るオペレーティングシステム(Operating System:OS)が格納されていることはもとより、例えば、以下のようなプログラムが格納される。
(1)「パーサプログラム」:検証用ファイル格納部122に格納された検証用スキーマファイルに従って、構造化データ格納部121に格納された構造化データに構文上の誤りが無いかどうかを判別するプログラム
(2)「基盤プログラム」:構造化データ格納部121に格納された構造化データを実行するプログラム。構造化データの実行に付随して、「パーサプログラム」、「コンパイラ」、「通信プログラム」等を起動し、これらのプログラムを制御する
(3)「コンパイラ」:構造化データに含まれる「実行可能要素ブロック」をコンパイルして「エージェント」として仕立てあげるプログラム
(4)「通信プログラム」:通信制御部150を制御し、通信ネットワークCを介して情報処理装置100A、100Bと通信を行うプログラム
その他、構造化データの実行時に必要な外部プログラムや「エージェント」も格納される。
The program storage unit 123 stores, for example, the following program as well as an operating system (OS) that manages the basic operation of the information processing apparatus 100A.
(1) “parser program”: a program for determining whether or not there is a syntax error in the structured data stored in the structured data storage unit 121 according to the verification schema file stored in the verification file storage unit 122 (2) “Platform program”: a program for executing structured data stored in the structured data storage unit 121. Accompanying the execution of structured data, "parser program", "compiler", "communication program", etc. are started and these programs are controlled (3) "compiler": "executable" included in structured data Program that compiles “element block” and compiles it as “agent” (4) “Communication program”: a program that controls communication control unit 150 and communicates with information processing apparatuses 100A and 100B via communication network C. It stores external programs and “agents” that are required when executing structured data.

図2に戻り、入力制御部130は、例えば、キーボードやマウス等の入力装置13を接続し、入力装置13から入力された制御部110への指示などを受け付けて制御部110に伝達する。   Returning to FIG. 2, for example, the input control unit 130 connects the input device 13 such as a keyboard and a mouse, receives an instruction to the control unit 110 input from the input device 13, and transmits the instruction to the control unit 110.

出力制御部140は、例えば、ディスプレイ等の出力装置14を接続し、制御部110の処理結果などを必要に応じて出力装置14に出力する。   For example, the output control unit 140 connects the output device 14 such as a display, and outputs the processing result of the control unit 110 to the output device 14 as necessary.

通信制御部150は、例えば、NIC(Network Interface Card)やルータなどの通信装置から構成され、情報処理装置100Aと通信ネットワークCとを接続し、この情報処理装置と他の情報処理装置100B、100Cとの間で行われる通信を制御する。   The communication control unit 150 is composed of a communication device such as a NIC (Network Interface Card) or a router, for example, and connects the information processing device 100A and the communication network C, and this information processing device and the other information processing devices 100B and 100C. Control the communication that takes place between them.

以下、本実施の形態にかかる情報処理装置100A、100B、100Cの動作について、図4を参照して説明する。100Aの構造化データ記憶部121に格納された構造化データを基盤プログラムで実行する場合を想定して説明する。
なお、構造化データに記載された命令列の実行に必要な他の構造化データおよび外部プログラムは、必要に応じて情報処理装置100A、100B、100Cにインストールされている。
また、以下の説明において、特に必要がなければ、制御部110など個々の動作を述べず、情報処理装置100A全体の動作として説明する。
Hereinafter, operations of the information processing apparatuses 100A, 100B, and 100C according to the present embodiment will be described with reference to FIG. A description will be given assuming that structured data stored in the structured data storage unit 121 of 100A is executed by a base program.
It should be noted that other structured data and external programs necessary for executing the instruction sequence described in the structured data are installed in the information processing apparatuses 100A, 100B, and 100C as necessary.
In the following description, unless otherwise required, the individual operations of the control unit 110 and the like will not be described, and will be described as the entire information processing apparatus 100A.

図4は、本実施の形態にかかる実行処理を説明するためのフローチャートである。実行処理は、利用者が入力装置13を操作し、構造化データ格納部121に格納されている構造化データを指定して基盤プログラムを起動することにより開始される。
まず、制御部110は、指定された構造化データを構造化データ格納部121から読み出す(ステップS101)。
FIG. 4 is a flowchart for explaining the execution process according to the present embodiment. The execution process is started when the user operates the input device 13 to start the base program by specifying the structured data stored in the structured data storage unit 121.
First, the control unit 110 reads designated structured data from the structured data storage unit 121 (step S101).

次に、制御部110は、検証用ファイル格納部122に格納されている検証用スキーマファイルを読み出し、読み出した構造化データに記述された要素ブロック間の階層構造が検証用スキーマファイルに記載された階層構造定義に則っているか否かを判別する(ステップS102)。構造化データに記述された要素ブロック間の階層構造が検証用スキーマファイルに記載された階層構造定義に則っていないと判別した場合(ステップS102:NG)、構文誤りにより実行不能であることを示すエラーメッセージを出力装置14に出力し実行処理を終了する。   Next, the control unit 110 reads the verification schema file stored in the verification file storage unit 122, and the hierarchical structure between the element blocks described in the read structured data is described in the verification schema file. It is determined whether or not the hierarchical structure is defined (step S102). When it is determined that the hierarchical structure between the element blocks described in the structured data does not conform to the hierarchical structure definition described in the verification schema file (step S102: NG), it indicates that execution is not possible due to a syntax error. An error message is output to the output device 14 and the execution process is terminated.

構造化データに記述された要素ブロック間の階層構造が検証用スキーマファイルに記載された階層構造定義に則っていると判別した場合(ステップS102:OK)、制御部110は構造化データの記述を走査し、構造化データ中に埋め込まれた「実行可能要素ブロック」が存在するか否かを判別する(ステップS103)。具体的には、構造化データに図3の「<xap:Embedding」で始まる要素ブロックがあるか否かを判別する。構造化データ中に「実行可能要素ブロック」が埋め込まれていると判別した場合(ステップS103:YES)、制御部110は「実行可能要素ブロック」内に指定されたプログラム言語用のコンパイラで、「実行可能要素ブロック」内に記述された命令列をコンパイルし、「エージェント」を生成する(ステップS104)。なお、「実行可能要素ブロック」内に指定されたプログラム言語の種類によっては、制御部110は、プログラム格納部123からその言語用のインタプリタを読み出して起動する。構造化データ中に「実行可能要素ブロック」が埋め込まれていないと判別した場合(ステップS103:NO)、制御部110はステップS104を実行せず、直接ステップS105の実行に移る。   When it is determined that the hierarchical structure between the element blocks described in the structured data conforms to the hierarchical structure definition described in the verification schema file (step S102: OK), the control unit 110 describes the structured data. Scan to determine whether there is an “executable element block” embedded in the structured data (step S103). Specifically, it is determined whether or not there is an element block starting with “<xap: Embedding” in FIG. 3 in the structured data. When it is determined that the “executable element block” is embedded in the structured data (step S103: YES), the control unit 110 is a compiler for the programming language specified in the “executable element block”. The instruction sequence described in the “executable element block” is compiled to generate “agent” (step S104). Note that, depending on the type of program language specified in the “executable element block”, the control unit 110 reads the interpreter for that language from the program storage unit 123 and activates it. When it is determined that the “executable element block” is not embedded in the structured data (step S103: NO), the control unit 110 does not execute step S104 but directly proceeds to execution of step S105.

次に、制御部110は再び構造化データの記述を走査し、構造化データ中に「エージェント」を指定する記載があるか否か、すなわちこの構造化データの実行のために実行される「エージェント」が存在するか否かを判別する(ステップS105)。具体的には、構造化データに図3の<xap:Agents>〜</xap:Agents>の要素ブロックがあるか否かを判別する。構造化データ中に「エージェント」を指定する記載があると判別した場合(ステップS105:YES)、<xap:Agents>〜</xap:Agents>の要素ブロック内の「Name=」の後に記載された文字列に対応する「エージェント」をプログラム格納部123から読み出す(ステップS106)。構造化データ中に「エージェント」を指定する記載がないと判別した場合(ステップS105:NO)、制御部110はステップS106を実行せず、直接ステップS107の実行に移る。   Next, the control unit 110 scans the description of the structured data again, and whether or not there is a description specifying “agent” in the structured data, that is, the “agent executed for executing the structured data”. "Is present or not (step S105). Specifically, it is determined whether or not there is an element block of <xap: Agents> to </ xap: Agents> in FIG. 3 in the structured data. When it is determined that there is a description specifying “agent” in the structured data (step S105: YES), it is described after “Name =” in the element block of <xap: Agents> to </ xap: Agents>. The “agent” corresponding to the character string is read from the program storage unit 123 (step S106). If it is determined that there is no description specifying “agent” in the structured data (step S105: NO), the control unit 110 does not execute step S106, but directly proceeds to execution of step S107.

最後に、制御部110は構造化データ中の最も「外側」の階層の<xap:Senarios>〜</xap:Senarios>内の<xap:Scene>から</xap:Scene>までの間に記載された命令列を実行する(ステップS107)。ここで、命令列の記載内容に応じて制御部110は、「エージェント」内のメソッドを実行する。これには、メソッドから遠隔手続き呼び出しなどの手法により他の情報処理装置100B、100Cに処理を依頼し処理結果を受け取ることを含む。図3の記述例に即して説明すると、例えば、GUIControllerという名称が「<xap:Agents>」で始まる要素ブロックで定義されているので、上から41行目から始まる要素ブロックにおいて、制御部110は、GUIControllerという「エージェント」に含まれるNavigate()なるメソッドを、引数「UrlTopPage」で実行すると解釈する。制御部110は、そのメソッドを実行する。   Finally, the control unit 110 describes between <xap: Senarios> and <xap: Scene> to </ xap: Scene> in <xap: Senarios> to </ xap: Senarios> in the outermost hierarchy in the structured data. The executed instruction sequence is executed (step S107). Here, the control unit 110 executes a method in the “agent” according to the description content of the instruction sequence. This includes requesting processing to other information processing apparatuses 100B and 100C by a method such as remote procedure calling from a method and receiving a processing result. 3 will be described. For example, since the name GUIController is defined in the element block starting with “<xap: Agents>”, the control unit 110 in the element block starting from the 41st line from the top is used. Interprets the method called Navigate () included in the “agent” called GUIController to be executed with the argument “UrlTopPage”. Control unit 110 executes the method.

すべての命令列の実行が終了するか異常終了すると、制御部110は、実行処理の実行を終了する。   When execution of all the instruction sequences is completed or abnormally ended, the control unit 110 ends execution of the execution process.

以上、説明したように、本発明の実施の形態にかかる情報処理装置100A等によれば、利用者が必要に応じて記述した構造化データを解釈・実行する。ここで、情報処理装置100A等は、「エージェント」と協調動作させることにより、構造化データに記載された様々な処理を実行することができる。   As described above, according to the information processing apparatus 100A and the like according to the embodiment of the present invention, the structured data described by the user as needed is interpreted and executed. Here, the information processing apparatus 100A and the like can execute various processes described in the structured data by performing a cooperative operation with the “agent”.

また、構造化データの記述は、XML形式に則って行われ、パーサプログラムが検証用スキーマファイルを参照して、実行前に構造化データ記述の妥当性を検証する。ここで、構造化データの記述者は、処理に必要なメソッドを「エージェント」から呼び出すことができ、構造化データについてはメソッドの実行順序にしぼって記述することができる。
ただし、構造化データ内に、「エージェント」として扱われる命令列を埋め込むことができる。これは、「エージェント」に記述することが不適当なメソッドを記述するために使用される。また、「エージェント」が修正できない場合にも使用される。
The description of the structured data is performed according to the XML format, and the parser program refers to the verification schema file to verify the validity of the structured data description before execution. Here, a writer of structured data can call a method necessary for processing from an “agent”, and can describe structured data in the execution order of methods.
However, an instruction sequence treated as an “agent” can be embedded in the structured data. This is used to describe a method that is inappropriate to describe in an “agent”. It is also used when the “agent” cannot be modified.

また、「基盤プログラム」が外部プログラムのメソッドを呼び出して実行し、呼び出し結果を構造化データ側に返却する。このため、外部プログラム内に呼び出される側の処理を記述する者は、構造化データにおける出現順序を考慮する事なく、処理を記述することが可能である。   In addition, the “base program” calls and executes the method of the external program, and returns the call result to the structured data side. For this reason, a person who describes the process to be called in the external program can describe the process without considering the appearance order in the structured data.

なお、本発明は上記実施の形態に限定されず、種々の変形および応用が可能である。
例えば、実行開始直前に構文上の誤りが検査される限りにおいて、構造化データがXML形式以外のマークアップ言語、もしくはデータ記述言語、等で記述された構造化データであってもよい。また、上記実施の形態で示した要素ブロックは例示であって、必要に応じて拡張・改変することができる。この場合、拡張・改変に応じてスキーマファイルの記述も変更される。さらに、構造化データから「エージェント」を呼び出し、呼び出された「エージェント」が他の「エージェント」を呼び出せるように構成してもよい。この場合、呼び出される「エージェント」は所定の呼び出しルーチンを持つように構成される。
In addition, this invention is not limited to the said embodiment, A various deformation | transformation and application are possible.
For example, as long as a syntax error is checked immediately before the start of execution, the structured data may be structured data described in a markup language other than the XML format, a data description language, or the like. The element blocks shown in the above embodiment are examples, and can be expanded / modified as necessary. In this case, the description of the schema file is also changed according to the extension / modification. Further, the “agent” may be called from the structured data so that the called “agent” can call another “agent”. In this case, the called “agent” is configured to have a predetermined calling routine.

また、上記実施の形態は、3台の情報処理装置100A、100B、100Cがネットワークに接続される形態であったが、構造化データに記載された処理が単一の情報処理装置100内で完結するような形態でもよい。   In the above embodiment, the three information processing apparatuses 100A, 100B, and 100C are connected to the network. However, the process described in the structured data is completed within the single information processing apparatus 100. It is also possible to use such a form.

なお、本発明の実施の形態にかかる情報処理装置100A他を実現するための情報処理装置は、専用のシステムによらず、通常のコンピュータシステムを用いて実現可能である。例えば、汎用コンピュータに、上述の処理を実行するためのプログラムを格納した媒体(CD−ROMなど)から当該プログラムをプログラム格納部123にインストールすることにより、上述の処理を実行する情報処理装置100A他を構成することができる。   Note that the information processing apparatus for realizing the information processing apparatus 100A and the like according to the embodiment of the present invention can be realized using a normal computer system, not a dedicated system. For example, the information processing apparatus 100A or the like that executes the above-described processing by installing the program in a program storage unit 123 from a medium (such as a CD-ROM) that stores the program for executing the above-described processing in a general-purpose computer. Can be configured.

また、上述の機能を、OS(Operating System)とアプリケーションとの分担、またはOSとアプリケーションとの協動により実現する場合などには、OS以外の部分のみを媒体に格納してもよい。   Further, when the above-described functions are realized by sharing between an OS (Operating System) and an application, or by cooperation between the OS and the application, only a part other than the OS may be stored in the medium.

また、搬送波にプログラムを重畳し、通信ネットワークを介して配信することも可能である。例えば、通信ネットワーク上の掲示板(BBS、Bulletin Board System)に該プログラムを掲示し、ネットワークを介して該プログラムを配信してもよい。そして、このプログラムを起動し、オペレーティングシステムの制御下で、他のアプリケーションプログラムと同様に実行することにより、上述の処理を実行できるように構成しても構わない。   It is also possible to superimpose a program on a carrier wave and distribute it via a communication network. For example, the program may be posted on a bulletin board (BBS, Bulletin Board System) on a communication network and distributed through the network. The program may be activated and executed in the same manner as other application programs under the control of the operating system, so that the above-described processing may be executed.

本発明の実施の形態にかかる情報処理システムの構成を示す図である。It is a figure which shows the structure of the information processing system concerning embodiment of this invention. 図1の情報処理装置の構成を示す図である。It is a figure which shows the structure of the information processing apparatus of FIG. 図2に示す構造化データ格納部に格納される構造化データの記述例を示す図である。It is a figure which shows the example of description of the structured data stored in the structured data storage part shown in FIG. 本発明の実施の形態にかかる情報処理装置の動作を説明するためのフローチャートである。It is a flowchart for demonstrating operation | movement of the information processing apparatus concerning embodiment of this invention.

符号の説明Explanation of symbols

1 情報処理システム
100、100A、100B、100C 情報処理装置
110 制御部
120 記憶部
121 構造化データ格納部
122 検証用ファイル格納部
123 プログラム格納部
130 入力制御部
13 入力装置
140 出力制御部
14 出力装置
150 通信制御部
DESCRIPTION OF SYMBOLS 1 Information processing system 100, 100A, 100B, 100C Information processing apparatus 110 Control part 120 Storage part 121 Structured data storage part 122 Verification file storage part 123 Program storage part 130 Input control part 13 Input device 140 Output control part 14 Output device 150 Communication control unit

Claims (5)

複数の要素ブロック間に階層関係を有する構造化データに記述された命令列により記載された処理を実行するプログラム実行装置であって、
前記構造化データに出現する要素ブロック間の階層関係と各要素ブロックの出現順序関係とを定義したスキーマデータを格納するスキーマ格納手段と、
前記スキーマ格納手段に格納されたスキーマデータに従って、前記構造化データにおける記述の構文上の妥当性を判別する判別手段と、
前記判別手段により記述が妥当であると判別された前記構造化データに記述された命令列を解釈実行する実行手段と、
を具備することを特徴とするプログラム実行装置。
A program execution device for executing a process described by an instruction sequence described in structured data having a hierarchical relationship between a plurality of element blocks,
Schema storage means for storing schema data defining a hierarchical relationship between element blocks appearing in the structured data and an appearance order relationship of each element block;
Discriminating means for discriminating the syntactic validity of the description in the structured data according to the schema data stored in the schema storage means;
Execution means for interpreting and executing an instruction sequence described in the structured data, the description of which is determined to be valid by the determination means;
A program execution device comprising:
前記命令列は、所定の処理を実行する外部実行手段を呼び出す命令を含むものであって、
前記実行手段は、
命令列を解釈し、解釈した命令に対応する前記外部実行手段を呼び出して実行させ、実行結果を受け取ることにより命令列を実行すること、
を特徴とする請求項1に記載のプログラム実行装置。
The instruction sequence includes an instruction for calling an external execution means for executing a predetermined process,
The execution means includes
Interpreting an instruction sequence, calling and executing the external execution means corresponding to the interpreted instruction, and executing the instruction sequence by receiving an execution result;
The program execution device according to claim 1.
前記実行手段は、
前記構造化データに記述された命令列のうち、分離して実行されるべき部分を判別し、該分離して実行されるべき部分をコンパイルするコンパイル手段を具備し、
前記コンパイル手段でコンパイルされた分離して実行されるべき部分を、前記構造化データに記述された命令列のうち分離して実行されるべきではない部分とは別の構造化データとして実行すること、
を特徴とする請求項1または2に記載のプログラム実行装置。
The execution means includes
A compiling unit for determining a part to be executed separately from the instruction sequence described in the structured data, and compiling the part to be executed separately;
Executing the part that is compiled by the compiling means and should be executed separately as structured data different from the part that should not be executed separately from the instruction sequence described in the structured data. ,
The program execution device according to claim 1 or 2.
複数の要素ブロック間に階層関係を有する構造化データに記述された命令列により記載された処理を実行するプログラム実行方法であって、
前記構造化データに出現する要素ブロック間の階層関係と各要素ブロックの出現順序関係とを定義したスキーマデータに従って、前記構造化データにおける記述の構文上の妥当性を判別する判別ステップと、
前記判別ステップにより記述が妥当であると判別された構造化データに記述された命令列を解釈実行する実行ステップと、
を備えることを特徴とするプログラム実行方法。
A program execution method for executing processing described by an instruction sequence described in structured data having a hierarchical relationship between a plurality of element blocks,
A determination step of determining the syntactic validity of the description in the structured data according to schema data that defines a hierarchical relationship between element blocks appearing in the structured data and an appearance order relationship of each element block;
An execution step of interpreting and executing an instruction sequence described in the structured data determined to be valid by the determination step;
A program execution method comprising:
コンピュータ装置を、
構造化データに出現する要素ブロック間の階層関係と各要素ブロックの出現順序関係とを定義したスキーマデータに従って、前記構造化データにおける記述の構文上の妥当性を判別し、
記述が妥当であると判別された構造化データに記述された命令列を解釈実行する、
プログラム実行装置として機能させることを特徴とするプログラム。
Computer equipment,
According to the schema data that defines the hierarchical relationship between the element blocks that appear in the structured data and the appearance order relationship of each element block, determine the syntactic validity of the description in the structured data,
Interprets and executes an instruction sequence described in structured data whose description is determined to be valid,
A program characterized by functioning as a program execution device.
JP2005036564A 2005-02-14 2005-02-14 Program execution device, program execution method and program Pending JP2006221556A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005036564A JP2006221556A (en) 2005-02-14 2005-02-14 Program execution device, program execution method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005036564A JP2006221556A (en) 2005-02-14 2005-02-14 Program execution device, program execution method and program

Publications (1)

Publication Number Publication Date
JP2006221556A true JP2006221556A (en) 2006-08-24

Family

ID=36983840

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005036564A Pending JP2006221556A (en) 2005-02-14 2005-02-14 Program execution device, program execution method and program

Country Status (1)

Country Link
JP (1) JP2006221556A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775937A (en) * 2016-12-02 2017-05-31 郑州云海信息技术有限公司 A kind of order line method of calibration and device
CN112667207A (en) * 2020-12-21 2021-04-16 苏州热工研究院有限公司 Design method for structuralization of operation program of nuclear power plant

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106775937A (en) * 2016-12-02 2017-05-31 郑州云海信息技术有限公司 A kind of order line method of calibration and device
CN112667207A (en) * 2020-12-21 2021-04-16 苏州热工研究院有限公司 Design method for structuralization of operation program of nuclear power plant
CN112667207B (en) * 2020-12-21 2023-04-28 苏州热工研究院有限公司 Nuclear power plant operation program structured design method

Similar Documents

Publication Publication Date Title
US9021419B2 (en) System and method for supporting intelligent design pattern automation
US8347272B2 (en) Call graph dependency extraction by static source code analysis
Lautamäki et al. CoRED: browser-based Collaborative Real-time Editor for Java web applications
CN107229848A (en) A kind of code reinforcement means and device
US20060265469A1 (en) XML based scripting framework, and methods of providing automated interactions with remote systems
AU2012203071A1 (en) Computer-implemented method, system and computer program product for displaying a user interface component
CN108920496B (en) Rendering method and device
JP2004342108A (en) Reflection-based processing of input parameter for command
US20050246692A1 (en) Asynchronous compilation
US10303467B2 (en) Target typing-dependent combinatorial code analysis
JP5209016B2 (en) WebAPI creation support apparatus and WebAPI creation support method
US10248545B2 (en) Method for tracking high-level source attribution of generated assembly language code
Naujokat et al. Domain-specific code generator modeling: a case study for multi-faceted concurrent systems
US20060009962A1 (en) Code conversion using parse trees
Shute Advanced JavaScript: Speed up web development with the powerful features and benefits of JavaScript
JP4702835B2 (en) Web service customization system
JP2006221556A (en) Program execution device, program execution method and program
JP2008165342A (en) Source code creating method, device and program
KR102022542B1 (en) System and method for providing client-server intergrated development platform
CN115756433A (en) Code platform migration method and device, electronic equipment and readable storage medium
Engelen From napkin sketches to reliable software
Mariño et al. Synthesis of verifiable concurrent Java components from formal models
US20130117728A1 (en) Computer program interface
CN112988136B (en) User interface editing method and device
JP2006293436A (en) Program code generation device and generation method