Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Visual Contract Extractor: A Tool for Reverse Engineering Visual Contracts using Dynamic Analysis

31th IEEE/ACM International Conference on Automated Software Engineering (ASE 2016)

Abdullah Alshanqiti

on 3 September 2016

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Visual Contract Extractor: A Tool for Reverse Engineering Visual Contracts using Dynamic Analysis

Visual Contract Extractor: A Tool for Reverse Engineering Visual Contracts using Dynamic Analysis
Why visual contracts?
Observing access and synthesising
contract instances
Previous work
: Alshanqiti, Abdullah M., and Reiko Heckel. "Towards Dynamic Reverse Engineering Visual Contracts from Java." Electronic Communications of the EASST 67 (2014).
Weaving instrumentation code with
Tracing object
Aggregating observations into
contract instances
Each contract instance represents one invocation. To generalise:
extract effect (pre/post diff) for each contract instance
classify according to operation executed and extracted effect
infer general contract for each class, subsuming all its instances
Maximal rule, subsuming all instances.

Deriving effects and common context
Previous work :
Alshanqiti, Abdullah M., Reiko Heckel, and Tamim Khan. "Learning minimal and maximal rules from observations of graph transformations." Electronic Communications of the EASST 58 (2013).
Introducing (universally quantified) multi objects
Contracts describing the same effect over sets of equivalent objects
e.g. when iterating over containers
duplication of and within contracts

A multi-object
represents the set of objects the operation is applied to
carries cardinality constraints to describe effects on variable sets of objects
identified by detecting objects with the same effect, attributes and connections
Deriving constraints on
attributes and parameter values
We use actual data-type values extracted from rule instances as input to
discover invariant conditions on attributes and their relations to (data-type) parameters

increase accuracy of generalised contracts
We would like to assess
reviewing code and model
Utility in assessing
test reports and localising faults
Utility in assessing
test reports and localising faults
Small, but significant advantage for VCs
recall 40% up (0.3/0215), precision 50% up (0.35/0.232) from textual results

Where are VCs more or less effective?
more effective with faults involving structure, than attributes and parameters only
less effective with faults in postconditions (effects) than preconditions
able to correlate information across structure, attributes, parameters and returns
Two case studies to evaluate scalability to
large numbers of invocations
large object graphs
1 - Visual contract
Let's see an example!
Sample documentation

(specification of operations)
(source code)
Test report
Group A
Test report (VC)
(group B)
Rule (
basic contracts
with multi object
Example of visualisation
Pop-up window to display constraints
Abdullah Alshanqiti, Reiko Heckel, and Timo Kehrer
Class diagram
Case study :
Rental Car Services
2 - Approach
3 - Evaluation
Future work
we are able to reproduce all behaviours we observed as well as their generalisations to larger contexts
limited scope:
limited coverage of behaviour:
not all internal classes are instrumented (
e.g., libraries, external components
test cases may only exercise a subset of available behaviours
User study on 66 participating students in two groups:
students with
textual test reports
students with
test reports by visual contracts
Are visual contracts more effective for detecting faults in tests?
For which kinds of faults are they most effective?
ASE 2016
September 3-7 2016

(University of Leicester, UK; Politecnico di Milano, Italy)
Access and code locations:
Visualisation of contract instances
Preparation Step
1- Selecting the classes to define the scope of object types

2 - Instrumenting Java source code (
or bytecode

3 - Selecting and executing test cases
Export to Henshin
is a visual model transformation language for the formal specification of graph transformation rules.
Full transcript