lab8
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| lab8 [2017/03/02 15:00] – franck | lab8 [2018/02/25 15:00] (current) – franck | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Lab 8 ====== | + | ====== Lab 6 ====== |
| Consider the following app. | Consider the following app. | ||
| - | <html> | + | <code java> |
| - | <pre> | + | public class Main { |
| - | public class ComputeSquareRoot | + | |
| public static void main(String[] args) { | public static void main(String[] args) { | ||
| - | double data = 3.1415926; | + | |
| - | | + | |
| } | } | ||
| } | } | ||
| - | </pre> | + | </code> |
| - | </html> | + | |
| + | If we run JPF with the following configuration file | ||
| + | < | ||
| + | target=Main | ||
| + | classpath=(directory that contains Main.class) | ||
| + | </code> | ||
| + | then we obtain output similar to the following. | ||
| + | < | ||
| + | JavaPathfinder core system v8.0 (rev 29+) - (C) 2005-2014 United States Government. All rights reserved. | ||
| + | |||
| + | |||
| + | ====================================================== system under test | ||
| + | Main.main() | ||
| + | |||
| + | ====================================================== search started: 3/12/17 9:55 PM | ||
| + | |||
| + | ====================================================== error 1 | ||
| + | gov.nasa.jpf.vm.NoUncaughtExceptionsProperty | ||
| + | java.lang.UnsatisfiedLinkError: | ||
| + | at java.lang.StrictMath.cbrt(no peer) | ||
| + | at Main.main(Main.java: | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | * Implement a native peer class. | ||
| + | JavaPathfinder core system v8.0 (rev 29+) - (C) 2005-2014 United States Government. All rights reserved. | ||
| + | |||
| + | |||
| + | ====================================================== system under test | ||
| + | Main.main() | ||
| + | |||
| + | ====================================================== search started: 3/12/17 9:59 PM | ||
| + | native peer class | ||
| + | 1.6386425412012917 | ||
| + | |||
| + | ====================================================== results | ||
| + | no errors detected | ||
| + | ... | ||
| + | </ | ||
| + | * Implement a peer class. | ||
| + | JavaPathfinder core system v8.0 (rev 29+) - (C) 2005-2014 United States Government. All rights reserved. | ||
| + | |||
| + | |||
| + | ====================================================== system under test | ||
| + | Main.main() | ||
| + | |||
| + | ====================================================== search started: 3/12/17 10:06 PM | ||
| + | peer class | ||
| + | 1.6386425412012982 | ||
| + | |||
| + | ====================================================== results | ||
| + | no errors detected | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | To compile your classes, you may want to use | ||
| + | < | ||
| + | javac -cp / | ||
| + | </ | ||
| + | or add / | ||
| + | |||
| + | To receive feedback, submit both classes and configuration files using | ||
| + | < | ||
| + | submit 4315 lab6 (name of file) | ||
| + | </ | ||
| + | before Tuesday March 6. | ||
| - | - Develop a model class so that the above app can be verified with JPF. [[https:// | ||
| - | - Develop a native peer so that the above app can be verified with JPF. | ||
lab8.1488466854.txt.gz · Last modified: by franck
