-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jar2bpl-generated bpl cause boogie to throw resolution errors #3
Comments
Sorry about that. Here is a quick fix: axiom (forall t : javaType :: $heap[$null,$type] <: t); procedure $new(obj_type:javaType) returns ($obj:ref); requires $heap[$obj,$alloc] == false; ensures $obj != $null; ensures $heap[$obj,$type] == obj_type; ensures $heap[$obj,$alloc] == true; which are generated as part of the prelude. Replace this by: procedure $new(obj_type:javaType) returns ($obj:ref); Then it should work. I'll try to change the code accordingly asap. |
@martinschaef in this case, how do you make sure that |
Ha ... that conversation started 9 years ago; I had to think about that for a minute :D. In terms of casting-rules, shouldn't null be a subtype of everything? Because you cast null to everything but you can't cast anything to null. That is you can write: String foo = null;
Integer bar = null; where the So if you think of the type lattice, you have |
Ah, didn't expect such a quick response :) I totally agree that |
Oh ... that again, I would need to think about longer. I assume Boogie changed in the last 9 years, so I'm not sure how you would have to write that axiom. Depending on what type of properties you want to prove, you might not even need to state that subtype relation for null explicitly |
It happens that I'm doing a proof about null pointer exception, so I think I need that axiom.., Did you have any way to specify that 9 years ago? Or other workaround that does not need the axiom? |
That, I don't remember ... note that this issue is 9 years old, but the code is a lot older than that. So my recommendation would be to check the literature of the past 10 years, I'm sure there is a better way to model the heap by now. |
I see, thanks for making jar2bpl and helping here :) |
btw, would you mind taking a look at the other issue I just created ;) |
Hi,
we are using jar2bpl to generate some bpl files for boogile to analyze. However, boogie throw resolution errors on all the files I had tried.
We tried the jar and apk you provided as the examples. The commands we used are "java -jar jar2bpl.jar -j ../lib/log4j-1.2.16.jar -b out.bpl" and "java -jar ./dist/jar2bpl.jar -j ../jar2bpl_test/regression/android_input/snake.apk -android-jars ../jar2bpl_test/data/ -b ./test.bpl". We also tried our java files and apks. But they all throw the similar errors.
We also tried the generated bpl to all available boogie releases.
The errors are as follows.
The text was updated successfully, but these errors were encountered: