Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

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.

DeleteCancel

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

Extracting Visual Contracts from Java Programs

30th IEEE/ACM International Conference on Automated Software Engineering (ASE 2015)
by

Abdullah Alshanqiti

on 12 November 2015

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Extracting Visual Contracts from Java Programs

Extracting Visual Contracts from Java Programs
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
AspectJ
Tracing object
creation
,
read
and
write
access
Aggregating observations into
contract instances
Visualisation of 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
Daikon
discover invariant conditions on attributes and their relations to (data-type) parameters

increase accuracy of generalised contracts
Evaluation
We would like to assess
(In)completeness
Correctness
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
http://www.cs.le.ac.uk/people/amma2/experiment/
Scalability
Two case studies to evaluate scalability to
large numbers of invocations
large object graphs
Conclusion
Application
1 - Visual contract
Let's see an example!
Sample documentation

Documentation
(specification of operations)
Implementation
(source code)
Test report
Group A
Test report (VC)
(group B)
Interface
(signatures)
Rule (
makeReservation
)
Example
Visualisation
basic contracts
with multi object
Example of visualisation
Approach
Pop-up window to display constraints
Abdullah Alshanqiti and Reiko Heckel
University of Leicester

Class diagram
Case study :
Rental Car Services
2 - Approach
3 - Evaluation
Access and code locations:
Reservation
object
Summary
Future work
But
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:
Group
A
:
32
students with
textual test reports
Group
B
:
34
students with
test reports by visual contracts
Question:
Are visual contracts more effective for detecting faults in tests?
For which kinds of faults are they most effective?
Full transcript