Sync upstream changes (2026-11-08) #1

Merged
Greensky merged 23 commits from sync/upstream-20261108-110214 into master 2026-11-08 11:02:17 +00:00
Owner

New upstream commits

  • 7262bbfa8 bddinfer: verbosity 2 prints the checks of the inferred invariants (François Bobot)
  • 5d1456f78 bddinfer bench: [@bddinfer:2] instead of the removed debug flag (François Bobot)
  • 7eefd2de2 bisect: fix crash when replaying the last prover run fails (Jacques-Henri Jourdan)
  • 891dc661a controller: recover from exceptions in the scheduler handlers (Jacques-Henri Jourdan)
  • 2977a6709 Do not let apply use the goal as a hypothesis. (Jacques-Henri Jourdan)
  • dcb9955ac Keep an abstract declaration for definitions removed by eliminate_symbol. (Jacques-Henri Jourdan)
  • 4963b1462 Do not apply congruence to arguments of different types. (Jacques-Henri Jourdan)
  • aacd1a77e Report an error when induction_ty_lex is asked for a non-algebraic type. (Jacques-Henri Jourdan)
  • ce0f52f79 Keep an abstract declaration for definitions removed by eliminate_big_constants. (Jacques-Henri Jourdan)
  • 774856a80 Do not let dequantification go into the term inspected by a match. (Jacques-Henri Jourdan)
  • 2906079ba Merge branch 'fix_apply_goal' into 'master' (MARCHE Claude)
  • 3565518c3 Merge branch 'fix_congruence_poly' into 'master' (MARCHE Claude)
  • 076fe4231 Merge branch 'fix_induction_non_algebraic' into 'master' (MARCHE Claude)
  • ac730dacd Merge branch 'fix_eliminate_big_constants' into 'master' (MARCHE Claude)
  • f71f528fe Merge branch 'fix_dequantification' into 'master' (MARCHE Claude)
  • 6ba399258 Merge branch 'fix-bisect-timelimit' into 'master' (MARCHE Claude)
  • 1810f30e1 Merge branch 'fix_eliminate_symbol' into 'master' (MARCHE Claude)
  • 7432617fd Merge branch 'bobot/agent/why3find/bddinfer-bench' into 'master' (MARCHE Claude)
  • ee748365f Turn on the subregion analysis in the stackify test while_loop. (Jacques-Henri Jourdan)
  • 9229ad02e Make the stackify section of the bench fail when a replay fails. (Jacques-Henri Jourdan)
  • 0e93c172a Replay the stackify examples in regtests.py. (Jacques-Henri Jourdan)
  • 2272822f0 Merge branch 'fix-stackify-bench' into 'master' (JOURDAN Jacques-Henri)
### New upstream commits - 7262bbfa8 bddinfer: verbosity 2 prints the checks of the inferred invariants (François Bobot) - 5d1456f78 bddinfer bench: [@bddinfer:2] instead of the removed debug flag (François Bobot) - 7eefd2de2 bisect: fix crash when replaying the last prover run fails (Jacques-Henri Jourdan) - 891dc661a controller: recover from exceptions in the scheduler handlers (Jacques-Henri Jourdan) - 2977a6709 Do not let apply use the goal as a hypothesis. (Jacques-Henri Jourdan) - dcb9955ac Keep an abstract declaration for definitions removed by eliminate_symbol. (Jacques-Henri Jourdan) - 4963b1462 Do not apply congruence to arguments of different types. (Jacques-Henri Jourdan) - aacd1a77e Report an error when induction_ty_lex is asked for a non-algebraic type. (Jacques-Henri Jourdan) - ce0f52f79 Keep an abstract declaration for definitions removed by eliminate_big_constants. (Jacques-Henri Jourdan) - 774856a80 Do not let dequantification go into the term inspected by a match. (Jacques-Henri Jourdan) - 2906079ba Merge branch 'fix_apply_goal' into 'master' (MARCHE Claude) - 3565518c3 Merge branch 'fix_congruence_poly' into 'master' (MARCHE Claude) - 076fe4231 Merge branch 'fix_induction_non_algebraic' into 'master' (MARCHE Claude) - ac730dacd Merge branch 'fix_eliminate_big_constants' into 'master' (MARCHE Claude) - f71f528fe Merge branch 'fix_dequantification' into 'master' (MARCHE Claude) - 6ba399258 Merge branch 'fix-bisect-timelimit' into 'master' (MARCHE Claude) - 1810f30e1 Merge branch 'fix_eliminate_symbol' into 'master' (MARCHE Claude) - 7432617fd Merge branch 'bobot/agent/why3find/bddinfer-bench' into 'master' (MARCHE Claude) - ee748365f Turn on the subregion analysis in the stackify test while_loop. (Jacques-Henri Jourdan) - 9229ad02e Make the stackify section of the bench fail when a replay fails. (Jacques-Henri Jourdan) - 0e93c172a Replay the stackify examples in regtests.py. (Jacques-Henri Jourdan) - 2272822f0 Merge branch 'fix-stackify-bench' into 'master' (JOURDAN Jacques-Henri)
Since 814b18fcc, the verbosity of the report starts with the inferred
invariants at 1, but the internal report was still called with the same
verbosity, so the checks of the loop invariants and of the assertions
(printed by the internal report at 1, before 814b18fcc) needed verbosity 2
and came with the inferred states. The internal report is now called with
one level less: [@bddinfer:2] prints the checks, like the debug flag
bddinfer did before, and the inferred states need verbosity 3.
Since 814b18fcc, the debug flag bddinfer no longer exists and the report
of the inference is printed only with a verbosity given by the attribute:
the outputs of the bench were only "unknown debug flag". [@bddinfer:2]
prints what the debug flag printed (since the previous commit).

