Home Intro Docs Wiki FAQ Download - Mail Awards Status FM Tools
Yices

C API

The current C API is not yet complete, but the basic Yices functionalities can be used. Dependent types, quantifiers, lambda expressions are not supported by this API right now but will be in the future.

Typedefs

typedef void * yices_expr
 Yices expressions (abstract syntax tree).
typedef void * yices_type
 Yices types (abstract syntax tree).
typedef void * yices_var_decl
 Variable declaration.
typedef void * yices_context
 Yices context.
typedef int assertion_id
 Assertion index, to identify retractable assertions.
typedef void * yices_model
 Model.
typedef void * yices_var_decl_iterator
 Iterator for scanning the boolean variables.

Enumerations

enum  lbool { l_false = -1, l_undef, l_true }
 Extended booleans: to represent the value of literals in the context. More...

Functions

void yices_set_verbosity (int l)
 Set the verbosity level.
char * yices_version ()
 Return the yices version number.
void yices_set_max_num_conflicts_in_maxsat_iteration (unsigned n)
 Set the maximum number of conflicts that are allowed in a maxsat iteration.
void yices_enable_type_checker (int flag)
 Force Yices to type check expressions when they are asserted (default = false).
void yices_set_max_num_iterations_in_maxsat (unsigned n)
 Set the maximum number of iterations in the MaxSAT algorithm.
void yices_set_maxsat_initial_cost (long long c)
 Set the initial cost for a maxsat problem.
void yices_set_arith_only (int flag)
 Inform yices that only arithmetic theory is going to be used.
void yices_enable_log_file (char *file_name)
 Enable a log file that will store the assertions, checks, decls, etc.
yices_context yices_mk_context ()
 Create a logical context.
void yices_del_context (yices_context ctx)
 Delete the given logical context.
void yices_reset (yices_context ctx)
 Reset the given logical context.
void yices_dump_context (yices_context ctx)
 Display the internal representation of the given logical context on stderr.
void yices_push (yices_context ctx)
 Create a backtracking point in the given logical context.
void yices_pop (yices_context ctx)
 Backtrack.
void yices_assert (yices_context ctx, yices_expr expr)
 Assert a constraint in the logical context.
assertion_id yices_assert_weighted (yices_context ctx, yices_expr expr, long long w)
 Assert a constraint in the logical context with weight w.
assertion_id yices_assert_retractable (yices_context ctx, yices_expr expr)
 Assert a constraint that can be later retracted.
void yices_retract (yices_context ctx, assertion_id id)
 Retract a retractable or weighted constraint.
int yices_inconsistent (yices_context ctx)
 Return 1 if the logical context is known to be inconsistent.
lbool yices_check (yices_context ctx)
 Check if the logical context is satisfiable.
lbool yices_find_weighted_model (yices_context ctx, int random)
 Search for a model of the constraints asserted in ctx and compute its cost.
lbool yices_evaluate_in_model (yices_model m, yices_expr e)
 Evaluate a formula in a model.
lbool yices_max_sat (yices_context ctx)
 Compute the maximal satisfying assignment for the asserted weighted constraints.
lbool yices_max_sat_cost_leq (yices_context c, long long max_cost)
 Similar to yices_max_sat, but start looking for models with cost less than of equal to max_cost.
yices_model yices_get_model (yices_context ctx)
 Return a model for a satisfiable logical context.
lbool yices_get_value (yices_model m, yices_var_decl v)
 Return the assignment for the variable v.
int yices_get_int_value (yices_model m, yices_var_decl d, long *value)
 Get the integer value assigned to variable v in model m.
int yices_get_arith_value (yices_model m, yices_var_decl d, long *num, long *den)
 Get the rational value assigned to variable v in model m.
int yices_get_double_value (yices_model m, yices_var_decl d, double *value)
 Convert the value assigned to variable v in model m to a floating point number.
int yices_get_mpq_value (yices_model m, yices_var_decl d, mpq_t value)
 Convert the value assigned to variable v in model m to a GMP rational (mpq_t).
int yices_get_mpz_value (yices_model m, yices_var_decl d, mpz_t value)
 Convert the value assigned to variable v in model m to a GMP integer (mpz_t).
