3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-05-15 22:55:33 +00:00
z3/src
Copilot 36fffb3a2f
TPTP frontend: fix TFF numeric atom typing, decimal literals, and $uminus (#9518)
This PR targets the main TFF frontend parsing failures: bare numeric
atoms were being treated as uninterpreted terms (`U`) in formula
position, decimal literals were not parsed, and `$uminus` was not
recognized as an arithmetic builtin. These issues caused widespread
parse/type failures in arithmetic-heavy TPTP inputs.

- **Numeric atom parsing in formulas (TFF)**
- Added a shared numeric-literal parser path for term/formula contexts.
- In atomic formulas, numeric LHS now parses as arithmetic numerals
before `=`/`!=` handling, avoiding `U` vs `Int/Real` mismatches.

- **Decimal literal support**
- Extended numeral parsing to accept `d.d` forms and construct `Real`
numerals.
- Keeps existing integer (`d`) and rational (`d/d`) behavior on the same
code path.

- **`$uminus` builtin support**
  - Added explicit handling for `$uminus(<arg>)` in term parsing.
- Enforces arity 1 and arithmetic-argument checks; maps directly to
arithmetic unary minus.

- **Focused regression coverage**
  - Added/updated TPTP unit cases for:
    - bare integer inequality: `31 != 12`
    - decimal arithmetic literal usage
    - `$uminus` in arithmetic predicates

Example of now-supported inputs:

```tptp
tff(c1,conjecture, 31 != 12).
tff(c2,conjecture, ~ $less(-3.25,-8.69)).
tff(c3,conjecture, $less($uminus(2),0)).
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-05-13 06:03:53 -04:00
..
ackermannization Fix off-by-one vulnerabilities: use range-based for on goals; cache loop bound 2026-02-19 22:37:22 +00:00
api Go bindings: extract CGo slice-conversion helpers to eliminate boilerplate (#9465) 2026-05-06 12:32:53 -07:00
ast Use the minimum generation number among matching enodes (#9405) 2026-05-07 18:32:31 -04:00
cmd_context TPTP frontend: fix TFF numeric atom typing, decimal literals, and $uminus (#9518) 2026-05-13 06:03:53 -04:00
math nla_grobner: remove dead code and fix indentation (#9423) 2026-04-29 11:12:45 -07:00
model Remove redundant default constructors when they're the only constructor (#8461) 2026-02-18 20:58:01 -08:00
muz Refactor sls_euf_plugin.cpp validate_model and add SASSERT in udoc_relation.cpp 2026-03-09 16:57:59 +00:00
nlsat making try-for tactic exception resilient on cancelation 2026-04-26 15:58:24 -07:00
opt fix box mode: reset bounds before each objective 2026-03-19 17:07:21 -10:00
params Simplify parallel SMT code: clean comments and deduplicate stat computation (#9507) 2026-05-12 14:41:20 -04:00
parsers Revert "Refactor find_psort_decl() to return std::optional<psort_decl*> (#8339)" 2026-02-18 20:57:56 -08:00
qe Simplify extract_var_bound via operator normalization (#9062) 2026-03-22 16:01:12 -07:00
sat Fix static analysis issues: null dereferences, unsafe casts, branch clones, uninitialized members (#9424) 2026-04-29 13:37:11 -07:00
shell Integrate TPTP with internal APIs via cmd_context, add embedded-string TPTP regression tests, and fix TFF arithmetic/timeout regressions (#9483) 2026-05-12 19:29:58 -04:00
smt Fix FPA/BV model-validation soundness bug for Array + Datatype theories (Fixes #9488) (#9500) 2026-05-12 19:33:48 -04:00
solver Add parallel_tactical2.cpp: portfolio parallel solver using the solver API (#9515) 2026-05-12 21:19:27 -04:00
tactic Throttle lia2card in QF_LIA preamble (mk_preamble_tactic) (#9489) 2026-05-11 12:03:09 -04:00
test TPTP frontend: fix TFF numeric atom typing, decimal literals, and $uminus (#9518) 2026-05-13 06:03:53 -04:00
util Final version of parallel architecture for FMCAD26 submission (#9476) 2026-05-11 18:08:23 -04:00
CMakeLists.txt git bindings v1.0 2026-02-18 21:02:25 -08:00