[go: up one dir, main page]

JP2005346660A - Source code management server and source code management program - Google Patents

Source code management server and source code management program Download PDF

Info

Publication number
JP2005346660A
JP2005346660A JP2004169008A JP2004169008A JP2005346660A JP 2005346660 A JP2005346660 A JP 2005346660A JP 2004169008 A JP2004169008 A JP 2004169008A JP 2004169008 A JP2004169008 A JP 2004169008A JP 2005346660 A JP2005346660 A JP 2005346660A
Authority
JP
Japan
Prior art keywords
source code
syntax tree
coding
code management
block
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
JP2004169008A
Other languages
Japanese (ja)
Inventor
Hiroyuki Tsuji
宏幸 辻
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.)
NTT Docomo Inc
Original Assignee
NTT Docomo 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 NTT Docomo Inc filed Critical NTT Docomo Inc
Priority to JP2004169008A priority Critical patent/JP2005346660A/en
Publication of JP2005346660A publication Critical patent/JP2005346660A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

【課題】効率的にソースコードの変更管理を行うソースコード管理サーバを提供する。
【解決手段】ソースコード管理サーバ1は、クライアント端末機から受信したソースコードファイルを構文解析し、構文ツリーに分解する構文解析手段12と、構文ツリーの要素毎に、ソースコードファイルの前のバージョンにおけるソースコードファイルとの変更差分を抽出するリポジトリ編集手段13と、変更差分を保持するリポジトリ情報保持部20とを備える。
【選択図】図1
A source code management server for efficiently managing source code changes is provided.
A source code management server 1 parses a source code file received from a client terminal and decomposes it into a syntax tree, and a previous version of the source code file for each element of the syntax tree. A repository editing unit 13 for extracting a change difference from the source code file and a repository information holding unit 20 for holding the change difference.
[Selection] Figure 1

Description

本発明は、ソースコード管理サーバ及びソースコード管理プログラムに関する。   The present invention relates to a source code management server and a source code management program.

従来、ソースコードの変更履歴管理システムとして、マイクロソフト社のVisual SourceSafeや、フリーソフトウェアのCVSなどが知られている。これらは、修正前のソースコードの情報と、それに対する変更差分情報をリポジトリと呼ばれるデータベースに蓄え、バージョン単位に修正のあった行を表示することができる(例えば、特許文献1参照)。   Conventionally, Visual SourceSafe of Microsoft Corporation and CVS of free software are known as source code change history management systems. These store the information of the source code before correction and the change difference information corresponding to the information in a database called a repository, and can display the corrected line for each version (see, for example, Patent Document 1).

しかし、複数のファイルにわたって修正があった場合、従来の製品では、ファイル単位でしか差分を管理していなかったため、複数ファイルに対する修正を関連付けることができなかった。これに対し、BitKeeper、Perfoce、Subversionなどの製品では、複数のファイルに対する修正を個々に処理できるため、不整合が発生しない。
特開平2−79121号公報
However, when corrections are made across a plurality of files, the conventional products manage the differences only on a file basis, and thus it is not possible to associate the corrections on the plurality of files. On the other hand, products such as BitKeeper, Perfoce, and Subversion can process modifications to multiple files individually, so there is no inconsistency.
JP-A-2-79121

しかしながら、上述した改良技術においても、依然として問題が残っており、例えば、バイナリ単位に差分情報を収集しているため、スペースや改行の挿入といった実際の修正には関係のない変更まで感知してしまう。即ち、図9に示すように、スペースや改行を挿入した箇所も修正があった箇所と認識し、反転して表示(図9の斜線部分)することが行われている。このような表示(ノイズ)が多くなれば、変更点を管理する作業者の効率が低下してしまう。   However, there are still problems with the above-described improved technology. For example, since difference information is collected in binary units, changes that are not related to actual correction such as insertion of spaces or line breaks are detected. . That is, as shown in FIG. 9, a place where a space or a line feed is inserted is also recognized as a corrected place, and is displayed inverted (the hatched portion in FIG. 9). If the number of such displays (noise) increases, the efficiency of the operator who manages the change point decreases.

又、上述した改良技術では、複数のファイルに対する変更を関連付けて管理できる。このため、後のバージョンアップ時に、前回修正を施した箇所に対し、修正時の影響範囲を調査する際、前バージョンの修正時に関連付けたファイルを網羅的に調査することで修正漏れを防ぐことができる。しかし、修正が複数回によって行われた場合は、すべての修正を関連付けすることができないため、影響範囲を調査する際、修正漏れが発生する危険性がある。例えば、図10(a)に示すように、修正Aを行ったとする。修正Aは、ファイル1、2、3のあるブロックに対する修正であり、これらの修正はお互いに依存関係にある。このため、ファイル1を再度修正する際は、ファイル2、ファイル3への影響を調査する必要がある。しかし、図10(b)、(c)に示すように、修正A1、修正A2が行われた場合、複数回の修正を関連付けることはできないので、将来、ファイル1に対して修正が必要となったとき、ファイル2への影響調査が必要なことに気が付かないことがある。   Also, with the improved technology described above, changes to a plurality of files can be associated and managed. For this reason, when investigating the scope of impact at the time of revision of the previous revision at the time of a later version upgrade, it is possible to prevent omissions by comprehensively examining the files associated with the revision of the previous version. it can. However, when corrections are made more than once, not all corrections can be associated with each other, so there is a risk of omission of correction when investigating the influence range. For example, it is assumed that correction A is performed as shown in FIG. The correction A is a correction to a certain block of the files 1, 2, and 3, and these corrections are dependent on each other. For this reason, when the file 1 is corrected again, it is necessary to investigate the influence on the files 2 and 3. However, as shown in FIGS. 10B and 10C, when the correction A1 and the correction A2 are performed, a plurality of corrections cannot be associated with each other, so that the file 1 needs to be corrected in the future. You may not realize that you need to investigate the impact on File 2.

更に、従来のソースコート管理システムでは、ソースコードの本質ではないコーディングスタイルについても管理している。このため、ソースコード管理システムを複数のメーカー、開発者で共用しようとした場合、図11(a)及び図11(b)に示すように、各社、個人により、改行の位置、スペースの数、タブの文字数、コメントの位置など、コーディングスタイルの違いに戸惑うことがある。   Furthermore, the conventional source code management system manages a coding style that is not the essence of the source code. For this reason, when the source code management system is to be shared by a plurality of manufacturers and developers, as shown in FIGS. 11A and 11B, the position of the line break, the number of spaces, You may be confused by differences in coding style, such as the number of characters in tabs and the position of comments.

そこで、上記の課題に鑑み、本発明は、効率的にソースコードの変更管理を行うソースコード管理サーバ及びソースコード管理プログラムを提供することを目的とする。   In view of the above problems, an object of the present invention is to provide a source code management server and a source code management program for efficiently managing source code changes.

上記目的を達成するため、本発明の第1の特徴は、(イ)クライアント端末機から受信したソースコードファイルを構文解析し、構文ツリーに分解する構文解析手段と、(ロ)構文ツリーの要素毎に、ソースコードファイルの前のバージョンにおけるソースコードファイルとの変更差分を抽出するリポジトリ編集手段と、(ハ)変更差分を保持するリポジトリ情報保持部とを備えるソースコード管理サーバであることを要旨とする。ここで、「構文」とは、if文やfor文など論理的意味を有する単位を指し、「構文ツリー」とは、これら構文をツリー形状にしたものをいう。   In order to achieve the above object, the first feature of the present invention is: (a) a syntax analysis means for parsing a source code file received from a client terminal and decomposing it into a syntax tree; and (b) elements of the syntax tree. It is a source code management server that includes a repository editing unit that extracts a change difference from a source code file in a previous version of the source code file and (c) a repository information holding unit that holds the change difference. And Here, “syntax” refers to a unit having a logical meaning, such as an if statement or a for statement, and “syntax tree” refers to a tree shape of these syntaxes.

第1の特徴に係るソースコード管理サーバによると、構文ツリー毎に変更差分を管理することにより、効率的にソースコードの変更管理を行うことができる。   According to the source code management server according to the first feature, by managing the change difference for each syntax tree, it is possible to efficiently manage the change of the source code.

又、第1の特徴に係るソースコード管理サーバの構文解析手段は、構文ツリーを各言語の最小要素毎に分解してもよい。ここで、「最小要素」とは、ソースコードの一文を指し、例えば、;までを一文として扱う。このソースコード管理サーバによると、スペースや改行といった実際の修正とは意味のない変更があった場合、これらを表示することがなく(ノイズの除去)、変更点を管理する作業者の効率を向上することができる。   Further, the syntax analysis means of the source code management server according to the first feature may decompose the syntax tree for each minimum element of each language. Here, the “minimum element” refers to one sentence of the source code, for example, up to; is treated as one sentence. According to this source code management server, if there are changes that do not make sense such as spaces and line breaks, they are not displayed (removal of noise), improving the efficiency of workers who manage the changes. can do.

又、第1の特徴に係るソースコード管理サーバは、(ニ)構文ツリーで表されたブロック毎に、当該ブロックを修正した際に影響が出る他のブロックを関連付ける修正ブロック管理手段と、(ホ)修正ブロック管理手段によって関連付けられたブロック毎の関連情報を保持する修正ブロック情報保持部とを更に備えてもよい。このソースコード管理サーバによると、ソースコードの修正時に、影響範囲が確認しやすくなるため、修正漏れ等のミスを低減することができる。   In addition, the source code management server according to the first feature includes (d) a correction block management means for associating each block represented by the syntax tree with another block that is affected when the block is corrected. ) A correction block information holding unit for holding related information for each block associated by the correction block management means may be further provided. According to the source code management server, it is easy to confirm the affected range when the source code is corrected, and errors such as omission of correction can be reduced.

又、第1の特徴に係るソースコード管理サーバは、(へ)コーディング規約と所定のコーディングスタイルとを含むコーディング情報を保持するコーディング情報保持部と、(ト)コーディング情報に基づいて、構文ツリーに対してコーディングスタイルを調整し、構文ツリーをソースコードファイル形式に成型するフォーマット調整手段とを更に備えてもよい。このソースコード管理サーバによると、異なるコーディング規約、コーディングスタイルを吸収し、複数のメーカー、開発者間で、ソースコードの共用が可能となる。   The source code management server according to the first feature includes: (f) a coding information holding unit that holds coding information including a coding rule and a predetermined coding style; and (g) a syntax tree based on the coding information. It may further comprise format adjusting means for adjusting the coding style for the syntax tree and forming the syntax tree into a source code file format. According to this source code management server, different coding standards and coding styles are absorbed, and the source code can be shared among a plurality of manufacturers and developers.

本発明の第2の特徴は、ソースコード管理サーバに、(イ)クライアント端末機から受信したソースコードファイルを構文解析し、構文ツリーに分解する手順と、(ロ)構文ツリーの要素毎に、ソースコードファイルの前のバージョンにおけるソースコードファイルとの変更差分を抽出する手順とを実行させるソースコード管理プログラムであることを要旨とする。   The second feature of the present invention is that the source code management server (b) parses the source code file received from the client terminal and decomposes it into a syntax tree, and (b) for each element of the syntax tree, The gist of the present invention is a source code management program that executes a procedure for extracting a change difference from a source code file in a previous version of a source code file.

又、第2の特徴に係るソースコード管理プログラムは、(ハ)構文ツリーで表されたブロック毎に、当該ブロックを修正した際に影響が出る他のブロックを関連付ける手順と、(ニ)当該関連付けられたブロック毎の関連情報を保持する手順とを更に実行させてもよい。   In addition, the source code management program according to the second feature includes (c) a procedure for associating each block represented by the syntax tree with another block that affects when the block is modified, and (d) the association. And a procedure for holding related information for each block may be further executed.

又、第2の特徴に係るソースコード管理プログラムは、(ホ)コーディング規約と所定のコーディングスタイルとを含むコーディング情報を保持する手順と、(へ)コーディング情報に基づいて、構文ツリーに対してコーディングスタイルを調整し、構文ツリーをソースコードファイル形式に成型する手順とを更に実行させてもよい。   The source code management program according to the second feature includes (e) a procedure for holding coding information including a coding rule and a predetermined coding style, and (f) coding on a syntax tree based on the coding information. The procedure of adjusting the style and shaping the syntax tree into a source code file format may be further executed.

このソースコード管理プログラムを読み出すことにより、ソースコード管理サーバなどに上記の手順を実行させることができる。   By reading out the source code management program, the source code management server or the like can execute the above procedure.

本発明によると、効率的なソースコードの変更管理を行うソースコード管理サーバ及びソースコード管理プログラムを提供することができる。   According to the present invention, it is possible to provide a source code management server and a source code management program that perform efficient source code change management.

次に、図面を参照して、本発明の実施の形態を説明する。以下の図面の記載において、同一または類似の部分には、同一または類似の符号を付している。ただし、図面は模式的なものであることに留意すべきである。   Next, embodiments of the present invention will be described with reference to the drawings. In the following description of the drawings, the same or similar parts are denoted by the same or similar reference numerals. However, it should be noted that the drawings are schematic.

本発明の実施の形態では、ソースコードを論理的な構成ツリーとして分解し、構成ブロック毎に差分管理を行うソースコード管理サーバ、ソースコード管理方法及びソースコード管理プログラムについて説明する。   In the embodiment of the present invention, a source code management server, a source code management method, and a source code management program for decomposing source code as a logical configuration tree and managing difference for each configuration block will be described.

(ソースコード管理サーバ)
本発明の実施の形態に係るソースコード管理システムは、図1に示すように、ソースコード管理サーバ1と、複数のクライアント端末機30a、30b、30cとを備える。ソースコード管理サーバ1と、クライアント端末機機30a、30b、30cとは、通信ネットワーク(インターネット、無線LANなど)を介して接続される。尚、接続方法は有線でも無線でも構わない。
(Source code management server)
As shown in FIG. 1, the source code management system according to the embodiment of the present invention includes a source code management server 1 and a plurality of client terminals 30a, 30b, and 30c. The source code management server 1 and the client terminals 30a, 30b, 30c are connected via a communication network (Internet, wireless LAN, etc.). The connection method may be wired or wireless.

クライアント端末機30a、30b、30cは、ソースコードの修正を行う端末装置であり、具体的には、パーソナルコンピュータ(PC)、ノートパソコン、携帯電話などが挙げられる。クライアント端末機30a、30b、30cは、ソースコードファイルをソースコード管理サーバ1から受信し、修正後のソースコードファイルをソースコード管理サーバ1へ送信する。又、クライアント端末機30a、30b、30cは、必要に応じて、ソースコード管理サーバ1から受信した変更差分情報を表示する。ここで、「変更差分情報」とは、所定のバージョンのソースコードファイルとその前のバージョンのソースコードファイルとの変更箇所をいう。通常、このような変更箇所は、その他の箇所と色や背景色を変更することにより明示される。   The client terminals 30a, 30b, and 30c are terminal devices that modify the source code, and specifically include personal computers (PCs), notebook computers, mobile phones, and the like. The client terminals 30a, 30b, and 30c receive the source code file from the source code management server 1 and transmit the modified source code file to the source code management server 1. Further, the client terminals 30a, 30b, and 30c display the change difference information received from the source code management server 1 as necessary. Here, the “change difference information” refers to a change place between a source code file of a predetermined version and a source code file of a previous version. Usually, such a change part is clearly shown by changing a color and a background color with another part.

ソースコード管理サーバ1は、処理制御装置(CPU)10を備え、CPU10には、リポジトリ情報保持部20、修正ブロック情報保持部21、コーディング情報保持部22、プログラム保持部23、入力装置24、出力装置25が接続されている。又、CPU10は、通信手段11、構文解析手段12、リポジトリ編集手段13、フォーマット調整手段14、修正ブロック管理手段15等のモジュールを内蔵している。これらのモジュールは、パーソナルコンピュータ等の汎用コンピュータにおいて、所定のプログラム言語を利用するための専用プログラムを実行することにより実現することができる。   The source code management server 1 includes a processing control device (CPU) 10 that includes a repository information holding unit 20, a modified block information holding unit 21, a coding information holding unit 22, a program holding unit 23, an input device 24, and an output. A device 25 is connected. Further, the CPU 10 incorporates modules such as a communication unit 11, a syntax analysis unit 12, a repository editing unit 13, a format adjustment unit 14, and a correction block management unit 15. These modules can be realized by executing a dedicated program for using a predetermined program language in a general-purpose computer such as a personal computer.

通信手段11は、クライアント端末機30a、30b、20cへソースコードファイルを送信し、クライアント端末機30a、30b、20cから修正後のソースコードファイルを受信する。又、通信手段11は、必要に応じて、クライアント端末機30a、30b、30cへ変更差分情報を送信する。   The communication unit 11 transmits the source code file to the client terminals 30a, 30b, and 20c, and receives the corrected source code file from the client terminals 30a, 30b, and 20c. Further, the communication unit 11 transmits the change difference information to the client terminals 30a, 30b, and 30c as necessary.

構文解析手段12は、ソースコードファイルを構文解析し、図3(b)に示すように、構文ツリーに分解する。又、構文解析手段12は、図4(b)に示すように、構文ツリーを各言語の最小要素毎に分解する。   The syntax analysis means 12 parses the source code file and decomposes it into a syntax tree as shown in FIG. Further, as shown in FIG. 4B, the syntax analysis unit 12 decomposes the syntax tree for each minimum element of each language.

リポジトリ編集手段13は、構文解析手段12によって分解された構文ツリーの形状で、ソースコードファイルをリポジトリ情報保持部20に保存する。又、リポジトリ編集手段13は、構文ツリーの要素毎に、前バージョンとの変更差分を抽出し、リポジトリ情報保持部20に保存する。更に、リポジトリ編集手段13は、クライアント端末機30a、30b、30cから指定されたソースコードファイルのバージョン番号に基づいて、該当する構文ツリーをリポジトリ情報保持部20から抽出する。   The repository editing unit 13 stores the source code file in the repository information holding unit 20 in the form of the syntax tree decomposed by the syntax analysis unit 12. Further, the repository editing means 13 extracts a change difference from the previous version for each element of the syntax tree and stores it in the repository information holding unit 20. Further, the repository editing unit 13 extracts a corresponding syntax tree from the repository information holding unit 20 based on the version number of the source code file specified from the client terminals 30a, 30b, and 30c.

フォーマット調整手段14は、コーディング情報に基づいて、構文ツリーに対してコーディングスタイルを調整し、構文ツリーをソースコードファイル形式に成型する。成型されたソースコードファイルは、通信手段11によってクライアント端末機30a、30b、30cへ送信される。   The format adjusting unit 14 adjusts the coding style for the syntax tree based on the coding information, and forms the syntax tree into a source code file format. The formed source code file is transmitted to the client terminals 30a, 30b, and 30c by the communication means 11.

修正ブロック管理手段15は、構文ツリーで表されたブロック毎に、当該ブロックを修正した際に影響が出る他のブロックを関連付け、修正ブロック情報保持部21に保存する。ここで「ブロック」とは、構文ツリーで表された枝(図5に示す斜線部分など)を指す。又、「他のブロック」とは、同じソースコードファイル内に限らず、異なるソースコードファイルに存在するブロックも含む。   The corrected block management means 15 associates each block represented by the syntax tree with another block that has an influence when the block is corrected, and stores it in the corrected block information holding unit 21. Here, the “block” refers to a branch (such as a shaded portion shown in FIG. 5) represented by a syntax tree. The “other blocks” include not only the same source code file but also blocks existing in different source code files.

リポジトリ情報保持部20は、ソースコードファイルを構文ツリーの形状で、前バージョンとの変更差分を保持する。又、リポジトリ情報保持部20は、各言語の最小要素毎に分解された構文ツリーを保持してもよい。   The repository information holding unit 20 holds a source code file in the form of a syntax tree and a change difference from the previous version. Further, the repository information holding unit 20 may hold a syntax tree decomposed for each minimum element of each language.

修正ブロック情報保持部21は、修正ブロック管理手段15によって関連付けられたブロック毎の関連情報を保持する。   The corrected block information holding unit 21 holds related information for each block associated by the corrected block management unit 15.

コーディング情報保持部22は、コーディング規約と所定のコーディングスタイルとを含むコーディング情報を保持する。「コーディング規約」とは、各開発環境によって定められるコーディングのルールのことであり、「所定のコーディングスタイル」とは、ユーザの嗜好などに応じたユーザ毎に異なるコーディングスタイルである。例えば、図11に示すように、ユーザAとユーザBでは、改行の仕方など、そのコーディングスタイルが異なる。   The coding information holding unit 22 holds coding information including a coding rule and a predetermined coding style. “Coding rules” are coding rules determined by each development environment, and “predetermined coding styles” are coding styles that differ for each user according to user preferences and the like. For example, as shown in FIG. 11, user A and user B have different coding styles such as a line feed method.

プログラム保持部23は、構文解析処理、リポジトリ編集処理などをCPU10に実行させるためのソースコード管理プログラムを保持する。ソースコード管理プログラムを読み出すことにより、上述した構文解析手段12(構文解析モジュール)やリポジトリ編集手段13(リポジトリ編集モジュール)を形成することができる。プログラム保持部23は、例えば、RAM、ROM、ハードディスク、フレキシブルディスク、コンパクトディスク、ICチップ、カセットテープなどの記録媒体である。このような記録媒体によれば、ソースコード管理プログラムの保存、運搬、販売などを容易に行うことができる。   The program holding unit 23 holds a source code management program for causing the CPU 10 to execute syntax analysis processing, repository editing processing, and the like. By reading the source code management program, the above-described syntax analysis means 12 (syntax analysis module) and repository editing means 13 (repository editing module) can be formed. The program holding unit 23 is a recording medium such as a RAM, a ROM, a hard disk, a flexible disk, a compact disk, an IC chip, and a cassette tape. According to such a recording medium, the source code management program can be easily stored, transported, sold, and the like.

入力装置24は、キーボード、マウス、タッチパネル等の機器を指す。入力装置24から入力操作が行われると対応するキー情報や位置情報がCPU10に伝達される。   The input device 24 refers to devices such as a keyboard, a mouse, and a touch panel. When an input operation is performed from the input device 24, corresponding key information and position information are transmitted to the CPU 10.

出力装置25は、モニタなどの画面を指し、液晶表示装置(LCD)、発光ダイオード(LED)パネル、エレクトロルミネッセンス(EL)パネル等が使用可能である。   The output device 25 refers to a screen such as a monitor, and a liquid crystal display (LCD), a light emitting diode (LED) panel, an electroluminescence (EL) panel, or the like can be used.

