Skip to content

Commit 17a3bdf

Browse files
committed
change indices for oracles
1 parent 20cf6f3 commit 17a3bdf

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

language/sygus.tex

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,15 +1045,15 @@ \subsection{Asserting Oracle Constraints and Assumptions}
10451045
\begin{itemize}
10461046
\item $\paren{\constraintoraclekwd\mbox{ } N \mbox{ }
10471047
\paren{\paren{x_1\mbox{ }\sigma_1} \ldots \paren{x_n\mbox{ }\sigma_n}}\mbox{ }
1048-
\paren{\paren{x_{n+1}\mbox{ }\sigma_{n+1}} \ldots \paren{x_{n+m}\mbox{ }\sigma_{n+m}}} \mbox{ } t}$
1048+
\paren{\paren{x'_{1}\mbox{ }\sigma'_{1}} \ldots \paren{x'_{m}\mbox{ }\sigma'_{m}}} \mbox{ } t}$
10491049

10501050
This informs the solver of the existance of an external binary with name $N$
10511051
which can be used as means of adding new constraints to the problem.
10521052
This command is well-formed only if $N$
1053-
\emph{implements} a function of sort $\sigma_1 \times \ldots \times \sigma_n \rightarrow \sigma_{n+1} \times \ldots \times \sigma_{n+m}$
1053+
\emph{implements} a function of sort $\sigma_1 \times \ldots \times \sigma_n \rightarrow \sigma'_{1} \times \ldots \times \sigma'_{m}$
10541054
(for a definition of the expected implementation of an external binary, see Section~\ref{sec:oracleimplementations}),
10551055
and $t$ is a well-sorted term of sort $\sbool$
1056-
whose free symbols may include those in the current signature, as well as any symbol in $x_1 \ldots x_{m+n}$,
1056+
whose free symbols may include those in the current signature, as well as any symbol in $x_1 \ldots x_{n}$ and $x'_1 \ldots x'_{m}$,
10571057
and moreover is allowed based on the restrictions of the current logic.
10581058

10591059
Assuming this command is well-formed,
@@ -1064,13 +1064,13 @@ \subsection{Asserting Oracle Constraints and Assumptions}
10641064
}
10651065
$c_1, \ldots, c_n$ for $x_1, \ldots x_n$ as input to the binary,
10661066
and the binary generating a list of constant values
1067-
$c_{n+1}, \ldots, c_{n+m}$ corresponding to the output $x_{n_1}, \ldots x_{n+m}$.
1067+
$c'_{1}, \ldots, c'_{m}$ corresponding to the output $x'_{1}, \ldots x'_{m}$.
10681068
The expected implementation for passing
10691069
constant values as input and output
10701070
is described in Section~\ref{sec:oracleimplementations}.
10711071
For each such call,
1072-
the formula $t[c_1 \ldots c_{n+m}]$, i.e.,
1073-
$t$ with all occurences of $x_1, \ldots, x_{n+m}$ replaced with $c_1, \ldots, c_{n+m}$,
1072+
the formula $t[c_1 \ldots c_{n} c'_1 \ldots c'_m]$, i.e.,
1073+
$t$ with all occurences of $x_1, \ldots, x_{n}, x'_1, \ldots, x'_m$ replaced with $c_1, \ldots, c_{n}, c'_1, \ldots c'_m$,
10741074
is added to the current list of constraints $\varphi$ in the conjecture.
10751075

10761076
Note that
@@ -1082,10 +1082,10 @@ \subsection{Asserting Oracle Constraints and Assumptions}
10821082
\item
10831083
$\paren{\assumeoraclekwd\mbox{ } N \mbox{ }
10841084
\paren{\paren{x_1\mbox{ }\sigma_1} \ldots \paren{x_n\mbox{ }\sigma_n}}\mbox{ }
1085-
\paren{\paren{x_{n+1}\mbox{ }\sigma_{n+1}} \ldots \paren{x_{n+m}\mbox{ }\sigma_{n+m}}} \mbox{ } t}$
1085+
\paren{\paren{x'_{1}\mbox{ }\sigma'_{1}} \ldots \paren{x'_{m}\mbox{ }\sigma'_{m}}} \mbox{ } t}$
10861086

10871087
This command is identical to $\constraintoraclekwd$,
1088-
but the term $t[c_1 \ldots c_{n+m}]$ obtained from a call to the external binary
1088+
but the term $t[c_1 \ldots c_{n} c'_1 \ldots c'_m]$ obtained from a call to the external binary
10891089
is added to the set of assumptions instead of the set of constraints.
10901090

10911091
\end{itemize}
@@ -1903,16 +1903,17 @@ \section{Calling Oracles}
19031903
The oracle is a binary that implements an iterface of sort $\sigma_1 \times \ldots \times \sigma_n \rightarrow \sigma$.
19041904
\end{definition}
19051905
The SyGuS solver makes queries to an oracle via a text file with the extension \textit{.oracle}. The oracle is called by the solver with the command \textit{oracle-name textfile.oracle}.
1906-
The text file should contain the text $\paren{v_1 \ldots v_n}$ specifying values for each argument to the oracle, where $v_1 \ldots v_n$ are written using the same syntax for constant terms described in this document. The oracle will return the text $\paren{v_{n+1} \ldots v_{n+m}}$ specifying values for the return values of the oracle on the standard output channel.\\
1906+
The text file should contain the text $\paren{v_1 \ldots v_n}$ specifying values for each argument to the oracle, where $v_1 \ldots v_n$ are written using the same syntax for constant terms described in this document. The oracle will return the text $\paren{v'_{1} \ldots v'_{m}}$ specifying values for the return values of the oracle on the standard output channel.\\
1907+
19071908

19081909

19091910
\noindent Consider an oracle that implements the interface declared with the following command:\\\\
19101911
$\paren{\constraintoraclekwd\mbox{ } N \mbox{ }
19111912
\paren{\paren{x_1\mbox{ }\sigma_1} \ldots \paren{x_n\mbox{ }\sigma_n}}\mbox{ }
1912-
\paren{\paren{x_{n+1}\mbox{ }\sigma_{n+1}} \ldots \paren{x_{n+m}\mbox{ }\sigma_{n+m}}} \mbox{ } t}$ \\
1913+
\paren{\paren{x'_{1}\mbox{ }\sigma'_{1}} \ldots \paren{x'_{m}\mbox{ }\sigma'_{m}}} \mbox{ } t}$ \\
19131914

1914-
The text file must contain a list of values $\paren{v_1 \ldots v_n}$ for the input parameters $x_1 \ldots x_n$, and $v_i$ must have the same sort of $\sigma_i$.
1915-
The oracle will return a list of values $\paren{v_{n+1} \ldots v_{n+m}}$, corresponding to the output parameters $x_{n+1} \ldots x_{n+m}$.
1915+
The text file must contain a list of values $\paren{v_1 \ldots v_n}$ for the input parameters $x_1 \ldots x_n$, and $v_i$ must have the same sort as $\sigma_i$.
1916+
The oracle will return a list of values $\paren{v'_{1} \ldots v'_{m}}$, corresponding to the output parameters $x'_{1} \ldots x'_{m}$, and $v'_i$ must have the same sort as $\sigma'_i$.
19161917
%
19171918
The solver calls the oracle with the command ${\tt N \,\,textfile.oracle}$, where ${\tt N}$ is the name of the oracle implememtation as specified in the oracle constraint declaration.
19181919

0 commit comments

Comments
 (0)