summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/expr_miner.cpp
AgeCommit message (Collapse)Author
2020-06-29Make ExprManager constructor private (#4669)Andres Noetzli
This commit makes the ExprManager constructor private and updates the initialization of subsolvers, unit tests, and system tests accordingly. This is a step towards making options part of SmtEngine instead of NodeManager.
2020-06-16Update copyright headers.Aina Niemetz
2020-03-03Standardize the interface for SMT engine subsolvers (#3836)Andrew Reynolds
This standardizes the interface for using SMT engines as subsolvers in various approaches. More refactoring is possible, but this is an initial cut at cleaning things up. This will make it easy to accommodate new feature request for SyGuS (timeouts for calls to verification steps). Notice this also required adding a missing function (mkGroundTerm/isWellFounded for functions) which was caught after standardizing due to an optimization (don't create SmtEngines to check satisfiability of constant Booleans).
2019-07-29Support get-abduct smt2 command (#3122)Andrew Reynolds
2019-03-26Update copyright headers.Aina Niemetz
2019-03-23Fix memory leak when using subsolvers (#2893)Andres Noetzli
ASAN was reporting memory leaks in regression tests that were using subsolvers. First, I am going to describe the origin of the leaks and then the solution implemented in this commit. Recall an `Expr` stores the `NodeManager` that the internal node is associated with. `Node::toExpr()` converts a `Node` to an `Expr` and assumes that the active `NodeManager` (returned by `NodeManager::currentNM()` is the one associated with the node. In `ExportPrivate::exportInternal()`, when we were exporting a skolem, we created a skolem in the target `NodeManager` by calling `NodeManager::mkSkolem()` (`ExprManager`s do not support the creation of skolems) but then we called `Node::toExpr()` on the resulting skolem while the origin `NodeManager` was the active `NodeManager`. One of the issues of having the wrong `NodeManager` in the `Expr` is that when the `Expr` is destroyed and the internal node's refcount reaches zero in destructor of `Expr`, then the node value associated with the node is added to the set of zombie nodes (nodes waiting to be garbage collected or resurrected) of the wrong `NodeManager`. The problem here is that the set of zombie nodes uses the node id to hash and compare nodes. Node ids, however, are only unique within a given `NodeManager`. Thus, if we have two nodes with the same id from different `NodeManager`s and both reach refcount zero in the context of the same `NodeManager`, only one of them will end up in the set of zombies and thus only that one will be freed. Using a subsolver realiably triggered this issue. `ExportPrivate::exportInternal()` stored the `Expr` with the wrong `NodeManager` in an `ExprManagerMapCollection` which associates variables in the original `ExprManager` with the variables in the target `ExprManager`. When we created a subsolver, we created the `ExprManagerMapCollection` before creating our subsolver, so it was deleted after the subsolver and so deleting the `ExprManagerMapCollection` deleted the last reference to `Expr`s holding skolem nodes associated with the wrong `NodeManager`. This commit fixes the issue by making sure that the correct `NodeManager` is in scope when converting the skolem/bound variable nodes to an `Expr`. It also swaps the creation order of `ExprManagerMapCollection` and `ExprManager` to make sure that `ExprManagerMapCollection` is deleted before the `ExprManager` that the `Expr`s belong to. Additionally, the commit makes it harder to make a similar mistake by asserting that the `Expr`s in the `ExprManagerMapCollection` are associated with the expected `ExprManager`s. Finally, it adds an assertion that tries to identify such issues by checking whether the list of zombies contains a node with the same id but located at a different address.
2019-03-19Sygus abduction feature (#2744)Andrew Reynolds
2018-11-28Generalize sygus stream solution filtering to logical strength (#2697)Andrew Reynolds
2018-10-12Reset input language for ExprMiner subsolver (#2624)Andres Noetzli
2018-10-10Synthesize rewrite rules from inputs (#2608)Andrew Reynolds
2018-09-13Generalize CandidateRewriteDatabase to ExprMiner (#2340)Andrew Reynolds
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback