incomplete cut corrections.

This commit is contained in:
Mark Thom
2018-04-07 00:15:34 -06:00
parent 2e65f7243c
commit 5d0674a667
8 changed files with 81 additions and 24 deletions

View File

@@ -668,7 +668,8 @@ pub type JumpStub = Vec<Term>;
pub enum QueryTerm {
Clause(Cell<RegType>, ClauseType, Vec<Box<Term>>),
Cut,
BlockedCut, // a cut which is 'blocked by letters', like the P term in P -> Q.
UnblockedCut,
Jump(JumpStub)
}
@@ -676,7 +677,7 @@ impl QueryTerm {
pub fn arity(&self) -> usize {
match self {
&QueryTerm::Clause(_, _, ref subterms) => subterms.len(),
&QueryTerm::Cut => 0,
&QueryTerm::BlockedCut | &QueryTerm::UnblockedCut => 0,
&QueryTerm::Jump(ref vars) => vars.len()
}
}