* src/pairs.c (bdd_setbddpair): Fix prototype in documentation.

This commit is contained in:
Alexandre Duret-Lutz 2003-05-20 08:22:35 +00:00
parent ed8ae1ed55
commit 42782f3a83
5 changed files with 279 additions and 275 deletions

View file

@ -1,3 +1,7 @@
2003-05-20 Alexandre Duret-Lutz <aduret@src.lip6.fr>
* src/pairs.c (bdd_setbddpair): Fix prototype in documentation.
2003-05-19 Alexandre Duret-Lutz <aduret@src.lip6.fr>
* src/bdd.h: Declare bdd_copypair().

View file

@ -1,6 +1,6 @@
/*========================================================================
Copyright (C) 1996-2002 by Jorn Lind-Nielsen
All rights reserved
Copyright (C) 1996-2002 by Jorn Lind-Nielsen
All rights reserved
Permission is hereby granted, without written agreement and without
license or royalty fees, to use, reproduce, prepare derivative
@ -28,7 +28,7 @@
========================================================================*/
/*************************************************************************
$Header: /Volumes/CVS/repository/spot/spot/buddy/src/bddop.c,v 1.4 2003/05/07 12:36:54 aduret Exp $
$Header: /Volumes/CVS/repository/spot/spot/buddy/src/bddop.c,v 1.5 2003/05/20 08:22:36 aduret Exp $
FILE: bddop.c
DESCR: BDD operators
AUTH: Jorn Lind
@ -267,7 +267,7 @@ SECTION {* kernel *}
SHORT {* Sets the cache ratio for the operator caches *}
PROTO {* int bdd_setcacheratio(int r) *}
DESCR {* The ratio between the number of nodes in the nodetable
and the number of entries in the operator cachetables is called
and the number of entries in the operator cachetables is called
the cache ratio. So a cache ratio of say, four, allocates one cache
entry for each four unique node entries. This value can be set with
{\tt bdd\_setcacheratio} to any positive value. When this is done
@ -314,7 +314,7 @@ SHORT {* build a cube from an array of variables *}
PROTO {* BDD bdd_buildcube(int value, int width, BDD *var)
BDD bdd_ibuildcube(int value, int width, int *var)*}
DESCR {* This function builds a cube from the variables in {\tt
var}. It does so by interpreting the {\tt width} low order
var}. It does so by interpreting the {\tt width} low order
bits of {\tt value} as a bit mask--a set bit indicates that the
variable should be added in it's positive form, and a cleared
bit the opposite. The most significant bits are encoded with
@ -388,7 +388,7 @@ SECTION {* operator *}
SHORT {* negates a bdd *}
PROTO {* BDD bdd_not(BDD r) *}
DESCR {* Negates the BDD {\tt r} by exchanging
all references to the zero-terminal with references to the
all references to the zero-terminal with references to the
one-terminal and vice versa. *}
RETURN {* The negated bdd. *}
*/
@ -466,31 +466,31 @@ SECTION {* operator *}
SHORT {* basic bdd operations *}
PROTO {* BDD bdd_apply(BDD left, BDD right, int opr) *}
DESCR {* The {\tt bdd\_apply} function performs all of the basic
bdd operations with two operands, such as AND, OR etc.
bdd operations with two operands, such as AND, OR etc.
The {\tt left} argument is the left bdd operand and {\tt right}
is the right operand. The {\tt opr} argument is the requested
operation and must be one of the following\\
\begin{tabular}{lllc}
{\bf Identifier} & {\bf Description} & {\bf Truth table}
& {\bf C++ opr.} \\
& {\bf C++ opr.} \\
{\tt bddop\_and} & logical and ($A \wedge B$) & [0,0,0,1]
& \verb%&% \\
& \verb%&% \\
{\tt bddop\_xor} & logical xor ($A \oplus B$) & [0,1,1,0]
& \verb%^% \\
& \verb%^% \\
{\tt bddop\_or} & logical or ($A \vee B$) & [0,1,1,1]
& \verb%|% \\
& \verb%|% \\
{\tt bddop\_nand} & logical not-and & [1,1,1,0] \\
{\tt bddop\_nor} & logical not-or & [1,0,0,0] \\
{\tt bddop\_imp} & implication ($A \Rightarrow B$) & [1,1,0,1]
& \verb%>>% \\
& \verb%>>% \\
{\tt bddop\_biimp} & bi-implication ($A \Leftrightarrow B$)& [1,0,0,1] \\
{\tt bddop\_diff} & set difference ($A \setminus B$) & [0,0,1,0]
& \verb%-% \\
& \verb%-% \\
{\tt bddop\_less} & less than ($A < B$) & [0,1,0,0]
& \verb%<% \\
& \verb%<% \\
{\tt bddop\_invimp} & reverse implication ($A \Leftarrow B$)& [1,0,1,1]
& \verb%<<% \\
& \verb%<<% \\
\end{tabular}
*}
RETURN {* The result of the operation. *}
@ -721,7 +721,7 @@ SECTION {* operator *}
SHORT {* if-then-else operator *}
PROTO {* BDD bdd_ite(BDD f, BDD g, BDD h) *}
DESCR {* Calculates the BDD for the expression
$(f \conj g) \disj (\neg f \conj h)$ more efficiently than doing
$(f \conj g) \disj (\neg f \conj h)$ more efficiently than doing
the three operations separately. {\tt bdd\_ite} can also be used
for conjunction, disjunction and any other boolean operator, but
is not as efficient for the binary and unary operations. *}
@ -877,7 +877,7 @@ SECTION {* operator *}
SHORT {* restric a set of variables to constant values *}
PROTO {* BDD bdd_restrict(BDD r, BDD var) *}
DESCR {* This function restricts the variables in {\tt r} to constant
true or false. How this is done
true or false. How this is done
depends on how the variables are included in the variable set
{\tt var}. If they
are included in their positive form then they are restricted to
@ -988,7 +988,7 @@ SECTION {* operator *}
SHORT {* generalized cofactor *}
PROTO {* BDD bdd_constrain(BDD f, BDD c) *}
DESCR {* Computes the generalized cofactor of {\tt f} with respect to
{\tt c}. *}
{\tt c}. *}
RETURN {* The constrained BDD *}
ALSO {* bdd\_restrict, bdd\_simplify *}
*/
@ -1106,7 +1106,7 @@ SECTION {* operator *}
SHORT {* replaces variables with other variables *}
PROTO {* BDD bdd_replace(BDD r, bddPair *pair) *}
DESCR {* Replaces all variables in the BDD {\tt r} with the variables
defined by {\tt pair}. Each entry in {\tt pair} consists of a
defined by {\tt pair}. Each entry in {\tt pair} consists of a
old and a new variable. Whenever the old variable is found in
{\tt r} then a new node with the new variable is inserted instead.
*}
@ -1228,7 +1228,7 @@ SECTION {* operator *}
SHORT {* functional composition *}
PROTO {* BDD bdd_compose(BDD f, BDD g, int var) *}
DESCR {* Substitutes the variable {\tt var} with the BDD {\tt g} in
the BDD {\tt f}: result $= f[g/var]$. *}
the BDD {\tt f}: result $= f[g/var]$. *}
RETURN {* The composed BDD *}
ALSO {* bdd\_veccompose, bdd\_replace, bdd\_restrict *}
*/
@ -1336,11 +1336,11 @@ SECTION {* operator *}
SHORT {* simultaneous functional composition *}
PROTO {* BDD bdd_veccompose(BDD f, bddPair *pair) *}
DESCR {* Uses the pairs of variables and BDDs in {\tt pair} to make
the simultaneous substitution: $f[g_1/V_1, \ldots, g_n/V_n]$.
the simultaneous substitution: $f[g_1/V_1, \ldots, g_n/V_n]$.
In this way one or more BDDs
may be substituted in one step. The BDDs in
{\tt pair} may depend on the variables they are substituting.
{\tt bdd\_compose} may be used instead of
{\tt bdd\_compose} may be used instead of
{\tt bdd\_replace} but is not as efficient when $g_i$ is a
single variable, the same applies to {\tt bdd\_restrict}.
Note that simultaneous substitution is not necessarily the same
@ -1426,7 +1426,7 @@ SECTION {* operator *}
SHORT {* coudert and Madre's restrict function *}
PROTO {* BDD bdd_simplify(BDD f, BDD d) *}
DESCR {* Tries to simplify the BDD {\tt f} by restricting it to the
domaine covered by {\tt d}. No checks are done to see if the
domaine covered by {\tt d}. No checks are done to see if the
result is actually smaller than the input. This can be done
by the user with a call to {\tt bdd\_nodecount}. *}
ALSO {* bdd\_restrict *}
@ -1538,7 +1538,7 @@ SECTION {* operator *}
SHORT {* existential quantification of variables *}
PROTO {* BDD bdd_exist(BDD r, BDD var) *}
DESCR {* Removes all occurences in {\tt r} of variables in the set
{\tt var} by existential quantification. *}
{\tt var} by existential quantification. *}
ALSO {* bdd\_forall, bdd\_unique, bdd\_makeset *}
RETURN {* The quantified BDD. *}
*/
@ -1589,7 +1589,7 @@ SECTION {* operator *}
SHORT {* universal quantification of variables *}
PROTO {* BDD bdd_forall(BDD r, BDD var) *}
DESCR {* Removes all occurences in {\tt r} of variables in the set
{\tt var} by universal quantification. *}
{\tt var} by universal quantification. *}
ALSO {* bdd\_exist, bdd\_unique, bdd\_makeset *}
RETURN {* The quantified BDD. *}
*/
@ -1640,7 +1640,7 @@ SECTION {* operator *}
SHORT {* unique quantification of variables *}
PROTO {* BDD bdd_unique(BDD r, BDD var) *}
DESCR {* Removes all occurences in {\tt r} of variables in the set
{\tt var} by unique quantification. This type of quantification
{\tt var} by unique quantification. This type of quantification
uses a XOR operator instead of an OR operator as in the
existential quantification, and an AND operator as in the
universal quantification. *}
@ -1734,7 +1734,7 @@ SECTION {* operator *}
SHORT {* apply operation and existential quantification *}
PROTO {* BDD bdd_appex(BDD left, BDD right, int opr, BDD var) *}
DESCR {* Applies the binary operator {\tt opr} to the arguments
{\tt left} and {\tt right} and then performs an existential
{\tt left} and {\tt right} and then performs an existential
quantification of the variables from the variable set
{\tt var}. This is done in a bottom up manner such that both the
apply and quantification is done on the lower nodes before
@ -1802,7 +1802,7 @@ SECTION {* operator *}
SHORT {* apply operation and universal quantification *}
PROTO {* BDD bdd_appall(BDD left, BDD right, int opr, BDD var) *}
DESCR {* Applies the binary operator {\tt opr} to the arguments
{\tt left} and {\tt right} and then performs an universal
{\tt left} and {\tt right} and then performs an universal
quantification of the variables from the variable set
{\tt var}. This is done in a bottom up manner such that both the
apply and quantification is done on the lower nodes before
@ -1868,7 +1868,7 @@ SECTION {* operator *}
SHORT {* apply operation and unique quantification *}
PROTO {* BDD bdd_appuni(BDD left, BDD right, int opr, BDD var) *}
DESCR {* Applies the binary operator {\tt opr} to the arguments
{\tt left} and {\tt right} and then performs a unique
{\tt left} and {\tt right} and then performs a unique
quantification of the variables from the variable set
{\tt var}. This is done in a bottom up manner such that both the
apply and quantification is done on the lower nodes before
@ -2050,7 +2050,7 @@ SECTION {* info *}
SHORT {* returns the variable support of a BDD *}
PROTO {* BDD bdd_support(BDD r) *}
DESCR {* Finds all the variables that {\tt r} depends on. That is
the support of {\tt r}. *}
the support of {\tt r}. *}
ALSO {* bdd\_makeset *}
RETURN {* A BDD variable set. *}
*/
@ -2086,7 +2086,7 @@ BDD bdd_support(BDD r)
*/
if (supportID == 0x0FFFFFFF)
{
/* We probably don't get here -- but let's just be sure */
/* We probably don't get here -- but let's just be sure */
memset(supportSet, 0, bddvarnum*sizeof(int));
supportID = 0;
}
@ -2146,7 +2146,7 @@ SECTION {* operator *}
SHORT {* finds one satisfying variable assignment *}
PROTO {* BDD bdd_satone(BDD r) *}
DESCR {* Finds a BDD with at most one variable at each level. This BDD
implies {\tt r} and is not false unless {\tt r} is
implies {\tt r} and is not false unless {\tt r} is
false. *}
ALSO {* bdd\_allsat bdd\_satoneset, bdd\_fullsatone, bdd\_satcount, bdd\_satcountln *}
RETURN {* The result of the operation. *}
@ -2195,7 +2195,7 @@ SECTION {* operator *}
SHORT {* finds one satisfying variable assignment *}
PROTO {* BDD bdd_satoneset(BDD r, BDD var, BDD pol) *}
DESCR {* Finds a minterm in {\tt r}. The {\tt var} argument is a
variable set that defines a set of variables that {\em must} be
variable set that defines a set of variables that {\em must} be
mentioned in the result. The polarity of these variables in
result---in case they are undefined in {\tt r}---are defined
by the {\tt pol} parameter. If {\tt pol} is the false BDD then
@ -2281,7 +2281,7 @@ SECTION {* operator *}
SHORT {* finds one satisfying variable assignment *}
PROTO {* BDD bdd_fullsatone(BDD r) *}
DESCR {* Finds a BDD with exactly one variable at all levels. This BDD
implies {\tt r} and is not false unless {\tt r} is
implies {\tt r} and is not false unless {\tt r} is
false. *}
ALSO {* bdd\_allsat bdd\_satone, bdd\_satoneset, bdd\_satcount, bdd\_satcountln *}
RETURN {* The result of the operation. *}
@ -2352,7 +2352,7 @@ SECTION {* operator *}
SHORT {* finds all satisfying variable assignments *}
PROTO {* BDD bdd_allsat(BDD r, bddallsathandler handler) *}
DESCR {* Iterates through all legal variable assignments (those
that make the BDD come true) for the bdd {\tt r} and
that make the BDD come true) for the bdd {\tt r} and
calls the callback handler {\tt handler} for each of them.
The array passed to {\tt handler} contains one entry for
each of the globally defined variables. Each entry is either
@ -2372,7 +2372,7 @@ void allsatPrintHandler(char* varset, int size)
}
\end{verbatim}
\noindent
\noindent
The handler can be used like this:
{\tt bdd\_allsat(r, allsatPrintHandler); } *}
@ -2453,7 +2453,7 @@ SHORT {* calculates the number of satisfying variable assignments *}
PROTO {* double bdd_satcount(BDD r)
double bdd_satcountset(BDD r, BDD varset) *}
DESCR {* Calculates how many possible variable assignments there exists
such that {\tt r} is satisfied (true). All defined
such that {\tt r} is satisfied (true). All defined
variables are considered in the first version. In the
second version, only the variables in the variable
set {\tt varset} are considered. This makes the function a
@ -2625,7 +2625,7 @@ SECTION {* info *}
SHORT {* counts the number of nodes used for a BDD *}
PROTO {* int bdd_nodecount(BDD r) *}
DESCR {* Traverses the BDD and counts all distinct nodes that are used
for the BDD. *}
for the BDD. *}
RETURN {* The number of nodes. *}
ALSO {* bdd\_pathcount, bdd\_satcount, bdd\_anodecount *}
*/
@ -2648,7 +2648,7 @@ SECTION {* info *}
SHORT {* counts the number of shared nodes in an array of BDDs *}
PROTO {* int bdd_anodecount(BDD *r, int num) *}
DESCR {* Traverses all of the BDDs in {\tt r} and counts all distinct nodes
that are used in the BDDs--if a node is used in more than one
that are used in the BDDs--if a node is used in more than one
BDD then it only counts once. The {\tt num} parameter holds the
size of the array. *}
RETURN {* The number of nodes *}
@ -2677,12 +2677,12 @@ SECTION {* info *}
SHORT {* returns a variable profile *}
PROTO {* int *bdd_varprofile(BDD r) *}
DESCR {* Counts the number of times each variable occurs in the
bdd {\tt r}. The result is stored and returned in an integer array
bdd {\tt r}. The result is stored and returned in an integer array
where the i'th position stores the number of times the i'th
variable occured in the BDD. It is the users responsibility to
free the array again using a call to {\tt free}. *}
RETURN {* A pointer to an integer array with the profile or NULL if an
error occured. *}
error occured. *}
*/
int *bdd_varprofile(BDD r)
{
@ -2728,7 +2728,7 @@ SECTION {* info *}
SHORT {* count the number of paths leading to the true terminal *}
PROTO {* double bdd_pathcount(BDD r) *}
DESCR {* Counts the number of paths from the root node {\tt r}
leading to the terminal true node. *}
leading to the terminal true node. *}
RETURN {* The number of paths *}
ALSO {* bdd\_nodecount, bdd\_satcount *}
*/

