|
|
|
|
|
|
|
Overview
Static error checker Wasp employs powerful data flow analysis to detect subtle
run-time errors and weak points in Java, Modula-2, and Oberon-2 programs.
Wasp also produces detailed and precise method call graph.
The following kinds of errors may be detected in a Java program:
- null pointer exception
- impermissible cast of variable value of reference type
- array index out of bounds
- division by zero
- overflow in arithmetic operator
- etc.
The following kinds of weak points may be detected in a Java program:
- uninitialised variable
- assignment of variable whose value is never used
- unreachable branch in conditional or switch statement
- unreachable loop body
- unreachable (or always reachable) second operand
in conditional operator '&&' or '||'
- unreachable catch clause
- unreachable normal exit of method
- uncaught exception
- etc.
Some comments on the list above.
The absence of initialisation for a variable is not considered as error
according the Java language semantics
but very often it may prove to be an error.
Sometimes the message on unreachable branch is a trivial non-interesting fact.
In some case such nessage may be induced by the situation which appears to be
an actual error.
Often such message shows a program weakness that may lead to errors
in future modifications of a program.
The case when assigned value of a variable is never used,
is usually qualified as program weakness although sometimes may be induced
by an erroneous situation.
Wasp also produces detailed and precise method call graph.
The method call graph of a program helps to know for each method
what actual methods are called in its body.
Additionally, for each method you may know where this method may be called.
Method call graphs produced other existing tools are imprecise due
to weak analyses applied.
In comparison with other static error analysers,
Wasp has two important advantages:
- Wasp is able to distinguish between a definite error,
a possible error (warning), and a potentially erroneous situation.
In the latter case, Wasp produces a message called
conditional error that in practice appear to indicate an error
in approximately one case from five
- Wasp performs context-sensitive data flow analysis,
so it is able to recognize an error that appears only for some calls
of the method containing it, but does not for other ones.
All known to us static analysers (e.g. QStudio Java, MetaMata Audit, etc)
that statically detect run-time errors may produce
only long lists of warnings because they
can not recognize definite errors in a program due to weak
analyses applied. A user has to waste much time to analyse all warnings.
Wasp has proven its ability to find subtle bugs in programs even
after debugging and testing stages of development because Wasp
detects situations of real complexity.
|