Struct clingo::TheoryAtoms
[−]
[src]
pub struct TheoryAtoms(_);
Container that stores theory atoms, elements, and terms of a program.
Methods
impl TheoryAtoms
[src]
pub fn size(&self) -> Result<usize, WrapperError>
[src]
Get the total number of theory atoms.
ⓘImportant traits for TheoryAtomsIterator<'a>pub fn iter(&self) -> TheoryAtomsIterator
[src]
Returns an iterator over the theory atoms.
pub fn term_type(&self, Id: Id) -> Option<TheoryTermType>
[src]
pub fn term_number(&self, Id: Id) -> Option<i32>
[src]
Get the number of the given numeric theory term.
Pre-condition
The term must be of type TermType::Number
.
Arguments
term
- id of the term
pub fn term_name<'a>(&self, Id: Id) -> Result<&'a str, Error>
[src]
Get the name of the given constant or function theory term.
Pre-condition
The term must be of type TermType::Function
or
TermType::Symbol
.
Arguments
term
id of the term
pub fn term_arguments(&self, Id: Id) -> Option<Vec<Id>>
[src]
Get the arguments of the given function theory term.
Pre-condition
The term must be of type TermType::Function
.
Arguments
term
- id of the term
pub fn term_to_string(&self, Id: Id) -> Result<&str, Error>
[src]
Get the string representation of the given theory term.
Arguments
term
- id of the term
Errors
ErrorType::Runtime
if the size is too smallErrorType::BadAlloc
pub fn element_tuple(&self, Id: Id) -> Option<Vec<Id>>
[src]
Get the tuple (array of theory terms) of the given theory element.
Arguments
element
- id of the element
pub fn element_condition(&self, Id: Id) -> Option<Vec<Literal>>
[src]
Get the condition (array of aspif literals) of the given theory element.
Arguments
element
- id of the element
pub fn element_condition_id(&self, Id: Id) -> Option<Literal>
[src]
Get the id of the condition of the given theory element.
Note:
This id can be mapped to a solver literal using PropagateInit::solver_literal()
.
This id is not (necessarily) an aspif literal;
to get aspif literals use TheoryAtoms::element_condition()
.
Arguments
element
- id of the element
pub fn element_to_string(&self, Id: Id) -> Result<&str, Error>
[src]
Get the string representation of the given theory element.
Arguments
element
- id of the element
Errors
ErrorType::Runtime
if the size is too smallErrorType::BadAlloc
pub fn atom_term(&self, Id: Id) -> Option<Id>
[src]
pub fn atom_elements(&self, Id: Id) -> Option<Vec<Id>>
[src]
pub fn atom_has_guard(&self, Id: Id) -> Option<bool>
[src]
pub fn atom_guard(&self, Id: Id) -> Result<(&str, Id), Error>
[src]
Get the guard consisting of a theory operator and a theory term of the given theory atom.
Arguments
atom
- id of the atom
pub fn atom_literal(&self, Id: Id) -> Option<Literal>
[src]
pub fn atom_to_string(&self, Id: Id) -> Result<&str, Error>
[src]
Get the string representation of the given theory atom.
Arguments
atom
- id of the element
Errors
ErrorType::Runtime
if the size is too smallErrorType::BadAlloc
Trait Implementations
impl Debug for TheoryAtoms
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Copy for TheoryAtoms
[src]
impl Clone for TheoryAtoms
[src]
fn clone(&self) -> TheoryAtoms
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more