int yices_get_bitvector_value (yices_model m, yices_var_decl d, unsigned n, int bv[])
 Get the bitvector constant assigned to a variable v in model m.
int yices_get_assertion_value (yices_model m, assertion_id id)
 Return 1 (0) if the assertion of the given id is satisfied (not satisfied) in the model m.
void yices_display_model (yices_model m)
 Display the given model in the standard output.
long long yices_get_cost (yices_model m)
 Return the cost of model m.
double yices_get_cost_as_double (yices_model m)
 Return the cost of the model m, converted to a double-precision floating point number.
yices_expr yices_mk_true (yices_context ctx)
 Return an expression representing true.
yices_expr yices_mk_false (yices_context ctx)
 Return an expression representing false.
yices_expr yices_mk_bool_var (yices_context ctx, char *name)
 Return a name expression for the given variable name.
yices_expr yices_mk_fresh_bool_var (yices_context ctx)
 Return a fresh boolean variable.
yices_var_decl yices_get_var_decl (yices_expr e)
 Return the variable declaration object associated with the given name expression.
yices_var_decl yices_mk_bool_var_decl (yices_context ctx, char *name)
 Return a new boolean variable declaration.
char * yices_get_var_decl_name (yices_var_decl d)
 Return a name of a variable declaration.
yices_expr yices_mk_bool_var_from_decl (yices_context ctx, yices_var_decl d)
 Return a name expression (instance) using the given variable declaration.
yices_expr yices_mk_or (yices_context ctx, yices_expr args[], unsigned n)
 Return an expression representing the or of the given arguments.
yices_expr yices_mk_and (yices_context ctx, yices_expr args[], unsigned n)
 Return an expression representing the and of the given arguments.
yices_expr yices_mk_eq (yices_context ctx, yices_expr a1, yices_expr a2)
 Return an expression representing a1 = a2.
yices_expr yices_mk_diseq (yices_context ctx, yices_expr a1, yices_expr a2)
 Return an expression representing a1 /= a2.
yices_expr yices_mk_ite (yices_context ctx, yices_expr c, yices_expr t, yices_expr e)
 Return an expression representing (if c t e).
yices_expr yices_mk_not (yices_context ctx, yices_expr a)
 Return an expression representing (not a).
yices_var_decl_iterator yices_create_var_decl_iterator (yices_context c)
 Create an iterator that can be used to traverse the boolean variables (var_decl objects) in the given logical context.
int yices_iterator_has_next (yices_var_decl_iterator it)
 Return 1 if the iterator it still has elements to be iterated. Return 0 otherwise.
yices_var_decl yices_iterator_next (yices_var_decl_iterator it)
 Return the next variable, and move the iterator.
void yices_iterator_reset (yices_var_decl_iterator it)
 Reset the given iterator, that is, move it back to the first element.
void yices_del_iterator (yices_var_decl_iterator it)
 Delete an iterator created with yices_create_var_decl_iterator.
yices_type yices_mk_type (yices_context ctx, char *name)
 Return the type associated with the given name. If the type does not exist, a new uninterpreted type is created.
yices_type yices_mk_function_type (yices_context ctx, yices_type domain[], unsigned domain_size, yices_type range)
 Return a function type (-> d1 ... dn r).
yices_type yices_mk_bitvector_type (yices_context ctx, unsigned size)
 Returns the bitvector type (bv[size]).
yices_type yices_mk_tuple_type (yices_context ctx, yices_type *args[], unsigned size)
 Constructs the tuple type (arg[0], ..., arg[size-1]).
yices_var_decl yices_mk_var_decl (yices_context ctx, char *name, yices_type ty)
 Return a new (global) variable declaration. It is an error to create two variables with the same name.
yices_var_decl yices_get_var_decl_from_name (yices_context ctx, char *name)
 Return a variable declaration associated with the given name.
yices_expr yices_mk_var_from_decl (yices_context ctx, yices_var_decl d)
 Return a name expression (instance) using the given variable declaration.
yices_expr yices_mk_app (yices_context ctx, yices_expr f, yices_expr args[], unsigned n)
 Return a function application term (f t1 ... tn).
