Handle stub_b = b as false
This commit is contained in:
@@ -95,13 +95,11 @@ impl Machine {
|
|||||||
loop {
|
loop {
|
||||||
self.dispatch_loop();
|
self.dispatch_loop();
|
||||||
|
|
||||||
if self.machine_st.fail {
|
//println!("b: {}", self.machine_st.b);
|
||||||
// NOTE: only print results on success
|
//println!("stub_b: {}", stub_b);
|
||||||
self.machine_st.fail = false;
|
//println!("fail: {}", self.machine_st.fail);
|
||||||
println!("false");
|
|
||||||
matches.push(QueryResolutionLine::False);
|
if self.machine_st.ball.stub.len() != 0 {
|
||||||
break;
|
|
||||||
} else if self.machine_st.ball.stub.len() != 0 {
|
|
||||||
// NOTE: this means an exception was thrown, at which
|
// NOTE: this means an exception was thrown, at which
|
||||||
// point we backtracked to the stub choice point.
|
// point we backtracked to the stub choice point.
|
||||||
// this should halt the search for solutions as it
|
// this should halt the search for solutions as it
|
||||||
@@ -128,7 +126,23 @@ impl Machine {
|
|||||||
.join(" ");
|
.join(" ");
|
||||||
|
|
||||||
return Err(error_string);
|
return Err(error_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if self.machine_st.fail {
|
||||||
|
// NOTE: only print results on success
|
||||||
|
self.machine_st.fail = false;
|
||||||
|
println!("fail!");
|
||||||
|
matches.push(QueryResolutionLine::False);
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
|
||||||
|
if self.machine_st.b == stub_b && term_write_result.var_dict.len() == 0 {
|
||||||
|
// NOTE: only print results on success
|
||||||
|
self.machine_st.fail = false;
|
||||||
|
println!("b == stub_b");
|
||||||
|
matches.push(QueryResolutionLine::False);
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
|
||||||
let mut bindings: BTreeMap<String, Value> = BTreeMap::new();
|
let mut bindings: BTreeMap<String, Value> = BTreeMap::new();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user