11 Commits

Author SHA1 Message Date
Andrew Reynolds
2b364e03e5 Final preparation for CONST_INTEGER (#8700)
With this PR, CI passes when using CONST_INTEGER instead of (all) integral CONST_RATIONAL.

This does not make this change yet, so CONST_RATIONAL is still used throughout.
2022-05-02 21:36:33 -05:00
Mathias Preiner
d01e59c13b Update copyright headers for release 1.0 (#8539) 2022-04-05 20:38:57 +00:00
Mathias Preiner
bbcd471ed4 Introduce internal namespace and remove api namespace. (#8443)
The public cvc5 API now lives in the cvc5 namespace. All internal parts were moved into the (new) internal namespace.
The final hierarchy will be as follows:

cvc5
  ~~ public API
  ::context
  ::internal
  ::parser
  ::main

After this PR it will be:

cvc5
  ~~ public API
  ::internal
      ::context
      ::main
  ::parser
2022-03-29 23:23:01 +00:00
Aina Niemetz
c335e4d3fa Rename kind PLUS -> ADD. (#8036)
This renames the arithmetic internal and API kind PLUS to ADD for
consistency with our naming scheme for other operators (e.g.,
BITVECTOR_ADD, FLOATINGPOINT_ADD).
2022-02-03 04:25:14 +00:00
Andres Noetzli
ad340126a7 Remove ConstantMap<Rational> (#7635)
This is in preparation of having two different kinds (CONST_RATIONAL
and CONST_INT) share the same payload. To do so, we cannot rely on
ConstantMap<Rational> anymore to map the payload type to a kind. This
commit extends support in the mkmetakind script to deal with such
payloads by adding a + suffix to the type. The commit also does some
minor refactoring of NodeManager::mkConst() and
NodeManager::mkConstInternal() to support setting the kind explicitly.
Finally, the commit addresses all instances where mkConst<Rational>()
is used, including the API.
2021-11-12 08:14:49 -06:00
Andres Noetzli
a24d6c8cf7 More precise includes of Node constants (#6617)
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-26 14:30:17 +00:00
Aina Niemetz
7ec3005875 Refactor and update copyright headers. (#6316) 2021-04-12 19:31:43 +00:00
Andres Noetzli
cfe1431aaa Remove template argument from NodeBuilder (#6290)
Currently, NodeBuilder takes a single template argument: An integer
that determines the expected number of arguments. This argument is used
to determine the size of the d_inlineNvChildSpace array. This array is
used to construct nodes inline. The advantage of this is that we don't
have to allocate a NodeValue on the heap for the node under
construction until we are sure that the node is new. While templating
the array size may save some stack space (or avoid a heap allocation if
we statically know that we a fixed number of children and that number is
greater than 10), it complicates the code and leads to longer compile
times. Thus, this commit removes the template argument and moves some of
the NodeBuilder code to a source file for faster compilation.

CPU build time before change (debug build): 2429.68s
CPU build time after change (debug build): 2228.44s

Signed-off-by: Andres Noetzli noetzli@amazon.com
2021-04-06 16:33:52 +00:00
Aina Niemetz
05a53a2ac4 Rename namespace CVC5 to cvc5. (#6258) 2021-04-01 16:56:14 +00:00
Aina Niemetz
a1466978fb Rename namespace CVC4 to CVC5. (#6249) 2021-03-31 22:23:17 +00:00
Aina Niemetz
bbf9eee55d Rename test/unit/expr to test/unit/node. (#6156)
This is in preparation for renaming src/expr to src/node.
2021-03-17 18:07:48 +00:00