ss_3-11

ss_3-11 - Java Pathfinder Session 3 Under the Hood Building...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Java Pathfnder Session 3: Under the Hood - Building Your JPF 1 Peter C. Mehlitz SGT / NASA Ames Research Center <[email protected] > Wednesday, May 18, 2011
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Recap: JPF - What is it? a model checker? a JVM? . . and the answer is: both, and more - it depends on you one thing it is not: a monolithic, black box tool the quest of today: learn what is in the toolbox to Fnd out how you can adapt JP± to your needs 2 *.class verifcation artiFact JPF core • report • test case • specifcation ... JPF extension System under Test (Java bytecode) *.jpF JP± confguration abstract virtual machine • execution semantics • program properties ... No “one size fts all” - Extensibility is Paramount Wednesday, May 18, 2011
Background image of page 2
Roadmap 3 Basics (focused on writing extensions) main stumbling block: VM inside VM key design components & classes Organization: runtime confguration scheme where are the sources: directory structure Examples listeners native peer classes instruction Factories Wednesday, May 18, 2011
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
1. Basics main stumbling block: recursive nature of JPF key design components and classes (as needed for extensions) Search and VM ChoiceGenerators Instruction Factories Attributes Listeners native peers: Model-Java-Interface (MJI) 4 Wednesday, May 18, 2011
Background image of page 4
Basics: a VM running inside JVM main stumbling block is recursive nature of JPF veri±ed Java program is executed by JPF, which is a virtual machine implemented in Java, i.e. runs on top of a host JVM easy to get confused about who executes what 5 platform OS host JVM native libraries standard library classes JPF (VM) rt.jar *.class verifcation target standard Java installation application JPF modules jpf.jar classpath native_classpath library classes native Java installation JPF installation system under test Wednesday, May 18, 2011
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Basics: JPF Components 6 ------------------------------------ error path .. Step #14 Thread #1 oldclassic.java:95 event2.waitForEvent(); oldclassic.java:37 wait(); ------------------------------------ thread stacks Thread: Thread-0 at java.lang.Object.wait(Object.java:429) at Event.waitForEvent(oldclassic.java:37) .. ======================== 1 Error Found: Deadlock JPF Core bytecode set listener/ property publisher/ -ext choice generator serializer/ restorer annotation (optional) in-source property spec domain framework model library application SuT execution environment search strategy Java virtual machine bytecode report JPF end seen error-path property violation host - JVM JPF distribution ... native peer ... ... extensions *.jpf JPF confguration report standard Java libraries *.jar *.jar Wednesday, May 18, 2011
Background image of page 6
JPF Toplevel Structure 7 search () JVM vm Search forward () backtrack () restoreState () JVM search () DFSearch run () search, vm, conFg JPF executeTransition () executeInstruction () ThreadInfo initializeNextTransition() executeNextTransition() SystemState ClassInfo MethodInfo FieldInfo ElementInfo Fields Monitor StaticArea bytecode execution type + code mgnt object model gov.nasa.jpf gov.nasa.jpf.search search () HeuristicSearch gov.nasa.jpf.jvm gov.nasa.jpf.search.heuristic gov.nasa.jpf.jvm.bytecode execute () Instruction ...
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/07/2012 for the course CS 4322 taught by Professor Martinrinard during the Spring '11 term at MIT.

Page1 / 46

ss_3-11 - Java Pathfinder Session 3 Under the Hood Building...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online