[−][src]Struct varisat::variables::Variables
Variable mapping and metadata.
Fields
global_from_user: VarBiMap
Bidirectional mapping from user variables to global variables.
Initially this is the identity mapping. This ensures that in the non-assumptions setting the map from used user variables to global variables is the identity. This is a requirement for generating proofs in non-native formats. Those proofs are not aware of variable renaming, but are restricted to the non-incremental setting, so this works out.
This is also requried for native proofs, as they assume that the mapping during the initial load is the identity.
solver_from_global: VarBiMap
Bidirectional mapping from global variables to user variables.
This starts with the empty mapping, so only used variables are allocated.
user_freelist: HashSet<Var>
User variables that were explicitly hidden by the user.
global_freelist: HashSet<Var>
Global variables that can be recycled without increasing the global_watermark.
solver_freelist: HashSet<Var>
Solver variables that are unused and can be recycled.
var_data: Vec<VarData>
Variable metadata.
Indexed by global variable indices.
Methods
impl Variables
[src]
pub fn solver_watermark(&self) -> usize
[src]
Number of allocated solver variables.
pub fn global_watermark(&self) -> usize
[src]
Number of allocated global variables.
pub fn user_watermark(&self) -> usize
[src]
Number of allocated global variables.
pub fn user_var_iter<'a>(&'a self) -> impl Iterator<Item = Var> + 'a
[src]
Iterator over all user variables that are in use.
pub fn global_var_iter<'a>(&'a self) -> impl Iterator<Item = Var> + 'a
[src]
Iterator over all global variables that are in use.
pub fn global_from_user(&self) -> &VarMap
[src]
The user to global mapping.
pub fn global_from_user_mut(&mut self) -> VarBiMapMut
[src]
Mutable user to global mapping.
pub fn solver_from_global(&self) -> &VarMap
[src]
The global to solver mapping.
pub fn solver_from_global_mut(&mut self) -> VarBiMapMut
[src]
Mutable global to solver mapping.
pub fn user_from_global(&self) -> &VarMap
[src]
The global to user mapping.
pub fn user_from_global_mut(&mut self) -> VarBiMapMut
[src]
Mutable global to user mapping.
pub fn global_from_solver(&self) -> &VarMap
[src]
The solver to global mapping.
pub fn global_from_solver_mut(&mut self) -> VarBiMapMut
[src]
Mutable solver to global mapping.
pub fn existing_solver_from_user(&self, user: Var) -> Var
[src]
Get an existing solver var for a user var.
pub fn existing_user_from_solver(&self, solver: Var) -> Var
[src]
Get an existing user var from a solver var.
pub fn var_data_global_mut(&mut self, global: Var) -> &mut VarData
[src]
Mutable reference to the var data for a global variable.
pub fn var_data_solver_mut(&mut self, solver: Var) -> &mut VarData
[src]
Mutable reference to the var data for a solver variable.
pub fn var_data_global(&self, global: Var) -> &VarData
[src]
Var data for a global variable.
pub fn solver_var_present(&self, solver: Var) -> bool
[src]
Check if a solver var is mapped to a global var
pub fn next_unmapped_global(&self) -> Var
[src]
Get an unmapped global variable.
pub fn next_unmapped_solver(&self) -> Var
[src]
Get an unmapped global variable.
pub fn next_unmapped_user(&self) -> Var
[src]
Get an unmapped user variable.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<Reference, Outer, OuterFieldType, Inner> HasPart<Nested<Outer, Inner>> for Reference where
Inner: Part,
Outer: Part<PartType = Field<OuterFieldType>>,
OuterFieldType: HasPart<Inner, RawTarget = OuterFieldType> + PartialRefTarget + ?Sized,
Reference: HasPart<Outer> + ?Sized,
Inner: Part,
Outer: Part<PartType = Field<OuterFieldType>>,
OuterFieldType: HasPart<Inner, RawTarget = OuterFieldType> + PartialRefTarget + ?Sized,
Reference: HasPart<Outer> + ?Sized,
unsafe fn part_ptr(
ptr: *const <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::Ptr
ptr: *const <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::Ptr
unsafe fn part_ptr_mut(
ptr: *mut <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::PtrMut
ptr: *mut <Reference as PartialRefTarget>::RawTarget
) -> <<Inner as Part>::PartType as PartType>::PtrMut