Start Discovering Solved Questions and Course Assignments
TextBooks Included
Active Tutors
Asked Questions
Answered Questions
Reduce Concurrency: From a model-checking perspective, the searched state space consists of all possible thread-state combinations, which implies that the level of concurrency has the biggest impact o
Limit the Use of Pre-processor Directives: The C pre-processor is powerful, but unrestricted use of it can lead to code that is hard to understand and analyze. Limit its use to inclusion of header fil
Signal Handlers: In some operating systems, signal handlers are executed on a thread stack; they “overlay” the current thread execution (which may be used, for example, in combination with
Use of setjmp() and longjmp(): In C/C++, setjmp() saves the contents of the registers at a particular state in the program and longjmp() will restore that state later. In this way, longjmp() “re
Multiple Inheritance: In C++, multiple-inheritance occurs when a class inherits from more than one parent. For example: Multiple inheritance used with several non-pure virtual bases cannot be trans
Unconditional Jumps: Jumps which are not strictly upwards in the block hierarchy can require extensive control-flow manipulation, including creation of redundant code, and should be avoided if possibl
Untyped Allocations: In C/C++ untyped allocations such as malloc, calloc, and realloc can easily be used to create overlays, which again require translation overhead to keep the corresponding non-over
Unions: Unions in C and C++ are object overlays—aggregate quantities such as structs, except that each element of the union consists offset 0, and the total size of union is only as large as is
Primitive Type Casting: C/C++ allows you to cast between totally unrelated types. This can be problematic for model checking. Avoid type casting between unrelated types and in particular primitive typ
Pointer Arithmetic: C and C++ provide the ability to modify a pointer’s target address with arithmetic operations. This is used, for example, to index arrays. MyObject* P = ... ... P = P + 42
Program Design Guidelines for Model Checking: Most of the significant software development projects use some kind of design and coding guidelines. There exist many such guidelines, some including tens
User-Guided Searches: Traditionally heuristics are often problem-specific. Structural heuristics and property-specific heuristics of general utility are provided as built-in features of model checkers
Choose-free Heuristic: With the choose-free heuristic, the model checker first searches the part of state space that does not contain any non-deterministic choices. This is particularly useful when ab
Thread Preference Heuristic: This is similar to the thread interleaving heuristic mentioned above except that it focuses on a few threads that may be suspected to harbor an error. To do this, it relie
The key difference between a property-specific heuristic and a structural heuristic can be seen in the dining philosophers’ example where we search for the well-known deadlock scenario. When inc
Thread Interleaving Heuristics: A different kind of structural coverage is based on maximizing thread interleavings. Traditional testing frequently misses subtle race conditions or deadlocks because u
Code Coverage Heuristics: In many industries, 100% branch coverage is considered a minimum requirement for test adequacy (Bezier 1990). Branch coverage requires that at every branching point in the pr
Structural Heuristics: Structural coverage measures can be used during directed model checking to improve the state space coverage (Groce and Visser 2002). Rather than looking for a particular error,
Property-Specific Heuristics: They are based on specific properties such as: Deadlock: Maximize number of blocked threads Assertions and exceptions: Minimize distance to assertions and throws of ex
Directed Model Checking: It addresses the state explosion problem by using guided or heuristic search techniques during state space exploration (Edelkamp, Lluch-Lafuente, and Lee 2004; Edelkamp 2006).
Coverage for Model Checking: When model checking is incomplete and no errors are reported, we would like to gain information about what aspects of the program’s behavior have been checked. To do
How can you distinguish Model Checking and Testing. Briefly explain with suitable diagram.
Random Search: It non-deterministically selects a state on the frontier to explore, and can find results even when exhaustive search is not feasible. Its success in artificial intelligence makes it a
Beam Search: It is an optimization of the best-first search that uses the heuristic function to discard all but the m best candidate states at each depth, where m is the bound on the “width of t
A* Search: A* (pronounced “A star”) is a best-first search that attempts to minimize the total length of the path from the initial state to the goal state. It combines advantages of breadt