JP2016170707A - Control program division apparatus, control program division method, computer program, and division source code production method - Google Patents
Control program division apparatus, control program division method, computer program, and division source code production method Download PDFInfo
- Publication number
- JP2016170707A JP2016170707A JP2015051051A JP2015051051A JP2016170707A JP 2016170707 A JP2016170707 A JP 2016170707A JP 2015051051 A JP2015051051 A JP 2015051051A JP 2015051051 A JP2015051051 A JP 2015051051A JP 2016170707 A JP2016170707 A JP 2016170707A
- Authority
- JP
- Japan
- Prior art keywords
- source code
- control program
- control
- unit
- division
- 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.)
- Granted
Links
Images
Landscapes
- Devices For Executing Special Programs (AREA)
- Stored Programmes (AREA)
Abstract
Description
本発明の実施形態は、制御プログラム分割装置、制御プログラム分割方法、コンピュータプログラム及び分割ソースコード生産方法に関する。 Embodiments described herein relate generally to a control program dividing device, a control program dividing method, a computer program, and a divided source code production method.
災害復旧を容易にするため、ネットワークを介して機器を遠隔制御する遠隔制御技術が注目されている。このような遠隔制御をクラウドサーバで実行する形態の遠隔制御システムは、クラウド制御システムと呼ばれる。クラウド制御システムでは、遠隔制御を実現するための制御プログラムが物理的に離れた複数のクラウドサーバに保持される。このようなクラウド制御システムでは、仮に1つの拠点が被災した場合であっても、他の拠点のクラウドサーバに制御プログラムが保持されているため、制御プログラムを消失することがない。そのため、被災時のシステム復旧作業に要する時間を短縮することができる。 In order to facilitate disaster recovery, remote control technology for remotely controlling devices via a network has attracted attention. A remote control system in which such remote control is executed by a cloud server is called a cloud control system. In the cloud control system, control programs for realizing remote control are held in a plurality of cloud servers that are physically separated. In such a cloud control system, even if one base is damaged, the control program is not lost because the control program is held in the cloud server of another base. Therefore, the time required for the system restoration work at the time of a disaster can be shortened.
ところで、遠隔制御システムは、制御対象の機器に関する情報をセンサ等の検知装置を用いて取得する。検知装置は、制御対象の機器に関する事象を計測し、計測値を示す検知信号を遠隔制御システムに送信する。遠隔制御システムは、検知信号を入力情報として、制御対象の機器を制御する制御信号を生成する。生成された制御信号に基づいて、制御対象の機器が動作することによって、機器の遠隔制御が実現される。このような遠隔制御システムをクラウド制御システムとして構成した場合、検知信号及び制御信号の送受信にはインターネットなどの広域ネットワークが用いられる可能性がある。この場合、広域ネットワークにおいて通信遅延が発生した場合、クラウド制御システムは、検知信号に対する制御信号の応答を要求される応答時間内に行うことができず、システムの応答性が低下する可能性がある。 By the way, the remote control system acquires information on the device to be controlled using a detection device such as a sensor. The detection device measures an event related to the device to be controlled and transmits a detection signal indicating the measurement value to the remote control system. The remote control system generates a control signal for controlling a device to be controlled using the detection signal as input information. Based on the generated control signal, the device to be controlled operates to realize remote control of the device. When such a remote control system is configured as a cloud control system, a wide area network such as the Internet may be used for transmission and reception of detection signals and control signals. In this case, when a communication delay occurs in the wide area network, the cloud control system cannot perform the response of the control signal to the detection signal within the required response time, which may reduce the system responsiveness. .
このような背景により、制御プログラムを複数の装置で並列実行することができるように分割するプリコンパイラが求められている。このようなプリコンパイラが実現されれば、クラウド制御システムは、広域ネットワークの状況に応じて制御プログラムを分割することでシステムの応答時間を保証することができる。例えば、検知装置側のネットワークに位置する装置と、広域ネットワーク側に位置するクラウドサーバとに制御プログラムを分割することができる。 With such a background, there is a need for a precompiler that divides a control program so that it can be executed in parallel by a plurality of devices. If such a precompiler is realized, the cloud control system can guarantee the response time of the system by dividing the control program according to the situation of the wide area network. For example, the control program can be divided into a device located on the network on the detection device side and a cloud server located on the wide area network side.
このようなプログラムの分割を行う手法として、従来、一般的なマルチプロセッサ向けのコンパイラにおいて、ループ処理を並列実行可能に分割する手法があった。しかしながら、従来手法では、データ依存性の整合をとるため、分割されたループごとにサーバ間通信を行う必要がある。そのため、分割するプログラムの処理内容や処理量によっては、分割したことによる通信量のオーバーヘッドが大きくなり、必ずしも処理時間の短縮につながらない可能性があった。 As a technique for dividing such a program, there has conventionally been a technique for dividing a loop process so that it can be executed in parallel in a general multiprocessor compiler. However, in the conventional method, it is necessary to perform server-to-server communication for each divided loop in order to achieve data dependency matching. For this reason, depending on the processing contents and processing amount of the program to be divided, the overhead of the communication amount due to the division becomes large, and there is a possibility that the processing time is not necessarily shortened.
本発明が解決しようとする課題は、通信量の増大を抑制しつつ制御プログラムの並列処理を可能にする制御プログラム分割装置、制御プログラム分割方法、コンピュータプログラム及び分割ソースコード生産方法を提供することである。 The problem to be solved by the present invention is to provide a control program dividing device, a control program dividing method, a computer program, and a divided source code production method that enable parallel processing of control programs while suppressing an increase in communication volume. is there.
実施形態の制御プログラム分割装置は、字句解析部と、構文解析部と、分割部と、実行主体判定部と、を持つ。字句解析部は、制御対象の機器が設置された環境に関する情報を示す環境情報と、前記機器の状態を示す状態情報とのいずれかを含む検知信号に基づいて前記機器を制御するための制御信号を複数生成する制御処理を実現する制御プログラムのソースコードから、前記ソースコードにおいて意味を持つ最小の単位の文字列であるトークンを抽出する。構文解析部は、前記字句解析部によって抽出されたトークンの構文を解析し、前記ソースコードの意味を示す構文情報を生成する。分割部は、前記構文解析部によって生成された構文情報と前記ソースコードとに基づいて、前記制御信号を生成する複数の分割ソースコードを生成する。実行主体判定部は、前記分割ソースコードから生成される制御プログラムが実行された際の入力となる入力信号の依存関係に基づいて、前記制御プログラムの実行主体を判定する。 The control program dividing device of the embodiment includes a lexical analyzer, a syntax analyzer, a divider, and an execution subject determining unit. The lexical analysis unit is a control signal for controlling the device based on a detection signal including either environment information indicating information about an environment in which the device to be controlled is installed and state information indicating the state of the device From the source code of the control program that realizes the control process for generating a plurality of tokens, a token that is a character string of the smallest unit having meaning in the source code is extracted. The syntax analysis unit analyzes the syntax of the token extracted by the lexical analysis unit, and generates syntax information indicating the meaning of the source code. The dividing unit generates a plurality of divided source codes for generating the control signal based on the syntax information generated by the syntax analyzing unit and the source code. The execution subject determination unit determines the execution subject of the control program based on the dependency relationship of the input signals that are input when the control program generated from the divided source code is executed.
以下、実施形態の制御プログラム分割装置、制御プログラム分割方法、コンピュータプログラム及び分割ソースコード生産方法を、図面を参照して説明する。 Hereinafter, a control program dividing device, a control program dividing method, a computer program, and a divided source code production method according to embodiments will be described with reference to the drawings.
(第1の実施形態)
図1は、第1の実施形態の制御プログラム分割装置1の機能構成を示す機能ブロック図である。
制御プログラム分割装置1は、バスで接続されたCPU(Central Processing Unit)やメモリや補助記憶装置などを備え、分割プログラムを実行する。制御プログラム分割装置1は、分割プログラムの実行によって入力部11、字句解析部12、構文解析部13、記憶部14、分割部15及び分割プログラム出力部16を備える装置として機能する。なお、制御プログラム分割装置1の各機能の全て又は一部は、ASIC(Application Specific Integrated Circuit)やPLD(Programmable Logic Device)やFPGA(Field Programmable Gate Array)等のハードウェアを用いて実現されてもよい。分割プログラムは、コンピュータ読み取り可能な記録媒体に記録されてもよい。コンピュータ読み取り可能な記録媒体とは、例えばフレキシブルディスク、光磁気ディスク、ROM、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置である。分割プログラムは、電気通信回線を介して送信されてもよい。
(First embodiment)
FIG. 1 is a functional block diagram illustrating a functional configuration of the control program dividing
The control program dividing
入力部11は、分割対象のプログラムのソースコードを自装置に入力する。例えば、入力部11は、LAN等のネットワークに接続するための通信インターフェースを含んで構成され、他の装置からソースコードが記載されたファイルを取得するように構成されてもよい。また、例えば、入力部11は、CD−ROMやフラッシュメモリなどの記録媒体から情報を読み出す装置を含んで構成され、これらの記録媒体からソースコードが記載されたファイルを取得するように構成されてもよい。また、例えば、入力部11は、キーボードやマウスなどの入力装置を含んで構成され、これらの入力装置を用いて入力された文字をソースコードとして取得するように構成されてもよい。入力部11は、取得したソースコードを字句解析部12に出力する。
The
字句解析部12は、入力部11からソースコードを取得する。字句解析部12は、ソースコードを解析してトークン列を取得する。トークン列とは、ソースコードにおいて意味を持つ最小単位の文字列のことである。このような字句解析を行うプログラムは、一般にレキシカルアナライザ(lexical analyzer)と呼ばれる。非特許文献1に記載のプログラムLexは、プログラミング言語(以下、単純に「言語」という。)のトークンの規則に基づいて、レキシカルアナライザを自動生成するプログラムである。例えば、字句解析部12は、取得したソースコードの言語におけるトークンの規則が定義されたファイルをプログラムLexに入力し、解析対象のソースコードのレキシカルアナライザを生成する。字句解析部12は、取得したソースコードを入力として生成されたレキシカルアナライザを実行することで、ソースコードからトークン列を取得する。字句解析部12は、取得したトークン列を構文解析部13に出力する。
The
構文解析部13は、字句解析部12から出力されるトークン列に基づいて、ソースコードの構文解析を行う。このような構文解析を行うプログラムは一般にパーサ(Parser)と呼ばれる。非特許文献1に記載のプログラムYaccは、言語の構文規則に基づいて、パーサを自動生成するプログラムである。例えば、構文解析部13は、取得されたソースコードの言語における構文規則が定義されたファイルをプログラムYaccに入力し、解析対象のソースコードのパーサを生成する。構文解析部13は、取得したトークン列を入力として生成されたパーサを実行することで、トークン列の構文解析を行う。
The
一般に、ソースコードは、宣言部と命令部とに分類される。宣言部は、取り扱う変数や関数の定義に関する記述であり、命令部は、宣言部で定義された変数や関数を用いた具体的な処理に関する記述である。構文解析部13は、構文解析を行うことにより、このようなソースコードの構成を示す情報を解析結果として取得する。構文解析部13は、取得した解析結果を記憶部14に保存する。
In general, source code is classified into a declaration part and an instruction part. The declaration part is a description related to the definition of variables and functions to be handled, and the instruction part is a description related to specific processing using the variables and functions defined in the declaration part. The
記憶部14は、磁気ハードディスク装置や半導体記憶装置などの記憶装置を用いて構成される。記憶部14は、構文解析部13によって取得されたソースコードの解析結果(構文情報)を記憶する。
The
分割部15は、構文解析部13の解析結果に基づいてソースコードを、個々の制御信号を生成するソースコードに分割する。分割部15は、分割したソースコードを分割プログラム出力部16に出力する。
The dividing
分割プログラム出力部16は、分割部15から出力された分割後の各ソースコードを、それぞれ別々のテキストファイルとして出力する。
The division
以下、実施形態の制御プログラム分割装置1が制御プログラムのソースコードを分割する処理について詳細に説明する。まず、制御プログラムを実行するクラウド制御システムの構成について説明する。
Hereinafter, a process in which the control
図2は、クラウド制御システム10のシステム構成を示すシステム構成図である。
クラウド制御システム10は、検知装置20−1〜20−3、被制御装置30−1及び30−2、通信装置40−1及び40−2、サーバ50を備える。通信装置40−1及び40−2は、広域ネットワーク60を介してサーバ50と通信する。
FIG. 2 is a system configuration diagram illustrating a system configuration of the
The
検知装置20−1及び20−2は、被制御装置30−1に関する検知信号を取得する。検知装置20−1及び20−2は、取得した検知信号を通信装置40−1に送信する。同様に、検知装置20−3は、被制御装置30−2に関する検知信号を取得する。検知装置20−3は、取得した検知信号を通信装置40−2に送信する。 The detection devices 20-1 and 20-2 acquire a detection signal related to the controlled device 30-1. The detection devices 20-1 and 20-2 transmit the acquired detection signal to the communication device 40-1. Similarly, the detection device 20-3 acquires a detection signal related to the controlled device 30-2. The detection device 20-3 transmits the acquired detection signal to the communication device 40-2.
被制御装置30−1は、通信装置40−1から制御信号を取得する。被制御装置30−1は、取得した制御信号に基づいて自装置を動作させる。同様に、被制御装置30−2は、通信装置40−2から制御信号を取得する。被制御装置30−2は、取得した制御信号に基づいて自装置を動作させる。 The controlled device 30-1 acquires a control signal from the communication device 40-1. The controlled device 30-1 operates its own device based on the acquired control signal. Similarly, the controlled device 30-2 acquires a control signal from the communication device 40-2. The controlled device 30-2 operates its own device based on the acquired control signal.
通信装置40−1は、検知装置20−1及び20−2から検知信号を取得する。通信装置40−1は、取得した検知信号をサーバ50に送信する。また、通信装置40−1は、送信した検知信号に基づいて生成された制御信号をサーバ50から取得する。通信装置40−1は、取得した制御信号を被制御装置30−1に送信する。
The communication device 40-1 acquires detection signals from the detection devices 20-1 and 20-2. The communication device 40-1 transmits the acquired detection signal to the
同様に、通信装置40−2は、検知装置20−3から検知信号を取得する。通信装置40−2は、取得した検知信号をサーバ50に送信する。また、通信装置40−2は、送信した検知信号に基づいて生成された制御信号をサーバ50から取得する。通信装置40−2は、取得した制御信号を被制御装置30−2に送信する。
Similarly, the communication device 40-2 acquires a detection signal from the detection device 20-3. The communication device 40-2 transmits the acquired detection signal to the
サーバ50は、制御処理を実行可能なクラウドサーバである。制御処理とは、検知信号に基づいて制御信号を生成する処理である。制御処理は、制御プログラムの実行により実現される。サーバ50は、通信装置40−1及び40−2から検知信号を取得する。サーバ50は、取得した検知信号のそれぞれに応じた処理を行って、それぞれの検知信号に応じた制御信号を生成する。サーバ50は、生成した制御信号を対応する通信装置40−1又は40−2に送信する。
The
サーバ50は、制御処理の主たる実行主体であるが、この制御処理は通信装置40−1及び40−2においても実行可能である。通常、通信装置40−1及び40−2は、検知信号をサーバ50に送信し、サーバ50が制御処理を実行する。その一方で、通信装置40−1及び40−2は、必要に応じて自装置で制御処理を実行することによって、システムの応答性の低下を抑制する。この場合、通信装置40−1及び40−2は、サーバ50に検知信号を送信しない。
The
以下、説明を簡単にするために、特に区別しない限り、検知装置20−1〜20−3を検知装置20と記載する。同様に、被制御装置30−1及び30−2を被制御装置30と記載する。同様に、通信装置40−1及び40−2を通信装置40と記載する。 Hereinafter, for the sake of simplicity, the detection devices 20-1 to 20-3 are referred to as the detection device 20 unless otherwise specified. Similarly, controlled devices 30-1 and 30-2 are referred to as controlled device 30. Similarly, the communication devices 40-1 and 40-2 are referred to as the communication device 40.
このようなクラウド制御システム10において、検知装置20は、対応する被制御装置30について環境情報又は状態情報を取得する。環境情報は、被制御装置30が設置された環境に関する情報であり、例えば、明るさ、温度、人の有無、人の数などを示す情報である。また、状態情報は、被制御装置30の状態に関する情報であり、例えば、スイッチのON又はOFF、電流、電圧、圧力、流量、重量、速度などを示す情報である。検知装置20は、取得したこれらの情報を示す検知信号を通信装置40に送信する。なお、環境情報や状態情報は、被制御装置30の制御に用いることができる情報であれば、他のどのような情報であってもよい。
In such a
また、クラウド制御システム10の制御対象となる被制御装置30はどのような装置であってもよい。例えば、被制御装置30は、製造工場やプラントを自動制御する機器であってもよい。また、被制御装置30は、住宅や施設等の屋内に設置される機器であってもよいし、道路や公園等の屋外に設置される機器であってもよい。また、被制御装置30は、所定の場所に固定して設置される機器であってもよいし、飛行機や自動車等の移動体に設置される機器であってもよい。このような被制御装置30となり得る機器の具体例として、モータ、バルブ、ポンプ、照明機器、空調機器、信号機などが挙げられる。
Further, the controlled device 30 to be controlled by the
図2の例のクラウド制御システム10の場合、被制御装置30−1の制御信号は、検知装置20−1及び20−2によって取得された検知信号に基づいて生成される。通常、この2つの検知信号に基づく制御処理はサーバ50によって実行されるが、この制御処理を通信装置40−1とサーバ50とに分割して並列処理することができれば、検知信号の入力に対する制御信号の出力に要する応答時間を短縮することができる。このような応答時間の短縮を目的として、実施形態の制御プログラム分割装置1は、以下のような方法で制御プログラムを分割する。
In the case of the
図3は、制御プログラムを分割する処理の流れを示すフローチャートである。
まず、入力部11は、分割する対象の制御プログラムのソースコードを取得する(ステップS101)。入力部11は、取得したソースコードを字句解析部12に出力する。例えば、入力部11は、次の図4に示すソースコードを取得する。
FIG. 3 is a flowchart showing a flow of processing for dividing the control program.
First, the
図4は、分割対象のソースコードの具体例を示す図である。
図4のソースコード100において、符号110が示す範囲の記述が宣言部であり、符号120が示す範囲の記述が命令部である。さらに宣言部110のうち、符号111が示す範囲には入出力信号の変数が、符号112が示す範囲には一時変数が、符号113が示す範囲には関数名が、それぞれ宣言されている。また、命令部120には、宣言部113に宣言された各関数の入出力が記載されている。図4では、説明を簡単にするために、各関数の詳細な処理の記載を省略している。また、各関数のソースコードはソースコード100と異なるファイルに記載されてもよい。
FIG. 4 is a diagram illustrating a specific example of the source code to be divided.
In the
ソースコード100における、“X1”、“X2”及び“X3”は入力信号、すなわち検知信号を示す変数であり、“Y1”及び“Y2”は出力信号、すなわち制御信号を示す変数である。“T1”及び“T2”は、一時変数である。また、関数“POU1”は検知信号“X1”を入力として一時変数“T1”を出力する関数である。関数“POU2”は一時変数“T1”を入力として制御信号“Y1”を出力する関数である。関数“POU3”は検知信号“X3”を入力として一時変数“T2”を出力する関数である。関数“POU4”は一時変数“T2”及び検知信号“X2”を入力として制御信号“Y2”を出力する関数である。
In the
図3の説明に戻る。
字句解析部12は、入力部11からソースコードを取得する。字句解析部12は、取得したソースコードの字句解析を行う(ステップS102)。字句解析部12は、字句解析によって取得されたトークン列を構文解析部13に保存する。構文解析部13は、字句解析部12からトークン列を取得する。構文解析部13は、取得したトークン列について構文解析を行う(ステップS103)。構文解析部13は、解析結果を記憶部14に保存する。具体的には、構文解析部13は、解析結果を、アドレス情報テーブル141、入出力信号テーブル142、依存性テーブル143(依存性情報)及びツリー情報144として保存する。
Returning to the description of FIG.
The
図5は、アドレス情報テーブル141の具体例を示す図である。
アドレス情報テーブル141は、変数名ごとにアドレス情報レコードを有する。アドレス情報レコードは、変数名及びアドレス情報の各項目を有する。変数名は、検知信号及び制御信号に対応する変数名を表す。アドレス情報は、変数名が示す変数の値が保持される装置の識別情報である。アドレス情報レコードは、宣言部111の内容に基づいて生成される。宣言部111には、各変数のアドレス情報が記載されている。例えば、変数“X1”の場合、アドレス情報は“%IW60.1”である。アドレス情報は、“.”(以下、「ドット」という。)で区切られ、ドットより前の値は、変数の種別と、変数の値を保持する通信装置40の種別とを表す。ドットより後の値は、1台の通信装置40におけるメモリアドレスを表す。図3の例の場合、“%IW”及び“%QW”が変数の種別を表し、“%IW”は検知信号を、“%QW”は制御信号を示している。また、変数の種別とドットとの間の数値が通信装置40の種別を表し、“60”は通信装置40−1を、“70”は通信装置40−2を示している。構文解析部13は、変数名と通信装置40の種別とに基づいてアドレス情報レコードを生成し、アドレス情報テーブル141に登録する。
FIG. 5 is a diagram showing a specific example of the address information table 141.
The address information table 141 has an address information record for each variable name. The address information record has items of variable name and address information. The variable name represents a variable name corresponding to the detection signal and the control signal. The address information is identification information of a device that holds the value of the variable indicated by the variable name. The address information record is generated based on the contents of the
図6は、入出力信号テーブル142の具体例を示す図である。
入出力信号テーブル142は、変数名ごとに入出力信号レコードを有する。入出力信号レコードは、変数名及び信号種別の各項目を有する。変数名は、検知信号、制御信号及び一時変数に対応する変数名を表す。変数名が示す変数に対応する信号の種別を表す。図5でも説明したように、宣言部111には、検知信号及び制御信号に対応する各変数のアドレス情報が定義されている。このアドレス情報により、各変数に対応する信号の種別が識別される。また、宣言部112には、一時変数が定義されている。構文解析部13は、宣言部111及び宣言部112の内容に基づいて入出力信号レコードを生成し、入出力信号テーブル142に登録する。
FIG. 6 is a diagram showing a specific example of the input / output signal table 142.
The input / output signal table 142 has an input / output signal record for each variable name. The input / output signal record has items of variable name and signal type. The variable name represents a variable name corresponding to the detection signal, the control signal, and the temporary variable. Indicates the type of signal corresponding to the variable indicated by the variable name. As described with reference to FIG. 5, the
図7は、依存性テーブル143の具体例を示す図である。
依存性テーブル143は、変数名ごとに依存性レコードを有する。依存性レコードは、変数名、信号種別、直接依存性、間接依存性及び連携要否の各項目を有する。変数名は、制御信号及び一時変数に対応する変数名を表す。信号種別は、変数名が示す変数に対応する信号の種別を表す。直接依存性は、変数名が示す変数の値を出力する関数に入力される変数を表す。一方、間接依存性は、直接依存性が示す変数を取得するために用いられた変数を表す。直接依存性が示す変数が、複数の関数の入出力を経て取得される場合もあるが、ここでは、説明を簡単にするために、間接依存性が示す変数は、直接依存性が示す変数を出力する関数に入力される変数を表すものと仮定する。連携要否は、変数名が示す変数の取得に、他の装置との連携を必要とするか否かを表す。このような依存性テーブル143を保持することによりで、制御信号に対する検知信号や一時変数の依存性を短時間で参照することが可能となる。
FIG. 7 is a diagram illustrating a specific example of the dependency table 143.
The dependency table 143 has a dependency record for each variable name. The dependency record includes items of variable name, signal type, direct dependency, indirect dependency, and necessity of cooperation. The variable name represents a variable name corresponding to the control signal and the temporary variable. The signal type represents the type of signal corresponding to the variable indicated by the variable name. The direct dependency represents a variable input to a function that outputs the value of the variable indicated by the variable name. On the other hand, indirect dependency represents a variable used to acquire a variable indicated by direct dependency. The variable indicated by the direct dependency may be obtained through input / output of multiple functions, but here, for simplicity of explanation, the variable indicated by the indirect dependency is the variable indicated by the direct dependency. Suppose that it represents a variable that is input to the output function. The necessity of cooperation indicates whether or not cooperation with another apparatus is required for obtaining the variable indicated by the variable name. By holding such a dependency table 143, it is possible to refer to the dependency of the detection signal and the temporary variable on the control signal in a short time.
構文解析部13は、命令部120の内容に基づいて、まず、連携要否の項目以外の値を持つ依存性レコードを生成し、依存性テーブル143に登録する。連携要否の項目は、後段の分割部15によって登録される。
Based on the contents of the command unit 120, the
図8は、ツリー情報144の具体例を示す図である。
ツリー情報144は、ソースコードのツリー構造を示す情報である。ソースコードのツリー構造とは、ソースコード内のトークンの従属関係を木構造で表したものである。構文解析部13は、ソースコードにおける各セクションの開始及び終了を示すトークンに基づいて、トークンの木構造を生成する。例えば、図4の例のソースコード100の場合、ソースコードの開始を示すトークンは“PROGRAM POU0”であり、終了を示すトークンは“END_PROGRAM”である。また、宣言部111の開始を示すトークンは“VAR”であり、終了を示すトークンは“END_VAR”である。宣言部112及び113の開始及び終了を表すトークンも同様である。このようなセクションの開始及び終了を表すトークンに基づけば、ソースコード100のツリー構造は図8のように表される。
FIG. 8 is a diagram illustrating a specific example of the
図3の説明に戻る。
構文解析部13によるソースコードの構文解析が行われると、分割部15は、構文解析部13の解析結果に基づいて、分割対象のソースコードを個々の制御信号を生成するソースコードに分割する(ステップS104)。具体的には、分割部15は、ツリー情報144を参照し、ツリー構造を構成するトークンから、個々の制御信号の生成に必要なトークンを抽出することで、ソースコードを分割する。このとき、分割部15は、依存性テーブル143を参照し、直接依存性及び間接依存性が示す変数に関するトークンを抽出する。このように、制御信号の生成に必要なトークンを、制御信号ごとに抽出することによって、分割対象のソースコードを個々の制御信号を生成するソースコードに分割することができる。このような分割によって、図4の例のソースコード100は、例えば、次の図9のような2つのソースコードに分割される。
Returning to the description of FIG.
When the syntax analysis of the source code is performed by the
図9は、分割されたソースコードの具体例を示す図である。
ソースコード100−1及び100−2は、各制御信号の生成に必要となる各変数が、図7の例の依存性テーブル143が示す依存関係を持つ場合において分割されたソースコード100である。ソースコード100−1は、制御信号“Y1”を生成するソースコードである。依存性テーブル143が示す依存関係により、制御信号“Y1”の生成には、関数“POU3”及び“POU4”は不要である。そのため、分割部15は、ツリー情報144が示すツリー構造から、トークン1441及び1442以外のトークンを抽出することによりソースコード100−1を生成する。また、ソースコード100−2は、制御信号“Y2”を生成するソースコードである。依存性テーブル143が示す依存関係により、制御信号“Y2”の生成には、関数“POU1”及び“POU2”は不要である。そのため、分割部15は、ツリー情報144が示すツリー構造から、トークン1443及び1444以外のトークンを抽出することによりソースコード100−2を生成する。
FIG. 9 is a diagram illustrating a specific example of the divided source code.
The source codes 100-1 and 100-2 are the
図3の説明に戻る。
分割部15(分割部及び実行主体判定部)は、ソースコードを分割した後、分割されたソースコード(以下、「分割ソースコード」という。)に基づいて生成される制御プログラム(以下、「分割プログラム」という。)の実行主体となる装置を決定する(ステップS105)。具体的には、分割部15は、依存性テーブル143の各依存性レコードについて連携要否を判定することで、通信装置40又はサーバ50のいずれかを分割プログラムの実行主体として決定する。分割プログラムの実行主体を決定する処理の詳細は次のとおりである。
Returning to the description of FIG.
The dividing unit 15 (dividing unit and execution subject determining unit) divides the source code and then generates a control program (hereinafter, “divided source code”) based on the divided source code (hereinafter, “divided source code”). A device that is the execution subject of the program is determined (step S105). Specifically, the dividing
分割部15は、アドレス情報テーブル141及び依存性テーブル143を参照し、各依存性レコードの変数名、直接依存性及び間接依存性が示す変数のアドレス情報を取得する。分割部15は、取得した全てのアドレス情報が同じである場合、その変数名が示す制御信号を生成する処理において、他の装置との連携が“不要”であると判定する。一方、分割部15は、取得したアドレス情報に複数のアドレス情報が含まれる場合、その変数名が示す制御信号を生成する処理において、他の装置との連携が“必要”であると判定する。
The dividing
例えば、図7の例の依存性テーブル143において、制御信号“Y1”の生成は、一時変数“T1”及び検知信号“X1”に依存している。また、変数“T1”は検知信号“X1”に依存している。この場合、図5の例のアドレス情報テーブル141によれば、検知信号“X1”及び制御信号“Y1”のアドレス情報はともに“60”である。そのため、この場合、分割部15は、制御信号“Y1”を生成する制御処理の連携要否を“不要”と判断する。
For example, in the dependency table 143 of the example of FIG. 7, the generation of the control signal “Y1” depends on the temporary variable “T1” and the detection signal “X1”. The variable “T1” depends on the detection signal “X1”. In this case, according to the address information table 141 in the example of FIG. 5, both the address information of the detection signal “X1” and the control signal “Y1” is “60”. Therefore, in this case, the dividing
また、例えば、図7の例の依存性テーブル143において、制御信号“Y2”の生成は、一時変数“T2”、検知信号“X2”及び“X3”に依存している。また、変数“T2”は検知信号“X3”に依存している。この場合、図5の例のアドレス情報テーブル141によれば、検知信号“X2”のアドレス情報は“60”であり、検知信号“X3”及び制御信号“Y2”のアドレス情報はともに“70”である。そのため、この場合、分割部15は、制御信号“Y2”を生成する制御処理の連携要否を“必要”と判断する。
分割部15は、このように判断した連携要否を各依存性レコードに登録する。
Further, for example, in the dependency table 143 in the example of FIG. 7, the generation of the control signal “Y2” depends on the temporary variable “T2” and the detection signals “X2” and “X3”. The variable “T2” depends on the detection signal “X3”. In this case, according to the address information table 141 in the example of FIG. 5, the address information of the detection signal “X2” is “60”, and the address information of the detection signal “X3” and the control signal “Y2” are both “70”. It is. Therefore, in this case, the dividing
The dividing
分割部15は、このように判断した連携要否に基づいて分割プログラムの実行主体を決定する。例えば、連携要否が図7の例の依存性テーブル143のように判定された場合、分割部15は、連携が“必要”な分割プログラムの実行主体をサーバ50に決定する。この場合の分割プログラムは、ソースコード100−2に基づいて生成された制御プログラムである。また、分割部15は、連携が“不要”な分割プログラムの実行主体を通信装置40−1に決定する。この場合の分割プログラムは、ソースコード100−1に基づいて生成された制御プログラムである。分割部15は、このように決定された分割プログラムの実行主体と、分割ソースコードとの対応を示す情報(以下、「対応情報」という。)を記憶部14に保存する。例えば、図9の例のようにソースコード100が分割された場合、分割部15は、図10の例のような対応情報テーブル145として対応情報を保存する。このような対応情報を記憶しておくことにより、制御プログラム分割装置1は、制御プログラムを複数の装置で自動的に並列実行させることができる。
The dividing
続いて、分割プログラム出力部16は、分割部15によって分割された各分割ソースコードのファイル名を決定し、決定したファイル名で各分割ソースコードをファイル出力する。例えば、分割プログラム出力部16は、分割元のソースコードのプログラム名(図4の例では“POU0”)と、各分割ソースコードにより生成される制御信号の変数名とを組み合わせて、各分割ソースコードのファイル名を決定する。例えば、ソースコード100−1のファイル名を決定する場合、分割プログラム出力部16は、依存性テーブル143を参照し、制御信号の変数名“Y1”を取得する(ステップS106)。分割プログラム出力部16は、分割元のソースコード名“POU0”と制御信号の変数名“Y1”とを組み合わせ、例えば、“POU0_Y1”というファイル名をソースコード100−1のファイル名として決定する(ステップS107)。分割プログラム出力部16は、決定した“POU0_Y1”というファイル名でソースコード100−1をテキスト出力する(ステップS108)。同様に、分割プログラム出力部16は、ソースコード100−2を、“POU0_Y2”というファイル名でテキスト出力する。
Subsequently, the divided
分割プログラム出力部16がこのようなファイル出力を行うことにより、分割ソースコードのファイル名から、その分割ソースコードがどの制御信号を生成するソースコードであるかを判断することが可能となる。
When the divided
このように構成された第1の実施形態の制御プログラム分割装置1は、制御処理を、1台の通信装置40で実行可能な制御処理と、複数台の通信装置40とで連携して実行する制御処理とに分類して制御プログラムを分割する。このように制御プログラムを分割すれば、1台の通信装置40で実行可能な制御処理を通信装置40に実行させ、複数台の通信装置40が連携して実行する制御処理をサーバ50に実行させることができる。このような制御プログラムの分割により、クラウド制御システムは、制御処理における通信量の増大を抑制しつつ、制御プログラムを並列処理することが可能となる。
The control
以下、第1の実施形態の制御プログラム分割装置1の変形例について説明する。
Hereinafter, modified examples of the control
制御プログラム分割装置1が備える機能部は、通信装置40及びサーバ50を含む制御処理が実行可能ないずれかの制御装置に実装されてもよい。この場合、これらの機能部は、制御装置が制御プログラムを実行する前に動作するプリコンパイラとして構成されてもよい。
The functional units included in the control
上記の実施形態では、制御プログラムのプログラミング言語に、国際規格IEC61131−3に準拠するプログラミング言語を想定しているが、制御プログラムのプログラミング言語は、上記の字句解析や構文解析と同等の解析が可能であれば、他のどのようなプログラミング言語であってもよい。例えば、上記規格が拡張された国際規格IEC61499に準拠するものであってもよいし、CやCOBOL、FORTRANなどの高級言語であっても良い。 In the above embodiment, the programming language of the control program is assumed to be a programming language compliant with the international standard IEC61131-3. However, the programming language of the control program can be equivalent to the above lexical analysis and syntax analysis. Any other programming language can be used. For example, it may be based on the international standard IEC61499, which is an extension of the above standard, or may be a high-level language such as C, COBOL, or FORTRAN.
ソースコード内にどの程度の数の入出力信号があるかは、ソースコードの読み込みが完了するまで不明である。そのため、構文解析部13が解析結果を出力する各種テーブルは、動的にレコードを追加することが可能なテーブルであってもよい。
It is unknown how many input / output signals are present in the source code until the reading of the source code is completed. Therefore, the various tables from which the
分割部15は、ソースコードを分割する際、ツリー情報144に基づいて、ツリー構造が示す従属関係に対応する位置にトークンが表示されるように、トークンの出力を調整してもよい。例えば、分割部15は、分割ソースコードに、ツリー構造に対応するインデントを設定してもよい。分割部15がインデントを設定した分割ソースコードを出力することにより、ユーザは視認性のよい分割ソースコードを取得することができる。
When dividing the source code, the dividing
(第2の実施形態)
図11は、第2の実施形態の制御プログラム分割装置1aの機能構成を示す機能ブロック図である。
第2の実施形態の制御プログラム分割装置1aは、コンパイラ17をさらに備える点で、第1の実施形態の制御プログラム分割装置1と異なる。コンパイラ17以外の制御プログラム分割装置1aの各機能部は、制御プログラム分割装置1と同様である。そのため、図11では、コンパイラ17以外の各機能部については、図1と同じ符号を付すことにより説明を省略する。
(Second Embodiment)
FIG. 11 is a functional block diagram showing a functional configuration of the control
The control
コンパイラ17(コンパイル部)は、ソースコードから実行モジュールを生成するコンパイラである。コンパイラ17は、分割プログラム出力部16から分割ソースコードのファイルを取得する。コンパイラ17は、取得した分割ソースコードをコンパイルし、分割プログラムを生成する。なお、コンパイラ17は、gccやg++、cc、MinGWなどのコンパイラであってもよいし、組み込み機器専用のコンパイラであってもよい。
The compiler 17 (compile unit) is a compiler that generates an execution module from source code. The
以下、第2の実施形態の制御プログラム分割装置1aの変形例について説明する。
Hereinafter, modified examples of the control
[第1の変形例]
通信装置40とサーバ50とが同じOS(Operating System:オペレーティングシステム)やCPUで動作する場合、制御プログラム分割装置1aは、その環境に対応したコンパイラ17を備えればよいが、通信装置40とサーバ50とが異なるOSやCPUで動作する場合や、複数の通信装置40の間でOSやCPUが異なる場合、それら複数の環境に対応したコンパイラ17が必要になる。このような場合、制御プログラム分割装置1aは、複数の環境に対応するコンパイラ17を備えてもよい。
[First Modification]
When the communication device 40 and the
図12は、変形例の制御プログラム分割装置1bの機能構成を示す機能ブロック図である。
変形例の制御プログラム分割装置1bは、環境判別部171及びコンパイラ切り替え部172をさらに備える点で、第2の実施形態の制御プログラム分割装置1aと異なる。
環境判別部171は、通信装置40及びサーバ50からOSの種別やCPUの種別などのシステム環境を示すシステム情報を取得する。環境判別部171は、システム情報に基づいて、制御プログラムを実行主体となる通信装置40又はサーバ50のシステム環境を判別する。環境判別部171は、判別結果をコンパイラ切り替え部172に通知する。
FIG. 12 is a functional block diagram illustrating a functional configuration of a control
The control
The
コンパイラ切り替え部172(コンパイラ制御部)は、環境判別部171から通知された判別結果に基づいて、コンパイラ17を、制御プログラムの実行主体のシステム環境に対応したコンパイラに変更する。
The compiler switching unit 172 (compiler control unit) changes the
[第2の変形例]
一般に、コンパイラには、OSの種別やCPUの種別に応じて実行モジュールを最適化するコンパイラオプションが用意されている。そのため、変形例の制御プログラム分割装置1bは、OSの種別やCPUの種別に応じてコンパイラオプションを切り換えるように構成されてもよい。
[Second Modification]
In general, a compiler has a compiler option for optimizing an execution module according to the type of OS or the type of CPU. Therefore, the modified control
図13は、変形例の制御プログラム分割装置1cの機能構成を示す機能ブロック図である。
変形例の制御プログラム分割装置1cは、環境判別部171に代えて環境判別部171cを備える点、コンパイラオプション切り替え部173をさらに備える点で、変形例の制御プログラム分割装置1bと異なる。
環境判別部171cは、システム環境の判別結果を、コンパイラ切り替え部172及びコンパイラオプション切り替え部173に通知する。
FIG. 13 is a functional block diagram illustrating a functional configuration of a control
The modified control
The
コンパイラオプション切り替え部173(コンパイラ制御部)は、環境判別部171cから通知された判別結果に基づいて、コンパイラ17のコンパイラオプションを、制御プログラムの実行主体のシステム環境に対応したコンパイラオプションに変更する。
The compiler option switching unit 173 (compiler control unit) changes the compiler option of the
例えば、コンパイラオプション切り替え部173は、システム環境の判別結果に基づいて、CPUの種別を指定するオプションや、浮動小数点レジスタを使用しないオプションを自動的に追加するように構成されてもよい。また、コンパイラオプション切り替え部173は、CPUの種別に応じてエンディアンを切り替えるオプションを追加してもよい。また、コンパイラオプション切り替え部173は、性能が低いCPUに対しては実行速度を優先し、メモリキャッシュの少ないCPUに対してはファイルサイズを優先するように、実行モジュールを最適化するオプションを追加してもよい。なお、上述したコンパイラの切り替えやコンパイラオプションの切り替えは一例を示したものであり、実施形態の校正をここに示す範囲に限定するものではない。このような、コンパイラの切り替えやコンパイラオプションの切り替えは、一般的に使用可能な他のコンパイラやコンパイラオプションの切り替えに適用されてもよい。
For example, the compiler
このようなコンパイラの切り替えやコンパイラオプションの切り替えを行うことによって、制御プログラム分割装置1cは、制御プログラムの実行主体となる装置の様々なアーキテクチャに対応した制御プログラムを生成することが可能となる。
By performing such switching of compilers and switching of compiler options, the control
以上説明した少なくともひとつの実施形態によれば、制御プログラムのソースコードからトークンを抽出する字句解析部と、抽出されたトークンの構文を解析し、ソースコードの意味を示す構文情報を生成する構文解析部と、構文情報とソースコードとに基づいて、個々の制御信号を生成する複数の分割ソースコードを生成する分割部と、入力信号の依存関係に基づいて、制御プログラムの実行主体を判定する実行主体判定部と、を持つことにより、通信量の増大を抑制しつつ制御プログラムの並列処理を可能にすることができる。 According to at least one embodiment described above, a lexical analyzer that extracts a token from the source code of the control program, and a syntax analyzer that analyzes the syntax of the extracted token and generates syntax information indicating the meaning of the source code A division unit for generating a plurality of divided source codes for generating individual control signals based on the syntax information and the source code, and execution for determining the execution subject of the control program based on the dependency relationship of the input signals By having the subject determination unit, it is possible to enable parallel processing of control programs while suppressing an increase in communication volume.
本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれると同様に、特許請求の範囲に記載された発明とその均等の範囲に含まれるものである。 Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and gist of the invention, and are also included in the invention described in the claims and the equivalents thereof.
1、1a、1b、1c…制御プログラム分割装置,10…クラウド制御システム,11…入力部,12…字句解析部,13…構文解析部,14…記憶部,141…アドレス情報テーブル,142…入出力信号テーブル,143…依存性テーブル,144…ツリー情報,1441〜1444…トークン,145…対応情報テーブル,15…分割部,16…分割プログラム出力部,17…コンパイラ,171、171c…環境判別部,172…コンパイラ切り替え部,173…コンパイラオプション切り替え部,20、20−1〜20−3…検知装置,30、30−1、30−2…被制御装置,40、40−1、40−2…通信装置,50…サーバ,60…広域ネットワーク,100、100−1、100−2…ソースコード,110、111、112、113…宣言部,120…命令部
DESCRIPTION OF
Claims (11)
前記字句解析部によって抽出されたトークンの構文を解析し、前記ソースコードの意味を示す構文情報を生成する構文解析部と、
前記構文解析部によって生成された構文情報と前記ソースコードとに基づいて、前記制御信号を生成する複数の分割ソースコードを生成する分割部と、
前記分割ソースコードから生成される制御プログラムが実行された際の入力となる入力信号の依存関係に基づいて、前記制御プログラムの実行主体を判定する実行主体判定部と、
を備える制御プログラム分割装置。 Control for generating a plurality of control signals for controlling the device based on a detection signal including any one of environment information indicating information about an environment in which the device to be controlled is installed and state information indicating the state of the device A lexical analyzer that extracts a token, which is a character string of the smallest unit having meaning in the source code, from the source code of a control program that realizes processing;
Analyzing the syntax of the token extracted by the lexical analyzer, and generating syntax information indicating the meaning of the source code;
A dividing unit that generates a plurality of divided source codes that generate the control signal based on the syntax information generated by the syntax analysis unit and the source code;
An execution subject determination unit that determines an execution subject of the control program based on a dependency of an input signal that becomes an input when the control program generated from the divided source code is executed;
A control program dividing device comprising:
前記分割部は、前記依存性情報に基づいて、前記ツリー情報から各制御信号の生成に必要なトークンを抽出することで、前記分割ソースコードを生成する、
請求項1に記載の制御プログラム分割装置。 The syntax analysis unit generates syntax information including tree information indicating a tree structure of the token and dependency information indicating a dependency relationship between an input signal of the source code and another signal;
The dividing unit generates the divided source code by extracting a token necessary for generating each control signal from the tree information based on the dependency information.
The control program dividing device according to claim 1.
請求項2に記載の制御プログラム分割装置。 The division unit generates the divided source code so that a token included in the divided source code is displayed at a position corresponding to the tree structure when the divided source code is displayed.
The control program dividing device according to claim 2.
請求項1から3のいずれか一項に記載の制御プログラム分割装置。 The execution subject determination unit determines that the device is an execution subject of the divided source code when the dependency of the input signal of the divided source code is a relationship closed to one device, and the input signal of the divided source code If the dependency relationship is related to a plurality of devices, another device that can communicate with the plurality of devices is determined as an execution subject of the divided source code.
The control program dividing device according to any one of claims 1 to 3.
請求項1から4のいずれか一項に記載の制御プログラム分割装置。 Based on the identification information of the control signal generated by the division program and the identification information of the source code before the division, the file name of each division source code is determined, and each division source code is determined by the decided file name. A split program output unit for outputting a file;
The control program dividing device according to any one of claims 1 to 4.
請求項1から5のいずれか一項に記載の制御プログラム分割装置。 A compiling unit that compiles the divided source code and generates an executable control program;
The control program dividing device according to any one of claims 1 to 5.
制御プログラムの実行主体となる装置のオペレーティングシステム又はCPUに関する情報に基づいて、前記コンパイル部が使用するコンパイラを、制御プログラムの実行主体となる装置のオペレーティングシステム又はCPUに応じたコンパイラに切り替えるコンパイラ制御部をさらに備える、
請求項6に記載の制御プログラム分割装置。 The compiling unit has a plurality of compilers according to the type of the operating system or CPU of the device that is the execution subject of the control program,
A compiler control unit that switches a compiler used by the compiling unit to a compiler corresponding to the operating system or CPU of the device that is the execution body of the control program, based on information about the operating system or CPU of the device that is the execution body of the control program Further comprising
The control program dividing device according to claim 6.
請求項7に記載の制御プログラム分割装置。 The compiler control unit determines the compiler option of the compiler used by the compiling unit based on the information related to the operating system or CPU of the device that is the execution subject of the control program, and the operating system or CPU of the device that is the execution subject of the control program. Switch to the appropriate compiler option,
The control program dividing device according to claim 7.
前記字句解析ステップにおいて抽出されたトークンの構文を解析し、前記ソースコードの意味を示す構文情報を生成する構文解析ステップと、
前記構文解析ステップにおいて生成された構文情報と前記ソースコードとに基づいて、前記制御信号を生成する複数の分割ソースコードを生成する分割ステップと、
前記分割ソースコードから生成される制御プログラムが実行された際の入力となる入力信号の依存関係に基づいて、前記制御プログラムの実行主体を判定する実行主体判定ステップと、
を有する制御プログラム分割方法。 Control for generating a plurality of control signals for controlling the device based on a detection signal including any one of environment information indicating information about an environment in which the device to be controlled is installed and state information indicating the state of the device A lexical analysis step for extracting a token, which is a character string of the smallest unit having meaning in the source code, from the source code of a control program that realizes processing;
Analyzing the syntax of the token extracted in the lexical analysis step and generating syntax information indicating the meaning of the source code;
A dividing step of generating a plurality of divided source codes for generating the control signal based on the syntax information generated in the parsing step and the source code;
An execution subject determination step of determining an execution subject of the control program based on a dependency relationship of an input signal that becomes an input when the control program generated from the divided source code is executed;
A control program dividing method comprising:
前記字句解析ステップにおいて抽出されたトークンの構文を解析し、前記ソースコードの意味を示す構文情報を生成する構文解析ステップと、
前記構文解析ステップにおいて生成された構文情報と前記ソースコードとに基づいて、前記制御信号を生成する複数の分割ソースコードを生成する分割ステップと、
前記分割ソースコードから生成される制御プログラムが実行された際の入力となる入力信号の依存関係に基づいて、前記制御プログラムの実行主体を判定する実行主体判定ステップと、
をコンピュータに実行させるためのコンピュータプログラム。 Control for generating a plurality of control signals for controlling the device based on a detection signal including any one of environment information indicating information about an environment in which the device to be controlled is installed and state information indicating the state of the device A lexical analysis step for extracting a token, which is a character string of the smallest unit having meaning in the source code, from the source code of a control program that realizes processing;
Analyzing the syntax of the token extracted in the lexical analysis step and generating syntax information indicating the meaning of the source code;
A dividing step of generating a plurality of divided source codes for generating the control signal based on the syntax information generated in the parsing step and the source code;
An execution subject determination step of determining an execution subject of the control program based on a dependency relationship of an input signal that becomes an input when the control program generated from the divided source code is executed;
A computer program for causing a computer to execute.
前記字句解析ステップにおいて抽出されたトークンの構文を解析し、前記ソースコードの意味を示す構文情報を生成する構文解析ステップと、
前記構文解析ステップにおいて生成された構文情報と前記ソースコードとに基づいて、前記制御信号を生成する複数の分割ソースコードを生成する分割ステップと、
を有する分割ソースコードの生産方法。 Control for generating a plurality of control signals for controlling the device based on a detection signal including any one of environment information indicating information about an environment in which the device to be controlled is installed and state information indicating the state of the device A lexical analysis step for extracting a token, which is a character string of the smallest unit having meaning in the source code, from the source code of a control program that realizes processing;
Analyzing the syntax of the token extracted in the lexical analysis step and generating syntax information indicating the meaning of the source code;
A dividing step of generating a plurality of divided source codes for generating the control signal based on the syntax information generated in the parsing step and the source code;
A method for producing divided source code.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015051051A JP6404751B2 (en) | 2015-03-13 | 2015-03-13 | Control program dividing apparatus, control program dividing method, and computer program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015051051A JP6404751B2 (en) | 2015-03-13 | 2015-03-13 | Control program dividing apparatus, control program dividing method, and computer program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016170707A true JP2016170707A (en) | 2016-09-23 |
JP6404751B2 JP6404751B2 (en) | 2018-10-17 |
Family
ID=56983874
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015051051A Active JP6404751B2 (en) | 2015-03-13 | 2015-03-13 | Control program dividing apparatus, control program dividing method, and computer program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6404751B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6452904B1 (en) * | 2017-12-25 | 2019-01-16 | 三菱電機株式会社 | Design support apparatus, design support method, and program |
KR20200086093A (en) * | 2019-01-08 | 2020-07-16 | 국방과학연구소 | Apparatus and method for analyzing source code of concurrent program and computer readible storage medium therefor |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010528361A (en) * | 2007-05-22 | 2010-08-19 | コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ | Compiler and compiling method for network control system having a plurality of devices |
JP2015035174A (en) * | 2013-08-09 | 2015-02-19 | 株式会社東芝 | Control program division device, control program division method, and recording medium therefor |
-
2015
- 2015-03-13 JP JP2015051051A patent/JP6404751B2/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010528361A (en) * | 2007-05-22 | 2010-08-19 | コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ | Compiler and compiling method for network control system having a plurality of devices |
JP2015035174A (en) * | 2013-08-09 | 2015-02-19 | 株式会社東芝 | Control program division device, control program division method, and recording medium therefor |
Non-Patent Citations (1)
Title |
---|
高仲 徹 外2名: "「ネットワークを介したリアルタイム制御システムのための動的負荷平準化手法の開発」", 電気学会研究会資料 通信研究会, vol. CMN-14-001〜007・009〜015, JPN6018004683, 23 January 2014 (2014-01-23), pages 43 - 46 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6452904B1 (en) * | 2017-12-25 | 2019-01-16 | 三菱電機株式会社 | Design support apparatus, design support method, and program |
WO2019130396A1 (en) * | 2017-12-25 | 2019-07-04 | 三菱電機株式会社 | Design assistance device, design assistance method and program |
KR20200081502A (en) * | 2017-12-25 | 2020-07-07 | 미쓰비시덴키 가부시키가이샤 | Design support devices, design support methods, and programs stored on recording media |
CN111512285A (en) * | 2017-12-25 | 2020-08-07 | 三菱电机株式会社 | Design support device, design support method, and program |
KR102213046B1 (en) * | 2017-12-25 | 2021-02-05 | 미쓰비시덴키 가부시키가이샤 | Design support device, design support method, and program stored on a recording medium |
US10977032B2 (en) | 2017-12-25 | 2021-04-13 | Mitsubishi Electric Corporation | Assistance device, design assistance method and program |
KR20200086093A (en) * | 2019-01-08 | 2020-07-16 | 국방과학연구소 | Apparatus and method for analyzing source code of concurrent program and computer readible storage medium therefor |
KR102185294B1 (en) | 2019-01-08 | 2020-12-01 | 국방과학연구소 | Apparatus and method for analyzing source code of concurrent program and computer readible storage medium therefor |
Also Published As
Publication number | Publication date |
---|---|
JP6404751B2 (en) | 2018-10-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9916145B2 (en) | Utilizing special purpose elements to implement a FSM | |
JP5763783B2 (en) | Method and apparatus for compiling regular expressions | |
ES2635437T3 (en) | Method and system to generate an analyzer and analysis of complex data | |
JP5857072B2 (en) | Expansion of quantifiers to control the order of entry and / or exit of automata | |
US7739696B2 (en) | Message translation systems and methods | |
US10613844B2 (en) | Using comments of a program to provide optimizations | |
JP2014506693A5 (en) | ||
US11029924B2 (en) | Program optimization by converting code portions to directly reference internal data representations | |
US9477451B1 (en) | Generating dynamic measurement metadata for efficient compilation and optimization on a target device | |
US20160048376A1 (en) | Portable binary image format (pbif) for pre-compiled kernels | |
JP6404751B2 (en) | Control program dividing apparatus, control program dividing method, and computer program | |
CN110457065B (en) | Method and apparatus for obtaining applications compatible with multi-version systems | |
US11036527B2 (en) | Class splitting in object-oriented environments | |
US10169008B2 (en) | Information processing device and compilation method | |
CN112269566B (en) | Script generation processing method, device, equipment and system | |
US10275228B2 (en) | Relaxing user-specified register constraints for improving register allocation | |
KR102117165B1 (en) | Method and apparatus for testing intermediate language for binary analysis | |
US20220269490A1 (en) | Feature estimating device, feature estimating method and computer-readable medium | |
CN107562430B (en) | Compiling method for file processing function of mobile pi-calculus language | |
KR101691600B1 (en) | Program Analysis Method Based on Common Structure Transformation and Apparatus Therefor | |
JP2015035174A (en) | Control program division device, control program division method, and recording medium therefor | |
US10572233B2 (en) | Vectorization device, vectorization method, and recording medium on which vectorization program is stored | |
US20130318509A1 (en) | Generating object code from a conjoined assembler directive | |
US9772825B2 (en) | Program structure-based blocking | |
KR20200061280A (en) | Method for Static Analysis based on Data Dependence on Data Plane Towards Network Switch Parallelization, and Parallelization Apparatus using the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170321 |
|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20170911 Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20170911 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180129 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180213 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180416 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20180814 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180913 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6404751 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |