Skip to content
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

Suggested steps too low #60

Closed
treiher opened this issue Jul 14, 2020 · 2 comments
Closed

Suggested steps too low #60

treiher opened this issue Jul 14, 2020 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@treiher
Copy link

treiher commented Jul 14, 2020

Describe the bug
The suggested steps are in some cases too low for a successful proof. While 1672 steps are suggested, 1768 steps are required.

$ run_spat -Ptest.gpr --suggest
[...]
package Prove is
   for Proof_Switches ("rflx-arrays-tests.adb") use ("--prover=Z3", "--steps=1672", "--timeout=1");
end Prove;
$ sparkprof -Ptest -u rflx-arrays-tests
---------------------------------------------------------------------------------------
UNIT                                                  MAX STEPS    MAX TIME  TOTAL TIME
[...]
rflx-arrays-tests                                       1768 steps     0.0 s     0.0 s

Here is the relevant .spark file: rflx-arrays-tests.spark.txt

Used version: run_spat V1.1.3 (compiled by SYSTEM_NAME_GNAT Community 2020 (20200429-93))

@treiher treiher added the bug Something isn't working label Jul 14, 2020
@Jellix
Copy link
Member

Jellix commented Jul 14, 2020

I can confirm the defect.

Maximum number of steps reported in that file is '1864090' Z3 steps, which by the Z3 formula (steps - 450_000) / 800 should translate into the expected 1768 steps.

Instead, spat seems to pick up '1786890' Z3 steps as maximum, which by above formula result in the reported 1672 steps.

No obvious reason why that would happen, I'll investigate.

@Jellix Jellix modified the milestones: V1.1.3, V1.1.4 Jul 14, 2020
Jellix added a commit that referenced this issue Jul 15, 2020
  We inadvertently skipped a lot of attempts by evaluating the wrong results (i.e. Checks_Sentinel instead of
  an actual Proof_Attempt.T). Recursive data structures are hard, especially when combined with polymorphism.
@Jellix
Copy link
Member

Jellix commented Jul 15, 2020

Fixed in v1.1.4 and fix merged to main branch.

@Jellix Jellix closed this as completed Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants