summaryrefslogtreecommitdiff
path: root/src/expr
AgeCommit message (Collapse)Author
2020-11-20(proof-new) Replace LazyCDProofSet by generic CDProofSet (#5487)Gereon Kremer
This PR replaces the LazyCDProofSet, that was hardcoded to use LazyCDProof objects, by a templated CDProofSet.
2020-11-19Include stddef.h (needed for size_t) in cvc4_public.h (#5476)Aina Niemetz
This further removes obsolete explicit includes of stdint.h.
2020-11-19Add nested quantifier elimination module (#5422)Andrew Reynolds
This has static utilities for doing nested quantifier elimination and some data structures for maintaining a context-dependent set of quantified formulas that have been processed. This is work towards CVC4/cvc4-wishues#26, and work reimplementation of the option --ceqgi-nested-qe.
2020-11-19Use symbol manager for unsat cores (#5468)Andrew Reynolds
This PR uses the symbol manager for handling names for unsat cores. This replaces interfaces in SmtEngine for managing expression names. It removes the SetExpressionName command.
2020-11-17FloatingPoint: Clean up and document header, format. (#5453)Aina Niemetz
This cleans up the src/util/floatingpoint.h.in header to conform to the code style guidelines of CVC4. This further attempts to fully document the header. The main changes (except for added documentation) are renames of member variables, getting rid of the redundant functions FloatingPointSize::exponent() and FloatingPointSize::significand(), and a more explicit naming of CVC4 wrapper types vs symFPU trait types. Else, it's mainly reordering and formatting.
2020-11-16Cleaning up scopes in preparation for symbol manager (#5442)Andrew Reynolds
This changes the default of Parser::pushScope and prepares symbol manager further for maintaining expression names.
2020-11-13Add more features to symbol manager (#5434)Andrew Reynolds
This is in preparation for having the symbol manager manage expression names at the parser level instead of inside SmtEngine. This adds some necessary features regarding scopes and global declarations. This PR still does not change the behavior of the parser.
2020-11-12(proof-new) Fix true explanations of propagations in pf equality engine (#5338)Andrew Reynolds
This ensures we construct proper proofs for propagations whose conclusions are of the form (=> true lit). Literals may be propagated with "true" as an explanation in datatypes, e.g. discriminators for datatypes with 1 constructor.
2020-11-12(proof-new) Improve printing and debugging for pedantic checking (#5337)Andrew Reynolds
This improves trace/error messages for proof-new-pedantic, and also merges the proof-new-pedantic-eager with the proof-new-eager-checking option.
2020-11-12Make symbol manager context dependent (#5424)Andrew Reynolds
This follows a similar style to symbol_table.h/cpp. This is required since context dependent data structures are cvc4_private, and symbol manager is cvc4_public.
2020-11-11Move symbol manager to src/expr/ (#5420)Andrew Reynolds
This is required since symbol manager will use context dependent data structures (in its cpp). This is required since classes in src/parser/ are not allowed to include private headers.
2020-11-11Add simple substitution utility (#5397)Andrew Reynolds
A few new algorithms for CEGQI and single invocation sygus will use this utility for managing transformations.
2020-11-10Add getSubtermKinds to node algorithm (#5398)Andrew Reynolds
Required for a new algorithm for nested quantifier elimination.
2020-11-09Migrate some documentation about attributes (#5390)Andrew Reynolds
From old wiki.
2020-11-05Simplify printing with respect to expression types (#5394)Andrew Reynolds
This removes infrastructure for stream property related to printing type annotations on all variables. This is towards refactoring the printers.
2020-11-03Add scope methods constructing types in API (#5393)Andrew Reynolds
This addresses the nightly failures. It ensures a node manager is in scope when constructing type nodes. It also simplifies the construction of atomic type nodes to avoid an extra TypeNode(...) constructor.
2020-11-02Avoid dynamic allocation in symbol table implementation (#5368)Andrew Reynolds
Encountered this while debugging the new symbol manager. This is not essential but probably a good idea to refactor.
2020-10-29Update api::Sort to use TypeNode instead of Type (#5363)Andrew Reynolds
This is work towards removing the old API. This makes TypeNode the backend for Sort instead of Type. It also updates a unit test for methods isUninterpretedSortParameterized and getUninterpretedSortParamSorts whose implementation was previously buggy due to the implementation of Type-level SortType.
2020-10-29Add mkInteger to the API (#5274)mudathirmahgoub
This PR adds mkInteger to the API and update mkReal to ensure that the returned term has real sort. The parsers are modified to parse numbers like "0" "5" as integers and "0.0" and "15.0" as reals. This means subtyping is effectively eliminated from all theories except arithmetic. Other changes: Term::isValue is removed which was introduced to support parsing for constant arrays. It is no longer needed after this PR. Benchmarks are updated to match the changes in the parsers Co-authored-by: Andrew Reynolds andrew-reynolds@uiowa.edu
2020-10-29Add NodeManager::mkOr() (#5360)Gereon Kremer
This PR adds a convenience method mkOr() just like mkAnd().
2020-10-28Convert symbol table from Expr-level to Term-level (#5355)Andrew Reynolds
This task is left over from parser migration. This PR also drops support for a case of symbol overloading, in particular symbols (constructors, selectors) for parametric datatypes cannot be overloaded. One regression is disabled as a result.
2020-10-27Add missing methods involving datatype sorts to the API (#5290)Andrew Reynolds
This is required for migrating the parser's symbol table from Expr -> Term.
2020-10-26(proof-new) Add datatypes proof checker (#5340)Andrew Reynolds
This adds the proof rules and proof checker for datatypes.
2020-10-21(proof-new) Updates to lazy proof chain (#5317)Andrew Reynolds
Support for a default proof generator, which is optionally not called recursively. This is required for preprocessing.
2020-10-21Add operator MakeBagOp for constructing bags (#5209)mudathirmahgoub
This PR removes subtyping rules for bags and add operator MakeBagOp similar to SingletonOp
2020-10-20(proof-new) Fixes for proofs in rewriter (#5307)Andrew Reynolds
This PR fixes proofs in the rewriter so that we use attributes for marking whether a node has been rewritten with proofs instead of consulting the provided TConvProofGenerator for hasRewriteStep. This additionally marks TRUST_REWRITE steps if a rewriter happens to be nondeterministic (e.g. quantifiers). It furthermore decouples rewriteWithProof from reconstruction for theory rewrite steps. The proof postprocessor is additionally updated so that extended equality REWRITE steps are converted to THEORY_REWRITE steps with identifier RW_REWRITE_EQ_EXT for consistency, since eliminating REWRITE should result in THEORY_REWRITE only. This required generalizing the argument to THEORY_REWRITE to be a MethodId instead of a Boolean.
2020-10-20(proof-new) Fix for CDProof::isSame (#5297)Andrew Reynolds
Did not check for disequalities properly.
2020-10-20(proof-new) Update add lazy step interface in LazyCDProof (#5299)Andrew Reynolds
Ensuring closed proofs should not be enabled by default, it is actually not used very often as a whole. Moreover, the "trust id" argument is the most useful argument and hence should come as the 3rd argument. This updates all uses of addLazyStep for the change in interface, also changes term conversion generator which had a similar issue with default arguments. Notice that some calls to addLazyStep were checking closed but without providing a debug string, these I've left alone (they no longer check closed).
2020-10-19[proof-new] Fixing resolution proof checker (#5262)Haniel Barbosa
Previously the binary resolution checker was: - Checking applications in which for a pivot (not l) the literal (not l) would be eliminated from the first clause and l from the second because double negation was handled implicitly. Now whether the binary resolution is such that the pivot is removed as is from the first clause and negated from the second, or the other way around, is marked via an argument. - Not producing false the remaining set of literals after resolution was empty. This commit also updates the informal description of the rule accordingly, as well as to clarify the behavior when the pivot does not occur properly in the clauses (in which case the rule application corresponds to weakening). Co-authored-by: Gereon Kremer <gereon.kremer@cs.rwth-aachen.de>
2020-10-19[proof-new] Improving cycle checking in lazycdproofchain (#5302)Haniel Barbosa
2020-10-18(proof-new) Refactoring cyclic checks (#5291)Andrew Reynolds
This PR makes it so that cyclic checks are only performed eager when proofNewEagerChecking is true. It refactors the existing cyclic check in ProofNodeToSExpr to have a more consistent style, and adds a cyclic check to getFreeAssumptions.
2020-10-18 (proof-new) Witness axiom reconstruction for purification skolems (#5289)Andrew Reynolds
This formalizes the proofs of existentials that justify purification variables, e.g. those with witness form witness x. x = t for the term t they purify. This PR generalizes EXISTS_INTRO to do this, and makes some simplifications to SkolemManager.
2020-10-18(proof-new) Implementation of trust substitution (#5276)Andrew Reynolds
Trust substitution is a data structure that is used throughout preprocessing for proofs. This adds its implementation.
2020-10-13(proof-new) Simplifications for proof rule checker interface (#5244)Andrew Reynolds
Some of the interfaces in the proof rule checker are unnecessary now and can be deleted. This also updates STRING_TRUST to have pedantic level 2.
2020-10-13(proof-new) New rules for Booleans (#5243)Andrew Reynolds
This adds 2 new rules for convenience to the Boolean checker.
2020-10-13(proof-new) Change merge policy for proof node updater (#5242)Andrew Reynolds
This updates the proof node updater with a mergeSubproofs field which automatically merges subproofs in the same SCOPE that prove the same thing. This is currently enabled by default, it is now configurable and disabled by default.
2020-10-11SyGuS instantiation modes (#5228)Mathias Preiner
This PR adds three instantiation modes to the SyGuS instantiation module.
2020-10-08(proof-new) Add lazy proof set utility (#5221)Andrew Reynolds
This is a common pattern that is required in several places in preprocessing.
2020-10-08(proof-new) Fixes and improvements for smt proof postprocessor (#5197)Andrew Reynolds
This includes several subtle issues encountered in the past month based on our regressions. It also improves the expansion forms of MACRO_ rules to use EQ_RESOLVE instead of a TRUE_INTRO/TRUE_ELIM scheme. This is both more compact and avoids cyclic proofs for some corner cases of proofs with Boolean constant equalites.
2020-10-06(proof-new) Allow null proofs from generators in LazyCDProof (#5196)Andrew Reynolds
In some cases, a proof generator provided to a LazyCDProof may provide a null proof, which causes a segfault on proof-new currently. This PR makes LazyCDProof robust to this case; nullptr is interpreted as the fact is an assumption.
2020-10-05Remove subtyping for sets (#5205)mudathirmahgoub
Removed subtyping for sets in type_node.h Fixes #4502, fixes #4631.
2020-10-04Remove subtyping for sets theory (#5179)mudathirmahgoub
This PR removes subtyping for sets theory due to issues like #4502, #4507 and #4631. Changes: Add SingletonOp for singletons to specify the type of the single element in the set. Add mkSingleton to the solver to enable the user to pass the sort of the single element. Update smt and cvc parsers to use mkSingleton when the kind is SINGLETON
2020-10-02(proof-new) Fixes for theory preprocessing proofs (#5171)Andrew Reynolds
This fixes several subtle issues with theory preprocessing. The main fix is to ensure proofs are correct for cases where the theory preprocessor applies either with or without theory preprocessing (calling Theory::ppRewrite on subterms) enabled, see argument doTheoryPreprocess of preprocess. If disabled, it applies term formula removal and rewriting only. This is required for processing lemmas that are marked as "do not preprocess", which is an optimization, but is also necessary since theory combination may e.g. split on equality that was solved during ppRewrite. The solution is to use 2 separate term conversion sequences for these 2 cases. It also fixes an issue where preprocessing is term-context-sensitive: terms underneath quantifiers are treated differently. This is now handled by a new TermContext callback "InQuantTermContext".
2020-09-30(proof-new) Add the term conversion sequence generator (#5097)Andrew Reynolds
This class will be used in the theory preprocessor and is planned to be used in other preprocessing passes that can be understood as sequences of rewrite systems.
2020-09-29[proof-new] Updates to proof node updater (#5156)Haniel Barbosa
2020-09-28[proof-new] Adds a proof node hash function (#5154)Haniel Barbosa
2020-09-28Minor fixes to quantifiers proofs (#5151)Andrew Reynolds
Includes minor changes to the proof checker and a fix in the instantiate module.
2020-09-28[proof-new] Adds a proof manager for the SAT solver (#5140)Haniel Barbosa
Tracks the refutation proof built by Minisat. See the header for extensive explanations. This commit also adds a few dependencies for the SAT proof manager to work (making it a friend of the SAT solver, getting the cnf stream from theory proxy, having lazy cdproof chain give all the links).
2020-09-23Modify lemma vs fact policy for datatype equalities (#5115)Andrew Reynolds
This changes the lemma vs fact policy for datatype equalities. Previously, datatype equalities were sent as lemmas unless they were over datatypes that were composed of datatypes only. This is now changed so that equalities that do not involve direct subterms with finite non-datatype types are kept internal. The primary type of equality that this targets are "Instantiate" equalities, e.g. the conclusion of: (is-cons x) => x = (cons (head x) (tail x)) These equalities have been observed to generate large amounts of new terms for many benchmarks. With this PR, the the challenging Facebook benchmark goes from 2 min 45 sec -> 29 sec. If the instantiate rule is disabled altogether, it still correctly solves, and is faster (~14 seconds), which however is not correct in general. This change triggered two other issues: (1) A relations benchmark involving transitive closure now times out. This has been a common issue for the relations solver and should be revisited. (2) A potential issue with doPendingLemmas in InferenceManagerBuffer was uncovered. In rare cases, we can be re-entrant into this method since OutputChannel::lemma may trigger further preregistration of terms, which can trigger a recursive call to doPendingLemmas in the case of datatypes, which causes a segfault due to corrupting an iterator. This PR adds a simple guard for this method. This PR also fixes some existing issues in computing cardinality for parametric datatypes.
2020-09-22Add skeleton for theory of bags (multisets) (#5100)mudathirmahgoub
This PR adds initial headers and mostly empty source files for the theory of bags (multisets). It acts as a basis for future commits. It includes straightforward implementation for typing rules an enumerator for bags.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback