In general, a system development process includes a requirements development stage, a design and development stage and a verification stage. A requirement may be characterized as a documented need of how a particular product or service should perform. More particularly, a requirement may be referred to as a statement that identifies the necessary functionalities, attributes, capabilities, characteristics or qualities of a system. Requirements in the form of a requirements specification are used as inputs into the design stages of a system development process to design what elements and functions are necessary for a particular system.
Requirement specifications can be expressed using a variety of languages. These languages may be graphical or textual in nature and may include, without limitation, transition systems (e.g., state machines), event sequence charts (e.g., scenario or sequence diagrams) and structured English language. The system is implemented using software or hardware or both, often using interfaces implemented using sensors to sense the environment (including the user) inputs and actuators to control the hardware. In complex systems, particularly those in which safety is a primary concern, exhaustive testing and verification of the system, is required to ensure that the behavior of the system satisfies the requirements specification of the system.
A common approach to testing and verifying system is formal verification. Broadly, formal verification is the process of proving or disproving the correctness of intended algorithms underlying a system with respect to a formal specification (also referred to as a property), using a class of state space exploration methods. One formal verification approach is model checking, which is an automatic, systematic, exhaustive exploration of the behaviors of the model. Usually, this includes exploring all states and transitions in the model by using smart and domain-specific abstraction techniques to consider whole groups of states in a single operation and reduce computing time. Implementation techniques include state space enumeration, symbolic state space enumeration, abstract interpretation, symbolic simulation and abstraction refinement. The properties to be verified are often described in a temporal logic, such as linear temporal logic (LTL) or computational tree logic (CTL).
Known formal verification methods are normally applicable only to the models of the system at the design stage, or to the software portion of the systems. Although theoretically possible, models for entire systems can be impossible to implement, or at best, be extremely large so that existing formal methods techniques cannot scale to tackle the resulting large state space. Therefore, testing using simulation of the system is the only way of verifying the system against its requirements specification. However, since the test cases (test inputs to the system and the desired outputs) are written by testers, they usually test only simple specifications. This is because writing test cases for complex temporal specifications is error-prone. In addition, checking the simulation runs against the desired outputs according to complex temporal specifications is also time consuming and error-prone. Thus, there is a need to provide a system and method for automatic formal verification of an executable system that is scalable to any size system.
A system and method for automatic formal verification of an executable system includes an assertion monitor configured to verify a system against an assertion in a specification. The assertion monitor includes a parser configured to generate a propositional formula representing the assertion in the specification using Boolean propositions, a filter configured to generate a run of the system using truth assignments for the propositional symbols, and a trace verifier configured to verify the assertion using the run of the system using truth assignments for the propositional symbols and the propositional formula.
The method for verifying a system against an assertion in a specification includes generating a propositional formula representing an assertion in the specification using Boolean propositions, wherein each Boolean proposition is associated with an atomic assertion in the assertion and generating a test case designed to assess the behavior of the system with respect to the assertion.
The method also includes generating configuration data in response to a simulation of the test case on the system, converting the configuration data into truth assignments of the propositional symbols, generating a run of the system using the truth assignments for the propositional symbols and verifying the assertion using the run of the system in propositional symbols and the propositional formula.
Additional features will become apparent from the following description and appended claims, taken in conjunction with the accompanying drawings.
The embodiments described herein relate generally to a system and method for formal verification of executable systems and, more particularly, to a system and method for automatic formal verification of an executable system against designated portions of a specification. The system and method employ an assertion-based verification process that is scalable to any size system and configured to operate with or without direct accessibility to the system (i.e., online or offline, respectively).
Using an online approach to the formal verification system, a suite of test cases is developed to verify a particular assertion from the specification. In general, an assertion is a true-false statement used to verify certain properties of variables contained in the specification. The test cases are simulated by the system and the results sent to an assertion monitor for evaluation and verification of the assertion.
Using an offline approach to the formal verification system, a set of traces representing a sequence of configurations of the system are generated and input to the system. The configuration for each trace is sent to the assertion monitor for evaluation and verification of the assertions contained therein.
Online Verification System
Computing devices generally each include instructions executable by one or more devices such as those listed above. Computer-executable instructions may be compiled or interpreted from computer programs created using a variety of programming languages and/or technologies, including without limitation, and either alone or in combination, Java™, C, C++, Visual Basic, Java Script, Perl, etc. In general, a processor (e.g., a microprocessor) receives instructions, e.g., from a memory, a computer-readable medium, etc., and executes these instructions, thereby performing one or more processes, including one or more of the processes described herein. Such instructions and other data may be stored and transmitted using a variety of known computer-readable media.
A computer-readable media includes any medium that participates in providing data (e.g., instructions), which may be read by a computing device such as a computer. Such a medium may take many forms, including, but not limited to, non-volatile media, volatile media, and transmission media. Non-volatile media includes, for example, optical or magnetic disks and other persistent memory. Volatile media include dynamic random access memory (DRAM), which typically constitutes a main memory. Common forms of computer-readable media include any medium from which a computer can read.
Referring to
Assertion monitor 14, as explained in greater detail below, includes a parser 14a, a filter 14b, a storage device 14c, and a trace verifier 14d. The parser 14a is software that breaks down an assertion in the specification written in a logical language such as LTL and outputs a set of atomic assertions (assertions that cannot be broken down further). The storage device 14c stores an association list associating each atomic assertion produced by the parser 14a with a unique propositional symbol.
The filter 14b is software that takes as input a configuration of the system assigning values to the variables mentioned in the assertions and assigns truth values (True or False) the propositional symbols by evaluating the corresponding atomic assertions using the values of the variables in the configuration. The trace verifier 14d has the propositional formula F, which is the assertion where all the atomic assertions have been replaced by the corresponding propositional symbols. The trace verifier 14d evaluates F using the truth value of the propositions for each of the configurations in the sequence of configurations obtained from the trace of the system corresponding to a test case.
As described in further detail below, each test case within the test suite is simulated by the executable system written in a modeling language such as, but not limited to, C, C++, Unified Modeling Language (UML) and Simulink/Stateflow. The simulation results are sent to the assertion monitor 14 for evaluation and verification of the test case assertion.
Algorithm 100 begins at step 102 by extracting the given assertion from the specification, which is generally written in a formal language that views time as a sequence of states such as linear temporal logic (LTL). In temporal logic, a statement can be constant in time, but its truth value may vary in time. For instance, at one given time, the statement may be true, but at another time, the statement may be false. However, no statement can be true or false simultaneously in the same state (e.g., a moment in time, point in time or an instant). Having the specification written in a formal language allows the system to automatically simulate and verify the system 16 against the specification.
Using one approach, the specification is written in ActionLTL, which is a variant of linear temporal logic (LTL) in that it allows complex temporal requirements such as event occurrences, arithmetic expressions and parametric functions to be specified. The ActionLTL assertion is then converted to Boolean propositions at step 104 using parser 14a. In other words, the complex expressions in the assertion are broken down into elemental atomic expressions, which in this case, are Boolean expressions in their simplest form. At step 106, each atomic expression is assigned a propositional symbol and the collective assignments are output to an association list that stores the association between the expressions of variables in Boolean form and the assigned propositional symbols. In this example, the association list is stored in storage device 14c, but as understood by one of ordinary skill in the art, any means suitable for storing, accessing and retrieving the association list may be used. At step 108 algorithm 100 generates a propositional formula by replacing each atomic expression with the corresponding propositional symbol. As explained in greater detail below, the propositional formula is input to trace verifier 14d (
At step 110, filter 14b retrieves configuration e data, including state variables and values. At step 112, a filtering program associated with filter 14b assigns truth values (True or False) to each propositional symbol corresponding to the atomic assertions using the values of the variables in each configuration. More specifically, filter 14b looks to the association list to determine which atomic expression is assigned to which propositional symbol. The relationship between the atomic expressions and the propositional symbols is used by filter 14b at step 114 to convert the test case simulation of the system 16 (i.e., run of the system) into a sequence of truth value assignments to the propositional symbols. Thus, instead of having a simulated test case being a run on variables expressed in a formal language, the filter 14b generates a sequence of assignments to the propositional symbols.
At step 116, the propositional formula from step 108 and the sequence of assignments to the propositional symbols from step 114 are input to trace verifier 14d to formally verify that the assertion presented in the system 16 satisfies the assertion set forth in the specification. At step 118, the trace verifier outputs the Result of the trace.
Referring back to
Offline Verification System
Algorithm 400 begins at step 402 by extracting the given assertion from the specification, which is generally written in a formal language such as linear temporal logic (LTL) or ActionLTL, which is a variant of linear temporal logic (LTL) in that it allows complex temporal requirements such as event occurrences, arithmetic expressions and parametric functions to be specified. The ActionLTL assertion is then parsed at step 404 using parser 204a to identify Boolean propositions. In other words, the complex expressions in the assertion are broken down into elemental atomic expressions, which in this case, are Boolean expressions in their simplest form. At step 406, each atomic expression is assigned a propositional symbol and the collective assignments are output to an association list that stores the association between the expressions of variables in Boolean form and the assigned propositional symbols. In this example, the association list is stored in storage device 204c, but as understood by one of ordinary skill in the art, any means suitable for storing, accessing and retrieving the association list may be used. At step 408, algorithm 400 generates a propositional formula by replacing each atomic expression with the corresponding propositional symbol. As explained in greater detail below, the propositional formula is input to trace verifier 204d (
At step 410, filter 204b retrieves configuration e data from the selected trace, including state variables and values. At step 412, a filtering program associated with filter 204b assigns truth values (True or False) to each propositional symbol corresponding to the atomic assertions using the values of the variables in each configuration. More specifically, filter 204b looks to the association list to determine which atomic expression is assigned to which propositional symbol. The relationship between the atomic expressions and the propositional symbols is used by filter 204b at step 414 to convert the trace of the system (i.e., run of the system) into a sequence of truth value assignments to the propositional symbols. Thus, instead of having a trace run on variables expressed in a formal language, the filter 204b generates a sequence of assignments to the propositional symbols.
At step 416, the propositional formula from step 408 and the trace on truth assignments to propositional symbols from step 414 are input to trace verifier 204d to formally verify that the trace satisfies the assertion set forth in the specification. At step 418, the trace verifier outputs the Result of the trace.
Referring back to
It is to be understood that the above description is intended to be illustrative and not restrictive. Many alternative approaches or applications other than the examples provided would be apparent to those of skill in the art upon reading the above description. The scope of the invention should be determined, not with reference to the above description, but should instead be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled. It is anticipated and intended that further developments will occur in the arts discussed herein, and that the disclosed systems and methods will be incorporated into such further examples. In sum, it should be understood that the invention is capable of modification and variation and is limited only by the following claims.
The present embodiments have been particular shown and described, which are merely illustrative of the best modes. It should be understood by those skilled in the art that various alternatives to the embodiments described herein may be employed in practicing the claims without departing from the spirit and scope of the invention and that the method and system within the scope of these claims and their equivalents be covered thereby. This description should be understood to include all novel and non-obvious combinations of elements described herein, and claims may be presented in this or a later application to any novel and non-obvious combination of these elements. Moreover, the foregoing embodiments are illustrative, and no single feature or element is essential to all possible combinations that may be claimed in this or a later application.
All terms used in the claims are intended to be given their broadest reasonable construction and their ordinary meaning as understood by those skilled in the art unless an explicit indication to the contrary is made herein. In particular, use of the singular articles such as “a”, “the”, “said”, etc. should be read to recite one or more of the indicated elements unless a claim recites an explicit limitation to the contrary.
Number | Name | Date | Kind |
---|---|---|---|
20020099982 | Andersen et al. | Jul 2002 | A1 |
20020165701 | Lichtenberg et al. | Nov 2002 | A1 |
20050071818 | Reissman et al. | Mar 2005 | A1 |
20050096894 | Szpak et al. | May 2005 | A1 |
20050223353 | Keidar-Barner et al. | Oct 2005 | A1 |
20060053408 | Kornerup et al. | Mar 2006 | A1 |
20060064291 | Pattipatti et al. | Mar 2006 | A1 |
20060224361 | McIntyre et al. | Oct 2006 | A1 |
20070260438 | Langer et al. | Nov 2007 | A1 |
20070282586 | Szpak et al. | Dec 2007 | A1 |
20070288213 | Schantl et al. | Dec 2007 | A1 |
20080004840 | Pattipatti et al. | Jan 2008 | A1 |
20100218044 | Roblett et al. | Aug 2010 | A1 |
20110088017 | Mohalik | Apr 2011 | A1 |
Entry |
---|
Ansuman Banerjee, Pallab Dasgupta and Partha P. Chakrabarti, “Can Semi-Formal be Made More Formal?”, Next Generation Design and Verification Methodologies for Distributed Embedded Control Systems, Proceedings of the GM R&D Workshop, Bangalore, India, Jan. 2007, pp. 193-211. |
Number | Date | Country | |
---|---|---|---|
20110087923 A1 | Apr 2011 | US |