Eric Bodden Current conditions in Darmstadt: Scattered Clouds, 20°C
20°C

Easy and efficient software verification
  • rss
  • Home
  • Research
    • Publications
    • Presentations
    • Past Research
      • Efficient Runtime Verification
      • Racer: Effective Race Detection Using AspectJ
      • Continuation-equivalent states (ICSE 2010)
      • Aspect-oriented programming and design
      • Visual specification languages
      • A denial-of-service attack on the Java bytecode verifier
  • Tools
    • TamiFlex – a tool suite for taming reflection
    • Clara: Compile-time Approximation of Runtime Analyses
    • RacerAJ (for race detection)
    • An introduction to Soot 2.2.5
    • Aspect-oriented approaches targeting the .NET Framework
  • Teaching
    • Automated Software Engineering
    • Software-Engineering Project
    • COMP 520
    • COMP 621
  • Legacy
    • Bad Sector Recovery on NTFS
    • Arithmetic Coding
    • PHP Scripts
  • About me
  • Photos

New Tech Report: Efficient and Precise Typestate Analysis by Determining Continuation-Equivalent States

Eric | September 10, 2009

image

I just uploaded a new Technical Report. The report (currently under submission) describes a novel typestate analysis, called Nop-Shadows Analysis,  that I implemented for my doctoral dissertation. The analysis is certainly one of my dissertation’s major technical contributions. I implemented the Nop-Shadows Analysis in the Clara framework, which means that you are welcome to download it, try it out or extend it.


Continuation-equivalent states

So what are these continuation-equivalent states that appear in the title? We say that two automaton states s1 and s2 are continuation-equivalent if, given the current code location and all possible continuations of the execution after this location we either will or won’t reach a violating typestate regardless of whether we are in s1 or s2. Maybe an example is in order… (taken from the paper)

State machine for ConnectionClosed property

