3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-01-21 01:24:43 +00:00
z3/src/cmd_context
Simon Jeanteur deaced1711
Subterms Theory (#8115)
* somewhaat failed attempt at declaring subterm predicate

I can't really figure out how to link the smt parser to the rest of the
machinenery, so I will stop here and try from the other side. I'll start
implmenting the logic and see if it brings me back to the parser.

* initial logic implmentation

Very primitive, but I don't like have that much work uncommitted.

* parser implementation

* more theory

* Working base

* subterm reflexivity

* a few optimization

Skip adding obvious equalities or disequality

* removed some optimisations

* better handling of backtracking

* stupid segfault

Add m_subterm to the trail

* Update src/smt/theory_datatype.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/ast/rewriter/datatype_rewriter.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/smt/theory_datatype.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/smt/theory_datatype.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/smt/theory_datatype.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* review

* forgot to update `iterate_subterm`'s signature

* fix iterator segfault

* Remove duplicate include statement

Removed duplicate include of 'theory_datatype.h'.

* Replace 'optional' with 'std::option' in datatype_decl_plugin.h

* Add is_subterm_predicate matcher to datatype_decl_plugin

* Change std::option to std::optional for m_subterm

* Update pdecl.h

* Change has_subterm to use has_value method

* Update pdecl.cpp

---------

Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-13 10:53:17 -08:00
..
extra_cmds QEL: Fast Approximated Quantifier Elimination (#6820) 2023-08-02 09:34:06 -07:00
basic_cmds.cpp Add commands for forcing preferences during search 2025-10-02 10:47:10 -07:00
basic_cmds.h booyah 2020-07-04 15:56:30 -07:00
CMakeLists.txt Add simplification customization for SMTLIB2 2023-01-30 22:38:51 -08:00
cmd_context.cpp Subterms Theory (#8115) 2026-01-13 10:53:17 -08:00
cmd_context.h Replace empty destructors with = default for compiler optimization (#8189) 2026-01-13 10:50:10 -08:00
cmd_context_to_goal.cpp fix #5300 2021-05-28 14:16:43 -07:00
cmd_context_to_goal.h booyah 2020-07-04 15:56:30 -07:00
cmd_util.cpp make include paths uniformly use path relative to src. #534 2017-07-31 13:24:11 -07:00
cmd_util.h booyah 2020-07-04 15:56:30 -07:00
echo_tactic.cpp mux 2019-06-05 09:06:17 +01:00
echo_tactic.h add missing tactic descriptions, add rewrite for tamagochi 2023-01-08 13:32:26 -08:00
eval_cmd.cpp remove theory_str and classes that are only used by it 2025-08-07 21:05:12 -07:00
eval_cmd.h booyah 2020-07-04 15:56:30 -07:00
parametric_cmd.cpp fix a couple hundred deref-after-free bugs due to .c_str() on a temporary string 2020-07-11 20:24:45 +01:00
parametric_cmd.h fix #6023 2022-05-08 12:03:13 -07:00
pdecl.cpp Subterms Theory (#8115) 2026-01-13 10:53:17 -08:00
pdecl.h Subterms Theory (#8115) 2026-01-13 10:53:17 -08:00
README remove hassel table from unstable: does not compile under other plantforms 2013-05-31 17:48:19 -07:00
simplifier_cmds.cpp Pr (#7654) 2025-05-19 03:24:45 -07:00
simplifier_cmds.h Add simplification customization for SMTLIB2 2023-01-30 22:38:51 -08:00
simplify_cmd.cpp remove theory_str and classes that are only used by it 2025-08-07 21:05:12 -07:00
simplify_cmd.h booyah 2020-07-04 15:56:30 -07:00
tactic_cmds.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
tactic_cmds.h remove default destructors 2024-10-02 22:20:12 +01:00
tactic_manager.cpp Add simplification customization for SMTLIB2 2023-01-30 22:38:51 -08:00
tactic_manager.h add API for creating and attaching simplifiers 2023-01-31 17:06:03 -08:00

Command context provides the infrastructure for executing commands in front-ends such as SMT-LIB 2.0.
It is also provides the solver abstraction to plugin solvers in this kind of front-end.