yices_expr yices_mk_num (yices_context ctx, int n)
 Return an expression representing the given integer.
yices_expr yices_mk_num_from_string (yices_context ctx, char *n)
 Return an expression representing the number provided in ASCII format.
yices_expr yices_mk_num_from_mpz (yices_context ctx, const mpz_t z)
 Construct a numerical expression form a GMP integer.
yices_expr yices_mk_num_from_mpq (yices_context ctx, const mpq_t q)
 Construct a numerical expression form a GMP rational.
yices_expr yices_mk_sum (yices_context ctx, yices_expr args[], unsigned n)
 Return an expression representing args[0] + ... + args[n-1].
yices_expr yices_mk_sub (yices_context ctx, yices_expr args[], unsigned n)
 Return an expression representing args[0] - ... - args[n-1].
yices_expr yices_mk_mul (yices_context ctx, yices_expr args[], unsigned n)
 Return an expression representing args[0] * ... * args[n-1].
yices_expr yices_mk_lt (yices_context ctx, yices_expr a1, yices_expr a2)
 Return an expression representing a1 < a2.
yices_expr yices_mk_le (yices_context ctx, yices_expr a1, yices_expr a2)
 Return an expression representing a1 <= a2.
yices_expr yices_mk_gt (yices_context ctx, yices_expr a1, yices_expr a2)
 Return an expression representing a1 > a2.
yices_expr yices_mk_ge (yices_context ctx, yices_expr a1, yices_expr a2)
 Return an expression representing a1 >= a2.
yices_expr yices_mk_bv_constant (yices_context ctx, unsigned size, unsigned long value)
 Create a bit vector constant of size bits and of the given value.
yices_expr yices_mk_bv_constant_from_array (yices_context ctx, unsigned size, int bv[])
 Create a bit vector constant from an array.
yices_expr yices_mk_bv_add (yices_context ctx, yices_expr a1, yices_expr a2)
 Bitvector addition.
yices_expr yices_mk_bv_sub (yices_context ctx, yices_expr a1, yices_expr a2)
 Bitvector subtraction.
yices_expr yices_mk_bv_mul (yices_context ctx, yices_expr a1, yices_expr a2)
 Bitvector multiplication.
yices_expr yices_mk_bv_minus (yices_context ctx, yices_expr a1)
 Bitvector opposite.
yices_expr yices_mk_bv_concat (yices_context ctx, yices_expr a1, yices_expr a2)
 Bitvector concatenation.
yices_expr yices_mk_bv_and (yices_context ctx, yices_expr a1, yices_expr a2)
 Bitwise and.
yices_expr yices_mk_bv_or (yices_context ctx, yices_expr a1, yices_expr a2)
 Bitwise or.
yices_expr yices_mk_bv_xor (yices_context ctx, yices_expr a1, yices_expr a2)
 Bitwise exclusive or.
yices_expr yices_mk_bv_not (yices_context ctx, yices_expr a1)
 Bitwise negation.
yices_expr yices_mk_bv_extract (yices_context ctx, unsigned end, unsigned begin, yices_expr a)
 Bitvector extraction.
yices_expr yices_mk_bv_sign_extend (yices_context ctx, yices_expr a, unsigned n)
 Sign extension.
yices_expr yices_mk_bv_shift_left0 (yices_context ctx, yices_expr a, unsigned n)
 Left shift by n bits, padding with zeros.
yices_expr yices_mk_bv_shift_left1 (yices_context ctx, yices_expr a, unsigned n)
 Left shift by n bits, padding with ones.
yices_expr yices_mk_bv_shift_right0 (yices_context ctx, yices_expr a, unsigned n)
 Right shift by n bits, padding with zeros.
yices_expr yices_mk_bv_shift_right1 (yices_context ctx, yices_expr a, unsigned n)
 Right shift by n bits, padding with ones.
yices_expr yices_mk_bv_lt (yices_context ctx, yices_expr a1, yices_expr a2)
 Unsigned comparison: (a1 < a2).
yices_expr yices_mk_bv_le (yices_context ctx, yices_expr a1, yices_expr a2)
 Unsigned comparison: (a1 <= a2).
