summaryrefslogtreecommitdiff
path: root/src/printer
AgeCommit message (Collapse)Author
2021-06-09Fixes related to printing tuples, define-fun commands in smt2 (#6679)Andrew Reynolds
This PR fixes some initial issues with printing datatypes in smt2. It does not yet address further issues on printing define-fun as a result of dump=raw-benchmark, which requires deeper refactoring of the implementation of the API / SmtEngine.
2021-06-07Remove `Options::wasSetByUser()` (#6682)Gereon Kremer
This PR removes the next heavily specialized template function Options::wasSetByUser() in favor of direct access to the *WasSetByUser flags.
2021-06-02Fixes for printing define-fun-rec (#6673)Andrew Reynolds
2021-05-27Fix `str.replace_re` and `str.replace_re_all` (#6615)Andres Noetzli
Fixes #6057. The reductions of `str.replace_re` and `str.replace_re_all` were not correctly enforcing that the operations replace the _first_ occurrence of some regular expression in a string. This commit fixes the issue by introducing a new operator `str.indexof_re(s, r, n)`, which, analoguously to `str.indexof`, returns the index of the first match of the regular expression `r` in `s`. The commit adds basic rewrites for evaluating the operator as well as its reduction. Additionally, it converts the reductions of `str.replace_re` and `str.replace_re_all` to use that new operator. This simplifies the reductions of the two operators and ensures that the semantics are consistent between the two.
2021-05-27FP: Rename FLOATINGPOINT_PLUS to FLOATINGPOINT_ADD. (#6628)Aina Niemetz
This is to make it consistent with the name of the SMT-LIB operator (fp.add).
2021-05-26 More precise includes of `Node` constants (#6617)Andres Noetzli
We store constants, e.g., BitVector and Rational, in our node infrastructure. As a result, we were indirectly including some headers in almost all files, e.g., the GMP headers. This commit changes that by forward-declaring the classes for the constants. As a result, we have to include headers like util/rational.h explicitly when we use Rational but it saves about 3 minutes in compile time (CPU time). The commit changes RoundingMode from an enum to an enum class such that it can be forward declared.
2021-05-21Update to sygus standard output for check-synth responses (#6521)Andrew Reynolds
This PR does two things: (1) It eliminates the ad-hoc implementation of printSynthSolutions and removes it from the API. Now, printing response to a check-synth command is done in a more standard way, using the API + symbol manager. This is analogous to recent refactoring to get-model. (2) It updates cvc5's output in response to check-synth to be compliant with the upcoming sygus 2.1 standard. The standard has changed slightly: responses to check-synth are now closed in parentheses, mirroring the smt2 response to get-model. It also removes the unused command GetSynthSolutionCommand.
2021-05-21BV: Rename BITVECTOR_PLUS to BITVECTOR_ADD. (#6589)Aina Niemetz
2021-05-18Fix smt2 printing (#6558)Andrew Reynolds
This fixes bugs related to the smt2 printer where we rely on stream operators for recursive printing calls for certain parts of terms. Notice that a call to `out << n;` within `SmtPrinter::toStream(...)` is wrong since then recursively `n` is printed with the current output language. This means that if one were to ask to print a term in SMT2 format and the output language is not SMT2, then the above call would print `n` in a different format. This is required to fix bugs in the LFSC proof converter, which explicitly changes the output format to SMT2.
2021-05-13Add std::hash overloads for Node, TNode and TypeNode. (#6534)Mathias Preiner
Eliminates NodeHashFunction, TNodeHashFunction and TypeNodeHashFunction.
2021-05-07Add support for datatype update (#6449)Andrew Reynolds
This removes the special case of TUPLE_UPDATE and RECORD_UPDATE in favor of the more general datatype update. Datatype update is handled analogously to APPLY_SELECTOR / APPLY_TESTER.
2021-05-07Properly printing INST_PATTERN_LIST by itself (#6507)Haniel Barbosa
Previously the SMT2 printer would print pattern lists wrong when they were not printed as part of a binder containing it. This commit fixes this by removing an unused hardcoded restriction that led to issues when printing the ASTs of proof nodes containing patterns.
2021-04-27Add internal support for datatype update (#6450)Andrew Reynolds
2021-04-26First part of options refactoring (#6428)Gereon Kremer
This PR does a first round of refactoring and gets rid of a significant portion of generated code. In particular - it removes options::optionName.wasSetByUser() (we still have Options::wasSetByUser()) - it removes options::optionName.set() (we still have Options::set()) - it removes options::optionName.getName() in favor of options::optionName.name - it removes the specializations of Options::assign() and Options::assignBool() from the headers - it eliminates runHandlerAndPredicates() and runBoolPredicates() The removed methods are only used in few places with are changed to using Options::current().X() instead. In the future, we also want to get rid of options::optionName() and use Options::operator[]() instead, and furthermore not use Options::current() but use the options from the Env object. This PR already adds Env::getOption() as a shorthand for Env::getOptions()[...] and uses it as a proof of concept within SmtEngine.
2021-04-20Add instantiation pool feature to the API (#6358)Andrew Reynolds
This adds the command declare-pool to the public API. It also adds parsing support for this feature, lifts the internal kinds to public kinds, adds an example regression, and a unit test for the new declare-pool solver method.
2021-04-20Remove support for CVC3 language. (#6369)Aina Niemetz
2021-04-15Rename occurrences of CVC4 to CVC5. (#6351)Aina Niemetz
This renames everything but GitHub links and build system related macros. Switching the build system to cvc5 will be the last step in the renaming process.
2021-04-14Rename public and private headers in src/include. (#6352)Aina Niemetz
2021-04-12Refactor and update copyright headers. (#6316)Aina Niemetz
2021-04-09Rename CVC4_ macros to CVC5_. (#6327)Aina Niemetz
2021-04-09Rename CVC4__ header guards to CVC5__. (#6326)Aina Niemetz
2021-04-05New C++ Api: Rename and move headers. (#6292)Aina Niemetz
2021-04-01Rename namespace CVC5 to cvc5. (#6258)Aina Niemetz
2021-03-31Rename namespace CVC4 to CVC5. (#6249)Aina Niemetz
2021-03-30Fix printing for double patterns (#6235)Andrew Reynolds
2021-03-30Make SEXPR simply typed (#6160)Andrew Reynolds
Currently, SEXPR applications are given a parametric type SEXPR_TYPE applied to the types of its arguments. This means that SEXPR that are type checked consume roughly double the memory. This issue arises in practice when printing proofs in the internal calculus. There is no need to have SEXPR_TYPE as a parametric type, this PR makes SEXPR simply typed. Also moves some implementation of TypeNode methods to type_node.cpp.
2021-03-25FP: Refactor FloatingPointLiteral in preparation for MPFR. (#6206)Aina Niemetz
This pushes all symfpu specific parts from FloatingPoint into FloatingPointLiteral. FloatingPoint is now generic. An additional FloatingPointLiteral implementation using MPFR will be made configurable similiarly to how we handle Integers with either GMP or CLN backend.
2021-03-18Eliminate more uses of SExpr. (#6149)Abdalrhman Mohamed
This PR eliminates all remaining uses of SExpr outside of statistics.
2021-03-15Letify quantifier bodies independently (#6112)Andrew Reynolds
This fixes a subtle bug with how quantifier bodies are letified. It makes our letification more conservative so that let symbols are never pushed inside quantifier bodies, instead quantifier bodies are letified independently of the context.
2021-03-11Delete Expr layer. (#6117)Aina Niemetz
2021-03-09Some more cleanup of includes (#6083)Gereon Kremer
This PR does some more cleanup of the includes.
2021-03-09Update copyright headers to 2021. (#6081)Aina Niemetz
2021-03-05Remove partial UDIV/UREM operators. (#6069)Mathias Preiner
This commit removes the partial UDIV/UREM operator handling. BITVECTOR_UDIV and BITVECTOR_UREM are now total.
2021-03-06Remove SMT-LIB 2.5 and 2.0 support. (#6068)Mathias Preiner
This commit removes parser and printer support for old SMT-LIB standards and also converts all regression tests to 2.6.
2021-03-03More cleanup of includes to reduce compilation times (#6037)Gereon Kremer
Similar to #6031, this PR implements suggestions from iwyu to reduce the number of includes in header files by introducing forward declarations and moving includes to source files.
2021-03-03Remove uses of SExpr class. (#6035)Abdalrhman Mohamed
This PR is a step towards removing SExpr class. It replaces SExpr with std::string for set-info and set-option commands.
2021-03-03Add tuple projection operator (#5904)mudathirmahgoub
This PR adds tuple projection operator to the theory of data types. It Also adds helper functions for selecting elements from a tuple.
2021-03-02Clean up includes to reduce compile times (#6031)Gereon Kremer
This PR cleans up a ton of includes, based on the suggestions of iwyu. Mostly, it removes includes from header files in favor of forward declarations and adds includes to source files.
2021-02-26Minor improvement and fix to smt2 printer (#6009)Andrew Reynolds
This permits access to the static method string smtKindString(Kind k, Variant v) which is required for LFSC proof conversion. It also makes a fix to how a string kind is printed.
2021-02-22(proof-new) Add new arithmetic kind INDEXED_ROOT_PREDICATE. (#5949)Gereon Kremer
This PR introduces a new arithmetic kind for indexed root predicates. An indexed root predicate compares a real variable to the k'th root of a given polynomial as follows: Let IRP_k(x ~ 0, p) an indexed root predicate with k a non-negative number, x some real variable, ~ an arithmetic relation (e.g. =, <, ...), and p a polynomial over x (and possibly other variables). If p contains variables apart from x, we can only evaluate the expression over a suitable assignment for at least these variables. The evaluation of this expression is equivalent to computing the k'th real root of p in x (with all other variables evaluated over a given assignment) and comparing this real root to zero (according to the relation symbol ~). Note that we currently do not intend to use this structure for solving, but require it for representing and printing CAD proofs.
2021-02-08Use quantifiers inference manager for lemma management (#5867)Andrew Reynolds
Towards eliminating dependencies on quantifiers engine. This replaces the custom implementation of lemma management in quantifiers engine with the standard one. It makes a few minor changes to the standard inference manager classes to ensure the same behavior for quantifiers. Note that some minor changes in behavior are introduced in this PR, such as being more consistent about caching/rewriting lemmas. This should not have any major impact.
2021-01-24(proof-new) Instantiation list utility (#5768)Andrew Reynolds
This is in preparation for refactoring the printing of instantiations. We will migrate the printing of instantiations (currently done in the Instantiate module within quantifiers engine) to somewhere more high level e.g. the SmtEngine or in the command layer. This will make the infrastructure for dumping instantiations much more flexible, as implemented on proof-new.
2021-01-11Further simplifications in preparation for removing Expr layer (#5756)Andrew Reynolds
This deletes variable flags from NodeManager::mkVar and moves ExprManager sort flags to NodeManager. These flags are used for determining when a variable or sort should be printed via the old dump infrastructure. The old dump infrastructure is simplified in this PR accordingly. This PR should preserve behavior of the previous dumping with a minor exception that the internal trace "declarations" will also included symbols introduced from define-fun. This will be further refactored later. This is in preparation for removing the includes expr.h/expr_manager.h from node_manager.h.
2021-01-08Add bags inference generator (#5731)mudathirmahgoub
This PR adds inference generator for basic bag rules.
2021-01-05Remove a few miscellaneous references to the expr layer (#5661)Andrew Reynolds
Leftover from a development branch.
2020-12-16Simplify synth-fun printer (#5682)Andrew Reynolds
Simplifies synth-fun printing to assume that the function-to-synthesize should be printed with the proper name and return type.
2020-12-15Improvements related to quantifiers printing (#5678)Andrew Reynolds
Also fixes a bug where patterns would be printed with the wrong scope (that included the bound variable list).
2020-12-08Fix a bug with synth-fun printer (#5512)Abdalrhman Mohamed
This PR fixes #5448. SynthFunCommand::toStream used to call d_grammar->resolve even when d_grammar is a nullptr. This PR fixes the issue and modifies the signature of Printer::toStreamCmdSynthFun to make it clear that grammar is an optional argument.
2020-12-03Models as (#5581)yoni206
This PR relates to #4987 . Our plan is to: delete the model keyword (done in #5415 ) avoid printing extra declarations by default (done in #5432 ) wrap UF values with as expressions. This PR does step 3, fixes a regression accordingly, and adds the formula from #4987 and a variant of it to the regressions.
2020-12-02Update copyright headers.Aina Niemetz
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback