KR100248435B1 - Detecting method of dangerous control flow for chill programming language - Google Patents

Detecting method of dangerous control flow for chill programming language Download PDF

Info

Publication number
KR100248435B1
KR100248435B1 KR1019970063591A KR19970063591A KR100248435B1 KR 100248435 B1 KR100248435 B1 KR 100248435B1 KR 1019970063591 A KR1019970063591 A KR 1019970063591A KR 19970063591 A KR19970063591 A KR 19970063591A KR 100248435 B1 KR100248435 B1 KR 100248435B1
Authority
KR
South Korea
Prior art keywords
statement
node
label
control
terminal
Prior art date
Application number
KR1019970063591A
Other languages
Korean (ko)
Other versions
KR19990042696A (en
Inventor
이동길
정민수
이준경
이종동
Original Assignee
이계철
한국전기통신공사
정선종
한국전자통신연구원
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 이계철, 한국전기통신공사, 정선종, 한국전자통신연구원 filed Critical 이계철
Priority to KR1019970063591A priority Critical patent/KR100248435B1/en
Publication of KR19990042696A publication Critical patent/KR19990042696A/en
Application granted granted Critical
Publication of KR100248435B1 publication Critical patent/KR100248435B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3624Software debugging by performing operations on the source code, e.g. via a compiler

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

본 발명은 칠(CHILL) 프로그래밍 언어에 대하여 정적인 시간에 GOTO문이나 EXIT문 등에 의해 위험하게 분기하는 프로그램 내의 위험한 제어 이동을 탐지하는 방법에 관한 것으로서, 추상 구문 트리를 순회하면서 제어 이동문을 탐지하고, 탐지된 제어 이동문에 대한 레이블 정보를 파악하여, 레이블에 대한 정보가 없으면 적절한 진단 메시지를 출력하며, 제어 이동문의 레이블에 대한 정보가 파악되면 그 레이블의 위치를 조사하여 블록문의 내부 인지의 여부를 판단하여 적절한 진단 메시지를 출력하는 칠 언어에 대한 위험한 제어 이동의 탐지방법을 제공함으로써, 칠 프로그램 내에 위험한 제어 이동을 정적 시간에 자동으로 진단하여, 신뢰성 높은 칠 프로그램을 작성할 수 있고, 제어 흐름 분석을 통한 소프트웨어의 품질을 향상시킬 수 있는 효과가 있다.The present invention relates to a method for detecting dangerous control movements in a program that dangerously branches by a GOTO statement or an EXIT statement at a static time for a CHILL programming language, and detects a control movement statement while traversing an abstract syntax tree. If the information on the label of the control door is found, the location of the label is examined to determine the label information of the detected control door. By providing a method of detecting dangerous control movements for the fill language that judges whether or not and outputs an appropriate diagnostic message, it is possible to automatically diagnose dangerous control movements in the fill program at a static time, thereby creating a reliable fill program, and controlling flow. It has the effect of improving the quality of software through analysis .

Description

칠 언어에 대한 위험한 제어 이동 탐지방법How to detect dangerous control movements for seven languages

본 발명은 칠 프로그래밍 언어에 대하여 정적인 시간에 프로그램 내의 위험한 제어 이동을 탐지하는 방법에 관한 것으로서, 특히, GOTO문이나 EXIT문 등에 의해 위험하게 분기하는 부분을 탐지하는 방법에 관한 것이다.The present invention relates to a method for detecting dangerous control movements in a program at a static time for a seven programming language, and more particularly, to a method for detecting a dangerous branching by a GOTO statement or an EXIT statement.

제어 이동문은 예기치 않은 상황을 발생시킬 확률이 많고, 프로그램의 문법적 오류와는 무관하기 때문에 프로그램 개발자가 의도하지 않은 치명적인 오류를 유발시킬 가능성이 높다. 소프트웨어의 오류는 계획 단계에서 문제 정의의 부정확함, 요구 사항에 대한 개발자의 주관적 해석, 소프트웨어적인 표현으로 바꾸는 설계 단계에서의 어려움, 코딩 단계 등 모든 과정에서 발생이 가능하다. 소프트웨어 공학에서 연구된 결과에 의하면 소프트웨어에 내재된 오류의 발견과 그에 대한 정정이 빠를수록 경제적이다. 신뢰성이 높은 교환기용 칠 프로그램을 작성하기 위해서는 조기에 오류 발생 가능성이 있는 부분을 찾아서 수정하는 작업이 필요하다. 디버거는 프로그램의 오류 수정을 위한 강력하고 필수적인 도구이기는 하지만, 프로그램의 실행을 추적하면서 오류 수정을 해야 하는 부담을 가진다. 디버거의 이러한 단점을 보완하기 위하여 프로그램이 컴파일 될 때 또는 그 이전에 프로그램을 분석하는 정적 분석 방법이 많이 사용된다. 이들 도구들은 컴파일시 또는 그 이전에 작동되기 때문에 실행시에 부담을 주지 않는다. 또한 프로그램 실행 하나의 실체(instance)만 고려하는 것이 아니라 프로그램 자체에 대한 분석을 수행한다는 장점도 있다.Control movement statements are more likely to cause unexpected situations and are more likely to cause fatal errors not intended by the program developer because they are not related to grammatical errors in the program. Software errors can occur at any stage of the planning process, including inaccuracies in the definition of a problem, subjective interpretation of the requirements by the developer, difficulty in the design phase of switching to software representation, and coding. The results of research in software engineering indicate that the faster the discovery and correction of errors inherent in software, the more economically. To write a reliable exchange program, it is necessary to find and correct an error part early. Although the debugger is a powerful and essential tool for fixing errors in a program, it is burdensome to fix them while tracking the execution of the program. To overcome these shortcomings of the debugger, many static analysis methods are used to analyze the program before or when it is compiled. These tools are not burdened at run time because they run at or before compilation. It also has the advantage that it does not only consider an instance of program execution but also analyzes the program itself.

종래에는 상기 프로그램의 오류 수정을 하는 디버깅 도구들로서, 린트(lint)와 로지스코프(LOGISCOPE) 등의 정적 분석기를 사용하였다.Conventionally, as a debugging tool for error correction of the program, a static analyzer such as lint and LOGISCOPE was used.

린트는 씨(C) 프로그램을 정적으로 진단하는 공개 소프트웨어이다. 린트는 버그로 생각되거나 이식성이 없거나 불필요한 부분을 찾아 주고, 씨 컴파일러보다 더 강력한 자료형 검사를 수행한다. 또한 린트는 자료의 정확한 사용과 제어의 정확한 흐름에 대해서도 진단한다.Lint is open source software that diagnoses C programs statically. Lint finds bugs, is not portable or unnecessary, and performs more powerful type checking than the C compiler. Lint also diagnoses the correct use of data and the correct flow of control.

로지스코프는 베릴로그(Verilog)사에서 개발한 소프트웨어 분석 도구이다. 이 분석 결과들은 소프트웨어 개발과 유지 보수에 유용하게 사용될 수 있다. 그리고, 로지스코프는 정적 분석을 할 수 있으며, 그 결과로써 소프트웨어의 품질에 대한 진단, 호출 그래프, 제어 흐름 그래프를 생성하는 것이 가능하다. 또한 동적 분석도 가능하며, 그 분석 결과를 이용하여 테스트 프로그램을 자동으로 생성할 수 있어 소프트웨어의 수행을 시뮬레이션 할 수 있다. 로지스코프는 범용 절차적 언어의 분석을 대상으로 설계되었으며, 이러한 설계 방법은 적용 대상 언어가 대단히 많다는 장점이 있으나, 특정 언어에 대한 비효율성에 대한 단점을 동시에 지니고 있다. 또한, 이러한 시스템들은 칠 언어가 가진 가시성 분석, 병행성 분석의 기능이 고려되지 않은 문제점이 있다.Logiscope is a software analysis tool developed by Verilog. The results of this analysis can be useful for software development and maintenance. And, the logscope can do static analysis, and as a result it is possible to generate diagnostics, call graphs, and control flow graphs for the quality of the software. Dynamic analysis is also possible, and test results can be automatically generated using the analysis results to simulate software performance. Logiscope is designed for the analysis of general purpose procedural languages, and this design method has the advantage that there are many languages to be applied, but it has the disadvantage of inefficiency for a specific language. In addition, these systems have a problem that the functions of visibility analysis and parallel analysis of the seven languages are not considered.

상기 문제점을 해결하기 위해 본 발명은, 추상 구문 트리를 순회하면서 제어 이동문을 탐지하고, 탐지된 제어 이동문에 대한 레이블 정보를 파악하여, 레이블에 대한 정보가 없으면 적절한 진단 메시지를 출력하며, 제어 이동문의 레이블에 대한 정보가 파악되면 그 레이블의 위치를 조사하여 블록문의 내부 인지의 여부를 판단하여 적절한 진단 메시지를 출력하는 칠 언어에 대한 위험한 제어 이동의 탐지방법을 제공하여, 칠 프로그램 내에 위험한 제어 이동을 정적 시간에 자동으로 진단하도록 하는데 그 목적이 있다.In order to solve the above problem, the present invention detects a control movement statement while traversing an abstract syntax tree, grasps the label information of the detected control movement statement, and outputs an appropriate diagnostic message if there is no information on the label. When the information on the label of the moving statement is known, the location of the label is examined to determine whether it is inside the block statement and to provide a dangerous control movement detection method for the seven languages that outputs an appropriate diagnostic message. The goal is to automatically diagnose movement at static times.

도 1은 본 발명이 적용되는 하드웨어 시스템 구성도,1 is a hardware system configuration to which the present invention is applied,

도 2는 본 발명에 따른 칠 컴파일러 진단부의 내부 구성도,2 is an internal configuration diagram of a chill compiler diagnostic unit according to the present invention;

도 3은 본 발명에 따른 위험한 제어 이동 탐지를 위한 전체적인 처리 흐름도,3 is an overall process flow diagram for hazardous control movement detection in accordance with the present invention;

도 4는 도 3의 제어 이동문 탐지 단계의 상세 처리 흐름도,4 is a detailed processing flowchart of the control moving door detection step of FIG. 3;

도 5는 도 3의 제어 이동문 레이블에 대한 정보 수집 단계의 상세 처리 흐름도,5 is a detailed processing flowchart of the information collecting step for the control mobile door label of FIG. 3;

도 6은 도 3의 제어 이동문의 적절성 판단 단계의 상세 처리 흐름도.FIG. 6 is a detailed processing flowchart of the suitability determination step of the control mobile door of FIG. 3; FIG.

〈도면의 주요 부분에 대한 부호의 설명〉<Explanation of symbols for main parts of drawing>

101 : 메인 메모리 보드 102 : 중앙 처리장치101: main memory board 102: central processing unit

103 : 보조 기억장치 104 : 입/출력 장치103: auxiliary memory 104: input / output device

105 : 유닉스 운영체제 106 : 시스템 버스105: Unix Operating System 106: System Bus

본 발명은 칠(CHILL) 프로그래밍 언어에 대하여 정적인 시간에 프로그램 내의 위험한 제어 이동을 탐지하는 방법에 관한 것으로서, 특히, GOTO문이나 EXIT문 등에 의해 위험하게 분기하는 부분을 탐지하는 방법에 관한 것이다.The present invention relates to a method for detecting dangerous control movements in a program at a static time for a CHILL programming language, and more particularly, to a method for detecting a dangerous branching by a GOTO statement or an EXIT statement.

이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세히 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명이 적용되는 하드웨어 시스템 구성도로서, 사용자가 작성한 칠 원시 코드를 분석하여 정적 시간에 제어 흐름을 분석하는 프로그램이 탑재되어 있는 시스템의 메인 메모리 보드(101)와, 상기 메인 메모리 보드(101)에 탑재된 파일을 실행시키는 중앙 처리 보드(102)와, 시스템에서 사용하는 파일 및 데이터 등을 저장하는 보조 기억장치(103)와, 위험한 제어 이동 탐지 실행중 발생하는 모든 오류 메시지 및 결과들을 입/출력하는 입/출력 장치(104)와, 상기 각 보드 및 장치를 제어하는 유닉스 운영체제(105)와, 상기 각 보드 및 장치간에 상호 주고 받는 메시지나 정보들을 전송하는 시스템 버스(106)로 구성된다.1 is a block diagram of a hardware system to which the present invention is applied, and includes a main memory board 101 of a system in which a program for analyzing a control flow at a static time by analyzing seven source codes created by a user, and the main memory board. Central processing board 102 for executing files mounted in 101, auxiliary storage 103 for storing files and data used in the system, and all error messages and results generated during dangerous control movement detection execution. Input / output device 104 for inputting / outputting the devices, the Unix operating system 105 for controlling the boards and devices, and the system bus 106 for transmitting messages and information exchanged between the boards and devices. It is composed.

도 2는 본 발명에 따른 칠 컴파일러 진단부의 내부 구성도이다.2 is an internal configuration diagram of a chill compiler diagnostic unit according to the present invention.

제어 흐름 분석을 위한 칠 컴파일러의 진단부는, 구문 분석부(201)에서 입력 프로그램을 어휘 분석하고 동시에 구문 분석하면서 데이터에 대한 심볼 테이블과 실행문에 대한 추상 구문 트리를 생성하여 전체 프로그램 구조부(205)에 저장시키고, 가시성 제어부(202)로 출력하면, 가시성 제어부(202)에서는 상기 구문 분석부(201)로부터 출력된 심볼 테이블과 추상 구문 트리의 가시성을 분석하고, 모듈간에 단절된 이름 정보를 외부로 보여주고 외부로부터 받는 GRANT/SEIZE 정보를 이용하여 심볼 테이블을 재구성하며, 의미 분석부(203)는 상기 가시성 제어부(202)에서 출력된 심볼 테이블을 이용하여 프로그램의 의미 분석을 수행한다. 그리고, 제어 흐름 분석부(204)가 상기 의미 분석부(203)의 출력 신호를 정적 시간에 제어 흐름 분석하여 출력하면, 최종적으로 위험한 제어 이동 탐지 출력부(206)에서 진단 결과를 출력한다.The diagnosis unit of the Chill compiler for control flow analysis generates the abstract syntax tree for the symbol table and the execution statement for the data while simultaneously parsing the input program in the parser 201 and simultaneously parsing the entire program structure unit 205. In this case, the visibility control unit 202 analyzes the visibility of the symbol table and the abstract syntax tree output from the parser 201, and displays name information disconnected between modules. The symbol table is reconstructed using GRANT / SEIZE information received from the outside, and the semantic analysis unit 203 performs semantic analysis of the program using the symbol table output from the visibility control unit 202. When the control flow analyzing unit 204 outputs the output signal of the semantic analyzing unit 203 by analyzing the control flow at a static time, the dangerous control movement detection output unit 206 finally outputs a diagnosis result.

도 3은 본 발명에 따른 위험한 제어 이동 탐지를 위한 전체적인 처리 흐름도이다.3 is an overall process flow diagram for hazardous control movement detection in accordance with the present invention.

먼저, 단위 프로그램의 끝인가의 여부를 판단하여(300), 끝일 경우에는 종료하고, 끝이 아닐 경우에는 추상 구문 트리를 순회하면서 제어 이동문(GOTO문, EXIT문)을 탐지한다(400). 상기 단계(400)에서 제어 이동문이 발견되면, 발견된 제어 이동문의 레이블에 대한 정보의 파악을 하고, 레이블에 대한 정보가 없으면 적절한 진단 메시지를 출력한다(500). 상기 단계(500)의 결과에 따라 제어 이동문의 레이블에 대한 정보가 파악되면 그 레이블의 위치를 조사하여 블록문(IF문, DO문, CASE문)의 내부인지 아닌지를 판단하여 적절한 진단 메시지를 출력한다(600). 상기의 각 단계들을 단위 프로그램의 끝이 될 때까지 반복 수행한다.First, it is determined whether or not the end of the unit program (300), and if it is the end, if it is not the end, it detects the control movement statement (GOTO statement, EXIT statement) while traversing the abstract syntax tree (400). If the control movement door is found in step 400, the controller determines the information on the label of the found control movement door and outputs an appropriate diagnostic message if there is no information on the label (500). When the information on the label of the control movement statement is grasped according to the result of step 500, the position of the label is examined to determine whether it is inside the block statement (IF statement, DO statement, or CASE statement), and to output an appropriate diagnostic message. (600). Each of the above steps is repeated until the end of the unit program.

도 4는 도 3의 제어 이동문 탐지 단계의 상세 처리 흐름도이다.4 is a detailed process flowchart of the control mobile door detection step of FIG.

먼저, 추상 구문 트리의 노드가 마지막 인지의 여부를 판단하여(401), 마지막일 경우에는 종료하고, 마지막이 아닐 경우에는 넌터미널(Nonterminal)형인지의 여부를 판단한다(402). 상기 단계(402)에서 그 노드가 넌터미널형일 경우 노드 이름이 제어 이동문인지의 여부를 판단하며(403), 넌터미널형이 아닐 경우 노드의 포인터를 형제 노드로 옮기고(406), 다시 상기 단계(401)로 귀환하여 상기의 단계들을 반복한다. 상기 단계(403)에서 노드 이름이 제어 이동문일 경우 제어 이동문의 레이블 정보를 탐지하고(404), 노드 이름이 제어 이동문이 아닐 경우 현 노드의 자식 노드를 인자로 자신을 다시 호출한다(405). 그리고, 상기 단계들(404, 405)은 노드의 포인터를 형제 노드로 옮긴(406) 후, 다시 단계(401)로 귀환하여, 추상 구문 트리의 노드가 마지막일 경우 종료되고, 마지막이 아닐 경우 다시 상기의 단계들을 반복하여 수행한다.First, it is determined whether the node of the abstract syntax tree is last (401). If it is the last, it is terminated. If not, it is determined whether it is a nonterminal type (402). In step 402, if the node is a non-terminal type, it is determined whether the node name is a control movement statement (403), and if it is not a non-terminal type, a pointer of the node is moved to a sibling node (406). Returning to 401, the above steps are repeated. In step 403, if the node name is the control movement statement, the label information of the control movement statement is detected (404). If the node name is not the control movement statement, the node re-calls itself with the child node of the current node as a factor (405). . Steps 404 and 405 then move the node's pointer to the sibling node 406 and then back to step 401, ending if the node of the abstract syntax tree is last and again if not last. Repeat the above steps.

도 5는 도 3의 제어 이동문 레이블에 대한 정보 수집 단계의 상세 처리 흐름도이다.FIG. 5 is a detailed processing flowchart of the information collecting step for the control mobile door label of FIG. 3.

먼저, 제어 이동문의 레이블에 대한 정보를 입수하고(501), 입수한 레이블 정보가 존재하는지의 여부와 및 명칭의 클래스가 프로그램의 실행문에 해당하는가를 검사하여 레이블 정보의 정확성 여부를 판단하여(502), 레이블 정보가 정확할 경우에는 제어 이동문의 레이블 위치를 검사하고(503), 레이블 정보가 부정확할 경우에는 적절한 경고 메시지를 출력하고 이 처리를 종료한다(504). 상기 단계(503)에서 검사된 레이블의 위치가 현재의 블록 내부에 있는지 점검한다(505). 그리고, 상기 단계(505)에서 레이블이 현재의 블록 내부에 존재하는가의 여부를 판단하여(505), 있을 경우에는 종료하고, 없을 경우에는 적절한 경고 메시지를 출력한(506) 후, 종료한다.First, information on the label of the control movement statement is obtained (501), and whether the label information is present and whether the class of the name corresponds to the execution statement of the program is judged to determine whether the label information is correct ( 502) If the label information is correct, the label position of the control moving door is checked (503). If the label information is incorrect, an appropriate warning message is output and the process ends (504). In step 503, it is checked whether the position of the label checked is in the current block (505). In step 505, it is determined whether or not the label exists in the current block (505). If it is present, it terminates. If not, an appropriate warning message is output (506) and then terminated.

도 6은 도 3의 제어 이동문의 적절성 판단 단계의 상세 처리 흐름도이다.6 is a detailed processing flowchart of the suitability determination step of the control mobile door of FIG.

추상 구문 트리의 노드가 마지막인가의 여부를 판단하고(601), 마지막일 경우에는 종료하고, 마지막이 아닌 경우에는 넌터미널형인가의 여부를 판단한다(602). 상기 단계(602)에서 넌터미널형일 경우에는 노드 이름이 블록문인지 점검하고(603), 넌터미널 형이 아닐 경우에는 노드의 포인터를 형제 노드로 옮긴(606) 뒤, 상기 단계(601)로 귀환하여 다시 상기 단계들을 반복한다. 상기 단계(603)에서 노드 이름이 블록문이 아닐 경우에는 현 노드의 자식 노드를 인자로 자신을 다시 호출하며(605), 노드 이름이 블록문일 경우에는 블록문 내부의 레이블을 탐지하여, 레이블이 있으면 경고 메시지를 출력한(604) 후, 현 노드의 자식 노드를 인자로 자신을 다시 호출하고(605), 노드의 포인터를 형제 노드로 옮긴(606) 뒤, 상기 단계(601)로 귀환하여 추상 구문 트리의 노드가 마지막이면 종료된다.It is determined whether the node of the abstract syntax tree is last (601). If it is the last, it is terminated. If not, it is determined whether it is a non-terminal type (602). In step 602, if the non-terminal type is a non-terminal type, check whether the node name is a block statement (603), if not in the non-terminal type, move the pointer of the node to a sibling node (606), and then return to step 601. Repeat the above steps again. In step 603, if the node name is not a block statement, the node is called again with the child node of the current node as an argument (605). If the node name is a block statement, the label is detected by detecting a label inside the block statement. If it does, it outputs a warning message (604), then calls itself again with the child node of the current node as an argument (605), moves the node's pointer to a sibling node (606), and returns to step 601 to abstract it. Terminates when the node of the syntax tree is last.

본 발명은 추상 구문 트리를 순회하면서 제어 이동문을 탐지하고, 탐지된 제어 이동문에 대한 레이블 정보를 파악하여, 레이블에 대한 정보가 없으면 적절한 진단 메시지를 출력하며, 제어 이동문의 레이블에 대한 정보가 파악되면 그 레이블의 위치를 조사하여 블록문의 내부 인지의 여부를 판단하여 적절한 진단 메시지를 출력하는 칠 언어에 대한 위험한 제어 이동의 탐지방법을 제공함으로써, 칠 프로그램 내에 위험한 제어 이동을 정적 시간에 자동으로 진단하여, 신뢰성 높은 칠 프로그램을 작성할 수 있고, 제어 흐름 분석을 통한 소프트웨어의 품질을 향상시킬 수 있는 효과가 있다.The present invention detects the control movement statement while traversing the abstract syntax tree, grasps the label information of the detected control movement statement, outputs an appropriate diagnostic message if there is no information on the label, and provides information on the label of the control movement statement. Once identified, it provides a method of detecting dangerous control movements in a chilled language that automatically detects dangerous control movements within a chilling program at static times by examining the location of the label to determine whether it is inside a block statement and output an appropriate diagnostic message. By diagnosing, it is possible to create a reliable fill program and to improve the quality of software through control flow analysis.

Claims (4)

칠(CHILL) 프로그래밍 언어에 대하여 정적인 시간에 GOTO문이나 EXIT문 등에 의해 위험하게 분기하는 프로그램 내의 위험한 제어 이동을 탐지하는 방법에 있어서,In the CHILL programming language, a method of detecting dangerous control movement in a program that is dangerously branched by a GOTO statement or an EXIT statement at a static time, 단위 프로그램의 끝인가의 여부를 판단하여 끝일 경우에는 종료하는 제 1 과정과;Determining whether or not the end of the unit program is completed; 상기 제 1 과정에서 끝이 아닐 경우에는 추상 구문 트리를 순회하면서 제어 이동문(GOTO문, EXIT문)을 탐지하는 제 2 과정과;A second step of detecting a control movement statement (GOTO statement, EXIT statement) while traversing the abstract syntax tree when the first step is not the end; 상기 제 2 과정에서 제어 이동문이 발견되면, 발견된 제어 이동문의 레이블에 대한 정보를 파악하고, 레이블에 대한 정보가 없으면 적절한 진단 메시지를 출력하는 제 3 과정과;A third step of identifying information on a label of the found control door and outputting an appropriate diagnostic message when the control door is found in the second step; 상기 제 3 과정의 결과에 따라 제어 이동문의 레이블에 대한 정보가 파악되면 그 레이블의 위치를 조사하여 블록문(IF문, DO문, CASE문)의 내부인지 아닌지를 판단하여 적절한 진단 메시지를 출력하고, 다시 상기 제 1 과정으로 귀환하여 단위 프로그램의 끝이 될 때까지 상기 각 과정들을 반복하여 수행하는 제 4 과정을 포함하는 것을 특징으로 하는 칠 언어에 대한 위험한 제어 이동 탐지방법.When the information on the label of the control movement statement is grasped according to the result of the third process, the position of the label is examined to determine whether it is inside the block statement (IF statement, DO statement, CASE statement), and to output an appropriate diagnostic message. And a fourth process of repeating each process until the end of a unit program is returned to the first process again. 제 1 항에 있어서,The method of claim 1, 상기 제 2 과정은, 추상 구문 트리의 노드가 끝인지의 여부를 판단하여 끝일 경우에는 종료하는 제 1 단계와;The second process includes: a first step of determining whether a node of the abstract syntax tree is an end and ending if it is an end; 상기 제 1 단계에서 끝이 아닐 경우에는 넌터미널형인지의 여부를 판단하는 제 2 단계와;A second step of determining whether the terminal is non-terminal if not in the first step; 상기 제 2 단계에서 넌터미널형일 경우 노드 이름이 제어 이동문인지의 여부를 판단하는 제 3 단계와;A third step of determining whether the node name is a control mobile statement when the terminal is non-terminal in the second step; 상기 제 3 단계에서 노드 이름이 제어 이동문일 경우 제어 이동문의 레이블 정보를 탐지하는 제 4 단계와;A fourth step of detecting label information of the control mobile statement when the node name is the control mobile statement in the third step; 상기 제 3 단계에서 노드 이름이 제어 이동문이 아닐 경우 현 노드의 자식 노드를 인자로 자신을 다시 호출하는 제 5 단계와;A fifth step of calling itself again with a child node of the current node when the node name is not a control movement statement in the third step; 상기 제 2 단계에서 넌터미널형이 아닐 경우 또는 제 4 단계 또는 제 5 단계를 수행한 후, 노드의 포인터를 형제 노드로 옮기고, 다시 상기 제 1 단계로 귀환하여 추상구문트리의 노드가 끝이 될 때까지 상기의 단계들을 반복하는 제 6 단계를 포함하는 것을 특징으로 하는 칠 언어에 대한 위험한 제어 이동 탐지방법.If the terminal is not non-terminal in the second step or after performing the fourth or fifth step, the pointer of the node is moved to the sibling node, and the node of the abstract syntax tree ends again by returning to the first step. And a sixth step of repeating the above steps until the dangerous control movement detection method for the seven languages. 제 1 항에 있어서,The method of claim 1, 상기 제 3 과정은, 제어 이동문의 레이블에 대한 정보를 입수하는 제 1 단계와;The third process includes: a first step of obtaining information on a label of a control moving door; 상기 제 1 단계에서 입수한 레이블 정보의 유무 확인 및 명칭의 클래스가 프로그램의 실행문에 해당하는가를 검사하여 레이블 정보의 정확성 여부를 판단하는 제 2 단계와;A second step of determining whether the label information is correct by checking whether the label information obtained in the first step and the class of the name correspond to an execution statement of the program; 상기 제 2 단계에서 레이블 정보가 부정확할 경우에는 적절한 경고 메시지를 출력하고 종료하는 제 3 단계와;A third step of outputting and terminating an appropriate warning message if the label information is incorrect in the second step; 상기 제 2 단계에서 레이블 정보가 정확할 경우에는 제어 이동문의 레이블 위치를 검사하는 제 4 단계와;A fourth step of checking the label position of the control door when the label information is correct in the second step; 상기 제 4 단계에서 검사된 레이블의 위치가 현재의 블록 내부에 존재하는가의 여부를 판단하는 제 5 단계와;A fifth step of determining whether the position of the label checked in the fourth step exists in the current block; 상기 제 5 단계에서 존재하지 않을 경우에는 경고 메시지를 출력하고 종료하는 제 6 단계와;A sixth step of outputting a warning message and terminating if it is not present in the fifth step; 상기 제 5 단계에서 존재할 경우에는 종료하는 제 7 단계를 포함하는 것을 특징으로 하는 칠 언어에 대한 위험한 제어 이동 탐지방법.And a seventh step of terminating if present in the fifth step. 제 1 항에 있어서,The method of claim 1, 상기 제 4 과정은, 추상 구문 트리의 노드가 끝인가의 여부를 판단하고, 끝일 경우에는 종료하는 제 1 단계와;The fourth process includes: a first step of determining whether a node of the abstract syntax tree is an end, and ending if it is an end; 상기 제 1 단계에서 끝이 아닐 경우에는 넌터미널형인가의 여부를 판단하는 제 2 단계와;A second step of determining whether the terminal is non-terminal if not in the first step; 상기 제 2 단계에서 넌터미널형일 경우에는 노드 이름이 블록문인가의 여부를 판단하는 제 3 단계와;A third step of determining whether or not the node name is a block statement when the non-terminal type is used in the second step; 상기 제 3 단계에서 노드 이름이 블록문일 경우에는 블록문 내부에 레이블이 존재하는가를 탐지하여 존재하면 경고 메시지를 출력하는 제 4 단계와;A fourth step of detecting whether a label exists inside the block statement when the node name is a block statement and outputting a warning message if the node name is a block statement; 상기 제 3 단계에서 노드 이름이 블록문이 아닐 경우 또는 상기 제 4 단계를 수행한 후, 현 노드의 자식 노드를 인자로 자신을 다시 호출하는 제 5 단계와;A fifth step of calling the node again with the child node of the current node when the node name is not a block statement in the third step or after performing the fourth step; 상기 제 2 단계에서 넌터미널 형이 아닐 경우 또는 제 5 단계를 수행한 후, 노드의 포인터를 형제 노드로 옮기고, 상기 제 1 단계로 귀환하여 추상구문트리의 노드가 끝이 될 때까지 상기 단계들을 반복하는 제 6 단계를 포함하는 것을 특징으로 하는 칠 언어에 대한 위험한 제어 이동 탐지방법.If the second step is not a non-terminal type or after performing the fifth step, move the pointer of the node to the sibling node, and return to the first step until the node of the abstract syntax tree ends. And a repeating sixth step.
KR1019970063591A 1997-11-27 1997-11-27 Detecting method of dangerous control flow for chill programming language KR100248435B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019970063591A KR100248435B1 (en) 1997-11-27 1997-11-27 Detecting method of dangerous control flow for chill programming language

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019970063591A KR100248435B1 (en) 1997-11-27 1997-11-27 Detecting method of dangerous control flow for chill programming language

Publications (2)

Publication Number Publication Date
KR19990042696A KR19990042696A (en) 1999-06-15
KR100248435B1 true KR100248435B1 (en) 2000-03-15

Family

ID=19525802

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019970063591A KR100248435B1 (en) 1997-11-27 1997-11-27 Detecting method of dangerous control flow for chill programming language

Country Status (1)

Country Link
KR (1) KR100248435B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8443342B2 (en) * 2010-06-01 2013-05-14 Microsoft Corporation Static analysis using interactive and integration tools

Also Published As

Publication number Publication date
KR19990042696A (en) 1999-06-15

Similar Documents

Publication Publication Date Title
EP1019818B1 (en) Automated validation and verification of computer software
US11151018B2 (en) Method and apparatus for testing a code file
US8266608B2 (en) Post-compile instrumentation of object code for generating execution trace data
Harrold et al. An approach to analyzing and testing component-based systems
RU2668973C2 (en) Debugging native code by transitioning from execution in native mode to execution in interpreted mode
CA2179553C (en) Determining dynamic properties of programs
US20080244536A1 (en) Evaluating static analysis results using code instrumentation
Deutsch Static verification of dynamic properties
EP0430182B1 (en) Method for assembly language programming potential error detection sensing apparent inconsistency with a previous operation
CN109359055B (en) Data testing method and device
US5822589A (en) Method for locating errors in a computer program
KR100248435B1 (en) Detecting method of dangerous control flow for chill programming language
CN110347576B (en) Pseudo code debugging method and device
CN115658507A (en) Analysis system for real-time embedded software source code coverage rate
CN110647467B (en) Target code coverage rate testing method, system and medium based on single step exception
Ročkai et al. A simulator for llvm bitcode
Brockmeyer et al. An approach to monitoring and assertion-checking of real-time specifications
JP2013080406A (en) Compilation device, information processing system, compilation method, compilation program, and storage medium
US5029170A (en) Assembly language programming potential error detection scheme which recognizes incorrect symbolic or literal address constructs
CN117555811B (en) Embedded software analysis method, device and storage medium based on static symbol execution
Benz et al. Advancing source-level timing simulation using loop acceleration
Jahier The lurette v2 user guide
Su Automatic analysis of relay ladder logic programs
JP2659366B2 (en) Debugging method and device
JP2002278792A (en) Method for testing software

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20041201

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee