module-qualify incomplete goals in expand_goal/3
This commit is contained in:
@@ -20,12 +20,6 @@
|
|||||||
:- use_module(library(reif)).
|
:- use_module(library(reif)).
|
||||||
|
|
||||||
|
|
||||||
permutation([], []).
|
|
||||||
permutation([X|Xs], Ys) :-
|
|
||||||
permutation(Xs, Yss),
|
|
||||||
select(X, Ys, Yss).
|
|
||||||
|
|
||||||
|
|
||||||
valid_time([H1,H2,M1,M2], T) :-
|
valid_time([H1,H2,M1,M2], T) :-
|
||||||
memberd_t(H1, [0,1,2], TH1),
|
memberd_t(H1, [0,1,2], TH1),
|
||||||
memberd_t(H2, [0,1,2,3,4,5,6,7,8,9], TH2),
|
memberd_t(H2, [0,1,2,3,4,5,6,7,8,9], TH2),
|
||||||
|
|||||||
@@ -439,7 +439,7 @@ mod tests {
|
|||||||
]
|
]
|
||||||
));
|
));
|
||||||
|
|
||||||
for _ in 0..2 { //00000 {
|
for _ in 0..200000 {
|
||||||
let mut iter = stackless_preorder_iter(&mut wam.machine_st.heap, heap_loc_as_cell!(0));
|
let mut iter = stackless_preorder_iter(&mut wam.machine_st.heap, heap_loc_as_cell!(0));
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
|||||||
@@ -1125,9 +1125,6 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
|
|||||||
return self.push_list(max_depth);
|
return self.push_list(max_depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
// let end_h = heap_pstr_iter.focus();
|
|
||||||
// let end_cell = self.iter.heap[end_h];
|
|
||||||
|
|
||||||
let end_h = heap_pstr_iter.focus();
|
let end_h = heap_pstr_iter.focus();
|
||||||
let end_cell = heap_pstr_iter.focus;
|
let end_cell = heap_pstr_iter.focus;
|
||||||
|
|
||||||
@@ -1146,7 +1143,7 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
|
|||||||
|
|
||||||
if self.ignore_ops {
|
if self.ignore_ops {
|
||||||
if !self.print_string_as_functor(focus, max_depth) {
|
if !self.print_string_as_functor(focus, max_depth) {
|
||||||
if end_cell == empty_list_as_cell!() { // end_cell.get_tag() == HeapCellValueTag::CStr {
|
if end_cell == empty_list_as_cell!() {
|
||||||
append_str!(self, "[]");
|
append_str!(self, "[]");
|
||||||
} else {
|
} else {
|
||||||
if self.outputter.ends_with(",") {
|
if self.outputter.ends_with(",") {
|
||||||
|
|||||||
@@ -643,6 +643,7 @@ expand_meta_predicate_subgoals([SG | SGs], [MS | MSs], M, [ESG | ESGs], HeadVars
|
|||||||
MS >= 0
|
MS >= 0
|
||||||
) ->
|
) ->
|
||||||
( var(SG),
|
( var(SG),
|
||||||
|
MS =:= 0,
|
||||||
pairs:same_key(SG, HeadVars, [_|_], _) ->
|
pairs:same_key(SG, HeadVars, [_|_], _) ->
|
||||||
expand_subgoal(SG, MS, M, ESG, HeadVars)
|
expand_subgoal(SG, MS, M, ESG, HeadVars)
|
||||||
; expand_subgoal(SG, MS, M, ESG0, HeadVars),
|
; expand_subgoal(SG, MS, M, ESG0, HeadVars),
|
||||||
|
|||||||
Reference in New Issue
Block a user