pub struct StringSolver { /* private fields */ }Expand description
String theory solver
Implementations§
Source§impl StringSolver
impl StringSolver
Sourcepub fn add_equality(&mut self, lhs: StringExpr, rhs: StringExpr, origin: TermId)
pub fn add_equality(&mut self, lhs: StringExpr, rhs: StringExpr, origin: TermId)
Add a string equality
Sourcepub fn add_disequality(
&mut self,
lhs: StringExpr,
rhs: StringExpr,
origin: TermId,
)
pub fn add_disequality( &mut self, lhs: StringExpr, rhs: StringExpr, origin: TermId, )
Add a string disequality
Sourcepub fn add_length_eq(&mut self, var: u32, len: i64, origin: TermId)
pub fn add_length_eq(&mut self, var: u32, len: i64, origin: TermId)
Add a length constraint
Sourcepub fn add_regex_membership(
&mut self,
var: u32,
regex: Arc<Regex>,
positive: bool,
origin: TermId,
)
pub fn add_regex_membership( &mut self, var: u32, regex: Arc<Regex>, positive: bool, origin: TermId, )
Add regex membership constraint
Sourcepub fn add_prefix(&mut self, prefix: StringExpr, s: StringExpr, origin: TermId)
pub fn add_prefix(&mut self, prefix: StringExpr, s: StringExpr, origin: TermId)
Add prefix constraint: str.prefixof(prefix, s)
Sourcepub fn add_suffix(&mut self, suffix: StringExpr, s: StringExpr, origin: TermId)
pub fn add_suffix(&mut self, suffix: StringExpr, s: StringExpr, origin: TermId)
Add suffix constraint: str.suffixof(suffix, s)
Sourcepub fn add_contains(
&mut self,
s: StringExpr,
substr: StringExpr,
origin: TermId,
)
pub fn add_contains( &mut self, s: StringExpr, substr: StringExpr, origin: TermId, )
Add contains constraint: str.contains(s, substr)
Sourcepub fn add_str_to_int(&mut self, str_var: u32, int_value: i64, origin: TermId)
pub fn add_str_to_int(&mut self, str_var: u32, int_value: i64, origin: TermId)
Add string-to-int constraint: int = str.to_int(s) Returns the integer value that string s represents Returns -1 if s is not a valid numeral
Sourcepub fn add_int_to_str(&mut self, str_var: u32, int_value: i64, origin: TermId)
pub fn add_int_to_str(&mut self, str_var: u32, int_value: i64, origin: TermId)
Add int-to-string constraint: s = str.from_int(int) Converts integer to its decimal string representation
Trait Implementations§
Source§impl Debug for StringSolver
impl Debug for StringSolver
Source§impl Default for StringSolver
impl Default for StringSolver
Source§impl Theory for StringSolver
impl Theory for StringSolver
Source§fn can_handle(&self, _term: TermId) -> bool
fn can_handle(&self, _term: TermId) -> bool
Check if this theory can handle a term
Source§fn assert_true(&mut self, term: TermId) -> Result<TheoryResult>
fn assert_true(&mut self, term: TermId) -> Result<TheoryResult>
Assert a term as true
Source§fn assert_false(&mut self, term: TermId) -> Result<TheoryResult>
fn assert_false(&mut self, term: TermId) -> Result<TheoryResult>
Assert a term as false
Source§fn check(&mut self) -> Result<TheoryResult>
fn check(&mut self) -> Result<TheoryResult>
Check consistency of current assertions
Auto Trait Implementations§
impl Freeze for StringSolver
impl RefUnwindSafe for StringSolver
impl Send for StringSolver
impl Sync for StringSolver
impl Unpin for StringSolver
impl UnwindSafe for StringSolver
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more