pub struct Fixedpoint { /* private fields */ }Expand description
Implementations§
Source§impl Fixedpoint
impl Fixedpoint
Sourcepub fn new() -> Fixedpoint
pub fn new() -> Fixedpoint
Create a new fixedpoint context.
Sourcepub fn add_rule(&self, rule: &impl Ast, name: Option<&str>)
pub fn add_rule(&self, rule: &impl Ast, name: Option<&str>)
Add a Horn clause rule to the fixedpoint context.
§Example
let fp = Fixedpoint::new();
let p = Bool::new_const("p");
let q = Bool::new_const("q");
// Add rule: p => q
fp.add_rule(&p.implies(&q), None);Sourcepub fn add_fact(&self, pred: &FuncDecl, args: &[u32])
pub fn add_fact(&self, pred: &FuncDecl, args: &[u32])
Add a fact (ground assertion) to the fixedpoint context.
Sourcepub fn query(&self, query: &impl Ast) -> SatResult
pub fn query(&self, query: &impl Ast) -> SatResult
Query the fixedpoint context for satisfiability.
Returns the result of the query (satisfiable, unsatisfiable, or unknown).
Sourcepub fn query_relations(&self, relations: &[&FuncDecl]) -> SatResult
pub fn query_relations(&self, relations: &[&FuncDecl]) -> SatResult
Query the fixedpoint context with multiple relations.
Sourcepub fn get_answer(&self) -> Option<Bool>
pub fn get_answer(&self) -> Option<Bool>
Get the answer substitution after a successful query. This provides the concrete values that make the query satisfiable.
Sourcepub fn get_reason_unknown(&self) -> String
pub fn get_reason_unknown(&self) -> String
Get the reason (core) for unsatisfiability after an unsuccessful query.
Sourcepub fn update_rule(&self, rule: &impl Ast, name: &str)
pub fn update_rule(&self, rule: &impl Ast, name: &str)
Update a named rule.
Sourcepub fn get_num_levels(&self, pred: &FuncDecl) -> u32
pub fn get_num_levels(&self, pred: &FuncDecl) -> u32
Get the number of levels explored during the last query.
Sourcepub fn get_cover_delta(&self, level: i32, predicate: &FuncDecl) -> Option<Bool>
pub fn get_cover_delta(&self, level: i32, predicate: &FuncDecl) -> Option<Bool>
Get the cover (approximation) at a given level.
Sourcepub fn add_cover(&self, level: i32, predicate: &FuncDecl, property: &impl Ast)
pub fn add_cover(&self, level: i32, predicate: &FuncDecl, property: &impl Ast)
Add a cover for a predicate at a given level.
Sourcepub fn get_statistics(&self) -> Statistics
pub fn get_statistics(&self) -> Statistics
Get statistics about the last query.
Sourcepub fn register_relation(&self, pred: &FuncDecl)
pub fn register_relation(&self, pred: &FuncDecl)
Register a relation as fixedpoint-defined (least-fixedpoint semantics).
Sourcepub fn set_params(&self, params: &Params)
pub fn set_params(&self, params: &Params)
Set parameters for the fixedpoint context.