Assume that we want to evaluate the “ConnectionClosed” property that is depicted by the state machine on the right. The property says that it is an error to write to a closed Connection (where connections can alternate between an “connected” and a “closed” state through “close” and “reconnect” operations. Next, assume that we want to statically evaluate this property on the following simple program…

Example

The figure on the right shows a program that is annotated with the analysis information that the Nop-Shadows Analysis computes. The example program violates the connection property by closing the connection (even twice, at lines 5 and 6), and then writing to the connection (line 7). Note, though, that all other statements in this program are irrelevant to the property violation. In particular, one does not need to monitor the “close” and “reconnect” operations at lines 3 and 4 because they precede the violating fragment of the run. Conversely, the operations at lines 8 to 10 follow this fragment, and hence do not need to be monitored either. A little more subtle, even of the the two“close” events at lines 5 and 6, it is correct to omit monitoring one of them. (But not
both!) The static analysis that we present in the paper will eliminate the instrumentation at exactly those shadows that we just identified as irrelevant—“nop shadows”, as we call them. Instrumentation will only remain in lines 5 and 7, or 6 and 7—an optimal result for this program.

The Nop-Shadow Analysis uses a deterministic finite-state machines for the mirror language of the original automaton’s language (see Figure 4b) to construct for every statement a partitioning of automaton states. States that are in the same class of the partition are continuation-equivalent. For instance, at line 3, which transitions from state 0 to 1, states {0,1,2} are all continuation-equivalent. Therefore there is no need to monitor the transition at this line – the transition is irrelevant!

Results

Results The analysis has several nice properties. Firstly, it is relatively efficient, and it is precise (see Figure). Also, it seems to be the first analysis of its kind (a flow-sensitive typestate analysis generating residual runtime monitors) that is sound. Unfortunately, we found an unsoundness problem in two analyses that we and others published earlier. The paper describes this problem in the related-work section. For my dissertation, I proved the novel Nop-Shadows Analysis sound, which was relatively easy because the analysis follows a relatively simple design.





Related posts and pages:

  1. Now available: Clara, a novel framework for implementing hybrid typestate analyses In my doctoral dissertation (click here for a draft), I...

Categories
Research Blog
Tags
Clara, Static Analysis, Typestate
Comments rss
Comments rss
Trackback
Trackback

« Now available: Clara, a novel framework for implementing hybrid typestate analyses Now working for CASED »

Leave a Reply

Click here to cancel reply.

ISSTA

Welcome

Welcome to my website. Interested in my research? Click here for details or jump directly to my publications.

Pages

  • Research
    • Publications
    • Presentations
    • Past Research
      • Continuation-equivalent states (ICSE 2010)
      • Efficient Runtime Verification
      • Racer: Effective Race Detection Using AspectJ
      • Aspect-oriented programming and design
      • Visual specification languages
      • A denial-of-service attack on the Java bytecode verifier
  • Tools
    • TamiFlex – a tool suite for taming reflection
    • Clara: Compile-time Approximation of Runtime Analyses
    • RacerAJ (for race detection)
    • An introduction to Soot 2.2.5
    • Aspect-oriented approaches targeting the .NET Framework
  • Teaching
    • Automated Software Engineering
    • Software-Engineering Project
    • COMP 520
    • COMP 621
  • Legacy
    • Arithmetic Coding
    • Bad Sector Recovery on NTFS
    • PHP Scripts
  • About me

Categories & Feeds

  • Research Blog RSS Feed Icon (80)
  • Comments (RSS) RSS Feed Icon

Colleagues

  • Gregory Prokopski
  • Laurie Hendren
  • Nomair Naeem
  • Ondrej Lhotak
  • Patrick Lam
  • Programming Tools Group, Oxford
  • Sable lab, McGill
  • Software Technology Group, Darmstadt

Kitchensink

  • Conferences
  • My first patent: Method and system for performance profiling of software (pending)
  • Photos

Research projects

  • AspectBench Compiler (abc)
  • Clara
  • J-LO
  • Soot
  • Stratified aspects
  • TamiFlex

Service

  • AOSD 2006
  • AOSD 2007
  • AOSD 2010
  • AOSD 2011
  • Association of Alumni, Friends, and Supporters of the RWTH Aachen University in North America
  • ATVA 2008
  • ECOOP 2008 Doctoral Symposium
  • ECOOP 2010
  • FOAL 2010
  • ICSE 2010
  • IEEE Transactions on Software Engineering (TSE)
  • International Journal of Image and Graphics
  • ISSTA 2011
  • NFM 2011
  • OOPSLA 2008
  • OOPSLA 2010
  • PEPM 2008
  • PLDI 2006
  • PLDI 2008
  • RV 2007
  • RV 2009
  • RV 2010
  • SEFM 2005
  • SEFM 2008
  • Transactions on Software Engineering and Methodology (TOSEM)
  • VMIL 2008
  • VMIL 2009

Some other people I know

  • Adrian Colyer
  • Bruno Dufour
  • Dan North
  • Daniel Klink
  • Dave Thomas
  • Dean Wampler
  • Eric Tanter
  • Friedrich Steimann
  • Joachim Kneis
  • Klaus Havelund
  • Liz Keogh
  • Malte Clasen
  • Markus Schorn
  • Pascal Costanza
  • Patricia Jablonski
  • Philip Mayer
  • Ron Bodkin
  • Sven Wittig
  • Wiebke Berg

Some people not to confuse me with

  • Eric B. the terrorist
  • Eric Bodden the basketball player
  • Eric Bodden the chef who sunk
  • Master Sgt. Eric Bodden

Previous posts

September 2009
M T W T F S S
« Aug   Nov »
 123456
78910111213
14151617181920
21222324252627
282930  

Tags

Alumni AOSD AspectJ Atlanta Blizzard Bug finding Clara COMP 621 Eclipse FSE Google ISSTA Java LinkedIn Mac McGill Microsoft Montreal Blog NASA OOPSLA Photos Politics Programming Quebec City Race detection Racer Random ranting Runtime verification RWTH Seattle Slides Snow storm Soot Soot Tutorial Static Analysis Strike TamiFlex TA strike Thesis tracematches Typestate Vacation Website Winter carnival Wordpress


rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox