self.heap[last_cell_loc].set_mark_bit(self.mark_phase);
}
+ if self.cycle_detection_active() {
+ for idx in (self.next as usize .. last_cell_loc).rev() {
+ if self.heap[idx].get_forwarding_bit() {
+ self.cycle_found = true;
+ return None;
+ }
+ }
+ }
+
self.heap[last_cell_loc].set_forwarding_bit(true);
self.next = self.heap[last_cell_loc].get_value();
A=[B|B],
B=[C|C].
+term7(A) :-
+ B=[C|D],
+ A=[D|C],
+ B=[B|D].
+
+term8(A) :-
+ B=C,
+ B=[C|_D],
+ A=[C|_E].
+
test("acyclic_term_1", (
L = [_Y,[M,B],B|M], acyclic_term(L)
)).
\+ acyclic_term(B)
)).
+test("acyclic_term#2130_1", (
+ term7(T),
+ \+ acyclic_term(T)
+)).
+
+test("acyclic_term#2130_2", (
+ term8(T),
+ \+ acyclic_term(T)
+)).
+
main :-
findall(test(Name, Goal), test(Name, Goal), Tests),
run_tests(Tests, Failed),