yices_expr yices_mk_bv_gt (yices_context ctx, yices_expr a1, yices_expr a2)
 Unsigned comparison: (a1 > a2).
yices_expr yices_mk_bv_ge (yices_context ctx, yices_expr a1, yices_expr a2)
 Unsigned comparison: (a1 >= a2).
yices_expr yices_mk_bv_slt (yices_context ctx, yices_expr a1, yices_expr a2)
 Signed comparison: (a1 < a2).
yices_expr yices_mk_bv_sle (yices_context ctx, yices_expr a1, yices_expr a2)
 Signed comparison: (a1 <= a2).
yices_expr yices_mk_bv_sgt (yices_context ctx, yices_expr a1, yices_expr a2)
 Signed comparison: (a1 > a2).
yices_expr yices_mk_bv_sge (yices_context ctx, yices_expr a1, yices_expr a2)
 Signed comparison: (a1 >= a2).
void yices_pp_expr (yices_expr e)
 Pretty print the given expression in the standard output.

Typedef Documentation

typedef int assertion_id
 

Assertion index, to identify retractable assertions.

typedef void* yices_context
 

Yices context.

A context stores a collection of declarations and assertions.

typedef void* yices_expr
 

Yices expressions (abstract syntax tree).

typedef void* yices_model
 

Model.

A model assigns constant values to variables defined in a context. The context must be known to be consistent for a model to be available. The model is constructed by calling yices_check (or its relatives) then yices_get_model.

typedef void* yices_type
 

Yices types (abstract syntax tree).

typedef void* yices_var_decl
 

Variable declaration.

A declaration consists of a name and a type (such as x::bool). An instance of the declaration represents the term x. Instances are also called name expressions. Instances can be created using yices_mk_bool_var_from_decl or yices_mk_var_from_decl.

typedef void* yices_var_decl_iterator
 

Iterator for scanning the boolean variables.


Enumeration Type Documentation

enum lbool
 

Extended booleans: to represent the value of literals in the context.

Enumerator:
l_false 
l_undef 
l_true 

Function Documentation

void yices_assert yices_context  ctx,
yices_expr  expr
 

Assert a constraint in the logical context.

After one assertion, the logical context may become inconsistent. The method yices_inconsistent may be used to check that.

assertion_id yices_assert_retractable yices_context  ctx,
yices_expr  expr
 

Assert a constraint that can be later retracted.

Returns:
An id that can be used to retract the constraint.
This is similar to yices_assert_weighted, but the weight is considered to be infinite.

See also:
yices_retract

assertion_id yices_assert_weighted yices_context  ctx,
yices_expr  expr,
long long  w
 

Assert a constraint in the logical context with weight w.

Returns:
An id that can be used to retract the constraint.
See also:
yices_retract

lbool yices_check yices_context  ctx  ) 
 

Check if the logical context is satisfiable.

  • l_true means the context is satisfiable
  • l_false means it is unsatisfiable
  • l_undef means it was not possible to decide due to an incompleteness.

If the context is satisfiable, then yices_get_model can be used to obtain a model.

Warning:
This method ignore the weights associated with the constraints.

yices_var_decl_iterator yices_create_var_decl_iterator yices_context  c  ) 
 

Create an iterator that can be used to traverse the boolean variables (var_decl objects) in the given logical context.

An iterator is particulary useful when we want to extract the assignment (model) produced by the yices_check command.

Example:

   yices_context ctx = yices_mk_context();
   ...
   if (yices_check(ctx) == l_true) {
      yices_var_decl_iterator it = yices_create_var_decl_iterator(ctx);
      yices_model m              = yices_get_model(ctx);
      while (yices_iterator_has_next(it)) {
         yices_var_decl d         = yices_iterator_next(it);
   char *         val;
   switch(yices_get_value(m, d)) {
   case l_true: 
        val = "true"; 
      break;
   case l_false: 
      val = "false";
      break;
   case l_undef: 
      val = "unknown"; 
      break;
   }
   printf("%s = %s\n", yices_get_var_decl_name(d), val);
      }
      yices_del_iterator(it);
   }

