![]() | Only 14 pages are availabe for public view |
Abstract Real-time systems could be vulnerable to hazardous situations. Thus, testing their functionality under time onstraints is very important. Most of the current tools focus on the analysis of the modelling phase, which is not the final stage of the V-Model. Inconsistencies sometimes occur between the implementation phase and the modelling phase. In this thesis, an American National Standards Institute for C-programming language (ANSI-C) code is statically analyzed to get the hazardous events that may occur in an Embedded ANSI-C code. As far as our knowledge, this is the first research that proposes an automated methodology to model and analyze of safety-critical embedded real-time systems with the help of a hazardous event equation to generate possible hazard scenarios. The strength of the proposed methodology is that it works directly on the implementation phase of the project without requiring multiple tuning of the ANSI-C code with distinct input values. The proposed system consists of three main sub-systems. The modeler is the first subsystem, which is responsible for parsing the input ANSI-C code and transforming it into an Hierarchical Communicating Real-time State Machine (H-CRSM) model. A hazardous event equation that represents the undesirable event that should not occur is created. Both, the H-CRSM model and the hazardous event, are input to the model analyzer sub-system. The model analyzer is the second sub-system, which is responsible for analyzing the generated H-CRSM model with the help of the hazardous event equation to generate a list of hazardous scenarios that may occur in the input ANSI-C code. Each hazardous scenario shows a path in the input ANSI-C code that causes the undesirable event equation to occur. All variables that appear in a hazardous scenario are time-stamped system inputs to the ANSI-C code. Systems can generate correct but delayed output that jeopardizes the safety Page I of humans. That is why timestamps are very important to detect these types of hazardous situations. A simplifier, which is the third sub-module, runs on each hazardous scenario to help minimize the false-positive scenarios. Variable classes are provided as inputs for each system input in the simplified equation. The system generates a list of values that can be used for each variable in the simplified scenario to prove that the hazard scenario is reachable. These values can be used as test cases to make sure that the project is implemented correctly. Two case studies are described in detail to show how the proposed system is capable of detecting the errors that might occur in an embedded ANSI-C code. The same results are achieved when our proposed automated solution ran over them. The work needed by an engineer to analyze a C-program manually for forty hours is done by our system in an automated way in less than half an hour. The proposed work can be extended to languages other than C-language. It helps in detecting the errors statically without the need to run the code on a simulator or a real vehicle. It can be part of the continuous integration process of a project to run it many times during the integration with other modules to help in the early detection of errors. |