pub struct State { /* private fields */ }
Expand description
A concrete State
.
Implementations§
source§impl State
impl State
sourcepub fn memory_mut(&mut self) -> &mut Memory
pub fn memory_mut(&mut self) -> &mut Memory
Retrieve a mutable reference to the Memory
associated with this
State
.
sourcepub fn set_scalar<S: Into<String>>(&mut self, name: S, value: Constant)
pub fn set_scalar<S: Into<String>>(&mut self, name: S, value: Constant)
Set the value of the given scalar to a concrete value.
sourcepub fn get_scalar(&self, name: &str) -> Option<&Constant>
pub fn get_scalar(&self, name: &str) -> Option<&Constant>
Get the concrete value of the given scalar.
sourcepub fn symbolize_expression(
&self,
expression: &Expression
) -> Result<Expression, Error>
pub fn symbolize_expression( &self, expression: &Expression ) -> Result<Expression, Error>
Symbolize an expression, replacing all scalars with the concrete values stored in this state.
sourcepub fn symbolize_and_eval(
&self,
expression: &Expression
) -> Result<Constant, Error>
pub fn symbolize_and_eval( &self, expression: &Expression ) -> Result<Constant, Error>
Symbolize the given expression, replacing all scalars with the concrete values held in this state, and evaluate the expression to a single concrete value.