This commit is contained in:
Vitor Santos Costa
2019-01-31 11:54:17 +00:00
parent f7ed109d1c
commit b71b4f6fca
8 changed files with 72 additions and 31 deletions

View File

@@ -10,6 +10,8 @@
:- module(yap_hacks, [
current_choicepoint/1,
parent_choicepoint/1,
parent_choicepoint/2,
cut_by/1,
cut_at/1,
current_choicepoints/1,
@@ -66,6 +68,16 @@ run_formats([], _).
run_formats([Com-Args|StackInfo], Stream) :-
format(Stream, Com, Args),
run_formats(StackInfo, user_error).
/**
* @pred parent_choicepoint(+_ChoicePoint_)
*
* _ChoicePoint_ is the parent of the current choice-point.
*
*/
parent_choicepoint(BP) :-
current_choicepoint(B),
parent_choicepoint(B, BP).
/**
* @pred virtual_alarm(+Interval, 0:Goal, -Left)