3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-16 12:05:43 +00:00
z3/src/solver
Copilot 316d249b3f
SMT2 front-end: accept HO_ALL and normalize curried expression-head applications (#9636)
The SMT2 front-end rejected valid higher-order inputs using `HO_ALL` and
failed on curried applications where the function position is itself an
expression (e.g., `((transfer top) 0)`).
This update adds `HO_ALL` support and makes curried parsing consistently
lower to implicit `select` chains.

- **Logic recognition**
  - Treat `HO_ALL` as an `ALL`-class logic in SMT logic classification.
- This unblocks `(set-logic HO_ALL)` in the standard SMT2 command path.

- **Curried application parsing**
- Extend application-frame handling to support parenthesized expression
heads, not only symbol heads.
- When the head is an expression, parse application arguments normally
and construct nested implicit selects:
    - `(f a b)` → `(select (select f a) b)`
- Preserve existing behavior for symbol-based applications, qualified
identifiers, and lambda-led forms.

- **Regression coverage**
- Add a focused parser/eval regression using the reported higher-order
case to lock in behavior.

```smt2
(set-logic HO_ALL)
(declare-fun transfer () (-> (-> Int Bool) (-> Int Bool)))
(assert (forall ((P (-> Int Bool))) (=> (P 0) ((transfer P) 0))))
(declare-fun top () (-> Int Bool))
(assert (forall ((x Int)) (top x)))
(assert (not ((transfer top) 0)))
(check-sat)
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-05-26 18:39:38 -07:00
..
assertions Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
check_logic.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
check_logic.h debug arith/mbi 2020-11-02 12:13:19 -08:00
check_sat_result.cpp more detailed tracing of where unmaterialized exceptions happen 2024-11-19 18:15:50 -08:00
check_sat_result.h more detailed tracing of where unmaterialized exceptions happen 2024-11-19 18:15:50 -08:00
CMakeLists.txt Add parallel_tactical2.cpp: portfolio parallel solver using the solver API (#9515) 2026-05-12 21:19:27 -04:00
combined_solver.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
combined_solver.h booyah 2020-07-04 15:56:30 -07:00
combined_solver_params.pyg solver factories, cleanup solver API, simplified strategic solver, added combined solver 2012-12-11 17:47:27 -08:00
mus.cpp Remove copies (#8583) 2026-02-18 21:02:22 -08:00
mus.h booyah 2020-07-04 15:56:30 -07:00
parallel_params.pyg connect parallel tactical2 as side load 2026-05-13 14:59:05 -07:00
parallel_tactical.cpp use std::exception as base class to z3_exception 2024-11-04 11:08:15 -08:00
parallel_tactical.h add missing tactic descriptions, add rewrite for tamagochi 2023-01-08 13:32:26 -08:00
parallel_tactical2.cpp Simplify parallel_tactical2.cpp for naming consistency and minor expression cleanup (#9526) 2026-05-13 16:57:52 -04:00
parallel_tactical2.h replace struct by class 2026-05-22 14:14:23 -07:00
preferred_value_propagator.h Remove redundant non-virtual destructors with = default (#8462) 2026-02-18 20:58:01 -08:00
progress_callback.h Use = default for virtual constructors. 2022-08-05 18:11:46 +03:00
simplifier_solver.cpp remove a few useless dynamic casts 2025-09-13 21:06:55 +01:00
simplifier_solver.h Add simplification customization for SMTLIB2 2023-01-30 22:38:51 -08:00
slice_solver.cpp add an option to register callback on quantifier instantiation 2025-08-06 21:11:55 -07:00
slice_solver.h A slice solver option for interactive use case 2024-10-08 09:24:52 -07:00
smt_logics.cpp benchmark patching 2026-05-20 13:32:23 -07:00
smt_logics.h SMT2 front-end: accept HO_ALL and normalize curried expression-head applications (#9636) 2026-05-26 18:39:38 -07:00
solver.cpp #7468 - add option (get-info :parameters) to display solver parameters that were updated globally and distinct from defaults 2025-02-10 11:57:14 -08:00
solver.h Add virtual translate method to solver_factory class (#7780) 2025-08-14 11:54:34 -07:00
solver2tactic.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
solver2tactic.h move model and proof converters to self-contained module 2022-11-03 05:23:01 -07:00
solver_na2as.cpp display assumptions used 2025-09-11 10:20:55 -07:00
solver_na2as.h remove default destructors & some default constructors 2024-09-04 22:30:23 +01:00
solver_pool.cpp remove a few useless dynamic casts 2025-09-13 21:06:55 +01:00
solver_pool.h booyah 2020-07-04 15:56:30 -07:00
solver_preprocess.cpp move smt params to params directory, update release.yml 2025-06-09 10:47:22 -07:00
solver_preprocess.h add unconstrained elimination for sequences 2023-03-20 17:07:04 +01:00
tactic2solver.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-02-18 20:57:29 -08:00
tactic2solver.h booyah 2020-07-04 15:56:30 -07:00