尚、リポジトリ情報保持部20、修正ブロック情報保持部21、コーディング情報保持部22は、上述した情報を保存する記録媒体である。記録媒体は、例えば、RAM、ROM、ハードディスク、フレキシブルディスク、コンパクトディスク、ICチップ、カセットテープなどが挙げられる。このような記録媒体によれば、データの保存、運搬、販売などを容易に行うことができる。   The repository information holding unit 20, the modified block information holding unit 21, and the coding information holding unit 22 are recording media that store the above-described information. Examples of the recording medium include RAM, ROM, hard disk, flexible disk, compact disk, IC chip, and cassette tape. According to such a recording medium, data can be easily stored, transported, sold, and the like.

(ソースコード管理方法)
次に、本実施の形態に係るソースコード管理方法について、図2〜図7を用いて説明する。
(Source code management method)
Next, the source code management method according to the present embodiment will be described with reference to FIGS.

まず、ソースコードの登録方法について、図2〜図4を用いて説明する。   First, a source code registration method will be described with reference to FIGS.

(イ)図2のステップS101において、クライアント端末機30aは、ソースコードファイルの編集を行い、ステップS102において、ソースコード管理サーバ1へ修正後のソースコードファイルを送信する。   (A) In step S101 in FIG. 2, the client terminal 30a edits the source code file, and transmits the corrected source code file to the source code management server 1 in step S102.

(ロ)次に、ステップS103において、構文解析手段12は、ソースコードファイルを構文解析し、構文ツリーに分解する。例えば、図3(a)に示すソースコードファイルは、図3(b)に示すような構文ツリーに分解される。又、構文解析手段12は、構文ツリーを各言語の最小要素毎に分解してもよい。例えば、図4(a)に示すソースコードファイルは、図4(b)に示すような構文ツリーに分解される。   (B) Next, in step S103, the syntax analysis means 12 parses the source code file and decomposes it into a syntax tree. For example, the source code file shown in FIG. 3A is broken down into a syntax tree as shown in FIG. Further, the syntax analysis means 12 may decompose the syntax tree for each minimum element of each language. For example, the source code file shown in FIG. 4A is broken down into a syntax tree as shown in FIG.

(ハ)次に、ステップS104において、構文解析手段12は、リポジトリ編集手段13へ構文ツリーを送信する。ステップS105において、リポジトリ編集手段13は、構文ツリーの要素毎に前バージョン(修正したソースコードファイルの前のバージョン)との変更があるか否かを確認し、変更差分をリポジトリ情報保持部20へ保存する。   (C) Next, in step S104, the syntax analysis unit 12 transmits the syntax tree to the repository editing unit 13. In step S105, the repository editing unit 13 checks whether there is a change from the previous version (the previous version of the modified source code file) for each element of the syntax tree, and sends the change difference to the repository information holding unit 20. save.

尚、この後、ソースコード管理サーバ1は、クライアント端末機30a、30b、30cからの要求に応じて、クライアント端末機30a、30b、30cに変更差分情報を送信し、クライアント端末機30a、30b、30cにおいて、変更差分表示が行われてもよい。   After this, the source code management server 1 transmits the change difference information to the client terminals 30a, 30b, 30c in response to requests from the client terminals 30a, 30b, 30c, and the client terminals 30a, 30b, 30c, In 30c, a change difference display may be performed.

次に、修正ブロックの関連付け方法について図5を用いて説明する。   Next, a correction block association method will be described with reference to FIG.

修正ブロック管理手段15は、リポジトリ情報保持部20に保持された構文ツリーを解析し、構文ツリーで表されたブロック(図5に示す斜線部分など)毎に、当該ブロックを修正した際に影響が出る他のブロックを関連付ける。具体的には、リポジトリ情報保持部20に保持された変更差分情報から、同時期の修正は関連のある修正と判断し、それらのブロックを関連付ける。   The correction block management means 15 analyzes the syntax tree held in the repository information holding unit 20 and affects each block (such as the hatched portion shown in FIG. 5) expressed in the syntax tree when the block is corrected. Associate other blocks that exit. Specifically, from the change difference information held in the repository information holding unit 20, it is determined that the corrections at the same time are related corrections, and these blocks are associated.

このように関連付けられたブロックは、修正ブロック情報保持部21に保持された関連情報に基づいて、ソースコード管理サーバ1の出力装置25に表示される。あるいは、ソースコード管理サーバ1がソースコードファイルと共に関連情報をクライアント端末機30a、30b、30cへ送信することにより、関連付けられたブロックは、クライアント端末機30a、30b、30cに表示される。   The blocks associated in this way are displayed on the output device 25 of the source code management server 1 based on the related information held in the modified block information holding unit 21. Alternatively, the source code management server 1 transmits related information together with the source code file to the client terminals 30a, 30b, and 30c, so that the associated blocks are displayed on the client terminals 30a, 30b, and 30c.

又、関連ブロックの表示方法としては、特定のブロックを表示する際、関連するブロックを同時に表示してもよく、表示された特定のブロックの近辺に関連ブロックの名称(関連ブロックが存在するソースコードファイルのバージョン番号、関数名、行数など)を表示してもよい。   As a related block display method, when a specific block is displayed, the related block may be displayed at the same time, and the name of the related block (source code in which the related block exists) is displayed in the vicinity of the displayed specific block. File version number, function name, number of lines, etc.) may be displayed.

次に、コーディングスタイルの調整方法について図6及び図7を用いて説明する。   Next, a coding style adjustment method will be described with reference to FIGS.

(イ)図6のステップS201において、クライアント端末機30aは、ソースコード管理サーバ1へ取得したいソースコードファイルのバージョン番号を通知する。そして、ステップS202において、リポジトリ編集手段13は、指定されたバージョンの構文ツリーをリポジトリ情報保持部20から抽出する。   (A) In step S201 of FIG. 6, the client terminal 30a notifies the source code management server 1 of the version number of the source code file to be acquired. In step S202, the repository editing unit 13 extracts the specified version of the syntax tree from the repository information holding unit 20.

(ロ)次に、ステップS203において、リポジトリ編集手段13は、構文ツリー情報をフォーマット調整手段14へ送信する(図7参照)。一方、ステップ204において、フォーマット調整手段14は、コーディング情報保持部22からコーディング情報を取得する(図7参照)。   (B) Next, in step S203, the repository editing unit 13 transmits the syntax tree information to the format adjusting unit 14 (see FIG. 7). On the other hand, in step 204, the format adjusting unit 14 acquires coding information from the coding information holding unit 22 (see FIG. 7).

(ハ)次に、ステップS205において、フォーマット調整手段14は、コーディング情報に基づいて、構文ツリーの要素に対して、コーディングスタイルの調整を行う。そして、構文ツリーをソースコードファイルの形式に成型する。   (C) Next, in step S205, the format adjusting unit 14 adjusts the coding style for the elements of the syntax tree based on the coding information. Then, the syntax tree is formed into a source code file format.

(ニ)次に、ステップS206において、ソースコード管理サーバ1は、ソースコードファイルをクライアント端末機30aへ送信する。ステップS207において、クライアント端末機30aは、ソースコードファイルの編集を行う(図7参照)。   (D) Next, in step S206, the source code management server 1 transmits the source code file to the client terminal 30a. In step S207, the client terminal 30a edits the source code file (see FIG. 7).

(作用及び効果)
本実施形態に係るソースコード管理サーバ1、ソースコード管理方法及びソースコード管理プログラムによると、構文ツリー毎に変更差分を管理することにより、効率的にソースコードの変更管理を行うことができる。
(Function and effect)
According to the source code management server 1, the source code management method, and the source code management program according to the present embodiment, by managing the change difference for each syntax tree, the source code can be efficiently managed.

例えば、従来製品での変更差分表示は、図8(a)に示す表示であったが、本実施形態によると、図8(b)に示す表示となる。即ち、変更箇所(i<sData.len();)のみが変更差分表示され(斜線部分)、修正箇所を容易に把握することができる。   For example, the change difference display in the conventional product is the display shown in FIG. 8A, but according to the present embodiment, the display is as shown in FIG. 8B. That is, only the changed portion (i <sData.len ();) is displayed as the change difference (hatched portion), and the corrected portion can be easily grasped.

又、本実施形態においては、構文ツリーを各言語の最小要素毎に分解することができる。このため、スペースや改行といった実際の修正とは意味のない変更があった場合、これらを表示することがなく(ノイズの除去)、変更点を管理する作業者の効率を向上することができる。   In the present embodiment, the syntax tree can be decomposed for each minimum element of each language. For this reason, when there is a change that does not mean actual correction such as a space or a line break, these are not displayed (removal of noise), and the efficiency of the operator who manages the change can be improved.

又、本実施形態においては、構文ツリーで表されたブロック毎に、当該ブロックを修正した際に影響が出る他のブロックを関連付けることができる。このような関連ブロック情報を表示することにより、ソースコードの修正時に、影響範囲が確認しやすくなるため、修正漏れ等のミスを低減することができる。   Further, in the present embodiment, each block represented by the syntax tree can be associated with another block that is affected when the block is modified. By displaying such related block information, it becomes easier to confirm the affected range when the source code is corrected, and errors such as omission of correction can be reduced.

又、本実施形態においては、コーディング規約と所定のコーディングスタイルとを含むコーディング情報に基づいて、コーディングスタイルを調整し、構文ツリーをソースコードファイル形式に成型することができる。このため、異なるコーディング規約、コーディングスタイルを吸収し、複数のメーカー、開発者間で、ソースコードの共用が可能となる。   Further, in the present embodiment, the coding style can be adjusted based on the coding information including the coding rule and the predetermined coding style, and the syntax tree can be formed into the source code file format. For this reason, different coding standards and coding styles are absorbed, and source code can be shared among multiple manufacturers and developers.

(その他の実施形態)
本発明は上記の実施形態によって記載したが、この開示の一部をなす論述及び図面はこの発明を限定するものであると理解すべきではない。この開示から当業者には様々な代替実施形態、実施例及び運用技術が明らかとなろう。
(Other embodiments)
Although the present invention has been described according to the above-described embodiments, it should not be understood that the descriptions and drawings constituting a part of this disclosure limit the present invention. From this disclosure, various alternative embodiments, examples and operational techniques will be apparent to those skilled in the art.

例えば、本実施形態において、ソースコード管理サーバ1は、クライアント端末機30a、30b、30cから修正後のソースコードファイルを受信すると説明したが、ソースコード管理サーバ1の入力装置24からの入力やFDからの読み込みなどにより、ソースコードファイルを取得しても構わない。又、ソースコード管理サーバ1は、クライアント端末機30a、30b、30cに変更差分情報を送信し、クライアント端末機30a、30b、30cにおいて、変更差分表示が行われると説明したが、ソースコード管理サーバ1の出力装置25に表示を行ってもよい。   For example, in the present embodiment, it has been described that the source code management server 1 receives the modified source code file from the client terminals 30a, 30b, and 30c. However, the source code management server 1 receives the input from the input device 24 of the source code management server 1 and the FD. The source code file may be acquired by reading from the source. In addition, the source code management server 1 transmits change difference information to the client terminals 30a, 30b, and 30c, and the change difference display is performed in the client terminals 30a, 30b, and 30c. The display may be performed on one output device 25.

又、ソースコード管理サーバ1について、構文解析手段12、リポジトリ編集手段13などをモジュールとして一つのCPUに備えてもよいと説明したが、それぞれ異なるCPUに備えられ、異なる装置としてもよい。その場合、複数の装置間をバスなどで接続するものとする。   Further, although it has been described that the source code management server 1 may include the syntax analysis unit 12 and the repository editing unit 13 as modules in one CPU, each may be provided in a different CPU and may be a different device. In that case, a plurality of devices are connected by a bus or the like.

又、ソースコード管理サーバ1について、リポジトリ情報保持部21、修正ブロック情報保持部21、コーディング情報保持部22、プログラム保持部23を分けて備えると説明したが、一つの保持部にこれらの情報を保持してもよい。   Further, the source code management server 1 has been described as having the repository information holding unit 21, the modified block information holding unit 21, the coding information holding unit 22, and the program holding unit 23 separately, but these pieces of information are stored in one holding unit. It may be held.

このように、本発明はここでは記載していない様々な実施形態等を含むことは勿論である。従って、本発明の技術的範囲は上記の説明から妥当な特許請求の範囲に係る発明特定事項によってのみ定められるものである。   As described above, the present invention naturally includes various embodiments not described herein. Therefore, the technical scope of the present invention is defined only by the invention specifying matters according to the scope of claims reasonable from the above description.

本発明の実施の形態に係るソースコード管理サーバの構成ブロック図である。It is a block diagram of the configuration of a source code management server according to an embodiment of the present invention. 本発明の実施の形態に係るソースコードの登録方法を示すフローチャートである。It is a flowchart which shows the registration method of the source code which concerns on embodiment of this invention. ソースコードファイルの構文ツリーへの分解を説明する図である(その1)。It is a figure explaining decomposition | disassembly to the syntax tree of a source code file (the 1). ソースコードファイルの構文ツリーへの分解を説明する図である(その2)。It is a figure explaining decomposition | disassembly into the syntax tree of a source code file (the 2). 本発明の実施の形態に係る修正ブロックの関連付け方法を説明する図である。It is a figure explaining the correlation method of the correction block which concerns on embodiment of this invention. 本発明の実施の形態に係るコーディングスタイルの調整方法を示すフローチャートである。It is a flowchart which shows the adjustment method of the coding style which concerns on embodiment of this invention. 本発明の実施の形態に係るコーディングスタイルの調整方法を説明する図である。It is a figure explaining the adjustment method of the coding style which concerns on embodiment of this invention. 本発明の実施の形態に係るソースコード管理サーバの効果を説明する図である。It is a figure explaining the effect of the source code management server which concerns on embodiment of this invention. 従来技術の問題点を説明する図である(その1)。It is a figure explaining the problem of a prior art (the 1). 従来技術の問題点を説明する図である(その2)。It is a figure explaining the problem of a prior art (the 2). 従来技術の問題点を説明する図である(その3)。It is a figure explaining the problem of a prior art (the 3).

符号の説明Explanation of symbols

1…ソースコード管理サーバ
10…CPU
11…通信手段
12…構文解析手段
13…リポジトリ編集手段
14…フォーマット調整手段
15…修正ブロック管理手段
20…リポジトリ情報保持部
21…修正ブロック情報保持部
22…コーディング情報保持部
23…プログラム保持部
24…入力装置
25…出力装置
30a、30b、30c…クライアント端末機

1 ... Source code management server 10 ... CPU
DESCRIPTION OF SYMBOLS 11 ... Communication means 12 ... Syntax analysis means 13 ... Repository editing means 14 ... Format adjustment means 15 ... Correction block management means 20 ... Repository information holding part 21 ... Correction block information holding part 22 ... Coding information holding part 23 ... Program holding part 24 ... Input device 25 ... Output device 30a, 30b, 30c ... Client terminal

Claims (7)

クライアント端末機から受信したソースコードファイルを構文解析し、構文ツリーに分解する構文解析手段と、
前記構文ツリーの要素毎に、前記ソースコードファイルの前のバージョンにおけるソースコードファイルとの変更差分を抽出するリポジトリ編集手段と、
前記変更差分を保持するリポジトリ情報保持部と
を備えることを特徴とするソースコード管理サーバ。
Parsing source code file received from client terminal and parsing it into a syntax tree;
Repository editing means for extracting, for each element of the syntax tree, a change difference from a source code file in a previous version of the source code file;
A source code management server, comprising: a repository information holding unit that holds the change difference.
前記構文解析手段は、前記構文ツリーを各言語の最小要素毎に分解することを特徴とする請求項1に記載のソースコード管理サーバ。   The source code management server according to claim 1, wherein the syntax analysis unit decomposes the syntax tree for each minimum element of each language. 前記構文ツリーで表されたブロック毎に、当該ブロックを修正した際に影響が出る他のブロックを関連付ける修正ブロック管理手段と、
該修正ブロック管理手段によって関連付けられた前記ブロック毎の関連情報を保持する修正ブロック情報保持部と
を更に備えることを特徴とする請求項1又は2に記載のソースコード管理サーバ。
Modified block management means for associating each block represented by the syntax tree with another block that is affected when the block is modified;
The source code management server according to claim 1, further comprising: a correction block information holding unit that holds the related information for each of the blocks associated by the correction block management unit.
コーディング規約と所定のコーディングスタイルとを含むコーディング情報を保持するコーディング情報保持部と、
前記コーディング情報に基づいて、前記構文ツリーに対してコーディングスタイルを調整し、前記構文ツリーをソースコードファイル形式に成型するフォーマット調整手段と
を更に備えることを特徴とする請求項1〜3のいずれか1項に記載のソースコード管理サーバ。
A coding information holding unit for holding coding information including a coding rule and a predetermined coding style;
4. The method according to claim 1, further comprising: a format adjusting unit that adjusts a coding style for the syntax tree based on the coding information, and forms the syntax tree into a source code file format. The source code management server according to item 1.
ソースコード管理サーバに、
クライアント端末機から受信したソースコードファイルを構文解析し、構文ツリーに分解する手順と、
前記構文ツリーの要素毎に、前記ソースコードファイルの前のバージョンにおけるソースコードファイルとの変更差分を抽出する手順と
を実行させることを特徴とするソースコード管理プログラム。
In the source code management server,
The source code file received from the client terminal is parsed and broken down into a syntax tree.
A source code management program for executing, for each element of the syntax tree, a procedure for extracting a change difference from a source code file in a previous version of the source code file.
前記構文ツリーで表されたブロック毎に、当該ブロックを修正した際に影響が出る他のブロックを関連付ける手順と、
当該関連付けられた前記ブロック毎の関連情報を保持する手順と
を更に実行させることを特徴とする請求項5に記載のソースコード管理プログラム。
A procedure for associating each block represented in the syntax tree with another block that is affected when the block is modified;
The source code management program according to claim 5, further comprising: a step of holding related information for each of the associated blocks.
コーディング規約と所定のコーディングスタイルとを含むコーディング情報を保持する手順と、
前記コーディング情報に基づいて、前記構文ツリーに対してコーディングスタイルを調整し、前記構文ツリーをソースコードファイル形式に成型する手順と
を更に実行させることを特徴とする請求項5又は6に記載のソースコード管理プログラム。

