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

feature wish: improve the reporting of the number of steps taken #935

Closed
claudemarche opened this issue Nov 15, 2023 · 1 comment · Fixed by #936 or #945
Closed

feature wish: improve the reporting of the number of steps taken #935

claudemarche opened this issue Nov 15, 2023 · 1 comment · Fixed by #936 or #945
Milestone

Comments

@claudemarche
Copy link
Collaborator

Currently, to get the number of steps taken by Alt-Ergo (using the Dolmen frontend) one has to parse the SMT comment of the form

; File \".*\", line [0-9]+, characters [0-9]+-[0-9]+:.*(\\([0-9]+.?[0-9]*\\) steps)

which indeed comes before the answer unsat or unknown. There should be a better way to get this info, e.g. by issuing a command of the form

(get-info :steps-taken)

after the (check-sat) query, and get back an answer of a standardized form, e.g.

resource::steps = ...

(moreover, this should be documented)

Thanks!

@bclement-ocp
Copy link
Collaborator

This information was added in #863 (not part of release 2.5) to the response of the standards (get-info :all-statistics):

(
 :timer-Arrays 0.000001000
 :timer-CC 0.000001000
 :timer-Records 0.000000000
 :timer-Expr 0.000000000
 :timer-Simplex 0.000000000
 :timer-Triggers 0.000000000
 :timer-Arith 0.000005000
 :timer-Typing 0.000000000
 :timer-None 0.000017000
 :timer-Match 0.000001000
 :timer-UF 0.000002000
 :timer-Sum 0.000001000
 :timer-Ite 0.000000000
 :timer-AC 0.000000000
 :timer-Sat 0.000005000
 :steps 3)

However, this currently requires enabling profiling (which should not be necessary, as it induces overhead and the information is there already), and further the --profiling option was broken by the switch to ppx_deriving_enum in #863 (the max_ty_function and max_ty_module were the length, they are now the last value, and so the arrays are too small by one element).

We should fix those two issues and document the format of (get-info :all-statistics).

@bclement-ocp bclement-ocp linked a pull request Nov 16, 2023 that will close this issue
@bclement-ocp bclement-ocp added this to the 2.6.0 milestone Nov 16, 2023
@bclement-ocp bclement-ocp removed a link to a pull request Nov 16, 2023
This was linked to pull requests Nov 16, 2023
bclement-ocp added a commit to bclement-ocp/alt-ergo that referenced this issue Nov 17, 2023
As noted in OCamlPro#935 the
--profiling option currently makes Alt-Ergo instantly crash because in
OCamlPro#863 we forgot a slot for the
last element in the array. This patch fixes that.
bclement-ocp added a commit that referenced this issue Nov 17, 2023
As noted in #935 the
--profiling option currently makes Alt-Ergo instantly crash because in
#863 we forgot a slot for the
last element in the array. This patch fixes that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants