Introducing
Your new presentation assistant.
Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.
Trending searches
PRE & y>x → {x:=y || y:=x}‹doA()› POST
Provides uniform API to backend implementations
Delegates and manages worker threads
Essential functionality is contained in autonomous subsystems of the core
Lightweight framework for delegating and monitoring worker threads.
Extends the Java executor model by providing wait-and-collect functionality, etc.
Condition coverage
Decision coverage
Statement coverage
Branch coverage
Convert Java source file into
internal abstraction
Start and monitor method
workers
chrsva@chalmers.se
Generate test suite for
individual method
Start and monitor model generation, oracle generation and misc workers
Modified Condition / Decision Coverage
https://github.com/csvan/keytestgen
Generate a concrete
model for a single
execution path through
a single method.
If inequalities are present in the code, enumeration is not possible, and integers will have to be dynamically generated
Object relations can be constructed through enumeration over the path condition itself
Like objects, boolean values are generated by enumeration
z == false & y == true
A != null & B == null & C == A
FALSE
Lightweight solver for real/integer constraints
TRUE
Two-phase simplex + integer relaxations
Can be extended to solve mixed-type problems (when KeY gains support for floats)
Natural state transitions
Test mutations
Generate an abstract
oracle for a single
method
Features
Performance
Integration
Same basic functionality but...
CHARTER project concludes. Development on KeYTestGen2 begins as complete re-implementation in order to address concerns over the previous version.
Beckert, Gladisch, Engel, Hähnle et al produce a series of papers on test case generation in KeY.
The Verification Based Test Generator (VBT) is created.
VBT further developed and extended at Chalmers, with industrial use in mind. KeYTestGen v.1 created
Background
Greyboxing in a KeY sort of way
Christopher Svanefalk
System overview
Generate symbolic execution tree
Current and future work
Extract subset of desired nodes from the tree
Generate test fixture satisfying the path
condition for each node
Encode everything as executable test suite
Complete mapping of execution paths
in the Java code
Information about program pre-state
constraints in order for a specific execution
path to be taken
KeYTestGen2 is an automatic, greybox (white + blackbox) test case generation system, engineered
to be useful in actual industrial contexts
KeY proof process yields extensive metadata about possible execution paths through Java programs
Use this data in order to generate test suites satisfying rigorous coverage criteria in a completely automatic fashion
The creation of robust test suites is usually
an error-prone, expensive element of
contemporary software engineering
Extend the flexibility of KeY by providing an alternative to strict formal verification:
automated test generation
PRE → ‹x=x+y; y=x-y; x=x-y; if(x>y) doA() else doB()› POST
KeY transforms Java + JML into sequents:
"Absolute" demonstration of correctness
φ → ‹π› ψ
Formal verification tool
PRE → {x:=y || y:=x}‹if(x>y) doA() else doB()› POST
φ → ‹π› ψ
/*@ public normal_behavior
@ requires PRE
@ ensures POST */
public void swapAndDo(int x, int y) {
x = x + y;
y = x - y;
x = x - y;
if (x > y) {
doA();
} else {
doB();
}
}
PRE & y<=x → {x:=y || y:=x}‹doB()› POST
KeY "executes" each statement in the Java code,
encoding its logical implications on the program state
Transforms Java + JML contract into logical
proof obligation
Proof obligation closed using semi-automatic
theorem prover (based on a sequent calculus),
implying correctness of the code w.r.t. contract
Interactive: potentially requires (extensive)
training in logic and proof strategies
. . . . .
φ : antecedent (conjunction of formulae)
ψ : precedent (disjunction of formulae)
π : Java code
CLOSE
Limitations in KeY (no floats, no concurrency)
The proof may branch (on if-else statements for example), creating additional creating additional branches which must be closed to complete the proof
QED
Idea: use proof information generated by KeY in order to facilitate a less complete, but fully automatic verification technique: test case generation