JPF-lecture-2

JPF-lecture-2 - Java Pathfinder Lecture 2: Under the Hood...

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

View Full Document Right Arrow Icon
Java Pathfnder Lecture 2: Under the Hood 1 Peter C. Mehlitz SGT / NASA Ames Research Center <Peter.C.Mehlitz@nasa.gov > Wednesday, May 25,
Background image of page 1

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

View Full DocumentRight Arrow Icon
Roadmap 2 Basics (focused on writing extensions) what is JPF? main stumbling block: VM inside VM key design components & classes Infrastructure project layout runtime con±guration mechanism test framework Main Extension Constructs Listeners NativePeers InstructionFactories ChoiceGenerators Wednesday, May 25,
Background image of page 2
1. Basics what is JPF: not a monolithic tool main stumbling block: recursive nature of JPF key design components and classes (as needed for extensions) top level design: Search and VM fundamental concept: ChoiceGenerators Instruction Factories Native Peers & Model-Java-Interface Utilities: Attributes Partial Order Reduction Serializer main extension point: Listeners 3 Wednesday, May 25,
Background image of page 3

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 virtual machine? . . ..and the answer is: both, and more - it depends on you 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 4 *.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 25,
Background image of page 4
Basics: JPF Components 5 ------------------------------------ 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 25,
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: 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 6 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 25,
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
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.

Page1 / 48

JPF-lecture-2 - Java Pathfinder Lecture 2: Under the Hood...

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