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

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

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

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

View Full Document Right 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 find out how you can adapt JPF to your needs 2 *.class verification artifact JPF core • report • test case • specification ... JPF extension System under Test (Java bytecode) *.jpf JPF configuration abstract virtual machine • execution semantics • program properties ... No “one size fits all” - Extensibility is Paramount Wednesday, May 18, 2011
Image of page 2
Roadmap 3 Basics (focused on writing extensions) main stumbling block: VM inside VM key design components & classes Organization: runtime configuration scheme where are the sources: directory structure Examples listeners native peer classes instruction factories Wednesday, May 18, 2011
Image of page 3

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

View Full Document Right 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
Image of page 4
Basics: a VM running inside JVM main stumbling block is recursive nature of JPF verified 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 verification 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
Image of page 5

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

View Full Document Right 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 configuration report standard Java libraries *.jar *.jar Wednesday, May 18, 2011
Image of page 6
JPF Toplevel Structure 7 search () JVM vm Search forward () backtrack () restoreState () JVM search () DFSearch run () search, vm, config 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 ...
Image of page 7

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern