@@ -1998,8 +1998,9 @@ __YICES_DLLSPEC__ extern term_t yices_parse_term(const char *s);
1998
1998
* - map must be an array of n terms
1999
1999
* - the type of map[i] must be a subtype of var[i]'s type
2000
2000
* - every occurrence of var[i] in t is replaced by map[i]
2001
- * - if a variable occurs several times in v, the last occurrence
2002
- * counts. (e.g., if v[i] = x and v[j] = x with i < j, and
2001
+ * - if an uninterpreted term / variable occurs several times in v,
2002
+ * the last occurrence counts.
2003
+ * (e.g., if v[i] = x and v[j] = x with i < j, and
2003
2004
* there are no other occurrences of x in v, then x is
2004
2005
* replaced by map[j]).
2005
2006
*
@@ -3019,7 +3020,9 @@ __YICES_DLLSPEC__ extern int32_t yices_pop(context_t *ctx);
3019
3020
* unless you really know what you're doing.
3020
3021
*
3021
3022
* The following functions selectively enable/disable a preprocessing
3022
- * option. The current options include:
3023
+ * option. In the description below we use "variable" for what should be
3024
+ * "uninterpreted term" (in the sense of Yices), to stick to standard
3025
+ * terminology. The current options include:
3023
3026
*
3024
3027
* var-elim: whether to eliminate variables by substitution
3025
3028
*
@@ -3169,8 +3172,7 @@ __YICES_DLLSPEC__ extern smt_status_t yices_check_context_with_assumptions(conte
3169
3172
/*
3170
3173
* Check satisfiability modulo a model.
3171
3174
*
3172
- * Check whether the assertions stored in ctx conjoined with a variable assignment defined by a
3173
- * model are satisfiable.
3175
+ * Check whether the assertions stored in ctx conjoined with a model are satisfiable.
3174
3176
* - ctx must be a context initialized with support for MCSAT
3175
3177
* (see yices_new_context, yices_new_config, yices_set_config).
3176
3178
* - params is an optional structure to store heuristic parameters
@@ -3213,7 +3215,7 @@ __YICES_DLLSPEC__ extern smt_status_t yices_check_context_with_model(context_t *
3213
3215
* Check satisfiability and compute interpolant.
3214
3216
*
3215
3217
* Check whether the combined assertions stored in ctx are satisfiable. If they are
3216
- * not compute an interpolants (defined on variables common to both contexts).
3218
+ * not, compute an interpolant (whose uninterpreted terms are common to both contexts).
3217
3219
* - params is an optional structure to store heuristic parameters
3218
3220
* - if params is NULL, default parameter settings are used.
3219
3221
*
@@ -3228,12 +3230,12 @@ __YICES_DLLSPEC__ extern smt_status_t yices_check_context_with_model(context_t *
3228
3230
*
3229
3231
* To call this function:
3230
3232
* - ctx->ctx_A must be a context initialized with support for MCSAT and interpolation.
3231
- * - ctx->ctx_B can be an other context (not necessarily with MCSAT support)
3233
+ * - ctx->ctx_B can be another context (not necessarily with MCSAT support)
3232
3234
*
3233
3235
* If this function returns STATUS_UNSAT, then an interpolant is returned in ctx->interpolant.
3234
3236
*
3235
3237
* If this function returns STATUS_SAT and build_model is true, then
3236
- * a model is returned in ctx->model. This model must be freed when no-longer need by
3238
+ * a model is returned in ctx->model. This model must be freed when no-longer needed by
3237
3239
* calling yices_free_model.
3238
3240
*
3239
3241
* If something is wrong, the function returns STATUS_ERROR and sets the yices error report
@@ -3391,7 +3393,7 @@ __YICES_DLLSPEC__ extern term_t yices_get_model_interpolant(context_t *ctx);
3391
3393
/*
3392
3394
* Build a model from ctx
3393
3395
* - keep_subst indicates whether the model should include
3394
- * the eliminated variables :
3396
+ * the uninterpreted terms that have been eliminated by simplification :
3395
3397
* keep_subst = 0 means don't keep substitutions,
3396
3398
* keep_subst != 0 means keep them
3397
3399
* - ctx status must be STATUS_SAT or STATUS_UNKNOWN
@@ -3400,25 +3402,25 @@ __YICES_DLLSPEC__ extern term_t yices_get_model_interpolant(context_t *ctx);
3400
3402
* and sets an error report (code = CTX_INVALID_OPERATION).
3401
3403
*
3402
3404
* When assertions are added to the context, the simplifications may
3403
- * eliminate variables (cf. simplification options above). The flag
3404
- * 'keep_subst' indicates whether the model should keep track of these
3405
- * eliminated variables and include their value.
3405
+ * eliminate some uninterpreted terms (cf. simplification options above).
3406
+ * The flag 'keep_subst' indicates whether the model should keep track
3407
+ * of these eliminated terms and include their value.
3406
3408
*
3407
3409
* Example: after the following assertions
3408
3410
*
3409
3411
* (= x (bv-add y z))
3410
3412
* (bv-gt y 0b000)
3411
3413
* (bg-gt z 0b000)
3412
3414
*
3413
- * variable 'x' gets eliminated. Then a call to 'check_context' will
3415
+ * uninterpreted term 'x' gets eliminated. Then a call to 'check_context' will
3414
3416
* return STATUS_SAT and we can ask for a model 'M'
3415
3417
* - if 'keep_subst' is false then the value of 'x' in 'M' is unavailable.
3416
3418
* - if 'keep_subst' is true then the value of 'x' in 'M' is computed,
3417
3419
* based on the value of 'y' and 'z' in 'M'.
3418
3420
*
3419
3421
* It's always better to set 'keep_subst' true. The only exceptions
3420
- * are some of the large SMT_LIB benchmarks where millions of variables
3421
- * are eliminated. In such cases, it saves memory to set 'keep_subst'
3422
+ * are some of the large SMT_LIB benchmarks where millions of uninterpreted
3423
+ * terms are eliminated. In such cases, it saves memory to set 'keep_subst'
3422
3424
* false, and model construction is faster too.
3423
3425
*/
3424
3426
__YICES_DLLSPEC__ extern model_t * yices_get_model (context_t * ctx , int32_t keep_subst );
@@ -3462,7 +3464,7 @@ __YICES_DLLSPEC__ extern model_t *yices_model_from_map(uint32_t n, const term_t
3462
3464
3463
3465
3464
3466
/*
3465
- * The following functions extend a model by assigning a value to a variable
3467
+ * The following functions extend a model by assigning a value to an uninterpreted term
3466
3468
* - var must be an uninterpreted term
3467
3469
* - var must not have a value in model
3468
3470
*
@@ -3472,23 +3474,23 @@ __YICES_DLLSPEC__ extern model_t *yices_model_from_map(uint32_t n, const term_t
3472
3474
* Error report:
3473
3475
* - code = INVALID_TERM if var is not valid
3474
3476
* - code = MDL_UNINT_REQUIRED if var is not uninterpreted
3475
- * - code = TYPE_MISMATCH if the variable and the value don't have compatible types.
3477
+ * - code = TYPE_MISMATCH if the uninterpreted term and the value don't have compatible types.
3476
3478
* - code = MDL_DUPLICATE_VAR if var already has a value in model
3477
3479
*/
3478
3480
3479
3481
/*
3480
- * Assign a value to a Boolean variable
3482
+ * Assign a value to a Boolean uninterpreted term
3481
3483
* - val 0 means false, anything else means true.
3482
3484
*
3483
3485
* Since 2.6.4.
3484
3486
*/
3485
3487
__YICES_DLLSPEC__ extern int32_t yices_model_set_bool (model_t * model , term_t var , int32_t val );
3486
3488
3487
3489
/*
3488
- * Assign a value to a numerical variable . The value can be given as
3490
+ * Assign a value to a numerical uninterpreted term . The value can be given as
3489
3491
* an integer, a GMP integer, a GMP rational, or an algebraic number.
3490
3492
*
3491
- * The assignment fails (TYPE_MISMATCH) is the variable has integer type
3493
+ * The assignment fails (TYPE_MISMATCH) is the uninterpreted term has integer type
3492
3494
* and the value is not an integer.
3493
3495
*
3494
3496
* For functions yices_model_set_rational32 and
@@ -3513,7 +3515,7 @@ __YICES_DLLSPEC__ extern int32_t yices_model_set_algebraic_number(model_t *model
3513
3515
3514
3516
3515
3517
/*
3516
- * Assign an integer value to a bitvector variable .
3518
+ * Assign an integer value to a bitvector uninterpreted term .
3517
3519
*
3518
3520
* Rules for truncation and zero/sign extension:
3519
3521
* - let n be the number of bits in var
@@ -3541,8 +3543,8 @@ __YICES_DLLSPEC__ extern int32_t yices_model_set_bv_mpz(model_t *model, term_t v
3541
3543
3542
3544
3543
3545
/*
3544
- * Assign a bitvector variable using an array of bits.
3545
- * - var = bitvector variable
3546
+ * Assign a bitvector value to a bitvector uninterpreted term, using an array of bits.
3547
+ * - var = bitvector uninterpreted term
3546
3548
* - a = array of n bits
3547
3549
* - var must be an uninterpreted term of type (bitvector n)
3548
3550
* (and var must not have a value in model).
@@ -3579,7 +3581,7 @@ __YICES_DLLSPEC__ extern int32_t yices_model_set_bv_from_array(model_t *model, t
3579
3581
*
3580
3582
* (assert (> y 0))
3581
3583
*
3582
- * then variable 'x' does not occur in the simplified assertions and will
3584
+ * then uninterpreted term 'x' does not occur in the simplified assertions and will
3583
3585
* not be included in vector 'v'.
3584
3586
*/
3585
3587
__YICES_DLLSPEC__ extern void yices_model_collect_defined_terms (model_t * mdl , term_vector_t * v );
@@ -4346,7 +4348,10 @@ __YICES_DLLSPEC__ extern int32_t yices_implicant_for_formulas(model_t *mdl, uint
4346
4348
* MODEL GENERALIZATION
4347
4349
*/
4348
4350
4349
- /*
4351
+ /* In the description below we use "variable" for what should be
4352
+ * "uninterpreted term" (in the sense of Yices), to stick to standard
4353
+ * terminology.
4354
+ *
4350
4355
* Given a model mdl for a formula F(X, Y). The following generalization functions
4351
4356
* eliminate variables Y from F(X, Y) in a way that is guided by the model.
4352
4357
*
0 commit comments