Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chyanju/picus
/ functions
Functions
4,080 in github.com/chyanju/picus
⨍
Functions
4,080
◇
Types & classes
283
↓ 5 callers
Method
pow_mod
Compute `self^exp mod modulus` using square-and-multiply.
crates/picus-solver/src/ff/univariate.rs:214
↓ 5 callers
Function
pr_xy
()
crates/picus-solver/src/gb/homog_ring_tests.rs:5
↓ 5 callers
Function
print_section
(title: &str)
crates/picus-cli/src/main.rs:450
↓ 5 callers
Function
read_r1cs_file
Read an R1CS binary file from a file path.
crates/picus-r1cs/src/parser.rs:185
↓ 5 callers
Function
record_dispatched
(name: &'static str)
crates/picus-solver/src/gb/ideal/engine.rs:193
↓ 5 callers
Method
reduce_by_refs_geobucket_indexed
Reduce against a divisor set using a **prebuilt** [`ReducerIndex`] (the geobucket reducer's degree-order + DivMask-bucket lookup structure, owned so i
crates/picus-core/src/ff/polynomial/dense_reduce.rs:417
↓ 5 callers
Method
reduce_with_cancel
Cancel-aware reduce. On cancel returns whatever partial remainder the geobucket reducer had accumulated — sound (still represents the same residue cla
crates/picus-solver/src/gb/ideal.rs:174
↓ 5 callers
Function
set
Replace the thread's config. The previous value is discarded; prefer [`ConfigGuard`] for scoped overrides.
crates/picus-core/src/config.rs:413
↓ 5 callers
Method
set_logic
Set the logic for this solver (e.g. , ).
crates/cvc5-ff/src/solver.rs:191
↓ 5 callers
Function
sexpr_to_string
Recursively format `s` back to SMT-LIB source. Used by `parse_boolean_multi` to rebuild per-prime subset queries.
crates/picus-solver/src/smt2/mod.rs:1465
↓ 5 callers
Method
solve
(&self)
crates/picus-solver/tests/common/mod.rs:124
↓ 5 callers
Function
solve_boolean_query
Solve a [`BooleanQuery`]. Default path: CDCL(T) over the original formula via [`crate::cdclt::solve_formula`]. The DNF-enumeration path is retained a
crates/picus-solver/src/boolean.rs:397
↓ 5 callers
Function
split_gb_cancel_traced
( poly_ring: &'r FfPolyRing, generator_sets: Vec<Vec<Poly>>, initial_deps: Vec<Vec<BTreeSet<usize>
crates/picus-solver/src/split_gb/fixpoint.rs:276
↓ 5 callers
Function
strip_named_annotation
If `s` matches `(! inner :named NAME [other :attr value ...])`, return `(inner, Some(NAME))`. The annotation may carry additional `:key value` pairs t
crates/picus-solver/src/smt2/session.rs:534
↓ 5 callers
Method
sub_scaled
Subtract `neg_coeff * x^mul_exps * divisor` from the geobucket. Internally materializes the scaled polynomial then routes via `add_poly`.
crates/picus-core/src/ff/geobucket.rs:151
↓ 5 callers
Function
sym_system
A small nonlinear system over GF(7) whose Buchberger run does real work (S-pairs + reductions), built through the facade.
crates/picus-solver/src/gb/ideal/engine_tests.rs:457
↓ 5 callers
Function
symbolic_preprocess
Symbolic preprocessing: given the S-polys, iteratively add reducer rows for every monomial divisible by some active basis LT. Returns: - The combined
crates/picus-solver/src/ff/f4/mod.rs:419
↓ 5 callers
Function
terms_ref_map
Reference coefficient map: fold the raw terms (sum duplicates, drop zeros) mod PRIME.
crates/picus-solver/src/ff/repr_oracle.rs:249
↓ 5 callers
Function
trivial_r1cs
Build a minimal R1CS with a single trivial `1 * 1 = 1` constraint over GF(`p`) with `n_wires` wires, the given `inputs` and `outputs`. Used as scaffol
crates/picus-analysis/src/dpvl_tests.rs:350
↓ 5 callers
Function
validate_combination
Check if a solver+theory combination is valid.
crates/picus-smt/src/lib.rs:103
↓ 5 callers
Method
zero
()
crates/picus-solver/src/ff/univariate.rs:24
↓ 4 callers
Method
add_theory_lemma_with_trail
Add a theory-supplied lemma clause. All literals must currently be False. Sorts by descending decision level, computes the assertion level (largest li
crates/picus-solver/src/sat/solver.rs:529
↓ 4 callers
Function
apply_theory_conflict
Turn an atom-core into a SAT lemma and apply it. On success returns `Some(trail_len_before_asserting)` (the position the lemma's asserting literal sit
crates/picus-solver/src/cdclt/orchestrator.rs:358
↓ 4 callers
Function
assert_cdclt_dnf_agree
(src: &str)
crates/picus-solver/src/boolean_tests.rs:127
↓ 4 callers
Function
assert_fglm_matches
FGLM-converted Lex GB must equal the directly-computed Lex GB (reduced GBs are unique up to ordering + monic normalisation).
crates/picus-solver/src/gb/fglm_tests.rs:61
↓ 4 callers
Function
assert_gb_characterisation
( label: &str, prime: u64, gens_fn: &dyn Fn(&Arc<PolyRing>) -> Vec<DensePoly>, )
crates/picus-solver/src/ff/buchberger/tests.rs:1120
↓ 4 callers
Function
assert_ideals_equal_dense
Mutual-ideal-membership over Dense polys: every element of `a` reduces to zero modulo `b` AND vice versa. Stronger than LT-set equality; pins ideal eq
crates/picus-solver/src/ff/f4/tests.rs:1742
↓ 4 callers
Function
binom_sat
Binomial coefficient `C(m, r)` as `i128`, saturating on overflow. Iterates over `min(r, m − r)` terms via the integer recurrence `C(m, i+1) = C(m, i)
crates/picus-solver/src/ff/hilbert.rs:375
↓ 4 callers
Function
bitsum_aux_index
Ring index of the auxiliary variable for the `bitsum_i`-th bitsum, given the user-variable count and the disequality count. Single source of the encod
crates/picus-solver/src/frontend/encoder.rs:103
↓ 4 callers
Function
bn128_field
BN128 / BN254 scalar field prime (~2^254). Used as a real ZK use case.
crates/picus-solver/src/split_gb/tests_hard.rs:53
↓ 4 callers
Method
bucket_is_empty
(&self, idx: usize)
crates/picus-core/src/ff/geobucket.rs:85
↓ 4 callers
Function
build_consistent_3v
Build a small consistent system on a freshly-built ring (sparse).
crates/picus-solver/src/ff/sparse_gb_tests.rs:785
↓ 4 callers
Function
build_partitions
Build the default two-partition split-GB generator sets and their per-generator provenance. - basis 0 (linear): the bitsum definition polys, then
crates/picus-solver/src/split_gb/mod.rs:109
↓ 4 callers
Method
cancelled
(&self)
crates/picus-solver/src/ff/sparse_gb.rs:148
↓ 4 callers
Function
canon_sparse
Canonical sort key: sparse polys → ordered, monic, sorted-by-LT-desc form.
crates/picus-solver/src/ff/sparse_gb_tests.rs:269
↓ 4 callers
Function
check
(cancel: Option<&CancelToken>)
crates/picus-solver/src/ff/buchberger/gvw.rs:51
↓ 4 callers
Method
check_sat
(&mut self)
crates/picus-solver/src/smt2/session.rs:355
↓ 4 callers
Method
check_with_cancel
Solve the current fact set with cooperative cancellation.
crates/picus-solver/src/gb/incremental.rs:105
↓ 4 callers
Method
cmp_dense
(&self, a: &[u16], b: &[u16])
crates/picus-core/src/ff/matrix_order.rs:113
↓ 4 callers
Method
collect_terms_idx
Each term as `(coeff, sorted nonzero (var, exp) pairs)` — the representation-native read the IR lowering / SMT backends use.
crates/picus-core/src/ff/polynomial.rs:338
↓ 4 callers
Method
compute
( &self, _pr: &FfPolyRing, _gens: Vec<Poly>, _cancel: &CancelToken, _o
crates/picus-solver/src/gb/ideal/engine_tests.rs:386
↓ 4 callers
Function
compute_gb_direct
Raw *direct* Gröbner basis (plain Buchberger, no strategy dispatch) on `poly_ring`, routed to the sparse or dense engine per the active representation
crates/picus-solver/src/gb/ideal/engine.rs:424
↓ 4 callers
Method
compute_tier1
Tier 1: atom polynomial fully reduces under `pinned`; derive its truth from the constant result. Reason = pinning sources.
crates/picus-solver/src/cdclt/ff_theory.rs:86
↓ 4 callers
Method
constraint_to_string
(&self, id: usize)
crates/picus-r1cs/src/grammar.rs:70
↓ 4 callers
Method
create_monomial
Build a monomial from an exponent slice. Exponents are cast from `usize` down to `u16`.
crates/picus-core/src/poly.rs:143
↓ 4 callers
Function
dense_f4_reduced_gb
Helper: compute the reduced dense GB via the F4-lite path; lift to sparse.
crates/picus-solver/src/ff/sparse_gb_tests.rs:816
↓ 4 callers
Function
detect_bit_constraint
Match `b·(b - 1) = 0` on an [`PolyTerm`] list. The list is expected to already be normalised by `rewrite_system`, so `b^2` lives as `[(b_idx, 2)]` and
crates/picus-solver/src/frontend/encoder/bitsum_extract.rs:131
↓ 4 callers
Method
div_rem
Polynomial long division: returns `(q, r)` such that `self = q * other + r` with `deg(r) < deg(other)`. Panics if `other` is zero.
crates/picus-solver/src/ff/univariate.rs:136
↓ 4 callers
Method
encode
Encode this `PolyIR` into an [`EncodedSystem`] ready for the GB engine. Internally builds a `ConstraintSystem` via [`Self::to_constraint_system`] and
crates/picus-smt/src/backends/native_lower.rs:179
↓ 4 callers
Function
encode_eq_and_diseq
Build a real `EncodedSystem` with one equality (`x - 5 = 0`) and one disequality (`x != 0`) so its provenance carries an `Equality(_)` and a `Rabinowi
crates/picus-solver/src/cdclt/ff_theory_tests.rs:856
↓ 4 callers
Method
enter_expansion
Enter one macro expansion; errors if the recursion is too deep (a recursive `define-fun`, which SMT-LIB forbids). Pair with [`ParseCtx::exit_expansion
crates/picus-solver/src/smt2/mod.rs:622
↓ 4 callers
Method
eq
(&self, other: &Self)
crates/picus-core/src/ff/field.rs:185
↓ 4 callers
Method
explain
Cached reason for an atom returned by the most recent `propagate()`. Empty result on cache miss is treated as a contract violation by `enqueue_theory`
crates/picus-solver/src/cdclt/ff_theory.rs:407
↓ 4 callers
Method
exps
(&mut self)
crates/picus-core/src/ff/matrix_order_tests.rs:21
↓ 4 callers
Function
field_reduce
(x: &BigUint, prime: &BigUint)
crates/picus-r1cs/src/lib.rs:25
↓ 4 callers
Function
find_zero_cancel
Cancel-aware model search.
crates/picus-solver/src/gb/model.rs:51
↓ 4 callers
Function
gb_hashes
(pr: &FfPolyRing, gens: Vec<crate::poly::Poly>, order: FfOrder)
crates/picus-solver/src/gb/ideal/engine_tests.rs:468
↓ 4 callers
Method
gcd
Component-wise minimum: the GCD in monomial-land.
crates/picus-core/src/ff/monomial.rs:151
↓ 4 callers
Method
generate_pairs_against
(&mut self, new_idx: usize, new_lt: &Monomial, new_sugar: u32)
crates/picus-solver/src/ff/buchberger/mod.rs:523
↓ 4 callers
Function
groebner_basis_gvw
Compute a Gröbner basis of `generators` in `order` via GVW. The result is a (not necessarily reduced) GB; the caller interreduces.
crates/picus-solver/src/ff/buchberger/gvw.rs:134
↓ 4 callers
Function
interreduce_with_cancel
Inter-reduce with cooperative cancellation. Returns the partially-reduced basis (still valid generators, just not yet inter-reduced) on cancel.
crates/picus-solver/src/ff/buchberger/mod.rs:183
↓ 4 callers
Method
into_lit_neg
Same as `into_lit_pos` but with negative polarity (disequality).
crates/picus-solver/src/cdclt/atoms.rs:359
↓ 4 callers
Method
into_lit_pos
Convert into a Lit assuming polarity-positive interpretation. Returns `Some(Lit::pos(v))` for a real atom; `None` for a trivially-true atom (caller mu
crates/picus-solver/src/cdclt/atoms.rs:351
↓ 4 callers
Method
lcm
Component-wise maximum: the LCM in monomial-land.
crates/picus-core/src/ff/monomial.rs:138
↓ 4 callers
Function
median_times
(polys: &[Polynomial], ring: &Arc<PolyRing>, use_f4: bool)
crates/picus-solver/tests/bench_perf.rs:485
↓ 4 callers
Method
mul_t_pow_assign
Multiply in place by `t^d` (shift coefficients up by `d`).
crates/picus-solver/src/ff/hilbert.rs:117
↓ 4 callers
Function
native_ff_config
()
crates/picus-analysis/tests/soundness.rs:48
↓ 4 callers
Method
neg_owned
(&self, mut a: FieldElem)
crates/picus-core/src/ff/field.rs:534
↓ 4 callers
Method
negate
(self)
crates/picus-solver/src/sat/lit.rs:107
↓ 4 callers
Method
negate_in_place
Negate every coefficient in place.
crates/picus-core/src/ff/polynomial.rs:671
↓ 4 callers
Method
new_aux
Allocate a fresh auxiliary SAT variable that has no associated atom (used by Tseitin transformations).
crates/picus-solver/src/cdclt/atoms.rs:250
↓ 4 callers
Method
on_new_poly
(&mut self, _idx: usize, _poly: &DensePoly, _from_pair: (usize, usize))
crates/picus-solver/src/ff/buchberger/mod.rs:95
↓ 4 callers
Method
on_pair_reducers
Called immediately before [`on_new_poly`] to report the active-basis indices that contributed to reducing the S-polynomial to its normal form. Observe
crates/picus-solver/src/ff/buchberger/mod.rs:94
↓ 4 callers
Function
out_of_range_eq_sys
`var_names = ["x"]` but the single equality references var index 5. `compact_used_vars` collects `{5}` whose count equals `var_names.len()`, so it ear
crates/picus-solver/src/incremental_context_tests.rs:923
↓ 4 callers
Function
parse_var_index
(name: &str)
crates/picus-r1cs/src/lib.rs:32
↓ 4 callers
Method
pick_decision
Pop the highest-activity Undef variable from the heap, applying the saved phase (positive when none was saved).
crates/picus-solver/src/sat/solver.rs:795
↓ 4 callers
Function
poly
(ring: &Arc<PolyRing>, terms: &[(Vec<u16>, i64)])
crates/picus-solver/src/ff/buchberger/tests.rs:280
↓ 4 callers
Function
poly_to_smtlib_ff
(ir: &PolyIR, poly: &picus_core::poly::IrPoly)
crates/picus-smt/src/backends/mod.rs:176
↓ 4 callers
Function
poly_to_smtlib_nia
(ir: &PolyIR, poly: &picus_core::poly::IrPoly)
crates/picus-smt/src/backends/mod.rs:152
↓ 4 callers
Function
poly_to_sparse_row
Convert a polynomial to sparse row form (column-ascending). The polynomial's terms are stored in monomial-DESCENDING order and columns are assigned wi
crates/picus-solver/src/ff/f4/matrix.rs:62
↓ 4 callers
Function
pool
(items: &[usize])
crates/picus-analysis/src/selector_tests.rs:21
↓ 4 callers
Function
pr_xy
(p: u32)
crates/picus-solver/src/gb/gb_homog_tests.rs:25
↓ 4 callers
Method
pre_eliminate_linear
Linear (Gaussian) pre-elimination — the in-tree analogue of cvc5's `theory/ff/gauss.cpp`. Computes a Gröbner basis of the linear equality subsystem (f
crates/picus-smt/src/backends/native_lower.rs:40
↓ 4 callers
Method
process_pair_geobucket
Per-pair S-poly construction + geobucket reduction. Shared with `run()` so `run_f4` can fall back to it for batches below [`F4_MIN_BATCH`], where the
crates/picus-solver/src/ff/buchberger/mod.rs:1078
↓ 4 callers
Function
product_pair
If `poly` has exactly one product monomial and it is a product of two distinct degree-1 variables (no squares, no higher degree), return that variable
crates/picus-analysis/src/propagation/basis2/compconstant.rs:166
↓ 4 callers
Method
reduce_by_refs_cancel
Cancel-aware variant of [`Self::reduce_by_refs`]. On cancel, returns the partial remainder accumulated so far — sound (same residue class) but not nec
crates/picus-core/src/ff/polynomial/dense_reduce.rs:39
↓ 4 callers
Method
reduce_by_refs_counted_cancel
Variant of [`Self::reduce_by_refs_cancel`] that also records, in `use_counts`, how many times each divisor was selected as the reducer during this cal
crates/picus-core/src/ff/polynomial/dense_reduce.rs:55
↓ 4 callers
Function
ref_mul
(a: &[u16], b: &[u16])
crates/picus-solver/src/ff/repr_oracle.rs:62
↓ 4 callers
Function
resync_after_lemma
Resync after a lemma forced a backjump: rewind the theory trail to the new decision level and rewind `notified` so the next pass re-notifies from the
crates/picus-solver/src/cdclt/orchestrator.rs:423
↓ 4 callers
Function
rewrite_system
Normalize every equality in a [`ConstraintSystem`]. Equalities whose term list collapses to empty are dropped.
crates/picus-solver/src/frontend/rewriter.rs:78
↓ 4 callers
Method
run_f4
(&mut self, observer: &mut O)
crates/picus-solver/src/ff/buchberger/mod.rs:1231
↓ 4 callers
Function
run_sparse_vs_dense_bank
Drive sparse_gb on each system, drive dense Buchberger on the dense lift, compare via mutual ideal-membership.
crates/picus-solver/src/ff/sparse_gb_tests.rs:600
↓ 4 callers
Function
s_polynomial
Monic-normalised S-polynomial of two nonzero polynomials: `(1/lc(f))·(L/lm(f))·f − (1/lc(g))·(L/lm(g))·g`, `L = lcm(lm(f), lm(g))`.
crates/picus-solver/src/ff/sparse_gb.rs:30
↓ 4 callers
Function
seeded_state
Seed a fresh `BuchbergerState` with `n` distinct single-variable generators x0..x_{n-1}. They are mutually coprime, so none deactivates another and al
crates/picus-solver/src/ff/buchberger/tests.rs:480
↓ 4 callers
Method
set_option
Set a solver option (e.g. `"produce-models"`, `"true"`).
crates/cvc5-ff/src/solver.rs:211
↓ 4 callers
Method
set_prime
Update the builder's prime in place. Used by long-lived builders (e.g. `SmtSession::builder`) whose prime is only known after a `define-sort` or first
crates/picus-solver/src/frontend/encoder/constraint_system.rs:115
↓ 4 callers
Function
solve_formula_multi
Multi-prime entry: solve a list of per-prime `(prime, var_names, formula)` triples against a single SAT solver and a [`FfTheoryRouter`]. Tseitin runs
crates/picus-solver/src/cdclt/orchestrator.rs:137
↓ 4 callers
Function
solve_single_gb
Single Groebner basis solver. Uses Buchberger observer hooks to trace which input polynomials contribute to an UNSAT proof.
crates/picus-solver/src/core.rs:127
↓ 4 callers
Method
sub_assign
Subtract `other` from `self` in place. Per-coefficient `i64::saturating_sub`.
crates/picus-solver/src/ff/hilbert.rs:106
↓ 4 callers
Method
to_boolean_query
Lower this `PolyIR` to a CDCL(T) [`BooleanQuery`] for the native solver's disjunction-aware path. The conjunctive constraints (`equalities`, `assignme
crates/picus-smt/src/backends/native_lower.rs:120
← previous
next →
501–600 of 4,080, ranked by callers