Skip to content

Commit 7f94618

Browse files
committed
Increased version number to 2.4.2 + updates to the doc.
1 parent 8f20f3c commit 7f94618

File tree

9 files changed

+123
-76
lines changed

9 files changed

+123
-76
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ YICES_TOP_DIR=$(shell pwd)
3737
#
3838
MAJOR = 2
3939
MINOR = 4
40-
PATCH_LEVEL = 1
40+
PATCH_LEVEL = 2
4141

4242
YICES_VERSION = $(MAJOR).$(MINOR).$(PATCH_LEVEL)
4343

doc/manual/manual.tex

+53-21
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ \subsection{Source Distribution}
153153
sudo apt-get install gperf
154154
\end{verbatim}
155155
\end{small}
156-
After this, compiling and installing Yices uses the following standard steps:
156+
After this, compiling and installing Yices use the following standard steps:
157157
\begin{small}
158158
\begin{verbatim}
159159
./configure
@@ -172,6 +172,40 @@ \subsection{Source Distribution}
172172
source distribution gives more details.
173173

174174

175+
\subsection{Nonlinear Arithmetic and MCSAT}
176+
\label{mcsat-install}
177+
178+
Yices includes a solver for nonlinear arithmetic based on the Model
179+
Constructing Satisfiability Calculus (MCSAT). This calculus and its
180+
application to nonlinear arithmetic are explained
181+
in~\cite{Jovanovic-etal:MCSATb:2013}
182+
and~\cite{deMouraJovanovic:nla:2012}.
183+
184+
The precompiled, binary distributions of Yices include the MCSAT
185+
solver and can process nonlinear arithmetic problems. If you build
186+
Yices from source and want support for nonlinear arithmetic, you must
187+
install an external library first and enable MCSAT support when you
188+
compile Yices.
189+
190+
This library is called ``libpoly''. It implements various operations
191+
on polynomials used by the MCSAT solver. It is open source and it is
192+
available on GitHub (\url{https://github.com/SRI-CSL/libpoly}). Make
193+
sure that you download the latest version of libpoly. Yices~2.4.2
194+
requires libpoly v0.1.2.
195+
196+
Once you have installed libpoly, you can compile Yices with MCSAT
197+
support as follows:
198+
\begin{small}
199+
\begin{verbatim}
200+
./configure --enable-mcsat
201+
make -j
202+
sudo make install
203+
\end{verbatim}
204+
\end{small}
205+
The usual environment variables (e.g., \texttt{CPPFLAGS} and
206+
\texttt{LDFLAGS}) can be used if you install libpoly in a non-standad
207+
location.
208+
175209

176210
\section{Content of the Distributions}
177211

@@ -213,19 +247,17 @@ \section{Library Dependencies}
213247
reproduced in Appendix~\ref{gmp-license}.
214248

215249
Since release 2.4.0, Yices has optional support for nonlinear real
216-
arithmetic, using the Model Constructing Satisfiability Calculus
217-
(MCSAT)~\cite{deMouraJovanovic:nla:2012,deMouraJovanovic:MCSAT:2013,Jovanovic-etal:MCSATb:2013}. This
218-
depends on an external library for operations on polynomials which is
250+
arithmetic. As explained in Section~\ref{mcsat-install}, this depends
251+
on an external library for operations on polynomials which is
219252
available at~\url{https://github.com/SRI-CSL/libpoly}.
220253

221254

222255
\section{Supported Logics}
223256

224257
The current Yices~2 release supports quantifier-free combinations of
225258
linear integer and real arithmetic, uninterpreted function, arrays,
226-
and bitvectors. Currently, Yices~2 supports all SMT-LIB logics that do
259+
and bitvectors. Currently, Yices~2 supports most SMT-LIB logics that do
227260
not involve quantifiers as summarized in Table~\ref{supported-logics}.
228-
Yices~2 includes a solver for non-linear real arithmeitce
229261
The meaning of the logics and theories in this table is explained at
230262
the SMT-LIB website (\url{http://www.smtlib.org}). In addition,
231263
Yices~2 supports a more general set of array operations than required
@@ -781,17 +813,12 @@ \subsection{Bitvectors}
781813
\label{bitvectors}
782814
\end{table}
783815

784-
\medskip\noindent
785-
The semantics of all the bitvector operators is defined in the
786-
SMT-LIB standard. Yices~2 follows the standard except for the
787-
case of division by zero. In SMT-LIB, the result of a division by
788-
zero is an unspecified value, but one must ensure that the division
789-
operators are functional. In other words, SMT-LIB does not specify the
790-
result of $(\mathtt{bvudiv}\ a\ b)$ if $b$ is the zero vector, but
791-
$(\mathtt{bvudiv}\ a\ b)$ and $(\mathtt{bvudiv}\ c\ b)$ must be equal
792-
whenever $a = c$, even if $b$ is the zero vector. Yices~2 uses a
793-
simpler semantics (inspired by the BTOR
794-
format~\cite{Brummayer-etal:2008}):
816+
\medskip\noindent The semantics of all the bitvector operators is
817+
defined in the SMT-LIB standard. Like other SMT solvers, Yices~2
818+
follows the BTOR conventions for bitvector division by
819+
zero~\cite{Brummayer-etal:2008}. Until recently, this was not the
820+
semantics defined by the SMT-LIB standard. The SMT-LIB semantics
821+
changed in October 2015. It is now the same as BTOR:
795822
\begin{description}
796823
\item[Unsigned Division:] If $b$ is the zero bitvector of $n$
797824
bits then
@@ -1018,10 +1045,11 @@ \section{MCSAT}
10181045
currently dedicated to quantifier-free nonlinear real arithmetic. The
10191046
theory and implementation of MCSAT is discussed in several
10201047
publications~\cite{Jovanovic-etal:MCSATb:2013,deMouraJovanovic:MCSAT:2013}.
1021-
Currently, this solver can process input written the SMT-LIB~2.0
1022-
notation. It does not support as many features as the CDCL-based
1023-
solver described in the previous section. In particular, the MCSAT
1024-
solver does not yet support incremental solving (i.e., push and pop).
1048+
Currently, this solver can process input written in the SMT-LIB~2.0 or
1049+
Yices notations. It does not support as many features as the
1050+
CDCL-based solver described in the previous section. In particular,
1051+
the MCSAT solver does not yet support incremental solving (i.e., push
1052+
and pop).
10251053

10261054

10271055
\chapter{Yices Tool}
@@ -1248,6 +1276,10 @@ \section{Tool Invocation}
12481276
includes no theory solvers at all. All assertions must be purely
12491277
propositional (i.e., involve only Boolean terms).
12501278

1279+
With option \texttt{--logic=QF\_NRA}, the \texttt{yices} binary uses
1280+
its MCSAT solver for nonlinear real arithmetic. When this solver is
1281+
selected, incremental solving is not supported.
1282+
12511283
\item[--arith-solver=<solver>] Select one of the possible arithmetic solvers.\\[1mm]
12521284
\texttt{<solver>} must be one of \texttt{simplex},
12531285
\texttt{floyd-warshall}, or \texttt{auto}.

doc/sphinx/source/basic-usage.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ This has two effects:
6161
printing these two terms. Otherwise, it would construct names
6262
such as ``"t!3"`` and ``"t!4"``.
6363

64-
2. The symbol table maps the strings ``"x"`` and ``"y"`` to the
65-
terms ``x`` and ``y``, respectively.
64+
2. The strings ``"x"`` and ``"y"`` can now be used to retrieve the
65+
terms ``x`` and ``y``. Yices maintains an internal symbol table
66+
that maps strings to terms. Calling :c:func:`yices_set_term_name`
67+
adds an entry in this table.
6668

6769
We can now build a more complex term by using constructors such as
6870
:c:func:`yices_arith_geq0_atom` and :c:func:`yices_and3`::

doc/sphinx/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
# The short X.Y version.
5959
version = '2.4'
6060
# The full version, including alpha/beta/rc tags.
61-
release = '2.4.0'
61+
release = '2.4.2'
6262

6363
# The language for content autogenerated by Sphinx. Refer to documentation
6464
# for a list of supported languages.

doc/sphinx/source/error-reports.rst

+2
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ The following functions give access to the error report.
4747
4848
To avoid memory leaks, the returned string must be freed when it is
4949
no longer used by calling :c:func:`yices_free_string`.
50+
51+

doc/sphinx/source/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ API Reference
2323

2424
version-data
2525
global-initialization
26+
out-of-memory
2627
hard-limits
2728
api-types
2829
error-reports

doc/sphinx/source/overview.rst

+11-6
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,17 @@ file :file:`doc/COMPILING` included in the distribution.
4242
MCSAT and Nonlinear Arithmetic
4343
..............................
4444

45-
Yices now includes a new solver for nonlinear arithmetic based on the
46-
Model Constructing Satisfiability Calculus (MCSAT). This solver depends
47-
on an external library available at
48-
https://github.com/SRI-CSL/libpoly. It you need nonlinear arithmetic
49-
and want to compile Yices from the source, you must install this libpoly
50-
library first. Then, compile Yices with MCSAT support as follows:
45+
Yices now includes a solver for nonlinear arithmetic based on the
46+
Model Constructing Satisfiability Calculus (MCSAT). This solver
47+
depends on an external library for manipulating polynomials. If you
48+
need nonlinear arithmetic and want to compile Yices from the source,
49+
you must install this library first. Get it from our `GitHub
50+
repository <https://github.com/SRI-CSL/libpoly>`_ and follow the build
51+
instructions there. Make sure to get the latest libpoly release
52+
(v0.1.2).
53+
54+
Once you have installed libpoly, you can compile Yices with MCSAT
55+
support as follows:
5156

5257
.. code-block:: sh
5358

doc/sphinx/source/version-data.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ used at compile time for checking the Yices version.
2222
2323
Patch level
2424

25-
For Yices 2.4.0, they are defined as follows::
25+
For Yices 2.4.2, they are defined as follows::
2626

2727
#define __YICES_VERSION 2
2828
#define __YICES_VERSION_MAJOR 4
29-
#define __YICES_VERSION_PATCHLEVEL 0
29+
#define __YICES_VERSION_PATCHLEVEL 2
3030

3131
The same information is available in the following constant string.
3232

@@ -35,7 +35,7 @@ The same information is available in the following constant string.
3535
Version as a string.
3636

3737
The string includes the version number, followed by the revision
38-
number and the patch level, as in ``"2.4.0"``.
38+
number and the patch level, as in ``"2.4.2"``.
3939

4040
More details are given by three constant strings:
4141

@@ -58,4 +58,4 @@ More details are given by three constant strings:
5858
5959
Build date.
6060

61-
This string uses the format ``"Year-Month-Day"``, as in ``"2014-12-20"``.
61+
This string uses the format ``"Year-Month-Day"``, as in ``"2015-12-11"``.

src/include/yices.h

+46-41
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* The Yices SMT Solver. Copyright 2014 SRI International.
2+
* The Yices SMT Solver. Copyright 2015 SRI International.
33
*
44
* This program may only be used subject to the noncommercial end user
55
* license agreement which is downloadable along with this program.
@@ -72,7 +72,7 @@ extern "C" {
7272

7373
#define __YICES_VERSION 2
7474
#define __YICES_VERSION_MAJOR 4
75-
#define __YICES_VERSION_PATCHLEVEL 1
75+
#define __YICES_VERSION_PATCHLEVEL 2
7676

7777

7878
/*
@@ -136,6 +136,50 @@ __YICES_DLLSPEC__ extern void yices_free_string(char *s);
136136

137137

138138

139+
/***************************
140+
* OUT-OF-MEMORY CALLBACK *
141+
**************************/
142+
143+
/*
144+
* By default, when Yices runs out of memory, it
145+
* first prints an error message on stderr; then it calls
146+
* exit(YICES_EXIT_OUT_OF_MEMORY). This kills the whole process.
147+
*
148+
* The following function allows you to register a callback to invoke
149+
* if Yices runs out of memory. The callback function takes no
150+
* arguments and returns nothing.
151+
*
152+
* Installing an out-of-memory callback allows you to do something a
153+
* bit less brutal than killing the process. If there's a callback,
154+
* yices will call it first when it runs out of memory. The callback
155+
* function should not return. If it does, yices will call exit as
156+
* previously.
157+
*
158+
* In other words, the code that handles out-of-memory is as follows:
159+
*
160+
* if (callback != NULL) {
161+
* callback();
162+
* } else {
163+
* fprintf(stderr, ...);
164+
* }
165+
* exit(YICES_EXIT_OUT_OF_MEMORY);
166+
*
167+
*
168+
* IMPORTANT
169+
* ---------
170+
* After Yices runs out of memory, its internal data structures may be
171+
* left in an inconsistent/corrupted state. The API is effectively
172+
* unusable at this point and nothing can be done to recover cleanly.
173+
* Evan a call to yices_exit() may cause a seg fault. The callback
174+
* should not try to cleanup anything, or call any function from the API.
175+
*
176+
* A plausible use of this callback feature is to implement an
177+
* exception mechanism using setjmp/longjmp.
178+
*/
179+
__YICES_DLLSPEC__ extern void yices_set_out_of_mem_callback(void (*callback)(void));
180+
181+
182+
139183
/*********************
140184
* ERROR REPORTING *
141185
********************/
@@ -193,45 +237,6 @@ __YICES_DLLSPEC__ extern char *yices_error_string(void);
193237

194238

195239

196-
/*
197-
* Register a callback function to invoke if Yices runs out of memory.
198-
* The callback function takes no arguments and returns nothing.
199-
*
200-
* By default, there's no callback. When Yices runs out of memory, it
201-
* first prints an error message on stderr; then it calls
202-
* exit(YICES_EXIT_OUT_OF_MEMORY). This kills the whole process.
203-
*
204-
* Installing an out-of-memory callback allows you to do
205-
* something a bit less brutal. If there's a callback,
206-
* yices will call it first when it runs out of memory.
207-
* The callback function should not return. If it does,
208-
* yices will call exit as previously.
209-
*
210-
* In other words, the code that handles out-of-memory is as follows:
211-
*
212-
* if (callback != NULL) {
213-
* callback();
214-
* } else {
215-
* fprintf(stderr, ...);
216-
* }
217-
* exit(YICES_EXIT_OUT_OF_MEMORY);
218-
*
219-
*
220-
* IMPORTANT
221-
* ---------
222-
* After Yices runs out of memory, its internal data structures may be
223-
* left in an inconsistent/corrupted state. The API is effectively
224-
* unusable at this point and nothing can be done to recover cleanly.
225-
* Evan a call to yices_exit() may cause a seg fault. The callback
226-
* should not try to cleanup anything, or call any function from the API.
227-
*
228-
* A plausible use of this callback feature is to implement an
229-
* exception mechanism using setjmp/longjmp.
230-
*/
231-
__YICES_DLLSPEC__ extern void yices_set_out_of_mem_callback(void (*callback)(void));
232-
233-
234-
235240
/********************************
236241
* VECTORS OF TERMS AND TYPES *
237242
*******************************/

0 commit comments

Comments
 (0)