User Tools

Site Tools


lab5

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lab5 [2017/02/02 02:47] francklab5 [2020/01/19 20:51] (current) franck
Line 1: Line 1:
-====== Lab ======+====== Lab ======
  
-Create a listener, named RandomDetectorwhich prints+Write a listener, named LongestPaththat keeps track of the length of a longest  path in the state space.  The method getDepth of the class Search might be helpful (see [[https://www.eecs.yorku.ca/course_archive/2019-20/W/4315/api/jpf/|JPF's API]]).  To make it a little easier, you do not have to consider state spaces with cycles.  A sample run can be found below.  It shows what type of output your listener should produce. 
 + 
 +To compile your listener, use
 <code> <code>
-Random!+javac -cp /cs/fac/packages/jpf/jpf-core/build/jpf.jar:. LongestPath.java 
 +</code> 
 +or add /cs/fac/packages/jpf/jpf-core/build/jpf.jar as an external library to Eclipse. 
 + 
 +Also write an app, named Path, to test your listener.  Finally, write an application properties file to run JPF with your listener on the app. 
 + 
 + 
 +To receive feedback, submit your listener, your app, and your application properties file using the submit command **before** Tuesday January 28:\\
 <code> <code>
-whenever a Random object is created.  +submit 4315 lab2 LongestPath.java Path.java Path.jpf 
 +</code> 
 + 
 +Sample output: 
 +<code> 
 +JavaPathfinder core system v8.0 (rev d772dfa80ea692f916aa6718d04c4f7bfb2a746b) - 
 + (C) 2005-2014 United States Government. All rights reserved. 
 + 
 + 
 +====================================================== system under test 
 +Path.main() 
 + 
 +====================================================== search started: 1/19/20 4:08 PM 
 +
 +
 +
 +
 +
 +
 +
 +Longest path has length 4 
 + 
 +====================================================== results 
 +no errors detected 
 + 
 +====================================================== statistics 
 +elapsed time:       00:00:00 
 +states:             new=4,visited=3,backtracked=7,end=4 
 +search:             maxDepth=4,constraints=0 
 +choice generators:  thread=1 (signal=0,lock=1,sharedRef=0,threadApi=0,reschedule=0), data=3 
 +heap:               new=368,released=42,maxLive=358,gcCycles=7 
 +instructions:       3247 
 +max memory:         57MB 
 +loaded code:        classes=62,methods=1341 
 + 
 +====================================================== search finished: 1/19/20 4:08 PM 
 +</code>
  
lab5.1486003641.txt.gz · Last modified: 2017/02/02 02:47 by franck