The oracles are regenerated: the messages have a new format and the
prover results changed in some files, but the inferred invariants and
their checks are the same, except in merge_sort where the unsupported
feature is now Eghost instead of Ematch. The files with "use export" of
both int.Int and bool.Bool use them without export, since they no longer
type-check.
When bisection ends, the prover is run again on the reduced task,
under a time limit equal to the last measured running time. On fast
proofs, this run can easily time out, which triggered an assertion
failure.

With this patch, a failure of the last run is not an internal
error. It shows a debug message, and leaves the failed node as it is.

Also, we leave some leeway above the measured time during
bisection. The limit never increases, so that the leeway does not
accumulate over the bisection steps.
A scheduler does not call a handler again after it raised an exception, but
the corresponding running flag stayed set, so the handler was never installed
again. With the timeout handler, the IDE remained open, but no prover call
could complete anymore. The scheduler was in an inconsistent state.

With this patch, when an exception escapes a handler, reset its flag
and interrupt all prover calls, then raise the exception again.
apply looked up the given proposition in the known map of the task
before separating the goal, so it could be the goal itself. Then
"apply g" on a goal g without premises produced no subgoal, which
proved any such goal, for instance "goal g : false".
eliminate_symbol removed the definitions whose body uses an eliminated
symbol, but kept the declarations that use the defined symbol. These
then failed with "Ident g is not yet declared".
congruence turned a goal "f a1 ... an = f b1 ... bn" into the goals
"ai = bi" without checking that ai and bi have the same type, which
is not the case when f is polymorphic. For instance, on
"size 1 = size true", it failed with an uncaught type mismatch.
With [@induction] on a variable of type int or of a type variable,
induction_ty_lex failed with an assertion. On other types without
constructors, such as real or abstract types, it failed with "Empty
match expression".
eliminate_big_constants removed the definitions containing big
constants, contrary to what its comment says, but kept the
declarations that use the defined symbol. These then failed with
"Ident big is not yet declared".
dequantification treated the term inspected by a match like a formula.
When this term contained a term-level "if", it failed with "t_map_sign:
cannot determine polarity"; when it was a "let", it failed with "Not a
formula". This could also happen in prover drivers when counterexamples
are requested.
Do not let apply use the goal as a hypothesis.

See merge request why3/why3!1396
Do not apply congruence to arguments of different types.

See merge request why3/why3!1399
Report an error when induction_ty_lex is asked for a non-algebraic type.

See merge request why3/why3!1400
Keep an abstract declaration for definitions removed by eliminate_big_constants.

See merge request why3/why3!1401
Do not let dequantification go into the term inspected by a match.

See merge request why3/why3!1403
bisect: fix crash when replaying the last prover run fails

See merge request why3/why3!1395
Keep an abstract declaration for definitions removed by eliminate_symbol.

See merge request why3/why3!1398
bddinfer: fix the bench, broken since 814b18fcc

See merge request why3/why3!1393
Since c2368f746 ("Add a flag to turn on subregion analysis"), the subregion
analysis only runs on functions with the attribute [@cfg:subregion_analysis].
The test while_loop relied on the frame invariant it adds: without it,
nothing relates x_1.fin to x.fin after the loop, so the postcondition
x.fin = 0 could not be proved. The session has been obsolete since then,
and the postcondition unproved since 7ae65be56.
The section calls replay, which records the failed sessions in
failed_simple_tests, but it never checked that variable, so it always
succeeded. This is how examples/stackify/while_loop stayed obsolete
unnoticed.
No mode of regtests.py replayed examples/stackify, so the nightly benches
never ran its sessions with provers. They are now replayed with the other
examples when Why3 is configured with stackify, including in reduced mode.
Fix test stackify/while_loop and make sure a failure is detected

See merge request why3/why3!1408
Greensky merged commit be2d3aca5e into master 2026-11-08 11:02:17 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Greensky/why3!1
No description provided.