KR101761732B1 - Apparatus and method for detecting error of application source code - Google Patents
Apparatus and method for detecting error of application source code Download PDFInfo
- Publication number
- KR101761732B1 KR101761732B1 KR1020150142616A KR20150142616A KR101761732B1 KR 101761732 B1 KR101761732 B1 KR 101761732B1 KR 1020150142616 A KR1020150142616 A KR 1020150142616A KR 20150142616 A KR20150142616 A KR 20150142616A KR 101761732 B1 KR101761732 B1 KR 101761732B1
- Authority
- KR
- South Korea
- Prior art keywords
- information
- error
- operating system
- source code
- setting information
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3604—Software analysis for verifying properties of programs
-
- G06F17/2705—
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)
- Software Systems (AREA)
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
The present invention provides an operating system in which operating system characteristics and object-related information are set in advance so that a user can detect an error code related to use of an operating system service API in a source code based on predefined setting information when a user creates an application source code An apparatus and method for detecting an error in an application source code, the apparatus comprising: a parser for parsing a plurality of predetermined operating system setting information and a created application source code; And an error detector for detecting an error of the parsed source code according to the setting information using a predetermined number of pieces of setting information error pattern information corresponding to operating system setting information parsed by the parser.
Description
The present invention relates to an apparatus and method for detecting an error in an application source code, and more particularly, to an error detection apparatus and method for detecting an error code related to use of an operating system service application programming interface (API) in an application source code And more particularly, to an apparatus and method for detecting an error in an application source code.
Generally, an embedded system refers to a device that embeds a microprocessor or a microcontroller and performs only functions designated by the original creator, and generally includes hardware and software for performing specific tasks as a part of a larger system Refers to a specific application system.
Such an embedded system can be applied to a variety of application fields such as a factory automation, a home automation, a robot control, a control field including a process control, a terminal device field including a cell phone, a PDA, a smart phone, a LBS, , An information appliance field including an HDTV, a network device field including an exchange, a router, a home server, a home gateway, and the like.
In recent years, the hardware specifications of embedded computer systems have been becoming more sophisticated and various electronic products have been converging. Because of this trend, the complexity of embedded software is increasing. On the other hand, the market cycle of products is getting shorter due to various demands of users and rapid changes in demand.
With these recent trends, the rapid development of complex software increases software bugs and reduces software stability.
Conventional verification and verification of software is a modeling checking method, which extracts a software model and verifies a model of a finite state machine (FSM) type. However, this technique has problems such as inaccuracies due to difference between actual software and model, complicated modeling process, and it is difficult to cope with the situation where the complexity of software increases.
In addition, the Abstract Interpretation technique is a technique for replacing a syntax of interest with an arbitrary syntax for a virtual machine, and performing error checking and verification at a compile-time or run-time point in a virtual machine, but has the same limitations as described above.
In addition, a conventional run-time checker technique adds a routine for detecting an error to the source code, and appropriately processes an error when it is detected. However, there are not many operating systems that support such error detection and error handling among a large number of operating systems, and even an operating system that supports error detection and error processing has a limitation in that it can detect errors only for its own application.
On the other hand, the above-described techniques for detecting errors in the software do not cope with many kinds of errors. In addition, it is possible to cope with unforeseen errors occurring in a very short time causing an application error, such as errors caused by asynchronous events such as interrupts, and errors in parts not inspected through test cases There was no.
In order to solve these problems, a prior patent (Laid-open Patent Application No. 10-2008-0050117) was filed on December 01, 2006, Detects the error, receives the detected error information, and processes the error based on the error information.
However, these prior patents have a problem that the use error of the operating system service API can be detected only by compiling or debugging the user-created source code.
In summary, conventionally, if the application developer can not understand the characteristics of the operating system in detail, there is a problem that it is not easy to use the service API of the operating system.
In addition, conventionally, it is impossible to detect an error code related to the use of the operating system service API in the application source code based on the setting information of the operating system. Therefore, the error code related to the use of the operating system service API in the source code can be detected Research and development is needed.
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems occurring in the prior art, and it is an object of the present invention to provide a method and apparatus for operating an operating system in which an operating system, And to detect an error code related to the use of the operating system service API in the source code based on the setting information, and a method thereof.
According to an aspect of the present invention, there is provided an apparatus for detecting an error in an application source code, the apparatus comprising: a parser for parsing a plurality of predetermined operating system setting information and a generated application source code; And an error detector for detecting an error of the parsed source code according to the setting information by using a predetermined number of setting information error pattern information corresponding to operating system setting information parsed by the parsing unit.
An operating system setting information input unit for inputting the preset operating system setting information into the parsing unit in a file format; And an application source code input unit for inputting the application source code into the parser.
Wherein the parser includes: a configuration information analyzer for parsing a plurality of operating system configuration information input through the operating system configuration information input unit, for each configuration information; And a source code interpretation unit for parsing the application source code input through the application source code input unit according to the setting information, respectively.
The plurality of operating system setting information may include attribute information of an operating system and information of an object used by the operating system.
The operating system attribute information may include at least one of class information of an operating system, difference information of an error processing method, and information on whether or not a hook routine is used.
The object information used by the operating system may include at least one of task information, alarm information, event information, and interrupt information as object definition and attribute information required for application execution in an operating system.
And an error pattern storage unit for storing error pattern information for each of the plurality of pieces of setting information for detecting an error of the source code in the error detecting unit.
The error pattern information includes error pattern information for an API used only in an extended task and a plurality of operating systems for a plurality of operating systems in which a class of an operating system is set as a class using only a basic task, Activation can not be enabled and the task is activated more than once. In the last sentence of the basic task source code, error pattern information about the case of not using the API related to termination of the task, extended task or multiple activation Error pattern information for activating a task with an attribute value of 1 several times, setting an interrupt category to disable the operating system service API in the service routine, generating error pattern information for using the API, and activating and deactivating an interrupt API For non-paired calls Information flow pattern, when two or more tasks to share a global variable. Error pattern information for cases where source code that reads or stores global variables does not use resource-related APIs in pairs, information about error patterns when resource-related APIs are not called in pairs, alarms already set using APIs The function body, the function to call the task body or the task, the interrupt service routine, the hook routine, and the alarm And error pattern information for use in the source code in an alarm-callback function.
And an error code output unit for outputting error code information for the source code detected by the error detecting unit and explanatory information on the error code.
According to another aspect of the present invention, there is provided a method of detecting an error in an application source code using an error detection apparatus, the method comprising: parsing a plurality of predetermined operating system setting information and a created application source code through a parser; And detecting an error of the parsed source code according to the setting information through the detection unit using the predetermined setting information error pattern information corresponding to the parsed operating system setting information.
Wherein the parsing step comprises parsing a plurality of operating system setting information input through the operating system setting information input unit for each setting information; And parsing the application source code input through the application source code input unit according to the setting information, respectively.
The plurality of operating system setting information may include attribute information of an operating system and information of an object used by the operating system.
The operating system attribute information may include at least one of class information of an operating system, difference information of an error processing method, and information on whether or not a hook routine is used.
The object information used by the operating system may include at least one of task information, alarm information, event information, and interrupt information as object definition and attribute information required for application execution in an operating system.
The error pattern information includes error pattern information for an API used only in an extended task and a plurality of operating systems for a plurality of operating systems in which a class of an operating system is set as a class using only a basic task, Activation) is enabled and the task is activated more than once. In the last sentence of the basic task source code, the error pattern information about the case of not using the API related to the termination of the task, the interrupt routine, And the API of the operating system, the error pattern information, the interrupt activation and deactivation API for the case of activating the task having the error pattern information, the extended task or the multiple activation property value 1 several times, For non-paired calls Information flow pattern, when two or more tasks to share a global variable. Error pattern information for cases where source code that reads or stores global variables does not use resource-related APIs in pairs, information about error patterns when resource-related APIs are not called in pairs, alarms already set using APIs The function body, the function to call the task body or the task, the interrupt service routine, the hook routine, and the alarm And error pattern information for use in the source code in the callback function.
And outputting the error code information for the detected source code and the description information for the error code.
According to the present invention, an error code relating to use of an operating system service API in a source code can be detected based on predefined setting information when a user creates an application source code in an operating system in which operating system characteristics and object related information are set in advance So that the user can easily detect a code writing error that occurs because the user can not accurately understand the characteristics of the operating system and the object related information before compiling or executing the program.
According to the present invention, it is possible to easily develop an application using an operating system because it solves the difficulty of understanding operating system setting information and using an API service.
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of an apparatus for detecting an error in an application source code according to the present invention; FIG.
2 is a flowchart showing an operation flow for an error detection method of an application source code according to the present invention;
BRIEF DESCRIPTION OF THE DRAWINGS The above and other objects, advantages and features of the present invention and methods of achieving them will be apparent from the following detailed description of embodiments thereof taken in conjunction with the accompanying drawings.
The present invention may, however, be embodied in many different forms and should not be construed as being limited to the exemplary embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, And advantages of the present invention are defined by the description of the claims.
It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. In the present specification, the singular form includes plural forms unless otherwise specified in the specification. &Quot; comprises "and / or" comprising ", as used herein, unless the recited component, step, operation, and / Or added.
Hereinafter, an apparatus and method for detecting an application source code according to the present invention will be described with reference to the accompanying drawings.
1 is a block diagram illustrating an apparatus for detecting an error in an application source code according to the present invention.
1, an apparatus for detecting an error in an application source code according to the present invention includes an operating system setting
The operating system setting
The application source
The setting
The source
The error
The error
The error
Let us now consider the operation of the error detection apparatus in the application source code according to the present invention having such a configuration.
First, the operating system setting information, for example, the attribute information of the operating system, and the object information used by the operating system are set in advance, and the operating system setting information is transmitted to the setting
The setting
On the other hand, the source code implementing the application function operating on the operating system is provided to the source
The source
The error
Therefore, the error
Hereinafter, an error detection method of an application source code according to the present invention corresponding to the operation of the error detection apparatus of the application source code according to the present invention will be described step by step with reference to FIG.
FIG. 2 is a flowchart illustrating an error detection method of an application source code according to the present invention.
As shown in FIG. 2, first, property information of an operating system and information of an object used by an operating system are set, and source code implementing an application function operating on an operating system is worked on.
Here, the attribute information of the operating system is information on a class of an operating system, difference information (Standard or Extended) of an error processing method, whether or not hook routines are used, and object information used by the operating system It shows the object definition and attribute information required for application execution in operating system such as task, alarm, event, and interrupt.
In this state, it is determined whether the setting information of the operating system is input to detect an error of the source code (S101).
Meanwhile, it is determined whether the application source code is input for error detection (S102).
When the setting information of the operating system is inputted in the step S101, the setting information of the input operating system is respectively parsed (S103). When the application source code is input in the step S102, Respectively (S104).
In operation S105, an error of each source code parsed in operation S104 is detected using an error pattern for each operating system setting information corresponding to each operating system setting information parsed in operation S103. That is, it is determined whether an error pattern that may occur in the current operating system setting occurs in the application source code, and an error code is detected. Here, the predetermined error pattern includes an error pattern for an API that is used only by an extended task (an extended task), an operating system is activated multiple times Multiple Activation), the error pattern for activating the task multiple times, the error pattern for not using the API related to the termination of the task in the last sentence of the basic task source code, the extended task or multiple activation Error pattern information for activating a task with an attribute value of 1 multiple times, setting the interrupt category to disable the operating system service API in the service routine, setting the error pattern for using the API, activating and deactivating the interrupt API If you did not call it with an error (E. G., DisableInterrupt / EnableInterrupt / SuspendInterrupt / ResumeInterrupt), when more than one task to share a global variable. Error pattern information for cases where the source code that reads or stores global variables does not use resource-related APIs in pairs, error patterns for when resource-related APIs are not called in pairs (for example, GetResource / RelResource) The service API, whose use is limited according to the error pattern and the setting information of the other operating system, is called a task body or a function to be called by a task, an interrupt An error pattern for use in source code in a service routine, a hook routine, and an alarm callback function.
If an error of the source code is detected in step S105, the error source code and the detailed information about the error source code are output so that the user can easily confirm the error source code (S106).
While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, but, on the contrary, And various alternatives, modifications, and changes may be made within the scope of the invention.
Therefore, the embodiments described in the present invention and the accompanying drawings are intended to illustrate rather than limit the technical spirit of the present invention, and the scope of the technical idea of the present invention is not limited by these embodiments and accompanying drawings . The scope of protection of the present invention should be construed according to the claims, and all technical ideas within the scope of equivalents should be interpreted as being included in the scope of the present invention.
100: Operating system setting information input unit
110: Application source code input unit
120: Setting information analyzing unit
130: Small code analyzing unit
140: Error code detector
150: Error pattern storage unit
160: Error code output unit
Claims (16)
A parsing unit for parsing a plurality of predetermined operating system setting information and generated application source code, respectively;
An error detector for detecting an error of the parsed source code according to the setting information using a predetermined number of setting information error pattern information corresponding to operating system setting information parsed by the parsing unit; And
And an error pattern storage unit for storing error pattern information for each of the plurality of setting information for detecting an error of the source code in the error detecting unit,
The error-
If the operating system class is set to a class that uses only the basic task, and the error pattern information about the API used only by the extended task is used, Error pattern information for cases where the task is activated several times, information on the error pattern when the API related to termination of the task is not used in the last sentence of the basic task source code, extended task or multiple activation attribute values are set to 1 Error pattern information for activating the task multiple times, setting the interrupt category to disable the operating system service API in the service routine, error pattern information for using the API, and not calling the interrupt activation and deactivation APIs in pairs If the error pattern information for two, When tasks on a shared global variable. Error pattern information for cases where source code that reads or stores global variables does not use resource-related APIs in pairs, information about error patterns when resource-related APIs are not called in pairs, alarms already set using APIs The function body, the function to be called by the task body, the interrupt service routine, the hook routine, and the alarm And error pattern information for use in source code in a callback function.
An operating system setting information input unit for inputting the preset operating system setting information into the parsing unit in a file format; And
An application source code input unit for inputting the application source code into the parser;
Further comprising: an error detection unit for detecting error in the application source code.
The parsing unit,
A setting information analyzing unit for parsing a plurality of operating system setting information inputted through the operating system setting information input unit, for each setting information; And
And a source code analyzing unit for parsing the application source code input through the application source code input unit according to the setting information, respectively.
Wherein the plurality of operating system setting information includes attribute information of an operating system and information of an object used by the operating system.
Wherein the operating system attribute information includes at least one of class information of an operating system, difference information of an error processing method, and information on whether or not a hook routine is used.
The object information used by the operating system includes object definition and attribute information necessary for application execution in an operating system and includes at least one of task information, alarm information, event information, and interrupt information, Device.
And an error code output unit for outputting error code information for the source code detected by the error detection unit and description information about the error code.
Parsing the plurality of operating system setting information set and the created application source code through a parser, respectively; And
Detecting an error of the parsed source code according to the setting information using a predetermined number of pieces of setting information error pattern information corresponding to operating system setting information parsed through the parsing unit,
The error-
If the operating system class is set to a class that uses only the basic task, and the error pattern information about the API used only by the extended task is used, Error pattern information for cases where the task is activated several times, information on the error pattern when the API related to the termination of the task is not used in the last sentence of the basic task source code, The error pattern information for when the API is used, and the interrupt activation and deactivation API are not called in pairs. In this case, Error pattern information for When the task to share a global variable. Error pattern information for cases where source code that reads or stores global variables does not use resource-related APIs in pairs, information about error patterns when resource-related APIs are not called in pairs, alarms already set using APIs The function body, the function to be called by the task body, the interrupt service routine, the hook routine, and the alarm And error pattern information for use in the source code in the callback function.
Wherein the parsing comprises:
Parsing a plurality of operating system setting information input through the operating system setting information input unit according to setting information; And
And parsing the application source code input through the application source code input unit according to the setting information, respectively.
Wherein the plurality of operating system setting information includes attribute information of an operating system and information of an object used by an operating system.
Wherein the operating system attribute information includes at least one of class information of an operating system, difference information of an error processing method, and information on whether or not a hook routine is used.
The object information used by the operating system includes object definition and attribute information necessary for application execution in an operating system and includes at least one of task information, alarm information, event information, and interrupt information, Way.
And outputting the error code information for the source code detected through the error detecting unit and the description information for the error code.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150142616A KR101761732B1 (en) | 2015-10-13 | 2015-10-13 | Apparatus and method for detecting error of application source code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150142616A KR101761732B1 (en) | 2015-10-13 | 2015-10-13 | Apparatus and method for detecting error of application source code |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20170043198A KR20170043198A (en) | 2017-04-21 |
KR101761732B1 true KR101761732B1 (en) | 2017-07-26 |
Family
ID=58705459
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020150142616A KR101761732B1 (en) | 2015-10-13 | 2015-10-13 | Apparatus and method for detecting error of application source code |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101761732B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102187293B1 (en) * | 2018-11-05 | 2020-12-04 | 서강대학교 산학협력단 | Apparatus and method for analyzing smart contracts being capable of saving GAS |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014215937A (en) * | 2013-04-30 | 2014-11-17 | 株式会社システムズ | Information processing apparatus, information processing method and program |
-
2015
- 2015-10-13 KR KR1020150142616A patent/KR101761732B1/en active IP Right Grant
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014215937A (en) * | 2013-04-30 | 2014-11-17 | 株式会社システムズ | Information processing apparatus, information processing method and program |
Also Published As
Publication number | Publication date |
---|---|
KR20170043198A (en) | 2017-04-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20070300209A1 (en) | Run into function | |
CN106503563B (en) | Batch leak detection method based on general framework | |
KR20100084036A (en) | Apparatus and method for detecting error of software | |
US20150212923A1 (en) | Nontransitory processor readable recording medium having fault injection program recorded therein and fault injection method | |
EP1849064A1 (en) | Applying coding standards in graphical programming environments | |
US7080360B2 (en) | Breakpoint safety net | |
CN108021791B (en) | Data protection method and device | |
Seiger et al. | Test modeling for context-aware ubiquitous applications with feature petri nets | |
Kästner et al. | Proving the absence of stack overflows | |
US20220137586A1 (en) | Method, computer program and apparatus for analysing a programmable logic controller program | |
KR101761732B1 (en) | Apparatus and method for detecting error of application source code | |
Kaestner et al. | Analyze this! sound static analysis for integration verification of large-scale automotive software | |
Nair et al. | A static code analysis tool for control system software | |
US6993749B2 (en) | Conditional debug monitors | |
Paige et al. | FPTC: automated safety analysis for domain-specific languages | |
US9710360B2 (en) | Optimizing error parsing in an integrated development environment | |
US6983454B2 (en) | Extended “run to” function | |
Robotics | Technical Reference Manual–Rapid Overview | |
Kress-Gazit et al. | The challenges in specifying and explaining synthesized implementations of reactive systems | |
Ahn et al. | A hierarchical fault tolerant architecture for component-based service robots | |
Frey et al. | “Safety automata”—A new specification language for the development of PLC safety applications | |
EP4047482A1 (en) | Improved checking of correctness of a plc program | |
US20140047410A1 (en) | Method and system for semiconductor host simulation automation | |
EP3889703B1 (en) | Method and apparatus for expressing and verifying functional specifications of a programmable logic controller program | |
Simon et al. | Static analysis of Sequential Function Charts using abstract interpretation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |