# basic parameters
set(DOXYGEN_INPUT_DIR ${PROJECT_SOURCE_DIR}/src/api/cpp)
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/doxygen)
-set(DOXYGEN_INPUT
- "${DOXYGEN_INPUT_DIR}/cvc5.h ${DOXYGEN_INPUT_DIR}/cvc5_kind.h ${PROJECT_SOURCE_DIR}/src/proof/proof_rule.h"
-)
+set(DOXYGEN_INPUT "\
+${DOXYGEN_INPUT_DIR}/cvc5.h \
+${DOXYGEN_INPUT_DIR}/cvc5_kind.h \
+${DOXYGEN_INPUT_DIR}/cvc5_types.h \
+${PROJECT_SOURCE_DIR}/src/proof/proof_rule.h \
+")
set(DOXYGEN_INDEX_FILE ${DOXYGEN_OUTPUT_DIR}/xml/index.xml)
# create doxygen config file
DEPENDS
${DOXYGEN_INPUT_DIR}/cvc5.h
${DOXYGEN_INPUT_DIR}/cvc5_kind.h
+ ${DOXYGEN_INPUT_DIR}/cvc5_types.h
${PROJECT_SOURCE_DIR}/src/proof/proof_rule.h
COMMENT "Generating doxygen API docs"
)
=====================
The C++ API is the primary interface for cvc5 and exposes the full functionality of cvc5.
-The :doc:`quickstart guide <quickstart>` gives a short introduction, while the following class hierarchy of the ``cvc5::api`` namespace provides more details on the individual classes.
-For most applications, the :cpp:class:`Solver <cvc5::api::Solver>` class is the main entry point to cvc5.
+The :doc:`quickstart guide <quickstart>` gives a short introduction, while the following class hierarchy of the ``cvc5`` namespace provides more details on the individual classes.
+For most applications, the :cpp:class:`Solver <cvc5::Solver>` class is the main entry point to cvc5.
.. container:: hide-toctree
Class hierarchy
^^^^^^^^^^^^^^^
-``namespace cvc5::api {``
+``namespace cvc5 {``
- * class :cpp:class:`CVC5ApiException <cvc5::api::CVC5ApiException>`
- * class :cpp:class:`CVC5ApiRecoverableException <cvc5::api::CVC5ApiRecoverableException>`
+ * class :cpp:class:`CVC5ApiException <cvc5::CVC5ApiException>`
+ * class :cpp:class:`CVC5ApiRecoverableException <cvc5::CVC5ApiRecoverableException>`
* class :ref:`api/cpp/datatype:datatype`
- * class :cpp:class:`const_iterator <cvc5::api::Datatype::const_iterator>`
+ * class :cpp:class:`const_iterator <cvc5::Datatype::const_iterator>`
* class :ref:`api/cpp/datatypeconstructor:datatypeconstructor`
- * class :cpp:class:`const_iterator <cvc5::api::DatatypeConstructor::const_iterator>`
+ * class :cpp:class:`const_iterator <cvc5::DatatypeConstructor::const_iterator>`
* class :ref:`api/cpp/datatypeconstructordecl:datatypeconstructordecl`
* class :ref:`api/cpp/datatypedecl:datatypedecl`
* class :ref:`api/cpp/optioninfo:optioninfo`
* class :ref:`api/cpp/result:result`
- * enum :cpp:enum:`UnknownExplanation <cvc5::api::Result::UnknownExplanation>`
+ * enum :cpp:enum:`UnknownExplanation <cvc5::Result::UnknownExplanation>`
* class :ref:`api/cpp/roundingmode:roundingmode`
* class :ref:`api/cpp/solver:solver`
* class :ref:`api/cpp/sort:sort`
- * class :cpp:class:`Stat <cvc5::api::Stat>`
- * class :cpp:class:`Statistics <cvc5::api::Statistics>`
+ * class :cpp:class:`Stat <cvc5::Stat>`
+ * class :cpp:class:`Statistics <cvc5::Statistics>`
* class :ref:`api/cpp/synthresult:synthresult`
* class :ref:`api/cpp/term:term`
- * class :cpp:class:`const_iterator <cvc5::api::Term::const_iterator>`
+ * class :cpp:class:`const_iterator <cvc5::Term::const_iterator>`
``}``
Datatype
========
-.. doxygenclass:: cvc5::api::Datatype
+.. doxygenclass:: cvc5::Datatype
:project: cvc5
:members:
:undoc-members:
DatatypeConstructor
===================
-.. doxygenclass:: cvc5::api::DatatypeConstructor
+.. doxygenclass:: cvc5::DatatypeConstructor
:project: cvc5
:members:
:undoc-members:
DatatypeConstructorDecl
=======================
-.. doxygenclass:: cvc5::api::DatatypeConstructorDecl
+.. doxygenclass:: cvc5::DatatypeConstructorDecl
:project: cvc5
:members:
:undoc-members:
DatatypeDecl
============
-.. doxygenclass:: cvc5::api::DatatypeDecl
+.. doxygenclass:: cvc5::DatatypeDecl
:project: cvc5
:members:
:undoc-members:
DatatypeSelector
================
-.. doxygenclass:: cvc5::api::DatatypeSelector
+.. doxygenclass:: cvc5::DatatypeSelector
:project: cvc5
:members:
:undoc-members:
The cvc5 API communicates certain errors using exceptions. We broadly
distinguish two types of exceptions: :cpp:class:`CVC5ApiException
-<cvc5::api::CVC5ApiException>` and :cpp:class:`CVC5ApiRecoverableException
-<cvc5::api::CVC5ApiRecoverableException>` (which is derived from
-:cpp:class:`CVC5ApiException <cvc5::api::CVC5ApiException>`).
+<cvc5::CVC5ApiException>` and :cpp:class:`CVC5ApiRecoverableException
+<cvc5::CVC5ApiRecoverableException>` (which is derived from
+:cpp:class:`CVC5ApiException <cvc5::CVC5ApiException>`).
If any method fails with a :cpp:class:`CVC5ApiRecoverableException
-<cvc5::api::CVC5ApiRecoverableException>`, the solver behaves as if the failing
+<cvc5::CVC5ApiRecoverableException>`, the solver behaves as if the failing
method was not called. The solver can still be used safely.
If, however, a method fails with a :cpp:class:`CVC5ApiException
-<cvc5::api::CVC5ApiException>`, the associated object may be in an unsafe state
+<cvc5::CVC5ApiException>`, the associated object may be in an unsafe state
and it should no longer be used.
-.. doxygenclass:: cvc5::api::CVC5ApiException
+.. doxygenclass:: cvc5::CVC5ApiException
:project: cvc5
:members:
:undoc-members:
-.. doxygenclass:: cvc5::api::CVC5ApiRecoverableException
+.. doxygenclass:: cvc5::CVC5ApiRecoverableException
:project: cvc5
:members:
:undoc-members:
Grammar
=======
-.. doxygenclass:: cvc5::api::Grammar
+.. doxygenclass:: cvc5::Grammar
:project: cvc5
:members:
:undoc-members:
Kind
====
-Every :cpp:class:`Term <cvc5::api::Term>` has an associated kind.
+Every :cpp:class:`Term <cvc5::Term>` has an associated kind.
This kind distinguishes if the Term is a value, constant, variable or operator,
and what kind of each.
For example, a bit-vector value has kind
-:cpp:enumerator:`CONST_BITVECTOR <cvc5::api::Kind::CONST_BITVECTOR>`,
+:cpp:enumerator:`CONST_BITVECTOR <cvc5::Kind::CONST_BITVECTOR>`,
a free constant symbol has kind
-:cpp:enumerator:`CONSTANT <cvc5::api::Kind::CONSTANT>`,
+:cpp:enumerator:`CONSTANT <cvc5::Kind::CONSTANT>`,
an equality over terms of any sort has kind
-:cpp:enumerator:`EQUAL <cvc5::api::Kind::EQUAL>`, and a universally
-quantified formula has kind :cpp:enumerator:`FORALL <cvc5::api::Kind::FORALL>`.
+:cpp:enumerator:`EQUAL <cvc5::Kind::EQUAL>`, and a universally
+quantified formula has kind :cpp:enumerator:`FORALL <cvc5::Kind::FORALL>`.
-.. doxygenenum:: cvc5::api::Kind
+.. doxygenenum:: cvc5::Kind
:project: cvc5
-.. doxygenstruct:: std::hash< cvc5::api::Kind >
+.. doxygenstruct:: std::hash< cvc5::Kind >
:project: std
:members:
:undoc-members:
Op
==
-.. doxygenclass:: cvc5::api::Op
+.. doxygenclass:: cvc5::Op
:project: cvc5
:members:
-.. doxygenstruct:: std::hash< cvc5::api::Op >
+.. doxygenstruct:: std::hash< cvc5::Op >
:project: std
:members:
:undoc-members:
OptionInfo
==========
-.. doxygenstruct:: cvc5::api::OptionInfo
+.. doxygenstruct:: cvc5::OptionInfo
:project: cvc5
:members:
Quickstart Guide
================
-First, create a cvc5 :cpp:class:`Solver <cvc5::api::Solver>` instance:
+First, create a cvc5 :cpp:class:`Solver <cvc5::Solver>` instance:
.. literalinclude:: ../../../examples/api/cpp/quickstart.cpp
:language: cpp
The result we get from this satisfiability check is either ``sat``, ``unsat``
or ``unknown``.
It's status can be queried via
-:cpp:func:`cvc5::api::Result::isSat`,
-:cpp:func:`cvc5::api::Result::isUnsat` and
-:cpp:func:`cvc5::api::Result::isSatUnknown`.
+:cpp:func:`cvc5::Result::isSat`,
+:cpp:func:`cvc5::Result::isUnsat` and
+:cpp:func:`cvc5::Result::isSatUnknown`.
Alternatively, it can also be printed.
.. literalinclude:: ../../../examples/api/cpp/quickstart.cpp
Result
======
-.. doxygenclass:: cvc5::api::Result
+.. doxygenclass:: cvc5::Result
:project: cvc5
:members:
:undoc-members:
RoundingMode
============
-.. doxygenenum:: cvc5::api::RoundingMode
+.. doxygenenum:: cvc5::RoundingMode
:project: cvc5
-.. doxygenstruct:: std::hash< cvc5::api::RoundingMode >
+.. doxygenstruct:: std::hash< cvc5::RoundingMode >
:project: std
:members:
:undoc-members:
Solver
======
-.. doxygenclass:: cvc5::api::Solver
+.. doxygenclass:: cvc5::Solver
:project: cvc5
:members:
:undoc-members:
Sort
====
-The :cpp:class:`Sort <cvc5::api::Sort>` class represents the sort of a
-:cpp:class:`Term <cvc5::api::Term>`.
+The :cpp:class:`Sort <cvc5::Sort>` class represents the sort of a
+:cpp:class:`Term <cvc5::Term>`.
-A :cpp:class:`Sort <cvc5::api::Sort>` can be hashed (using
-:cpp:class:`std::hash\<cvc5::api::Sort>`) and serialized to an output stream
-(using :cpp:func:`cvc5::api::operator<<()`).
+A :cpp:class:`Sort <cvc5::Sort>` can be hashed (using
+:cpp:class:`std::hash\<cvc5::Sort>`) and serialized to an output stream
+(using :cpp:func:`cvc5::operator<<()`).
-Class :cpp:class:`Sort <cvc5::api::Sort>` offers the default constructor
-only to create a null Sort. Instead, the :cpp:class:`Solver <cvc5::api::Solver>`
+Class :cpp:class:`Sort <cvc5::Sort>` offers the default constructor
+only to create a null Sort. Instead, the :cpp:class:`Solver <cvc5::Solver>`
class provides factory functions for all other sorts, e.g.,
-:cpp:func:`cvc5::api::Solver::getBooleanSort()` for Sort Bool and
-:cpp:func:`cvc5::api::Solver::mkBitVectorSort()` for bit-vector
+:cpp:func:`cvc5::Solver::getBooleanSort()` for Sort Bool and
+:cpp:func:`cvc5::Solver::mkBitVectorSort()` for bit-vector
sorts.
Sorts are defined as standardized in the SMT-LIB standard for standardized
- *Bag* (Multiset)
- - Created with :cpp:func:`cvc5::api::Solver::mkBagSort()`
+ - Created with :cpp:func:`cvc5::Solver::mkBagSort()`
- *Set* (:ref:`Theory of Sets and Relations <theory_reference_sets>`)
- - Created with :cpp:func:`cvc5::api::Solver::mkSetSort()`
+ - Created with :cpp:func:`cvc5::Solver::mkSetSort()`
- *Relation* (:ref:`Theory of Sets and Relations <theory_reference_sets>`)
- - Created with :cpp:func:`cvc5::api::Solver::mkSetSort()` as a set of tuple
+ - Created with :cpp:func:`cvc5::Solver::mkSetSort()` as a set of tuple
sorts
- *Table*
- - Created with :cpp:func:`cvc5::api::Solver::mkBagSort()` as a bag of tuple
+ - Created with :cpp:func:`cvc5::Solver::mkBagSort()` as a bag of tuple
sorts
-.. doxygenclass:: cvc5::api::Sort
+.. doxygenclass:: cvc5::Sort
:project: cvc5
:members:
:undoc-members:
-.. doxygenfunction:: cvc5::api::operator<<(std::ostream& out, const Sort& s)
+.. doxygenfunction:: cvc5::operator<<(std::ostream& out, const Sort& s)
-.. doxygenstruct:: std::hash< cvc5::api::Sort >
+.. doxygenstruct:: std::hash< cvc5::Sort >
:project: std
:members:
:undoc-members:
The solver collects a variety of statistics that can be helpful in understanding
what the solver is doing internally. The entirety of collected statistics are
-represented by a :cpp:class:`Statistics <cvc5::api::Statistics>` object that can
+represented by a :cpp:class:`Statistics <cvc5::Statistics>` object that can
be obtained from :cpp:func:`Solver::getStatistics()
-<cvc5::api::Solver::getStatistics>`. It is a copy of the internal solver
+<cvc5::Solver::getStatistics>`. It is a copy of the internal solver
statistics at this point in time.
-The :cpp:class:`Statistics <cvc5::api::Statistics>` object is essentially a
+The :cpp:class:`Statistics <cvc5::Statistics>` object is essentially a
mapping from names (as ``std::string``) to statistic values, represented by the
-:cpp:class:`Stat <cvc5::api::Stat>` class. A :cpp:class:`Stat <cvc5::api::Stat>`
+:cpp:class:`Stat <cvc5::Stat>` class. A :cpp:class:`Stat <cvc5::Stat>`
can hold values of different types (``int64_t``, ``double``, ``std::string`` and
histograms) and can be inspected by identifying the type
-(:cpp:func:`Stat::isInt() <cvc5::api::Stat::isInt()>`,
-:cpp:func:`Stat::isDouble() <cvc5::api::Stat::isDouble()>`, etc) and obtaining
-the actual value (:cpp:func:`Stat::getInt() <cvc5::api::Stat::getInt()>`,
-:cpp:func:`Stat::getDouble() <cvc5::api::Stat::getDouble()>`, etc). Histograms
+(:cpp:func:`Stat::isInt() <cvc5::Stat::isInt()>`,
+:cpp:func:`Stat::isDouble() <cvc5::Stat::isDouble()>`, etc) and obtaining
+the actual value (:cpp:func:`Stat::getInt() <cvc5::Stat::getInt()>`,
+:cpp:func:`Stat::getDouble() <cvc5::Stat::getDouble()>`, etc). Histograms
conceptually count the frequency of different values of an arbitrary type,
usually an enumeration type. They are represented as ``std::map<std::string,
uint64_t>`` where the key is the strings representation of one enumeration value
Statistics are generally categorized into public and internal statistics, and
furthermore into changed and defaulted statistics. By default, iterating a
-:cpp:class:`Statistics <cvc5::api::Statistics>` object only shows statistics
+:cpp:class:`Statistics <cvc5::Statistics>` object only shows statistics
that are both public and changed. The :cpp:func:`Statistics::begin()
-<cvc5::api::Statistics::begin()>` method has Boolean flags ``internal`` and
+<cvc5::Statistics::begin()>` method has Boolean flags ``internal`` and
``def`` to also show internal statistics and defaulted statistics, respectively.
-.. doxygenclass:: cvc5::api::Statistics
+.. doxygenclass:: cvc5::Statistics
:project: cvc5
:members: get, begin, end
:undoc-members:
-.. doxygenclass:: cvc5::api::Stat
+.. doxygenclass:: cvc5::Stat
:project: cvc5
:members:
:undoc-members:
SynthResult
===========
-.. doxygenclass:: cvc5::api::SynthResult
+.. doxygenclass:: cvc5::SynthResult
:project: cvc5
:members:
:undoc-members:
Term
====
-The :cpp:class:`Term <cvc5::api::Term>` class represents arbitrary expressions that are Boolean or from some of the supported theories. The list of all supported types (or kinds) is given by the :cpp:enum:`Kind <cvc5::api::Kind>` enum.
-The :cpp:class:`Term <cvc5::api::Term>` class provides methods for general inspection (e.g., comparison, retrieve the kind and sort, access sub-terms), but also methods to retrieving constant values for the supported theories (i.e., :code:`is<Type>Value()` and :code:`get<Type>Value()`, which returns the constant values in the best type standard C++ offers).
+The :cpp:class:`Term <cvc5::Term>` class represents arbitrary expressions that are Boolean or from some of the supported theories. The list of all supported types (or kinds) is given by the :cpp:enum:`Kind <cvc5::Kind>` enum.
+The :cpp:class:`Term <cvc5::Term>` class provides methods for general inspection (e.g., comparison, retrieve the kind and sort, access sub-terms), but also methods to retrieving constant values for the supported theories (i.e., :code:`is<Type>Value()` and :code:`get<Type>Value()`, which returns the constant values in the best type standard C++ offers).
-Additionally, a :cpp:class:`Term <cvc5::api::Term>` can be hashed (using :cpp:class:`std::hash\<cvc5::api::Term>`) and given to output streams, including terms within standard containers like :code:`std::map`, :code:`std::set`, or :code:`std::vector`.
+Additionally, a :cpp:class:`Term <cvc5::Term>` can be hashed (using :cpp:class:`std::hash\<cvc5::Term>`) and given to output streams, including terms within standard containers like :code:`std::map`, :code:`std::set`, or :code:`std::vector`.
-The :cpp:class:`Term <cvc5::api::Term>` only offers the default constructor to create a null term. Instead, the :cpp:class:`Solver <cvc5::api::Solver>` class provides factory functions for all other terms, e.g., :code:`Solver::mkTerm()` for generic terms and :code:`Solver::mk<Type>()` for constant values of a given type.
+The :cpp:class:`Term <cvc5::Term>` only offers the default constructor to create a null term. Instead, the :cpp:class:`Solver <cvc5::Solver>` class provides factory functions for all other terms, e.g., :code:`Solver::mkTerm()` for generic terms and :code:`Solver::mk<Type>()` for constant values of a given type.
-.. doxygenclass:: cvc5::api::Term
+.. doxygenclass:: cvc5::Term
:project: cvc5
:members:
:undoc-members:
-.. doxygenstruct:: std::hash< cvc5::api::Term >
+.. doxygenstruct:: std::hash< cvc5::Term >
:project: std
:members:
:undoc-members:
example whether it is an equality (:py:obj:`Equal <cvc5.Kind.Equal>`), a
conjunction (:py:obj:`And <cvc5.Kind.And>`), or a bit-vector addtion
(:py:obj:`BVAdd <cvc5.Kind.BVAdd>`).
-The kinds below directly correspond to the enum values of the C++ :cpp:enum:`Kind <cvc5::api::Kind>` enum.
+The kinds below directly correspond to the enum values of the C++ :cpp:enum:`Kind <cvc5::Kind>` enum.
.. autoclass:: cvc5.Kind
:members:
# -- extension:: breathe -----------------------------------------------------
breathe_default_project = "cvc5"
breathe_domain_by_extension = {"h" : "cpp"}
-cpp_index_common_prefix = ["cvc5::api::"]
+cpp_index_common_prefix = ["cvc5::"]
# -- extension:: sphinxcontrib.bibtex ----------------------------------------
When cvc5 is used as a binary, options can be set on the command line.
Also, options can be set and inspected using the respective commands of the input language and the corresponding API functions:
-- C++ API: :cpp:func:`setOption() <cvc5::api::Solver::setOption()>`,
- :cpp:func:`getOption() <cvc5::api::Solver::getOption()>`,
- :cpp:func:`getOptionNames() <cvc5::api::Solver::getOptionNames()>`,
- :cpp:func:`getOptionInfo() <cvc5::api::Solver::getOptionInfo()>`
+- C++ API: :cpp:func:`setOption() <cvc5::Solver::setOption()>`,
+ :cpp:func:`getOption() <cvc5::Solver::getOption()>`,
+ :cpp:func:`getOptionNames() <cvc5::Solver::getOptionNames()>`,
+ :cpp:func:`getOptionInfo() <cvc5::Solver::getOptionInfo()>`
- Java API: ``setOption()``, ``getOption()``, ``getOptionNames()``, ``getOptionInfo()``
- Base Python API: :py:func:`setOption() <cvc5.Solver.setOption()>`,
:py:func:`getOption() <cvc5.Solver.getOption()>`,
:ref:`rlimit <lbl-option-rlimit>`, and :ref:`rlimit-per <lbl-option-rlimit-per>`.
All these options take a single non-negative number as an argument where giving zero explicitly disables the respective limit. For time limits the number is interpreted as the number of milliseconds, and for resource limits it indicates the amount of *resources*.
-The limits configured using :ref:`tlimit <lbl-option-tlimit>` and :ref:`rlimit <lbl-option-rlimit>` restrict time and resource usage over the whole lifetime of the :cpp:class:`solver <cvc5::api::Solver>` object, respectively.
-In contrast to that, :ref:`tlimit-per <lbl-option-tlimit-per>` and :ref:`rlimit-per <lbl-option-rlimit-per>` apply to every check individually (:cpp:func:`checkSat <cvc5::api::Solver::checkSat>`, :cpp:func:`checkSatAssuming <cvc5::api::Solver::checkSatAssuming>`, :cpp:func:`checkEntailed <cvc5::api::Solver::checkEntailed>`, etc).
+The limits configured using :ref:`tlimit <lbl-option-tlimit>` and :ref:`rlimit <lbl-option-rlimit>` restrict time and resource usage over the whole lifetime of the :cpp:class:`solver <cvc5::Solver>` object, respectively.
+In contrast to that, :ref:`tlimit-per <lbl-option-tlimit-per>` and :ref:`rlimit-per <lbl-option-rlimit-per>` apply to every check individually (:cpp:func:`checkSat <cvc5::Solver::checkSat>`, :cpp:func:`checkSatAssuming <cvc5::Solver::checkSatAssuming>`, :cpp:func:`checkEntailed <cvc5::Solver::checkEntailed>`, etc).
Except for the overall time limit (see below), the limits are checked by cvc5 itself and the solver is in a safe state after exhausting a limit.
Due to the way cvc5 checks these limits (see below), cvc5 may not precisely honor per-call time limits: if a subroutine requires a long time to finish without spending resources itself, cvc5 only realizes afterwards that the timeout has (long) passed.
Whenever certain parts of the solver execute, they instruct the resource manager to *spend* a resource.
As soon as the resource manager realizes that some limit is exhausted (either the resource limit or the per-check time limit is reached), it asynchronously instructs the core solver to interrupt the check.
To not invalidate the internal state of the solver, and allow to use it again after an interrupt, the solver continues its work until it reaches a safe point in one of the core solving components.
-Then, it returns `unknown` (with an :cpp:enum:`explanation <cvc5::api::Result::UnknownExplanation>`).
+Then, it returns `unknown` (with an :cpp:enum:`explanation <cvc5::Result::UnknownExplanation>`).
The intention of a resource limit is to be a deterministic measure that grows (linearly, if possible) with actual running time.
Resources are spent when lemmas are generated and during a few select events like preprocessing, rewriting, decisions and restarts in the SAT solver, or theory checks.
==========
cvc5 collects a wide variety of statistics that give some insight on how it solves a particular input.
-The statistics can be inspected via the :cpp:func:`Solver::getStatistics() <cvc5::api::Solver::getStatistics()>` API
+The statistics can be inspected via the :cpp:func:`Solver::getStatistics() <cvc5::Solver::getStatistics()>` API
function, or printed using the following options:
- :ref:`stats <lbl-option-stats>` prints public statistics with non-default values
Statistics collection is only available if the ``ENABLE_STATISTICS`` cmake option
is set to true, which is the case for all but competition builds.
-Statistics, obtained via :cpp:func:`Solver::getStatistics() <cvc5::api::Solver::getStatistics()>`,
+Statistics, obtained via :cpp:func:`Solver::getStatistics() <cvc5::Solver::getStatistics()>`,
are always a snapshot of the statistics values that is decoupled from the
solver object and will not change when the solver is used again or deallocated.
Individual statistics values can be obtained via the API either by iterating over the
-:cpp:class:`Statistics <cvc5::api::Statistics>` object or by querying it by name.
+:cpp:class:`Statistics <cvc5::Statistics>` object or by querying it by name.
-A statistic value (of type :cpp:class:`Stat <cvc5::api::Stat>`) has two general
-properties, :cpp:func:`isInternal() <cvc5::api::Stat::isInternal()>` and
-:cpp:func:`isDefault() <cvc5::api::Stat::isDefault()>`.
-:cpp:func:`isInternal() <cvc5::api::Stat::isInternal()>` indicates whether a
+A statistic value (of type :cpp:class:`Stat <cvc5::Stat>`) has two general
+properties, :cpp:func:`isInternal() <cvc5::Stat::isInternal()>` and
+:cpp:func:`isDefault() <cvc5::Stat::isDefault()>`.
+:cpp:func:`isInternal() <cvc5::Stat::isInternal()>` indicates whether a
statistic is considered public or internal. Public statistics are considered to
be part of the public API and should therefore remain stable across different
minor versions of cvc5. There is no such guarantee for internal statistics.
-:cpp:func:`isDefault() <cvc5::api::Stat::isDefault()>` checks whether the
+:cpp:func:`isDefault() <cvc5::Stat::isDefault()>` checks whether the
current value of a statistics is still the default value, or whether its value
was changed.
.. run-command:: bin/cvc5 --stats ../test/regress/cli/regress0/auflia/bug336.smt2
Public statistics include some general information about the input file
-(``driver::filename`` and ``api::*``), the overall runtime (``global::totalTime``)
+(``driver::filename`` and ``*``), the overall runtime (``global::totalTime``)
and the lemmas each theory sent to the core solver (``theory::*``).
functions and predicates.
For the C++ API examples in the table below, we assume that we have created
-a `cvc5::api::Solver solver` object.
+a `cvc5::Solver solver` object.
+----------------------+----------------------------------------------+-------------------------------------------------------------------------+
| | SMTLIB language | C++ API |
+----------------------+----------------------------------------------+-------------------------------------------------------------------------+
| Logic String | ``(set-logic ALL)`` | ``solver.setLogic("ALL");`` |
+----------------------+----------------------------------------------+-------------------------------------------------------------------------+
-| Sort | ``(Bag <Sort>)`` | ``solver.mkBagSort(cvc5::api::Sort elementSort);`` |
+| Sort | ``(Bag <Sort>)`` | ``solver.mkBagSort(cvc5::Sort elementSort);`` |
+----------------------+----------------------------------------------+-------------------------------------------------------------------------+
| Constants | ``(declare-const X (Bag String)`` | ``Sort s = solver.mkBagSort(solver.getStringSort());`` |
| | | |
----------
For the C++ API examples in the table below, we assume that we have created
-a `cvc5::api::Solver solver` object.
+a `cvc5::Solver solver` object.
+--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
| | SMTLIB language | C++ API |
| | | |
| | | ``Term r = solver.mkTerm(Kind::APPLY_TESTER, {upd, t, u});`` |
+--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
-| Tuple Sort | ``(Tuple <Sort_1>, ..., <Sort_n>)`` | ``std::vector<cvc5::api::Sort> sorts = { ... };`` |
+| Tuple Sort | ``(Tuple <Sort_1>, ..., <Sort_n>)`` | ``std::vector<cvc5::Sort> sorts = { ... };`` |
| | | |
| | | ``Sort s = solver.mkTupleSort(sorts);`` |
+--------------------+----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
The syntax for the operators of separation logic is summarized in the following
table. For the C++ API examples in this table, we assume that we have created
-a :cpp:class:`cvc5::api::Solver` object.
+a :cpp:class:`cvc5::Solver` object.
+----------------------+----------------------------------------------+--------------------------------------------------------------------+
| | SMTLIB language | C++ API |
+----------------------+----------------------------------------------+--------------------------------------------------------------------+
| Magic Wand | ``(wand c1 c1)`` | ``solver.mkTerm(Kind::SEP_WAND, c1, c2);`` |
+----------------------+----------------------------------------------+--------------------------------------------------------------------+
-| Nil Element | ``(as sep.nil <Sort>)`` | ``solver.mkSepNil(cvc5::api::Sort sort);`` |
+| Nil Element | ``(as sep.nil <Sort>)`` | ``solver.mkSepNil(cvc5::Sort sort);`` |
+----------------------+----------------------------------------------+--------------------------------------------------------------------+
functions and predicates. More details can be found in :cite:`BansalBRT17`.
For the C++ API examples in the table below, we assume that we have created
-a `cvc5::api::Solver solver` object.
+a `cvc5::Solver solver` object.
+----------------------+----------------------------------------------+-------------------------------------------------------------------------+
| | SMTLIB language | C++ API |
| | | |
| | ``(set-logic QF_UFLIAFS)`` | ``solver.setLogic("QF_UFLIAFS");`` |
+----------------------+----------------------------------------------+-------------------------------------------------------------------------+
-| Sort | ``(Set <Sort>)`` | ``solver.mkSetSort(cvc5::api::Sort elementSort);`` |
+| Sort | ``(Set <Sort>)`` | ``solver.mkSetSort(cvc5::Sort elementSort);`` |
+----------------------+----------------------------------------------+-------------------------------------------------------------------------+
| Constants | ``(declare-const X (Set Int)`` | ``Sort s = solver.mkSetSort(solver.getIntegerSort());`` |
| | | |
+----------------------+----------------------------------------------+------------------------------------------------------------------------------------+
| Logic String | ``(set-logic QF_ALL)`` | ``solver.setLogic("QF_ALL");`` |
+----------------------+----------------------------------------------+------------------------------------------------------------------------------------+
-| Tuple Sort | ``(Tuple <Sort_1>, ..., <Sort_n>)`` | ``std::vector<cvc5::api::Sort> sorts = { ... };`` |
+| Tuple Sort | ``(Tuple <Sort_1>, ..., <Sort_n>)`` | ``std::vector<cvc5::Sort> sorts = { ... };`` |
| | | |
| | | ``Sort s = solver.mkTupleSort(sorts);`` |
+----------------------+----------------------------------------------+------------------------------------------------------------------------------------+
| | | |
| | | ``Term t = solver.mkTerm(Kind::APPLY_SELECTOR, {s, t});`` |
+----------------------+----------------------------------------------+------------------------------------------------------------------------------------+
-| Relation Sort | ``(Set (Tuple <Sort_1>, ..., <Sort_n>))`` | ``Sort s = solver.mkSetSort(cvc5::api::Sort tupleSort);`` |
+| Relation Sort | ``(Set (Tuple <Sort_1>, ..., <Sort_n>))`` | ``Sort s = solver.mkSetSort(cvc5::Sort tupleSort);`` |
+----------------------+----------------------------------------------+------------------------------------------------------------------------------------+
| Constants | ``(declare-const X (Set (Tuple Int Int)`` | ``Sort s = solver.mkSetSort(solver.mkTupleSort({s_int, s_int});`` |
| | | |