3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 04:03:39 +00:00

Fix some typos. (#7115)

This commit is contained in:
Bruce Mitchener 2024-02-08 14:06:43 +07:00 committed by GitHub
parent 937d4aa8f4
commit 53f89a81c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 33 additions and 33 deletions

View file

@ -50,7 +50,7 @@
) )
) )
; Transition funcion ; Transition function
(define-fun body ((f_0 Int) (f Int) (i_0 Int) (i_1 Int)(_A (Array Int Int)) (_x Int)) Bool (define-fun body ((f_0 Int) (f Int) (i_0 Int) (i_1 Int)(_A (Array Int Int)) (_x Int)) Bool
(and (and
(= f (ite (= _x (select _A i_0)) 1 f_0)) (= f (ite (= _x (select _A i_0)) 1 f_0))

View file

@ -52,7 +52,7 @@
) )
) )
; Transition funcion ; Transition function
(define-fun body ((f_0 IntValue) (f IntValue) (i_0 IntValue) (i_1 IntValue)(_A (Array IntValue IntValue)) (_x IntValue)) Bool (define-fun body ((f_0 IntValue) (f IntValue) (i_0 IntValue) (i_1 IntValue)(_A (Array IntValue IntValue)) (_x IntValue)) Bool
(and (and
(= f (ite (= _x (select _A i_0)) #x00000001 f_0)) (= f (ite (= _x (select _A i_0)) #x00000001 f_0))

View file

@ -86,7 +86,7 @@ if __name__ == "__main__":
# The pair -inst 2 indicates that two quantifier instantiations were not self-validated # The pair -inst 2 indicates that two quantifier instantiations were not self-validated
# They were instead validated using a call to SMT solving. A log for an smt invocation # They were instead validated using a call to SMT solving. A log for an smt invocation
# is exemplified in the next line. # is exemplified in the next line.
# Note that the pair +inst 6 indicates that 6 quantifier instantations were validated # Note that the pair +inst 6 indicates that 6 quantifier instantiations were validated
# using a syntactic (cheap) check. Some quantifier instantiations based on quantifier elimination # using a syntactic (cheap) check. Some quantifier instantiations based on quantifier elimination
# are not simple substitutions and therefore a simple syntactic check does not suffice. # are not simple substitutions and therefore a simple syntactic check does not suffice.
set_param("solver.proof.check", True) set_param("solver.proof.check", True)

View file

@ -8984,7 +8984,7 @@ def substitute_funs(t, *m):
m = m1 m = m1
if z3_debug(): if z3_debug():
_z3_assert(is_expr(t), "Z3 expression expected") _z3_assert(is_expr(t), "Z3 expression expected")
_z3_assert(all([isinstance(p, tuple) and is_func_decl(p[0]) and is_expr(p[1]) for p in m]), "Z3 invalid substitution, funcion pairs expected.") _z3_assert(all([isinstance(p, tuple) and is_func_decl(p[0]) and is_expr(p[1]) for p in m]), "Z3 invalid substitution, function pairs expected.")
num = len(m) num = len(m)
_from = (FuncDecl * num)() _from = (FuncDecl * num)()
_to = (Ast * num)() _to = (Ast * num)()

View file

@ -3478,7 +3478,7 @@ expr_ref seq_rewriter::mk_antimirov_deriv_union(expr* d1, expr* d2) {
// //
// restrict(d, false) = [] // restrict(d, false) = []
// //
// it is already assumed that the restriction takes place witin a branch // it is already assumed that the restriction takes place within a branch
// so the condition is not added explicitly but propagated down in order to eliminate // so the condition is not added explicitly but propagated down in order to eliminate
// infeasible cases // infeasible cases
expr_ref seq_rewriter::mk_antimirov_deriv_restrict(expr* e, expr* d, expr* cond) { expr_ref seq_rewriter::mk_antimirov_deriv_restrict(expr* e, expr* d, expr* cond) {
@ -3717,7 +3717,7 @@ expr_ref seq_rewriter::mk_regex_concat(expr* r, expr* s) {
result = re().mk_plus(re().mk_full_char(ele_sort)); result = re().mk_plus(re().mk_full_char(ele_sort));
else if (re().is_concat(r, r1, r2)) else if (re().is_concat(r, r1, r2))
// create the resulting concatenation in right-associative form except for the following case // create the resulting concatenation in right-associative form except for the following case
// TODO: maintain the followig invariant for A ++ B{m,n} + C // TODO: maintain the following invariant for A ++ B{m,n} + C
// concat(concat(A, B{m,n}), C) (if A != () and C != ()) // concat(concat(A, B{m,n}), C) (if A != () and C != ())
// concat(B{m,n}, C) (if A == () and C != ()) // concat(B{m,n}, C) (if A == () and C != ())
// where A, B, C are regexes // where A, B, C are regexes
@ -3725,11 +3725,11 @@ expr_ref seq_rewriter::mk_regex_concat(expr* r, expr* s) {
// In other words, do not make A ++ B{m,n} into right-assoc form, but keep B{m,n} at the top // In other words, do not make A ++ B{m,n} into right-assoc form, but keep B{m,n} at the top
// This will help to identify this situation in the merge routine: // This will help to identify this situation in the merge routine:
// concat(concat(A, B{0,m}), C) | concat(concat(A, B{0,n}), C) // concat(concat(A, B{0,m}), C) | concat(concat(A, B{0,n}), C)
// simplies to // simplifies to
// concat(concat(A, B{0,max(m,n)}), C) // concat(concat(A, B{0,max(m,n)}), C)
// analogously: // analogously:
// concat(concat(A, B{0,m}), C) & concat(concat(A, B{0,n}), C) // concat(concat(A, B{0,m}), C) & concat(concat(A, B{0,n}), C)
// simplies to // simplifies to
// concat(concat(A, B{0,min(m,n)}), C) // concat(concat(A, B{0,min(m,n)}), C)
result = mk_regex_concat(r1, mk_regex_concat(r2, s)); result = mk_regex_concat(r1, mk_regex_concat(r2, s));
else { else {
@ -3850,12 +3850,12 @@ bool seq_rewriter::pred_implies(expr* a, expr* b) {
Utility function to decide if two BDDs (nested if-then-else terms) Utility function to decide if two BDDs (nested if-then-else terms)
have exactly the same structure and conditions. have exactly the same structure and conditions.
*/ */
bool seq_rewriter::ite_bdds_compatabile(expr* a, expr* b) { bool seq_rewriter::ite_bdds_compatible(expr* a, expr* b) {
expr* ca = nullptr, *a1 = nullptr, *a2 = nullptr; expr* ca = nullptr, *a1 = nullptr, *a2 = nullptr;
expr* cb = nullptr, *b1 = nullptr, *b2 = nullptr; expr* cb = nullptr, *b1 = nullptr, *b2 = nullptr;
if (m().is_ite(a, ca, a1, a2) && m().is_ite(b, cb, b1, b2)) { if (m().is_ite(a, ca, a1, a2) && m().is_ite(b, cb, b1, b2)) {
return (ca == cb) && ite_bdds_compatabile(a1, b1) return (ca == cb) && ite_bdds_compatible(a1, b1)
&& ite_bdds_compatabile(a2, b2); && ite_bdds_compatible(a2, b2);
} }
else if (m().is_ite(a) || m().is_ite(b)) { else if (m().is_ite(a) || m().is_ite(b)) {
return false; return false;
@ -3915,7 +3915,7 @@ expr_ref seq_rewriter::mk_der_op_rec(decl_kind k, expr* a, expr* b) {
// sophisticated: in an antimirov union of n terms, we really // sophisticated: in an antimirov union of n terms, we really
// want to check if any pair of them is compatible. // want to check if any pair of them is compatible.
else if (m().is_ite(a) && m().is_ite(b) && else if (m().is_ite(a) && m().is_ite(b) &&
!ite_bdds_compatabile(a, b)) { !ite_bdds_compatible(a, b)) {
k = _OP_RE_ANTIMIROV_UNION; k = _OP_RE_ANTIMIROV_UNION;
} }
#endif #endif
@ -4269,7 +4269,7 @@ expr_ref seq_rewriter::mk_derivative_rec(expr* ele, expr* r) {
} }
else if (re().is_reverse(r, r1)) { else if (re().is_reverse(r, r1)) {
if (re().is_to_re(r1, r2)) { if (re().is_to_re(r1, r2)) {
// First try to exctract hd and tl such that r = hd ++ tl and |tl|=1 // First try to extract hd and tl such that r = hd ++ tl and |tl|=1
expr_ref hd(m()), tl(m()); expr_ref hd(m()), tl(m());
if (get_head_tail_reversed(r2, hd, tl)) { if (get_head_tail_reversed(r2, hd, tl)) {
// Use mk_der_cond to normalize // Use mk_der_cond to normalize

View file

@ -201,7 +201,7 @@ class seq_rewriter {
expr_ref mk_der_compl(expr* a); expr_ref mk_der_compl(expr* a);
expr_ref mk_der_cond(expr* cond, expr* ele, sort* seq_sort); expr_ref mk_der_cond(expr* cond, expr* ele, sort* seq_sort);
expr_ref mk_der_antimirov_union(expr* r1, expr* r2); expr_ref mk_der_antimirov_union(expr* r1, expr* r2);
bool ite_bdds_compatabile(expr* a, expr* b); bool ite_bdds_compatible(expr* a, expr* b);
/* if r has the form deriv(en..deriv(e1,to_re(s))..) returns 's = [e1..en]' else returns '() in r'*/ /* if r has the form deriv(en..deriv(e1,to_re(s))..) returns 's = [e1..en]' else returns '() in r'*/
expr_ref is_nullable_symbolic_regex(expr* r, sort* seq_sort); expr_ref is_nullable_symbolic_regex(expr* r, sort* seq_sort);
#ifdef Z3DEBUG #ifdef Z3DEBUG

View file

@ -8,7 +8,7 @@ Module Name:
Abstract: Abstract:
Skolem function support for sequences. Skolem function support for sequences.
Skolem functions are auxiliary funcions useful for axiomatizing sequence Skolem functions are auxiliary functions useful for axiomatizing sequence
operations. operations.
Author: Author:

View file

@ -196,7 +196,7 @@ namespace opt {
} }
unsigned lns::improve_linear(model_ref& mdl) { unsigned lns::improve_linear(model_ref& mdl) {
scoped_bounding _scoped_bouding(*this); scoped_bounding _scoped_bounding(*this);
unsigned num_improved = 0; unsigned num_improved = 0;
unsigned max_conflicts = m_max_conflicts; unsigned max_conflicts = m_max_conflicts;
while (m.inc()) { while (m.inc()) {

View file

@ -674,7 +674,7 @@ namespace mbp {
id = mbo.add_var(r, a.is_int(v)); id = mbo.add_var(r, a.is_int(v));
tids.insert(v, id); tids.insert(v, id);
} }
CTRACE("qe", kv.m_value.is_zero(), tout << mk_pp(v, m) << " has coefficeint 0\n";); CTRACE("qe", kv.m_value.is_zero(), tout << mk_pp(v, m) << " has coefficient 0\n";);
if (!kv.m_value.is_zero()) { if (!kv.m_value.is_zero()) {
coeffs.push_back(var(id, kv.m_value)); coeffs.push_back(var(id, kv.m_value));
} }

View file

@ -248,7 +248,7 @@ namespace mbp {
return false; return false;
} }
// returns `true` if a rewritting happened // returns `true` if a rewriting happened
bool try_int_mul_solve(expr *atom, bool is_pos, expr_ref &res) { bool try_int_mul_solve(expr *atom, bool is_pos, expr_ref &res) {
if (!is_pos) if (!is_pos)

View file

@ -157,8 +157,8 @@ namespace qe {
// //
// Partition variables into buckets. // Partition variables into buckets.
// The var_paritions buckets covering disjoint subsets of // The var_partitions buckets covering disjoint subsets of
// the conjuncts. The remaining variables in vars are non-partioned. // the conjuncts. The remaining variables in vars are non-partitioned.
// //
bool partition_vars( bool partition_vars(
unsigned num_vars, unsigned num_vars,

View file

@ -416,7 +416,7 @@ public:
//don't use mbp_qel on some theories where model evaluation is //don't use mbp_qel on some theories where model evaluation is
//incomplete This is not a limitation of qel. Fix this either by //incomplete This is not a limitation of qel. Fix this either by
//making mbp choices less dependent on the model evaluation methods //making mbp choices less dependent on the model evaluation methods
//or fix theory rewriters to make terms evalution complete //or fix theory rewriters to make terms evaluation complete
if (m_use_qel && !has_unsupported_th(fmls)) { if (m_use_qel && !has_unsupported_th(fmls)) {
bool dsub = m_dont_sub; bool dsub = m_dont_sub;
m_dont_sub = !force_elim; m_dont_sub = !force_elim;

View file

@ -1830,7 +1830,7 @@ namespace smt {
// Case) there is a variable old_v in the var-list of n. // Case) there is a variable old_v in the var-list of n.
// //
// Remark: This variable was moved to the var-list of n due to a add_eq. // Remark: This variable was moved to the var-list of n due to a add_eq.
SASSERT(th->get_enode(old_v) != n); // this varialbe is not owned by n SASSERT(th->get_enode(old_v) != n); // this variable is not owned by n
SASSERT(n->get_root()->get_th_var(th_id) != null_theory_var); // the root has also a variable in its var-list. SASSERT(n->get_root()->get_th_var(th_id) != null_theory_var); // the root has also a variable in its var-list.
n->replace_th_var(v, th_id); n->replace_th_var(v, th_id);
push_trail(replace_th_var_trail( n, th_id, old_v)); push_trail(replace_th_var_trail( n, th_id, old_v));

View file

@ -503,7 +503,7 @@ namespace smt {
theory_var x_i = r.get_base_var(); theory_var x_i = r.get_base_var();
SASSERT(is_int(x_i)); SASSERT(is_int(x_i));
// The following assertion is wrong. It may be violated in mixed-real-interger problems. // The following assertion is wrong. It may be violated in mixed-real-integer problems.
// The check is_gomory_cut_target will discard rows where any variable contains infinitesimals. // The check is_gomory_cut_target will discard rows where any variable contains infinitesimals.
// SASSERT(m_value[x_i].is_rational()); // infinitesimals are not used for integer variables // SASSERT(m_value[x_i].is_rational()); // infinitesimals are not used for integer variables
SASSERT(!m_value[x_i].is_int()); // the base variable is not assigned to an integer value. SASSERT(!m_value[x_i].is_int()); // the base variable is not assigned to an integer value.

View file

@ -11,7 +11,7 @@ Author:
Revision History: Revision History:
The implementaton is derived from theory_diff_logic. The implementation is derived from theory_diff_logic.
--*/ --*/
#include "smt/theory_utvpi.h" #include "smt/theory_utvpi.h"

View file

@ -905,10 +905,10 @@ public:
void collect_param_descrs(param_descrs & r) override { void collect_param_descrs(param_descrs & r) override {
insert_max_memory(r); insert_max_memory(r);
r.insert("common_patterns", CPK_BOOL, "minimize the number of auxiliary variables during CNF encoding by identifing commonly used patterns", "true"); r.insert("common_patterns", CPK_BOOL, "minimize the number of auxiliary variables during CNF encoding by identifying commonly used patterns", "true");
r.insert("distributivity", CPK_BOOL, "minimize the number of auxiliary variables during CNF encoding by applying distributivity over unshared subformulas", "true"); r.insert("distributivity", CPK_BOOL, "minimize the number of auxiliary variables during CNF encoding by applying distributivity over unshared subformulas", "true");
r.insert("distributivity_blowup", CPK_UINT, "maximum overhead for applying distributivity during CNF encoding", "32"); r.insert("distributivity_blowup", CPK_UINT, "maximum overhead for applying distributivity during CNF encoding", "32");
r.insert("ite_chaing", CPK_BOOL, "minimize the number of auxiliary variables during CNF encoding by identifing if-then-else chains", "true"); r.insert("ite_chaing", CPK_BOOL, "minimize the number of auxiliary variables during CNF encoding by identifying if-then-else chains", "true");
r.insert("ite_extra", CPK_BOOL, "add redundant clauses (that improve unit propagation) when encoding if-then-else formulas", "true"); r.insert("ite_extra", CPK_BOOL, "add redundant clauses (that improve unit propagation) when encoding if-then-else formulas", "true");
} }

View file

@ -64,7 +64,7 @@ public:
} }
/** /**
* size(), [](), update() and inconsisent() implement the abstract interface of dependent_expr_state * size(), [](), update() and inconsistent() implement the abstract interface of dependent_expr_state
*/ */
unsigned qtail() const override { return m_goal->size(); } unsigned qtail() const override { return m_goal->size(); }

View file

@ -433,7 +433,7 @@ namespace smtfd {
void populate_model(model_ref& mdl, expr_ref_vector const& terms); void populate_model(model_ref& mdl, expr_ref_vector const& terms);
/** /**
* \brief check consistency properties that can only be achived using a global analysis of terms * \brief check consistency properties that can only be achieved using a global analysis of terms
*/ */
void global_check(expr_ref_vector const& core); void global_check(expr_ref_vector const& core);

View file

@ -37,7 +37,7 @@ public:
} }
proof_ref operator()(ast_manager & m, unsigned num_source, proof * const * source) override { proof_ref operator()(ast_manager & m, unsigned num_source, proof * const * source) override {
// ignore the proofs from the arguments, instead obtain the proofs fromt he subgoals. // ignore the proofs from the arguments, instead obtain the proofs from the subgoals.
SASSERT(num_source == 0); SASSERT(num_source == 0);
proof_converter_ref_buffer pc_buffer; proof_converter_ref_buffer pc_buffer;
for (goal_ref g : m_goals) { for (goal_ref g : m_goals) {

View file

@ -18,7 +18,7 @@ Tactic Documentation
## Tactic quasi-macro-finder ## Tactic quasi-macro-finder
### Short Description ### Short Description
dentifies and applies quasi-macros. Identifies and applies quasi-macros.
### Long Description ### Long Description

View file

@ -343,7 +343,7 @@ namespace lp {
solver->add_constraint(&c); solver->add_constraint(&c);
} }
void create_equality_contraint_for_var(column* col, bound * b, lar_solver *solver) { void create_equality_constraint_for_var(column* col, bound * b, lar_solver *solver) {
lar_constraint c(EQ, b->m_fixed_value); lar_constraint c(EQ, b->m_fixed_value);
var_index i = solver->add_var(col->m_name); var_index i = solver->add_var(col->m_name);
c.add_variable_to_constraint(i, numeric_traits<T>::one()); c.add_variable_to_constraint(i, numeric_traits<T>::one());
@ -366,7 +366,7 @@ namespace lp {
create_upper_constraint_for_var(col, b, solver); create_upper_constraint_for_var(col, b, solver);
} }
if (b->m_value_is_fixed) { if (b->m_value_is_fixed) {
create_equality_contraint_for_var(col, b, solver); create_equality_constraint_for_var(col, b, solver);
} }
} }
} }

View file

@ -322,7 +322,7 @@ void tst_scoped() {
#define NUM_PRIMES 168 #define NUM_PRIMES 168
unsigned g_primes[NUM_PRIMES] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997 }; unsigned g_primes[NUM_PRIMES] = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997 };
// Return a big number by multipling powers of the first NUM_PRIMES. // Return a big number by multiplying powers of the first NUM_PRIMES.
// - ratio: rand() % ratio == 0 is used to decide whether a specific prime will be included or not. // - ratio: rand() % ratio == 0 is used to decide whether a specific prime will be included or not.
// - max_pw: if condition above is satisfied, then we use (rand() % max_pw) + 1 as the power. // - max_pw: if condition above is satisfied, then we use (rand() % max_pw) + 1 as the power.
void mk_big_num(unsynch_mpz_manager & m, unsigned ratio, unsigned max_pw, mpz & r) { void mk_big_num(unsynch_mpz_manager & m, unsigned ratio, unsigned max_pw, mpz & r) {