pub struct DependencyPairGraph {
pub pairs: Vec<DependencyPairNode>,
pub edges: Vec<HashSet<usize>>,
}Expand description
A dependency pair graph for a TRS — used to prove termination.
In the dependency pair method a “dependency pair” is derived from each rule
f(l) → C[g(r)] where g is a defined symbol. Termination is equivalent
to the non-existence of infinite chains in the dependency pair graph.
Fields§
§pairs: Vec<DependencyPairNode>The dependency pairs (nodes of the graph).
edges: Vec<HashSet<usize>>Edges: edges[i] is the set of indices j such that pair i may precede pair j.
Implementations§
Source§impl DependencyPairGraph
impl DependencyPairGraph
Sourcepub fn add_pair(
&mut self,
lhs_root: impl Into<String>,
rhs_root: impl Into<String>,
) -> usize
pub fn add_pair( &mut self, lhs_root: impl Into<String>, rhs_root: impl Into<String>, ) -> usize
Add a dependency pair (lhs_root, rhs_root) and return its index.
Sourcepub fn sccs(&self) -> Vec<Vec<usize>>
pub fn sccs(&self) -> Vec<Vec<usize>>
Find all strongly connected components (SCCs) via a simple iterative DFS.
Returns a list of SCCs, each represented as a list of pair indices.
Sourcepub fn all_sccs_trivial(&self) -> bool
pub fn all_sccs_trivial(&self) -> bool
Returns true if all SCCs are trivial (size ≤ 1 and no self-loops).
A TRS is terminating iff its dependency pair graph has no infinite chains, which holds when all non-trivial SCCs can be removed by a reduction pair.
Trait Implementations§
Source§impl Clone for DependencyPairGraph
impl Clone for DependencyPairGraph
Source§fn clone(&self) -> DependencyPairGraph
fn clone(&self) -> DependencyPairGraph
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more