A procedure for maintaining coding information including coding conventions and a predetermined coding style;
The source according to claim 5, further comprising: adjusting a coding style for the syntax tree based on the coding information, and forming the syntax tree into a source code file format. Code management program.

JP2004169008A 2004-06-07 2004-06-07 Source code management server and source code management program Pending JP2005346660A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004169008A JP2005346660A (en) 2004-06-07 2004-06-07 Source code management server and source code management program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004169008A JP2005346660A (en) 2004-06-07 2004-06-07 Source code management server and source code management program

Publications (1)

Publication Number Publication Date
JP2005346660A true JP2005346660A (en) 2005-12-15

Family

ID=35498942

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004169008A Pending JP2005346660A (en) 2004-06-07 2004-06-07 Source code management server and source code management program

Country Status (1)

Country Link
JP (1) JP2005346660A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010049419A (en) * 2008-08-20 2010-03-04 Internatl Business Mach Corp <Ibm> Development support program, development support method and development support system
US9860287B2 (en) 2014-07-31 2018-01-02 International Business Machines Corporation Apparatus and method for supporting sharing of source code
JP2019082854A (en) * 2017-10-30 2019-05-30 三菱電機株式会社 Information processing device, information processing method, and information processing program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0358125A (en) * 1989-07-27 1991-03-13 Nec Corp Generation managing system for source program
JPH06119155A (en) * 1992-10-05 1994-04-28 Toshiba Corp Program generator
JPH0756720A (en) * 1993-08-16 1995-03-03 Toshiba Corp Software development artifact management method and apparatus for maintaining consistency between artifacts
JP2004126866A (en) * 2002-10-01 2004-04-22 Mitsubishi Electric Corp Description output suppression program analysis apparatus and description output suppression program analysis method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0358125A (en) * 1989-07-27 1991-03-13 Nec Corp Generation managing system for source program
JPH06119155A (en) * 1992-10-05 1994-04-28 Toshiba Corp Program generator
JPH0756720A (en) * 1993-08-16 1995-03-03 Toshiba Corp Software development artifact management method and apparatus for maintaining consistency between artifacts
JP2004126866A (en) * 2002-10-01 2004-04-22 Mitsubishi Electric Corp Description output suppression program analysis apparatus and description output suppression program analysis method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010049419A (en) * 2008-08-20 2010-03-04 Internatl Business Mach Corp <Ibm> Development support program, development support method and development support system
US9860287B2 (en) 2014-07-31 2018-01-02 International Business Machines Corporation Apparatus and method for supporting sharing of source code
US9858071B2 (en) 2014-07-31 2018-01-02 International Business Machines Corporation Apparatus and method for supporting sharing of source code
JP2019082854A (en) * 2017-10-30 2019-05-30 三菱電機株式会社 Information processing device, information processing method, and information processing program

Similar Documents

Publication Publication Date Title
US12524217B2 (en) Systems and methods for automated retrofitting of customized code objects
US9064134B1 (en) Method and apparatus for mitigating software vulnerabilities
CA2684822C (en) Data transformation based on a technical design document
US8694960B2 (en) Computer-implemented method, system and computer program product for displaying a user interface component
CN108399072B (en) Application page updating method and device
EP2107457B1 (en) Automatic software configuring system
US20060161914A1 (en) Systems and methods to modify application installations
US20080301666A1 (en) System for aggregating content data and methods relating to analysis of same
US8544028B2 (en) Extracting and processing data from heterogeneous computer applications
CN1755681A (en) Method, apparatus and computer-readable medium for managing specific types of content in an electronic document
US20170004120A1 (en) Corrections for natural language processing
US9658997B2 (en) Portable page template
KR20110132570A (en) Computer implementation dictionary system and method
KR101882759B1 (en) Method and apparatus for stabilized binary differencing
US20030233621A1 (en) Editor for smart version control
US8296723B2 (en) Configurable unified modeling language building blocks
CN102360350B (en) Removing style corruption from extensible markup language documents
US20150234793A1 (en) Font resource management
US7328234B1 (en) Agent architecture for triggering remotely initiated data processing operations
US8020119B2 (en) Engine support for parsing correction user interfaces
CN114546384B (en) Page display system, page display method, readable storage medium and electronic equipment
US20090137202A1 (en) Information distribution system
JP2005346660A (en) Source code management server and source code management program
US7356458B1 (en) Multi-language correspondence/form generator
US20080005182A1 (en) Changing documents to include changes made to schemas

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070330

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100402

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100629

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100830

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100921