See also:
yices_iterator_has_next

yices_iterator_next

yices_iterator_reset

void yices_del_context yices_context  ctx  ) 
 

Delete the given logical context.

See also:
yices_mk_context

void yices_del_iterator yices_var_decl_iterator  it  ) 
 

Delete an iterator created with yices_create_var_decl_iterator.

void yices_display_model yices_model  m  ) 
 

Display the given model in the standard output.

void yices_dump_context yices_context  ctx  ) 
 

Display the internal representation of the given logical context on stderr.

This function is mostly for debugging.

void yices_enable_log_file char *  file_name  ) 
 

Enable a log file that will store the assertions, checks, decls, etc.

If the log file is already open, then nothing happens.

void yices_enable_type_checker int  flag  ) 
 

Force Yices to type check expressions when they are asserted (default = false).

lbool yices_evaluate_in_model yices_model  m,
yices_expr  e
 

Evaluate a formula in a model.

Model m can be obtained via yices_get_model, after a call to yices_check, yices_max_sat, or yices_find_weighted_model

  • l_true means the formula is true in the model
  • l_false means the formula is false in the model
  • l_undef means the model does not have enough information. typically this is due to a function application, e.g., the model defines (f 1) and (f 2), but the formula references (f 3)

lbool yices_find_weighted_model yices_context  ctx,
int  random
 

Search for a model of the constraints asserted in ctx and compute its cost.

If random is non-zero, then random search is used, otherwise, the default decision heuristic is used.

If there are no weighted constaints in ctx, then this function is the same as yices_check.

Otherwise, it searches for a model that satisfies all the non-weighted constraints but not necessarily the weighted constraints. The function returns l_true if such a model is found, and the model can be obtained using yices_get_model. The cost of this model is the sum of the weights of the unsatisfied weighted constraints.

The function returns l_false if it cannot find such a model.

The function may also return l_undef, if the context contains formulas for which yices is incomplete (e.g., quantifiers). Do not use the model in this case.

int yices_get_arith_value yices_model  m,
yices_var_decl  d,
long *  num,
long *  den
 

Get the rational value assigned to variable v in model m.

The numerator is stored in * num and the denominator in * den. Returns 1 on success.

A return code of 0 indicates one of the following errors:

  • v is not a proper declaration or not the declaration of a numerical variable
  • v has no value assigned in model m (typically, this means that v does not occur in the asserted constraints)
  • v has a value that cannot be converted to long/long, because the numerator or the denominator is too big

See also:
yices_get_value

yices_get_int_value

yices_get_double_value

int yices_get_assertion_value yices_model  m,
assertion_id  id
 

Return 1 (0) if the assertion of the given id is satisfied (not satisfied) in the model m.

This function is only useful for assertion ids obtained using yices_assert_weighted, and yices_max_sat was used to build the model. That is the only scenario where an assertion may not be satisfied in a model produced by yices.

int yices_get_bitvector_value yices_model  m,
yices_var_decl  d,
unsigned  n,
int  bv[]
 

Get the bitvector constant assigned to a variable v in model m.

The value stored in array bv: bv[0] is the low-order bit and bv[n - 1] is the high-order bit.

  • n should be the size of the bitvector variable v. Otherwise, if
  • n is smaller than v's size, the n lower-order bits of v are returned. If n is larger than v's size then the extra high-order bits are set to 0.

The return code is 0 if an error occurs, 1 otherwise. Possible errors are:

  • d is not the declaration of a bitvector variable.
  • d is not assigned a value in model m

long long yices_get_cost yices_model  m  ) 
 

Return the cost of model m.

The cost is the sum of the weights of unsatisfied constraints.

Warning:
The model cost is computed automatically by yices_max_sat but not by yices_check. If yices_check returns l_true (or l_undef), you can call yices_compute_model_cost to compute the cost explicitly.

double yices_get_cost_as_double yices_model  m  ) 
 

Return the cost of the model m, converted to a double-precision floating point number.

int yices_get_double_value yices_model  m,
yices_var_decl  d,
double *  value
 

Convert the value assigned to variable v in model m to a floating point number.

The value is stored in * value. Returns 1 on success.

A return code of 0 indicates one of the following errors:

  • v is not a proper declaration or not the declaration of a numerical variable
  • v has no value assigned in model m (typically, this means that v does not occur in the asserted constraints)

See also:
yices_get_value

yices_get_int_value

yices_get_arith_value

int yices_get_int_value yices_model  m,
yices_var_decl  d,
long *  value
 

Get the integer value assigned to variable v in model m.

The value is stored in * value. Returns 1 on success.

A return code of 0 indicates one of the following errors:

  • v is not a proper declaration or not the declaration of a numerical variable
  • v has no value assigned in model m (typically, this means that v does not occur in the asserted constraints)
  • v has a value that cannot be converted to long, because it is rational or too big

See also:
yices_get_value

yices_get_arith_value

yices_get_double_value

yices_model yices_get_model yices_context  ctx  ) 
 

Return a model for a satisfiable logical context.

Warning:
The should be only called if yices_check or yices_max_sat returned l_true or l_undef.
Return 0 if a model is not available. Calls to functions which modify the context invalidate the model.

int yices_get_mpq_value yices_model  m,
yices_var_decl  d,
mpq_t  value
 

Convert the value assigned to variable v in model m to a GMP rational (mpq_t).

Return 1 on success.

A return code of 0 indicates one of the following errors:

  • v is not a proper declaration or not the declaration of a numerical variable
  • v has no value assigned in model m (typically, this means that v does not occur in the asserted constraints)

Warning:
  • For this function to be declared properly, put #include <gmp.h> before #include <yices_c.h> in your code.
    If you don't need GMP numbers, don't include <gmp.h>.
  • The mpq_t object value must be initialized first, by calling GMP's mpq_init function. (Check the GNU MP documentation).
See also:
yices_get_mpz_value.

int yices_get_mpz_value yices_model  m,
yices_var_decl  d,
mpz_t  value
 

Convert the value assigned to variable v in model m to a GMP integer (mpz_t).

Return 1 on success

A return code of 0 indicates one of the following errors:

  • v is not a proper declaration or not the declaration of a numerical variable
  • v has no value assigned in model m (typically, this means that v does not occur in the asserted constraints)
  • the value assigned to v is not an integer.

Warning:
  • For this function to be declared properly, put #include <gmp.h> before #include <yices_c.h> in your code.
    If you don't need GMP numbers, don't include <gmp.h>.
  • The mpz_t object value must be initialized first, by calling GMP's mpz_init function or its variants. (Check the GNU MP documentation).
See also:
yices_get_mpq_value.

lbool yices_get_value yices_model  m,
yices_var_decl  v
 

Return the assignment for the variable v.

The result is l_undef if the value of v is a "don't care".

Warning:
v must be the declaration of a boolean variable
See also:
yices_get_int_value

yices_get_arith_value

yices_get_double_value

yices_var_decl yices_get_var_decl yices_expr  e  ) 
 

Return the variable declaration object associated with the given name expression.

Warning:
e must be a name expression created using methods such as: yices_mk_bool_var, yices_mk_fresh_bool_var, or yices_mk_bool_var_from_decl.

yices_var_decl yices_get_var_decl_from_name yices_context  ctx,
char *  name
 

Return a variable declaration associated with the given name.

Return 0 if there is no variable declaration associated with the given name.

char* yices_get_var_decl_name yices_var_decl  d  ) 
 

Return a name of a variable declaration.

int yices_inconsistent yices_context  ctx  ) 
 

Return 1 if the logical context is known to be inconsistent.

int yices_iterator_has_next yices_var_decl_iterator  it  ) 
 

Return 1 if the iterator it still has elements to be iterated. Return 0 otherwise.

See also:
yices_iterator_next

yices_create_var_decl_iterator

yices_var_decl yices_iterator_next yices_var_decl_iterator  it  ) 
 

Return the next variable, and move the iterator.

See also:
yices_iterator_has_next

yices_create_var_decl_iterator

void yices_iterator_reset yices_var_decl_iterator  it  ) 
 

Reset the given iterator, that is, move it back to the first element.

lbool yices_max_sat yices_context  ctx  ) 
 

Compute the maximal satisfying assignment for the asserted weighted constraints.

  • l_true means the maximal satisfying assignment was found
  • l_false means it is unsatisfiable (this may happen if the context has unweighted constraints)
  • l_undef means it was not possible to decide due to an incompleteness. If the result is l_true, then yices_get_model can be used to obtain a model.

See also:
yices_assert_weighted

lbool yices_max_sat_cost_leq yices_context  c,
long long  max_cost
 

Similar to yices_max_sat, but start looking for models with cost less than of equal to max_cost.

Returns:
l_false if such a model doesn't exist.

yices_expr yices_mk_and yices_context  ctx,
yices_expr  args[],
unsigned  n
 

Return an expression representing the and of the given arguments.

n is the number of elements in the array args.

Warning:
n must be greater than zero.

yices_expr yices_mk_app yices_context  ctx,
yices_expr  f,
yices_expr  args[],
unsigned  n
 

Return a function application term (f t1 ... tn).

The type of f must be a function-type, and its arity must be equal to the number of arguments.

yices_type yices_mk_bitvector_type yices_context  ctx,
unsigned  size
 

Returns the bitvector type (bv[size]).

Size must be positive.

yices_expr yices_mk_bool_var yices_context  ctx,
char *  name
 

Return a name expression for the given variable name.

yices_mk_bool_var(c, n1) == yices_mk_bool_var(c, n2) when strcmp(n1, n2) == 0.

See also:
yices_mk_bool_var_decl

yices_mk_fresh_bool_var

yices_mk_bool_var_from_decl

yices_var_decl yices_mk_bool_var_decl yices_context  ctx,
char *  name
 

Return a new boolean variable declaration.

It is an error to create two variables with the same name.

yices_expr yices_mk_bool_var_from_decl yices_context  ctx,
yices_var_decl  d
 

Return a name expression (instance) using the given variable declaration.

yices_expr yices_mk_bv_add yices_context  ctx,
yices_expr  a1,
yices_expr  a2
 

Bitvector addition.

a1 and a2 must be bitvector expression of same size.

yices_expr yices_mk_bv_and yices_context  ctx,
yices_expr  a1,
yices_expr  a2
 

Bitwise and.

a1 and a2 must be bitvector expression of same size.

yices_expr yices_mk_bv_concat yices_context  ctx,
yices_expr  a1,
yices_expr  a2
 

Bitvector concatenation.

a1 and a2 must be two bitvector expressions. a1 is the left part of the result and a2 the right part.

Assuming a1 and a2 have n1 and n2 bits, respectively, then the result is a bitvector concat of size n1 + n2. Bit 0 of concat is bit 0 of a2 and bit n2 of concat is bit 0 of a1.

yices_expr yices_mk_bv_constant yices_context  ctx,
unsigned  size,
unsigned long  value
 

Create a bit vector constant of size bits and of the given value.

size must be positive

yices_expr yices_mk_bv_constant_from_array yices_context  ctx,
unsigned  size,
int  bv[]
 

Create a bit vector constant from an array.

size must be positive bv must be an array of size elements

bit i of the bitvector is set to 0 if bv[i] = 0 and to 1 if bv[i] != 0

yices_expr yices_mk_bv_extract yices_context  ctx,
unsigned  end,
unsigned  begin,
yices_expr  a
 

Bitvector extraction.

a must a bitvector expression of size n with begin < end < n. The result is the subvector a[begin .. end]

yices_expr yices_mk_bv_ge yices_context  ctx,
yices_expr  a1,
yices_expr  a2
 

Unsigned comparison: (a1 >= a2).

a1 and a2 must be bitvector expression of same size.

yices_expr yices_mk_bv_gt yices_context  ctx,
yices_expr  a1,
yices_expr  a2
 

Unsigned comparison: (a1 > a2).

a1 and a2 must be bitvector expression of same size.

yices_expr yices_mk_bv_le yices_context  ctx,
yices_expr  a1,
yices_expr  a2
 

Unsigned comparison: (a1 <= a2).

a1 and a2 must be bitvector expression of same size.