-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I created a minimal test extension to diagnose the model class loading issue. Here are my findings. Please also check this repository: https://github.com/Mahmoud-Khawaja/jpf-test.
You can test it on your machine, but make sure to modify the site.properties file first.
jpf-core = PATH
jpf-test = PATH
extensions = ${jpf-core}
build the jar
gradle buildJars
and
java -jar ~/Downloads/nas/jpf-core/build/RunJPF.jar TestMath.jpf
you will get this output
avaPathfinder core system v8.0 (rev 7a901f73eec280ee2a3a14ff57a0ad4269b7baee) - (C) 2005-2014 United States Government. All rights reserved.
====================================================== system under test
TestMath.main()
====================================================== search started: 10/3/25, 8:13 AM
=== Testing JPF Math Model ===
[JPF-TEST] Math.max() called via peer: 10, 20
[JPF-TEST] Math.min() called via peer: 16, 34
[JPF-TEST] Math.min() called via peer: 34, 21
Math.max(10, 20) = 20
[JPF-TEST] Math.min() called via peer: 10, 20
[JPF-TEST] Math.min() called via peer: 16, 34
[JPF-TEST] Math.min() called via peer: 34, 21
Math.min(10, 20) = 10
[JPF-TEST] Math.sqrt() called via peer: 16.0
[JPF-TEST] Math.min() called via peer: 16, 34
[JPF-TEST] Math.max() called via peer: 0, -2
[JPF-TEST] Math.min() called via peer: 1, 1
[JPF-TEST] Math.min() called via peer: 34, 21
Math.sqrt(16.0) = 4.0
[JPF-TEST] Math.min() called via peer: 16, 34
[JPF-TEST] Math.min() called via peer: 34, 18
Math.abs(-42) = 42
FAILURE: Standard Math class loaded (model not working)
(Method getModelInfo() not found)
=== Test Complete ===
====================================================== results
no errors detected
====================================================== statistics
elapsed time: 00:00:00
states: new=4,visited=0,backtracked=4,end=1
search: maxDepth=4,constraints=0
choice generators: thread=4 (signal=0,lock=1,sharedRef=0,threadApi=0,reschedule=3), data=0
heap: new=1331,released=54,maxLive=1252,gcCycles=4
instructions: 154856
max memory: 250MB
loaded code: classes=101,methods=2474
====================================================== search finished: 10/3/25, 8:13 AM
as we can see here Peer classes load correctly - I see diagnostic output [JPF-TEST] Math.max() called via peer: 10, 20 proving the native peer methods execute
Model classes do not load - The diagnostic method Math.getModelInfo() throws NoSuchMethodError, meaning JPF is using the standard JDK java.lang.Math instead of my model class
Metadata
Metadata
Assignees
Labels
No labels