Skip to content

Commit ffe11c6

Browse files
committed
update doc about parallel yices2
1 parent 02f5f54 commit ffe11c6

File tree

2 files changed

+54
-44
lines changed

2 files changed

+54
-44
lines changed

README.md

Lines changed: 24 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,29 @@ sat
104104
(define-fun y () Real 0.447214))
105105
```
106106

107+
## Parallel Yices Example
108+
109+
Yices can be run in parallel using a portfolio approach, which launches several instances of `yices_smt2` with different configurations and returns as soon as one instance finds a solution. This is useful for hard SMT problems where different configurations may solve the problem faster.
110+
111+
A Python script is provided in `utils/yices2_parallel.py` for this purpose. Example usage:
112+
113+
```sh
114+
python3 utils/yices2_parallel.py --yices /path/to/yices_smt2 -n 4 --verbose path/to/problem.smt2
115+
```
116+
117+
- `--yices` specifies the path to the `yices_smt2` executable (default: `yices_smt2` in the script directory)
118+
- `-n` sets the number of parallel threads/configurations (default: 4)
119+
- `--verbose` enables detailed output
120+
- The last argument is the path to your SMT2 file
121+
122+
The script will run several Yices instances in parallel and print the result (`sat`, `unsat`, or `unknown`) as soon as one instance finishes.
123+
124+
For more options, run:
125+
126+
```sh
127+
python3 utils/yices2_parallel.py --help
128+
```
129+
107130
## Installing Prebuilt Binaries
108131

109132
Currently you can install Yices either using Homebrew or Apt.
@@ -245,46 +268,4 @@ This will build `./doc/manual/manual.pdf`.
245268

246269
Other documentation is in the `./doc` directory:
247270

248-
- `doc/COMPILING` explains the compilation process and options in detail.
249-
- `doc/NOTES` gives an overview of the source code.
250-
- `doc/YICES-LANGUAGE` explains the syntax of the Yices language, and
251-
describes commands, functions, and heuristic parameters.
252-
253-
To build the Sphinx documentation:
254-
```
255-
cd doc/sphinx
256-
make html
257-
```
258-
259-
This will build the documentation in build/html (within directory
260-
doc/sphinx). You can also do:
261-
```
262-
make epub
263-
```
264-
and you'll have the doc in `build/epub/Yices.epub`.
265-
266-
## Getting Help and Reporting bugs
267-
268-
For further questions about Yices, please contact us via the Yices
269-
mailing lists [email protected]. This mailing list is moderated,
270-
but you do not need to register to post to it. You can register to
271-
this mailing list if you are interested in helping others.
272-
273-
Please submit bug reports through GitHub issues. Please include enough
274-
information in your bug report to enable us to reproduce and fix the
275-
problem. This is an example of a good report:
276-
277-
> I am experiencing a segmentation fault from Yices. The following
278-
> is a small test case that causes the crash. I am using Yices 2.4.1 on
279-
> x86_64 statically linked against GMP on Ubuntu 12.04.
280-
281-
This is an example of a poor bug report:
282-
283-
> I have just downloaded Yices. After I compile my code and link it
284-
> with Yices, there is a segmentation fault when I run the executable.
285-
> Can you help?
286-
287-
Please try to include answers to the following questions:
288-
* Which version of Yices are you using?
289-
* On which hardware and OS?
290-
* How can we reproduce the bug? If possible, include an input file or program fragment.
271+
- `doc/COMPILING`

doc/manual/manual.tex

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ \chapter{Introduction}
6666
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6767

6868
This manual is an introduction to the logic, language, and
69-
architecture of the Yices~2 SMT solver. Yices is developed at SRI
69+
architecture of the Yices~2 SMT solver. Yices is developed at SRI
7070
International's Computer Science Laboratory. Since version 2.5.3,
7171
Yices is released under the GNU General Public License version 3
7272
(reproduced in Appendix~\ref{license}). Previous versions were
@@ -4295,6 +4295,35 @@ \subsection{Command-Line Options}
42954295
\end{options}
42964296

42974297

4298+
\section{Parallel Yices~2: Portfolio Solving}
4299+
4300+
For challenging SMT-LIB~2.x problems, it can be beneficial to run several Yices~2 instances in parallel, each with different solver configurations. This approach, known as a portfolio solver, increases the chance of quickly finding results by exploiting the diversity of solver heuristics.
4301+
4302+
Yices~2 provides a Python script, \texttt{utils/yices2\_parallel.py}, that launches multiple \texttt{yices-smt2} processes in parallel. The script stops as soon as one instance finds answer (\texttt{sat} or \texttt{unsat}).
4303+
4304+
\medskip\noindent
4305+
\textbf{Example usage:}
4306+
\begin{small}
4307+
\begin{lstlisting}[language=sh]
4308+
python3 utils/yices2_parallel.py --yices /path/to/yices_smt2 -n 4 --verbose path/to/problem.smt2
4309+
\end{lstlisting}
4310+
\end{small}
4311+
4312+
\begin{itemize}
4313+
\item \texttt{--yices} specifies the path to the \texttt{yices\_smt2} executable (default: \texttt{yices\_smt2} in the script directory)
4314+
\item \texttt{-n} sets the number of parallel threads/configurations (default: 4)
4315+
\item \texttt{--verbose} enables detailed output
4316+
\item The last argument is the path to your SMT2 file
4317+
\end{itemize}
4318+
4319+
The script will print the result (\texttt{sat}, \texttt{unsat}, or \texttt{unknown}) as soon as one instance finishes. For more options, run:
4320+
\begin{small}
4321+
\begin{lstlisting}[language=sh]
4322+
python3 utils/yices2_parallel.py --help
4323+
\end{lstlisting}
4324+
\end{small}
4325+
4326+
42984327
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42994328
\chapter{Yices API}
43004329
\label{yices-api}

0 commit comments

Comments
 (0)