remove SCCCutPolicy panic, revise (;)/2 so that comma'ed cuts are handled properly (#361)
This commit is contained in:
@@ -60,7 +60,8 @@ impl CodeRepo {
|
||||
.unwrap_or((Predicate::new(), VecDeque::from(vec![])))
|
||||
}
|
||||
|
||||
pub(crate) fn add_in_situ_result(
|
||||
pub(crate)
|
||||
fn add_in_situ_result(
|
||||
&mut self,
|
||||
result: &CompiledResult,
|
||||
in_situ_code_dir: &mut InSituCodeDir,
|
||||
@@ -100,16 +101,19 @@ impl CodeRepo {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(super) fn size_of_cached_query(&self) -> usize {
|
||||
pub(super)
|
||||
fn size_of_cached_query(&self) -> usize {
|
||||
self.cached_query.len()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(super) fn take_in_situ_code(&mut self) -> Code {
|
||||
pub(super)
|
||||
fn take_in_situ_code(&mut self) -> Code {
|
||||
mem::replace(&mut self.in_situ_code, Code::new())
|
||||
}
|
||||
|
||||
pub(super) fn lookup_instr<'a>(
|
||||
pub(super)
|
||||
fn lookup_instr<'a>(
|
||||
&'a self,
|
||||
last_call: bool,
|
||||
p: &CodePtr,
|
||||
|
||||
@@ -2280,7 +2280,8 @@ impl MachineState {
|
||||
}
|
||||
}
|
||||
}
|
||||
None => panic!("expected SCCCutPolicy trait object."),
|
||||
None => {
|
||||
}
|
||||
};
|
||||
|
||||
self.fail = true;
|
||||
|
||||
@@ -934,7 +934,7 @@ impl RelationWorker {
|
||||
let mut term = *term;
|
||||
|
||||
if let Term::Clause(cell, name, terms, op_spec) = term {
|
||||
if name.as_str() == "," {
|
||||
if name.as_str() == "," && terms.len() == 2 {
|
||||
let term = Term::Clause(cell, name, terms, op_spec);
|
||||
let mut subterms = unfold_by_str(term, ",");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user