fix faulty tidy_trail
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
:- op(1200, xfx, -->).
|
||||
|
||||
phrase(G, G) :-
|
||||
nonvar(G), G = [_|_], !. %, append(G, _, Ls0).
|
||||
nonvar(G), G = [_|_], !.
|
||||
phrase(G, Ls0) :-
|
||||
nonvar(G), G = (G1, G2), !, phrase(G1, Ls0, Ls1), phrase(G2, Ls1, []).
|
||||
phrase(G, Ls0) :-
|
||||
|
||||
@@ -428,6 +428,7 @@ impl MachineState {
|
||||
let tr = self.tr;
|
||||
let val = self.trail[tr - 1];
|
||||
self.trail[i] = val;
|
||||
self.trail.pop();
|
||||
self.tr -= 1;
|
||||
},
|
||||
Ref::StackCell(fr, _) => {
|
||||
@@ -445,6 +446,7 @@ impl MachineState {
|
||||
let tr = self.tr;
|
||||
let val = self.trail[tr - 1];
|
||||
self.trail[i] = val;
|
||||
self.trail.pop();
|
||||
self.tr -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user