View file

@ -1,6 +1,6 @@
/*========================================================================
Copyright (C) 1996-2002 by Jorn Lind-Nielsen
All rights reserved
Copyright (C) 1996-2002 by Jorn Lind-Nielsen
All rights reserved
Permission is hereby granted, without written agreement and without
license or royalty fees, to use, reproduce, prepare derivative
@ -28,14 +28,14 @@
========================================================================*/
/*************************************************************************
$Header: /Volumes/CVS/repository/spot/spot/buddy/src/kernel.c,v 1.3 2003/05/12 09:30:19 aduret Exp $
$Header: /Volumes/CVS/repository/spot/spot/buddy/src/kernel.c,v 1.4 2003/05/20 08:22:36 aduret Exp $
FILE: kernel.c
DESCR: implements the bdd kernel functions.
AUTH: Jorn Lind
DATE: (C) june 1997
WARNING: Do not use pointers to nodes across makenode calls,
as makenode may resize/move the nodetable.
as makenode may resize/move the nodetable.
*************************************************************************/
#include <stdlib.h>
@ -151,7 +151,7 @@ SECTION {* kernel *}
SHORT {* initializes the BDD package *}
PROTO {* int bdd_init(int nodesize, int cachesize) *}
DESCR {* This function initiates the bdd package and {\em must} be called
before any bdd operations are done. The argument {\tt nodesize}
before any bdd operations are done. The argument {\tt nodesize}
is the initial number of nodes in the nodetable and {\tt cachesize}
is the fixed size of the internal caches. Typical values for
{\tt nodesize} are 10000 nodes for small test examples and up to
@ -167,7 +167,7 @@ DESCR {* This function initiates the bdd package and {\em must} be called
after a garbage collection. But it does have some impact on the
efficency of the operations. *}
RETURN {* If no errors occur then 0 is returned, otherwise
a negative error code. *}
a negative error code. *}
ALSO {* bdd\_done, bdd\_resize\_hook *}
*/
int bdd_init(int initnodesize, int cs)
@ -244,7 +244,7 @@ SECTION {* kernel *}
SHORT {* resets the bdd package *}
PROTO {* void bdd_done(void) *}
DESCR {* This function frees all memory used by the bdd package and resets
the package to it's initial state.*}
the package to it's initial state.*}
ALSO {* bdd\_init *}
*/
void bdd_done(void)
@ -284,7 +284,7 @@ SECTION {* kernel *}
SHORT {* set the number of used bdd variables *}
PROTO {* int bdd_setvarnum(int num) *}
DESCR {* This function is used to define the number of variables used in
the bdd package. It may be called more than one time, but only
the bdd package. It may be called more than one time, but only
to increase the number of variables. The argument
{\tt num} is the number of variables to use. *}
RETURN {* Zero on succes, otherwise a negative error code. *}
@ -383,7 +383,7 @@ SECTION {* kernel *}
SHORT {* add extra BDD variables *}
PROTO {* int bdd_extvarnum(int num) *}
DESCR {* Extends the current number of allocated BDD variables with
{\tt num} extra variables. *}
{\tt num} extra variables. *}
RETURN {* The old number of allocated variables or a negative error code. *}
ALSO {* bdd\_setvarnum, bdd\_ithvar, bdd\_nithvar *}
*/
@ -405,7 +405,7 @@ SECTION {* kernel *}
SHORT {* set a handler for error conditions *}
PROTO {* bddinthandler bdd_error_hook(bddinthandler handler) *}
DESCR {* Whenever an error occurs in the bdd package a test is done to
see if an error handler is supplied by the user and if such exists
see if an error handler is supplied by the user and if such exists
then it will be called
with an error code in the variable {\tt errcode}. The handler may
then print any usefull information and return or exit afterwards.
@ -440,7 +440,7 @@ SECTION {* kernel *}
SHORT {* clears an error condition in the kernel *}
PROTO {* void bdd_clear_error(void) *}
DESCR {* The BuDDy kernel may at some point run out of new ROBDD nodes if
a maximum limit is set with {\tt bdd\_setmaxnodenum}. In this case
a maximum limit is set with {\tt bdd\_setmaxnodenum}. In this case
the current error handler is called and an internal error flag
is set. Further calls to BuDDy will always return {\tt bddfalse}.
From here BuDDy must either be restarted or {\tt bdd\_clear\_error}
@ -462,7 +462,7 @@ SECTION {* kernel *}
SHORT {* set a handler for garbage collections *}
PROTO {* bddgbchandler bdd_gbc_hook(bddgbchandler handler) *}
DESCR {* Whenever a garbage collection is required, a test is done to
see if a handler for this event is supplied by the user and if such
see if a handler for this event is supplied by the user and if such
exists then it is called, both before and after the garbage collection
takes places. This is indicated by an integer flag {\tt pre} passed to
the handler, which will be one before garbage collection and zero
@ -498,7 +498,7 @@ SECTION {* kernel *}
SHORT {* set a handler for nodetable resizes *}
PROTO {* bdd2inthandler bdd_resize_hook(bdd2inthandler handler) *}
DESCR {* Whenever it is impossible to get enough free nodes by a garbage
collection then the node table is resized and a test is done to see
collection then the node table is resized and a test is done to see
if a handler is supllied by the user for this event. If so then
it is called with {\tt oldsize} being the old nodetable size and
{\tt newsize} being the new nodetable size.
@ -531,7 +531,7 @@ SECTION {* kernel *}
SHORT {* set max. number of nodes used to increase node table *}
PROTO {* int bdd_setmaxincrease(int size) *}
DESCR {* The node table is expanded by doubling the size of the table
when no more free nodes can be found, but a maximum for the
when no more free nodes can be found, but a maximum for the
number of new nodes added can be set with {\tt bdd\_maxincrease}
to {\tt size} nodes. The default is 50000 nodes (1 Mb). *}
RETURN {* The old threshold on succes, otherwise a negative error code. *}
@ -554,7 +554,7 @@ SECTION {* kernel *}
SHORT {* set the maximum available number of bdd nodes *}
PROTO {* int bdd_setmaxnodenum(int size) *}
DESCR {* This function sets the maximal number of bdd nodes the package may
allocate before it gives up a bdd operation. The
allocate before it gives up a bdd operation. The
argument {\tt size} is the absolute maximal number of nodes there
may be allocated for the nodetable. Any attempt to allocate more
nodes results in the constant false being returned and the error
@ -584,7 +584,7 @@ SECTION {* kernel *}
SHORT {* set min. no. of nodes to be reclaimed after GBC. *}
PROTO {* int bdd_setminfreenodes(int n) *}
DESCR {* Whenever a garbage collection is executed the number of free
nodes left are checked to see if a resize of the node table is
nodes left are checked to see if a resize of the node table is
required. If $X = (\mathit{bddfreenum}*100)/\mathit{maxnum}$
is less than or
equal to {\tt n} then a resize is initiated. The range of
@ -614,7 +614,7 @@ SECTION {* kernel *}
SHORT {* get the number of active nodes in use *}
PROTO {* int bdd_getnodenum(void) *}
DESCR {* Returns the number of nodes in the nodetable that are
currently in use. Note that dead nodes that have not been
currently in use. Note that dead nodes that have not been
reclaimed yet
by a garbage collection are counted as active. *}
RETURN {* The number of nodes. *}
@ -632,7 +632,7 @@ SECTION {* kernel *}
SHORT {* get the number of allocated nodes *}
PROTO {* int bdd_getallocnum(void) *}
DESCR {* Returns the number of nodes currently allocated. This includes
both dead and active nodes. *}
both dead and active nodes. *}
RETURN {* The number of nodes. *}
ALSO {* bdd\_getnodenum, bdd\_setmaxnodenum *}
*/
@ -648,7 +648,7 @@ SECTION {* kernel *}
SHORT {* test whether the package is started or not *}
PROTO {* void bdd_isrunning(void) *}
DESCR {* This function tests the internal state of the package and returns
a status. *}
a status. *}
RETURN {* 1 (true) if the package has been started, otherwise 0. *}
ALSO {* bdd\_init, bdd\_done *}
*/
@ -664,7 +664,7 @@ SECTION {* kernel *}
SHORT {* returns a text string with version information *}
PROTO {* char* bdd_versionstr(void) *}
DESCR {* This function returns a text string with information about the
version of the bdd package. *}
version of the bdd package. *}
ALSO {* bdd\_versionnum *}
*/
char *bdd_versionstr(void)
@ -681,7 +681,7 @@ SECTION {* kernel *}
SHORT {* returns the version number of the bdd package *}
PROTO {* int bdd_versionnum(void) *}
DESCR {* This function returns the version number of the bdd package. The
number is in the range 10-99 for version 1.0 to 9.9. *}
number is in the range 10-99 for version 1.0 to 9.9. *}
ALSO {* bdd\_versionstr *}
*/
int bdd_versionnum(void)
@ -696,7 +696,7 @@ SECTION {* kernel *}
SHORT {* returns some status information about the bdd package *}
PROTO {* void bdd_stats(bddStat* stat) *}
DESCR {* This function acquires information about the internal state of
the bdd package. The status information is written into the
the bdd package. The status information is written into the
{\tt stat} argument. *}
ALSO {* bddStat *}
*/
@ -720,7 +720,7 @@ SECTION {* kernel *}
SHORT {* Fetch cache access usage *}
PROTO {* void bdd_cachestats(bddCacheStat *s) *}
DESCR {* Fetches cache usage information and stores it in {\tt s}. The
fields of {\tt s} can be found in the documentaion for
fields of {\tt s} can be found in the documentaion for
{\tt bddCacheStat}. This function may or may not be compiled
into the BuDDy package - depending on the setup at compile
time of BuDDy. *}
@ -740,7 +740,7 @@ SHORT {* print cache statistics *}
PROTO {* void bdd_printstat(void)
void bdd_fprintstat(FILE *ofile) *}
DESCR {* Prints information about the cache performance on standard output
(or the supplied file). The information contains the number of
(or the supplied file). The information contains the number of
accesses to the unique node table, the number of times a node
was (not) found there and how many times a hash chain had to
traversed. Hit and miss count is also given for the operator
@ -787,7 +787,7 @@ SECTION {* kernel *}
SHORT {* converts an error code to a string*}
PROTO {* const char *bdd_errstring(int errorcode) *}
DESCR {* Converts a negative error code {\tt errorcode} to a descriptive
string that can be used for error handling. *}
string that can be used for error handling. *}
RETURN {* An error description string if {\tt e} is known, otherwise {\tt NULL}. *}
ALSO {* bdd\_err\_hook *}
*/
@ -826,7 +826,7 @@ SECTION {* kernel *}
SHORT {* returns the constant true bdd *}
PROTO {* BDD bdd_true(void) *}
DESCR {* This function returns the constant true bdd and can freely be
used together with the {\tt bddtrue} and {\tt bddfalse}
used together with the {\tt bddtrue} and {\tt bddfalse}
constants. *}
RETURN {* The constant true bdd *}
ALSO {* bdd\_false, bddtrue, bddfalse *}
@ -843,7 +843,7 @@ SECTION {* kernel *}
SHORT {* returns the constant false bdd *}
PROTO {* BDD bdd_false(void) *}
DESCR {* This function returns the constant false bdd and can freely be
used together with the {\tt bddtrue} and {\tt bddfalse}
used together with the {\tt bddtrue} and {\tt bddfalse}
constants. *}
RETURN {* The constant false bdd *}
ALSO {* bdd\_true, bddtrue, bddfalse *}
@ -860,7 +860,7 @@ SECTION {* kernel *}
SHORT {* returns a bdd representing the I'th variable *}
PROTO {* BDD bdd_ithvar(int var) *}
DESCR {* This function is used to get a bdd representing the I'th
variable (one node with the childs true and false). The requested
variable (one node with the childs true and false). The requested
variable must be in the range define by {\tt
bdd\_setvarnum} starting with 0 being the first. For ease
of use then the bdd returned from {\tt bdd\_ithvar} does
@ -889,7 +889,7 @@ SECTION {* kernel *}
SHORT {* returns a bdd representing the negation of the I'th variable *}
PROTO {* BDD bdd_nithvar(int var) *}
DESCR {* This function is used to get a bdd representing the negation of
the I'th variable (one node with the childs false and true).
the I'th variable (one node with the childs false and true).
The requested variable must be in the range define by
{\tt bdd\_setvarnum} starting with 0 being the first. For ease of
use then the bdd returned from {\tt bdd\_nithvar} does not have
@ -915,7 +915,7 @@ SECTION {* kernel *}
SHORT {* returns the number of defined variables *}
PROTO {* int bdd_varnum(void) *}
DESCR {* This function returns the number of variables defined by
a call to {\tt bdd\_setvarnum}.*}
a call to {\tt bdd\_setvarnum}.*}
RETURN {* The number of defined variables *}
ALSO {* bdd\_setvarnum, bdd\_ithvar *}
*/
@ -1105,7 +1105,7 @@ SECTION {* kernel *}
SHORT {* increases the reference count on a node *}
PROTO {* BDD bdd_addref(BDD r) *}
DESCR {* Reference counting is done on externaly referenced nodes only
and the count for a specific node {\tt r} can and must be
and the count for a specific node {\tt r} can and must be
increased using this function to avoid loosing the node in the next
garbage collection. *}
ALSO {* bdd\_delref *}
@ -1131,7 +1131,7 @@ SECTION {* kernel *}
SHORT {* decreases the reference count on a node *}
PROTO {* BDD bdd_delref(BDD r) *}
DESCR {* Reference counting is done on externaly referenced nodes only
and the count for a specific node {\tt r} can and must be
and the count for a specific node {\tt r} can and must be
decreased using this function to make it possible to reclaim the
node in the next garbage collection. *}
ALSO {* bdd\_addref *}
@ -1300,7 +1300,7 @@ int bdd_makenode(unsigned int level, int low, int high)
if (bdderrorcond)
return 0;
/* Try to allocate more nodes */
/* Try to allocate more nodes */
bdd_gbc();
if ((bddnodesize-bddfreenum) >= usednodes_nextreorder &&
@ -1315,7 +1315,7 @@ int bdd_makenode(unsigned int level, int low, int high)
hash = NODEHASH(level, low, high);
}
/* Panic if that is not possible */
/* Panic if that is not possible */
if (bddfreepos == 0)
{
bdd_error(BDD_NODENUM);
@ -1420,7 +1420,7 @@ SECTION {* kernel *}
SHORT {* returns an integer representation of a variable set *}
PROTO {* int bdd_scanset(BDD r, int **v, int *n) *}
DESCR {* Scans a variable set {\tt r} and copies the stored variables into
an integer array of variable numbers. The argument {\tt v} is
an integer array of variable numbers. The argument {\tt v} is
the address of an integer pointer where the array is stored and
{\tt n} is a pointer to an integer where the number of elements
are stored. It is the users responsibility to make sure the
@ -1462,7 +1462,7 @@ SECTION {* kernel *}
SHORT {* builds a BDD variable set from an integer array *}
PROTO {* BDD bdd_makeset(int *v, int n) *}
DESCR {* Reads a set of variable numbers from the integer array {\tt v}
which must hold exactly {\tt n} integers and then builds a BDD
which must hold exactly {\tt n} integers and then builds a BDD
representing the variable set.
The BDD variable set is represented as the conjunction of

View file

@ -1,6 +1,6 @@
/*========================================================================
Copyright (C) 1996-2002 by Jorn Lind-Nielsen
All rights reserved
Copyright (C) 1996-2002 by Jorn Lind-Nielsen
All rights reserved
Permission is hereby granted, without written agreement and without
license or royalty fees, to use, reproduce, prepare derivative
@ -28,7 +28,7 @@
========================================================================*/
/*************************************************************************
$Header: /Volumes/CVS/repository/spot/spot/buddy/src/kernel.h,v 1.3 2003/05/05 14:07:28 aduret Exp $
$Header: /Volumes/CVS/repository/spot/spot/buddy/src/kernel.h,v 1.4 2003/05/20 08:22:36 aduret Exp $
FILE: kernel.h
DESCR: Kernel specific definitions for BDD package
AUTH: Jorn Lind

View file

@ -28,7 +28,7 @@
========================================================================*/
/*************************************************************************
$Header: /Volumes/CVS/repository/spot/spot/buddy/src/pairs.c,v 1.3 2003/05/19 15:58:44 aduret Exp $
$Header: /Volumes/CVS/repository/spot/spot/buddy/src/pairs.c,v 1.4 2003/05/20 08:22:36 aduret Exp $
FILE: pairs.c
DESCR: Pair management for BDD package.
AUTH: Jorn Lind
@ -219,7 +219,7 @@ EXTRA {* bdd\_setbddpair *}
SECTION {* kernel *}
SHORT {* set one variable pair *}
PROTO {* int bdd_setpair(bddPair *pair, int oldvar, int newvar)
int bdd_setbddpair(bddPair *pair, BDD oldvar, BDD newvar) *}
int bdd_setbddpair(bddPair *pair, int oldvar, BDD newvar) *}
DESCR {* Adds the pair {\tt (oldvar,newvar)} to the table of pairs
{\tt pair}. This results in {\tt oldvar} being substituted
with {\tt newvar} in a call to {\tt bdd\_replace}. In the first