pub struct Program {Show 14 fields
pub vars: Vec<ProgVar>,
pub states: Vec<ProgState>,
pub conjuncts: Vec<Expr>,
pub before: Vec<(u32, u32)>,
pub dists: Vec<Dist>,
pub real_vars: Vec<ProgRealVar>,
pub real: RealProblem,
pub arrays: Vec<ProgArray>,
pub funcs: Vec<Func>,
pub softs: Vec<Soft>,
pub rand_handles: Vec<ProgHandle>,
pub blocks: Vec<ProgBlock>,
pub n_disables: usize,
pub disable_keys: Vec<SoftKey>,
}Expand description
One class template’s solver input, resolved to object-field locations.
Fields§
§vars: Vec<ProgVar>Random variables, indexed by the IR’s VarId.
states: Vec<ProgState>State variables, indexed by the IR’s StateId.
conjuncts: Vec<Expr>One-bit expressions that must all hold.
before: Vec<(u32, u32)>solve ... before edges (first, later) over Self::vars (LRM
18.5.9). Acyclic (the builder checks). An edge whose variable is
inactive (rand_mode(0)) is ignored for that call: it is a constant
then, and there is nothing to order.
dists: Vec<Dist>The dist constraints (LRM 18.5.3). Dist j’s hidden selector variable
appears in Self::conjuncts as Var(SELECTOR_BASE + j); it is not a
field and is numbered after the active variables for each call.
real_vars: Vec<ProgRealVar>The real/shortreal random variables, indexed by the real
problem’s variable ids (their own numbering, separate from
Self::vars).
real: RealProblemThe constraints over Self::real_vars (Task C9), solved after the
integral variables with the same PRNG stream.
arrays: Vec<ProgArray>The dynamic arrays and queues the constraints reach (Task C14), indexed
by the IR’s super::ir::ArrayId.
funcs: Vec<Func>The functions the constraints call (Task C13), indexed by the IR’s
super::ir::FuncId.
softs: Vec<Soft>The soft constraints (Task C15, LRM 18.5.13): soft k’s discard flag
appears in Self::conjuncts as Var(SOFT_BASE + k) (see
super::priority). Empty for a class with none.
rand_handles: Vec<ProgHandle>The rand class-handle members (Task C17): the objects a joint solve
reaches from an object of this class (super::joint).
blocks: Vec<ProgBlock>The named constraint blocks, by ordinal (Task C20): what
constraint_mode(0) takes out of the solve. Empty for a program that
did not come from a class (a fragment, a scope randomization).
n_disables: usizeHow many disable softs the program holds: the table
Soft::disabled_by indexes and BlockItems::disables ranges over.
disable_keys: Vec<SoftKey>The targets of an inline fragment’s disable softs (empty for a class
program), in the order of the last Self::n_disables entries: the
overlay discards the base softs they reach (LRM 18.5.13.2, 18.7).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Program
impl<'de> Deserialize<'de> for Program
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Program
impl StructuralPartialEq for Program
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnsafeUnpin for Program
impl UnwindSafe for Program
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.