mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-17 06:47:17 +00:00
Represent bugs directly rather than with edt nodes.
Estimated hours taken: 10
Represent bugs directly rather than with edt nodes. This makes the
interface to the analyser more consistent: bugs are now handled
in much the same way as questions.
browser/declarative_analyser.m:
- In the mercury_edt/2 typeclass, change edt_root/3 to
edt_root_question/3 and add the method edt_root_e_bug/3.
- Add the type prime_suspect/1 which keeps track of the
evidence (oracle answers) which implicates a particular
edt node.
- Use the new bug representation.
browser/declarative_debugger.m:
browser/declarative_oracle.m:
- Move oracle_confirmation to declarative_debugger.m, and
rename it decl_confirmation.
browser/declarative_debugger.m:
- Change decl_bug/1 to decl_bug/0. Instead of a bug being
represented by an edt node, decl_bug now represents
directly the different sorts of bugs possible.
- Add an implementation for the new mercury_edt method.
browser/declarative_oracle.m:
browser/declarative_user.m:
- Update the confirmation to use the new types.
tests/debugger/declarative/*.{exp,exp2}:
- Update test results.
This commit is contained in:
@@ -26,8 +26,13 @@
|
||||
|
||||
% Gives the root node of an EDT.
|
||||
%
|
||||
pred edt_root(S, T, decl_question),
|
||||
mode edt_root(in, in, out) is det,
|
||||
pred edt_root_question(S, T, decl_question),
|
||||
mode edt_root_question(in, in, out) is det,
|
||||
|
||||
% If this node is an e_bug, then find the bug.
|
||||
%
|
||||
pred edt_root_e_bug(S, T, decl_e_bug),
|
||||
mode edt_root_e_bug(in, in, out) is det,
|
||||
|
||||
% Gives the list of children of a tree. If the tree is
|
||||
% represented implicitly, then the procedure fails.
|
||||
@@ -45,7 +50,7 @@
|
||||
|
||||
% A suspect who is guilty.
|
||||
%
|
||||
; bug_found(decl_bug(T))
|
||||
; bug_found(decl_bug)
|
||||
|
||||
% The analyser desires answers to any of a list
|
||||
% of queries.
|
||||
@@ -89,125 +94,243 @@
|
||||
:- type analyser_state(T)
|
||||
---> analyser(
|
||||
% Current incorrect node (initially `no').
|
||||
% This is the most recent node that the
|
||||
% oracle has said is incorrect.
|
||||
%
|
||||
maybe(T),
|
||||
maybe(prime_suspect(T)),
|
||||
|
||||
% Current suspects.
|
||||
%
|
||||
list(suspect(T))
|
||||
).
|
||||
|
||||
% A suspect is a suspect tree along with its corresponding
|
||||
% root node.
|
||||
%
|
||||
:- type suspect(T) == pair(T, decl_question).
|
||||
|
||||
analyser_state_init(analyser(no, [])).
|
||||
|
||||
start_analysis(Store, Tree, Response, _, Analyser) :-
|
||||
edt_root(Store, Tree, Root),
|
||||
Response = oracle_queries([Root]),
|
||||
Analyser = analyser(no, [Tree - Root]).
|
||||
edt_root_question(Store, Tree, Question),
|
||||
Response = oracle_queries([Question]),
|
||||
create_suspect(Store, Tree, Suspect),
|
||||
Analyser = analyser(no, [Suspect]).
|
||||
|
||||
continue_analysis(Store, Answers, Response, Analyser0, Analyser) :-
|
||||
(
|
||||
find_incorrect_suspect(Answers, Analyser0, Node)
|
||||
find_incorrect_suspect(Answers, Analyser0, Suspect)
|
||||
->
|
||||
make_new_suspects(Store, Node, Response, Analyser)
|
||||
make_new_prime_suspect(Store, Suspect, Response, Analyser0,
|
||||
Analyser)
|
||||
;
|
||||
remove_suspects(Answers, Response, Analyser0, Analyser)
|
||||
remove_suspects(Store, Answers, Response, Analyser0, Analyser)
|
||||
).
|
||||
|
||||
|
||||
% Find an answer which is `no' and find the suspect that
|
||||
% corresponds to it, or else fail.
|
||||
%
|
||||
:- pred find_incorrect_suspect(list(decl_answer), analyser_state(T), T).
|
||||
:- pred find_incorrect_suspect(list(decl_answer), analyser_state(T),
|
||||
suspect(T)).
|
||||
:- mode find_incorrect_suspect(in, in, out) is semidet.
|
||||
|
||||
find_incorrect_suspect([Answer | Answers], Analyser, Child) :-
|
||||
Analyser = analyser(_, Suspects),
|
||||
(
|
||||
Answer = Node - no,
|
||||
find_matching_suspects(Node, Suspects, [Match | _], _)
|
||||
Answer = _ - no,
|
||||
find_matching_suspects(Answer, Suspects, [Match | _], _)
|
||||
->
|
||||
Match = Child - _
|
||||
Match = Child
|
||||
;
|
||||
find_incorrect_suspect(Answers, Analyser, Child)
|
||||
).
|
||||
|
||||
% Create a new suspect list from the given tree, which is
|
||||
% assumed to have an incorrect root.
|
||||
% Create a new prime suspect from the given suspect, which is
|
||||
% assumed to be incorrect.
|
||||
%
|
||||
:- pred make_new_suspects(S, T, analyser_response(T), analyser_state(T))
|
||||
<= mercury_edt(S, T).
|
||||
:- mode make_new_suspects(in, in, out, out) is det.
|
||||
:- pred make_new_prime_suspect(S, suspect(T), analyser_response(T),
|
||||
analyser_state(T), analyser_state(T)) <= mercury_edt(S, T).
|
||||
:- mode make_new_prime_suspect(in, in, out, in, out) is det.
|
||||
|
||||
make_new_suspects(Store, Tree, Response, Analyser) :-
|
||||
make_new_prime_suspect(Store, Suspect, Response, Analyser0, Analyser) :-
|
||||
Analyser0 = analyser(MaybeOldPrime, _),
|
||||
suspect_get_edt_node(Suspect, Tree),
|
||||
create_prime_suspect(Suspect, MaybeOldPrime, Prime),
|
||||
(
|
||||
edt_children(Store, Tree, Children)
|
||||
->
|
||||
make_suspects(Store, Children, Suspects, Queries),
|
||||
Analyser = analyser(yes(Tree), Suspects),
|
||||
(
|
||||
Queries = []
|
||||
->
|
||||
Response = bug_found(e_bug(Tree))
|
||||
edt_root_e_bug(Store, Tree, EBug),
|
||||
Response = bug_found(e_bug(EBug))
|
||||
;
|
||||
Response = oracle_queries(Queries)
|
||||
)
|
||||
;
|
||||
Response = require_explicit(Tree),
|
||||
Analyser = analyser(yes(Tree), [])
|
||||
).
|
||||
% The real suspects cannot be found, so we
|
||||
% just use the empty list.
|
||||
%
|
||||
Suspects = [],
|
||||
Response = require_explicit(Tree)
|
||||
),
|
||||
Analyser = analyser(yes(Prime), Suspects).
|
||||
|
||||
:- pred make_suspects(S, list(T), list(suspect(T)), list(decl_question))
|
||||
<= mercury_edt(S, T).
|
||||
:- mode make_suspects(in, in, out, out) is det.
|
||||
|
||||
make_suspects(_, [], [], []).
|
||||
make_suspects(Store, [Tree | Trees], [Tree - Root | Ss], [Root | Qs]) :-
|
||||
edt_root(Store, Tree, Root),
|
||||
make_suspects(Store, [Tree | Trees], [Suspect | Ss], [Query | Qs]) :-
|
||||
create_suspect(Store, Tree, Suspect),
|
||||
Suspect = suspect(_, Query),
|
||||
make_suspects(Store, Trees, Ss, Qs).
|
||||
|
||||
% Go through the answers (none of which should be `no') and
|
||||
% remove the corresponding children from the suspect list.
|
||||
%
|
||||
:- pred remove_suspects(list(decl_answer), analyser_response(T),
|
||||
analyser_state(T), analyser_state(T)).
|
||||
:- mode remove_suspects(in, out, in, out) is det.
|
||||
:- pred remove_suspects(S, list(decl_answer), analyser_response(T),
|
||||
analyser_state(T), analyser_state(T)) <= mercury_edt(S, T).
|
||||
:- mode remove_suspects(in, in, out, in, out) is det.
|
||||
|
||||
remove_suspects([], Response, Analyser, Analyser) :-
|
||||
Analyser = analyser(MaybeTree, Suspects),
|
||||
remove_suspects(Store, [], Response, Analyser, Analyser) :-
|
||||
Analyser = analyser(MaybePrime, Suspects),
|
||||
(
|
||||
Suspects = []
|
||||
->
|
||||
(
|
||||
MaybeTree = yes(Tree)
|
||||
MaybePrime = yes(Prime)
|
||||
->
|
||||
Response = bug_found(e_bug(Tree))
|
||||
prime_suspect_get_edt_node(Prime, Tree),
|
||||
edt_root_e_bug(Store, Tree, EBug),
|
||||
Response = bug_found(e_bug(EBug))
|
||||
;
|
||||
Response = no_suspects
|
||||
)
|
||||
;
|
||||
list__map(snd, Suspects, Queries),
|
||||
list__map(suspect_get_question, Suspects, Queries),
|
||||
Response = oracle_queries(Queries)
|
||||
).
|
||||
|
||||
remove_suspects([Node - yes | Answers], Response, Analyser0, Analyser) :-
|
||||
Analyser0 = analyser(MaybeTree, Suspects0),
|
||||
find_matching_suspects(Node, Suspects0, _, Suspects),
|
||||
Analyser1 = analyser(MaybeTree, Suspects),
|
||||
remove_suspects(Answers, Response, Analyser1, Analyser).
|
||||
remove_suspects(Store, [Answer | Answers], Response, Analyser0,
|
||||
Analyser) :-
|
||||
|
||||
remove_suspects([_ - no | _], _, _, _) :-
|
||||
error("remove_suspects: unexpected incorrect node").
|
||||
(
|
||||
Answer = _ - yes
|
||||
->
|
||||
Analyser0 = analyser(MaybeTree, Suspects0),
|
||||
find_matching_suspects(Answer, Suspects0, _, Suspects),
|
||||
Analyser1 = analyser(MaybeTree, Suspects),
|
||||
remove_suspects(Store, Answers, Response, Analyser1, Analyser)
|
||||
;
|
||||
error("remove_suspects: unexpected incorrect node")
|
||||
).
|
||||
|
||||
:- pred find_matching_suspects(decl_question, list(suspect(T)),
|
||||
%-----------------------------------------------------------------------------%
|
||||
|
||||
:- type suspect(T)
|
||||
---> suspect(T, decl_question).
|
||||
|
||||
:- pred create_suspect(S, T, suspect(T)) <= mercury_edt(S, T).
|
||||
:- mode create_suspect(in, in, out) is det.
|
||||
|
||||
create_suspect(S, T, Suspect) :-
|
||||
edt_root_question(S, T, Question),
|
||||
Suspect = suspect(T, Question).
|
||||
|
||||
:- pred suspect_get_edt_node(suspect(T), T).
|
||||
:- mode suspect_get_edt_node(in, out) is det.
|
||||
|
||||
suspect_get_edt_node(suspect(Node, _), Node).
|
||||
|
||||
:- pred suspect_get_question(suspect(T), decl_question).
|
||||
:- mode suspect_get_question(in, out) is det.
|
||||
|
||||
suspect_get_question(suspect(_, Question), Question).
|
||||
|
||||
:- pred suspect_answer_match(suspect(T), decl_answer, decl_truth).
|
||||
:- mode suspect_answer_match(in, in, out) is semidet.
|
||||
|
||||
suspect_answer_match(suspect(_, Question), Question - Truth, Truth).
|
||||
|
||||
:- pred find_matching_suspects(decl_answer, list(suspect(T)),
|
||||
list(suspect(T)), list(suspect(T))).
|
||||
:- mode find_matching_suspects(in, in, out, out) is det.
|
||||
|
||||
find_matching_suspects(Node, Suspects, Matches, NoMatches) :-
|
||||
P = (pred(A::in) is semidet :- A = _ - Node),
|
||||
find_matching_suspects(Answer, Suspects, Matches, NoMatches) :-
|
||||
P = (pred(S::in) is semidet :- suspect_answer_match(S, Answer, _)),
|
||||
list__filter(P, Suspects, Matches, NoMatches).
|
||||
|
||||
%-----------------------------------------------------------------------------%
|
||||
|
||||
:- type prime_suspect(T)
|
||||
---> prime_suspect(
|
||||
% Incorrect node.
|
||||
%
|
||||
suspect(T),
|
||||
|
||||
% Evidence: the oracle said these nodes
|
||||
% were either correct or inadmissible.
|
||||
%
|
||||
list(suspect(T)),
|
||||
|
||||
% Earliest inadmissible child, if there
|
||||
% have been any at all. This child
|
||||
% is also included in the list of
|
||||
% evidence.
|
||||
%
|
||||
maybe(suspect(T)),
|
||||
|
||||
% Previous prime suspects.
|
||||
%
|
||||
list(suspect(T))
|
||||
).
|
||||
|
||||
% Create a prime suspect from a suspect, and maybe the previous
|
||||
% prime suspect (if there was one).
|
||||
%
|
||||
:- pred create_prime_suspect(suspect(T), maybe(prime_suspect(T)),
|
||||
prime_suspect(T)).
|
||||
:- mode create_prime_suspect(in, in, out) is det.
|
||||
|
||||
create_prime_suspect(Suspect, MaybeOldPrime, Prime) :-
|
||||
(
|
||||
MaybeOldPrime = yes(OldPrime)
|
||||
->
|
||||
OldPrime = prime_suspect(OldSuspect, _, _, Previous0),
|
||||
PreviousPrimes = [OldSuspect | Previous0]
|
||||
;
|
||||
PreviousPrimes = []
|
||||
),
|
||||
Prime = prime_suspect(Suspect, [], no, PreviousPrimes).
|
||||
|
||||
:- pred prime_suspect_get_edt_node(prime_suspect(T), T).
|
||||
:- mode prime_suspect_get_edt_node(in, out) is det.
|
||||
|
||||
prime_suspect_get_edt_node(prime_suspect(Suspect, _, _, _), EDT) :-
|
||||
suspect_get_edt_node(Suspect, EDT).
|
||||
|
||||
% Get all the suspects who are children of the prime suspect,
|
||||
% and who are deemed correct or inadmissible. Maybe get
|
||||
% the earliest inadmissible child (if there was one).
|
||||
%
|
||||
:- pred prime_suspect_get_evidence(prime_suspect(T), list(suspect(T)),
|
||||
maybe(suspect(T))).
|
||||
:- mode prime_suspect_get_evidence(in, out, out) is det.
|
||||
|
||||
prime_suspect_get_evidence(prime_suspect(_, E, M, _), E, M).
|
||||
|
||||
% Add to the evidence against the prime suspect a child who
|
||||
% is deemed correct or inadmissible.
|
||||
% This predicate will be more interesting when decl_truth
|
||||
% has three values.
|
||||
%
|
||||
:- pred prime_suspect_add_evidence(prime_suspect(T), suspect(T), decl_truth,
|
||||
prime_suspect(T)).
|
||||
:- mode prime_suspect_add_evidence(in, in, in, out) is det.
|
||||
|
||||
prime_suspect_add_evidence(Prime0, Suspect, yes, Prime) :-
|
||||
Prime0 = prime_suspect(S, Evidence0, M, P),
|
||||
Evidence = [Suspect | Evidence0],
|
||||
Prime = prime_suspect(S, Evidence, M, P).
|
||||
|
||||
prime_suspect_add_evidence(_, _, no, _) :-
|
||||
error("prime_suspect_add_evidence: not evidence").
|
||||
|
||||
|
||||
@@ -29,16 +29,54 @@
|
||||
%
|
||||
:- type decl_truth == bool.
|
||||
|
||||
% This type represents the possible responses to being
|
||||
% asked to confirm that a node is a bug.
|
||||
%
|
||||
:- type decl_confirmation
|
||||
---> confirm_bug
|
||||
; overrule_bug
|
||||
; abort_diagnosis.
|
||||
|
||||
% This type represents the bugs which can be diagnosed.
|
||||
% The parameter of the constructor is the type of EDT nodes.
|
||||
%
|
||||
:- type decl_bug(T)
|
||||
---> e_bug(T) % An EDT whose root node is incorrect,
|
||||
% but whose children are all correct.
|
||||
:- type decl_bug
|
||||
% An EDT whose root node is incorrect,
|
||||
% but whose children are all correct.
|
||||
%
|
||||
---> e_bug(decl_e_bug)
|
||||
|
||||
; i_bug(T). % An EDT whose root node is incorrect, and
|
||||
% which has no incorrect children but at
|
||||
% least one inadmissible one.
|
||||
% An EDT whose root node is incorrect, and
|
||||
% which has no incorrect children but at
|
||||
% least one inadmissible one.
|
||||
%
|
||||
; i_bug(decl_i_bug).
|
||||
|
||||
:- type decl_e_bug
|
||||
---> incorrect_contour(
|
||||
decl_atom, % The head of the clause, in its
|
||||
% final state of instantiation.
|
||||
decl_contour % The path taken through the body.
|
||||
)
|
||||
; partially_uncovered_atom(
|
||||
decl_atom % The called atom, in its initial
|
||||
% state.
|
||||
).
|
||||
|
||||
:- type decl_i_bug
|
||||
---> inadmissible_call(
|
||||
decl_atom, % The parent atom, in its initial
|
||||
% state.
|
||||
decl_position, % The location of the call in the
|
||||
% parent's body.
|
||||
decl_atom % The inadmissible child, in its
|
||||
% initial state.
|
||||
).
|
||||
|
||||
% XXX not yet implemented.
|
||||
%
|
||||
:- type decl_contour == unit.
|
||||
:- type decl_position == unit.
|
||||
|
||||
% Values of this type represent goal behaviour. This representation
|
||||
% is used by the front end (in this module), as well as the
|
||||
@@ -138,10 +176,10 @@ diagnosis(Store, NodeId, Response, Diagnoser0, Diagnoser) -->
|
||||
handle_analyser_response(_, no_suspects, no_bug_found, D, D) -->
|
||||
[].
|
||||
|
||||
handle_analyser_response(Store, bug_found(Bug), Response, Diagnoser0,
|
||||
handle_analyser_response(_, bug_found(Bug), Response, Diagnoser0,
|
||||
Diagnoser) -->
|
||||
|
||||
confirm_bug(Store, Bug, Response, Diagnoser0, Diagnoser).
|
||||
confirm_bug(Bug, Response, Diagnoser0, Diagnoser).
|
||||
|
||||
handle_analyser_response(Store, oracle_queries(Queries), Response,
|
||||
Diagnoser0, Diagnoser) -->
|
||||
@@ -176,22 +214,13 @@ handle_oracle_response(_, no_oracle_answers, no_bug_found, D, D) -->
|
||||
handle_oracle_response(_, abort_diagnosis, no_bug_found, D, D) -->
|
||||
io__write_string("Diagnosis aborted.\n").
|
||||
|
||||
:- pred confirm_bug(S, decl_bug(edt_node(R)), diagnoser_response,
|
||||
diagnoser_state(R), diagnoser_state(R), io__state, io__state)
|
||||
<= annotated_trace(S, R).
|
||||
:- mode confirm_bug(in, in, out, in, out, di, uo) is det.
|
||||
:- pred confirm_bug(decl_bug, diagnoser_response, diagnoser_state(R),
|
||||
diagnoser_state(R), io__state, io__state).
|
||||
:- mode confirm_bug(in, out, in, out, di, uo) is det.
|
||||
|
||||
confirm_bug(Store, Bug, Response, Diagnoser0, Diagnoser) -->
|
||||
{
|
||||
Bug = e_bug(Node),
|
||||
Message = "Incorrect node found:\n"
|
||||
;
|
||||
Bug = i_bug(Node),
|
||||
Message = "Inadmissible call node found:\n"
|
||||
},
|
||||
confirm_bug(Bug, Response, Diagnoser0, Diagnoser) -->
|
||||
{ diagnoser_get_oracle(Diagnoser0, Oracle0) },
|
||||
{ edt_root(wrap(Store), Node, Question) },
|
||||
oracle_confirm_bug(Message, Question, Confirmation, Oracle0, Oracle),
|
||||
oracle_confirm_bug(Bug, Confirmation, Oracle0, Oracle),
|
||||
{ diagnoser_set_oracle(Diagnoser0, Oracle, Diagnoser) },
|
||||
{
|
||||
Confirmation = confirm_bug,
|
||||
@@ -243,7 +272,8 @@ diagnosis_store(Store, Node, Response, State0, State) -->
|
||||
|
||||
:- instance mercury_edt(wrap(S), edt_node(R)) <= annotated_trace(S, R)
|
||||
where [
|
||||
pred(edt_root/3) is trace_root,
|
||||
pred(edt_root_question/3) is trace_root_question,
|
||||
pred(edt_root_e_bug/3) is trace_root_e_bug,
|
||||
pred(edt_children/3) is trace_children
|
||||
].
|
||||
|
||||
@@ -252,10 +282,11 @@ diagnosis_store(Store, Node, Response, State0, State) -->
|
||||
%
|
||||
:- type wrap(S) ---> wrap(S).
|
||||
|
||||
:- pred trace_root(wrap(S), edt_node(R), decl_question) <= annotated_trace(S, R).
|
||||
:- mode trace_root(in, in, out) is det.
|
||||
:- pred trace_root_question(wrap(S), edt_node(R), decl_question)
|
||||
<= annotated_trace(S, R).
|
||||
:- mode trace_root_question(in, in, out) is det.
|
||||
|
||||
trace_root(wrap(Store), dynamic(Ref), Root) :-
|
||||
trace_root_question(wrap(Store), dynamic(Ref), Root) :-
|
||||
det_trace_node_from_id(Store, Ref, Node),
|
||||
(
|
||||
Node = fail(_, CallId, RedoId)
|
||||
@@ -286,6 +317,20 @@ get_answers(Store, RedoId, As0, As) :-
|
||||
As = As0
|
||||
).
|
||||
|
||||
:- pred trace_root_e_bug(wrap(S), edt_node(R), decl_e_bug)
|
||||
<= annotated_trace(S, R).
|
||||
:- mode trace_root_e_bug(in, in, out) is det.
|
||||
|
||||
trace_root_e_bug(S, T, Bug) :-
|
||||
trace_root_question(S, T, Q),
|
||||
(
|
||||
Q = wrong_answer(Atom),
|
||||
Bug = incorrect_contour(Atom, unit)
|
||||
;
|
||||
Q = missing_answer(Atom, _),
|
||||
Bug = partially_uncovered_atom(Atom)
|
||||
).
|
||||
|
||||
:- pred trace_children(wrap(S), edt_node(R), list(edt_node(R)))
|
||||
<= annotated_trace(S, R).
|
||||
:- mode trace_children(in, in, out) is semidet.
|
||||
|
||||
@@ -106,9 +106,8 @@
|
||||
list(maybe(univ))
|
||||
).
|
||||
|
||||
% If the following two type is modified, some of
|
||||
% the macros in trace/mercury_trace_declarative.h may need
|
||||
% to be updated.
|
||||
% If the following type is modified, some of the macros in
|
||||
% trace/mercury_trace_declarative.h may need to be updated.
|
||||
%
|
||||
:- type goal_status
|
||||
---> succeeded
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
:- module mdb__declarative_oracle.
|
||||
:- interface.
|
||||
:- import_module mdb__declarative_debugger.
|
||||
:- import_module list, io, string.
|
||||
:- import_module list, io.
|
||||
|
||||
% A response that the oracle gives to a query about the
|
||||
% truth of an EDT node.
|
||||
@@ -35,13 +35,6 @@
|
||||
; no_oracle_answers
|
||||
; abort_diagnosis.
|
||||
|
||||
% A response that the oracle gives when asked to confirm a bug.
|
||||
%
|
||||
:- type oracle_confirmation
|
||||
---> confirm_bug
|
||||
; overrule_bug
|
||||
; abort_diagnosis.
|
||||
|
||||
% The oracle state. This is threaded around the declarative
|
||||
% debugger.
|
||||
%
|
||||
@@ -63,12 +56,10 @@
|
||||
:- mode query_oracle(in, out, in, out, di, uo) is det.
|
||||
|
||||
% Confirm that the node found is indeed an e_bug or an i_bug.
|
||||
% The first argument is a message from the caller to be
|
||||
% prefixed to the question.
|
||||
%
|
||||
:- pred oracle_confirm_bug(string, decl_question, oracle_confirmation,
|
||||
oracle_state, oracle_state, io__state, io__state).
|
||||
:- mode oracle_confirm_bug(in, in, out, in, out, di, uo) is det.
|
||||
:- pred oracle_confirm_bug(decl_bug, decl_confirmation, oracle_state,
|
||||
oracle_state, io__state, io__state).
|
||||
:- mode oracle_confirm_bug(in, out, in, out, di, uo) is det.
|
||||
|
||||
%-----------------------------------------------------------------------------%
|
||||
|
||||
@@ -104,23 +95,10 @@ query_oracle(Queries, Response, Oracle0, Oracle) -->
|
||||
{ Oracle = Oracle0 }
|
||||
).
|
||||
|
||||
oracle_confirm_bug(Message, Question, Confirmation, Oracle0, Oracle) -->
|
||||
oracle_confirm_bug(Bug, Confirmation, Oracle0, Oracle) -->
|
||||
{ get_oracle_user(Oracle0, User0) },
|
||||
user_confirm_bug(Message, Question, UserResponse, User0, User),
|
||||
{ set_oracle_user(Oracle0, User, Oracle) },
|
||||
{
|
||||
UserResponse = user_answer(_ - yes),
|
||||
Confirmation = confirm_bug
|
||||
;
|
||||
UserResponse = user_answer(_ - no),
|
||||
Confirmation = overrule_bug
|
||||
;
|
||||
UserResponse = no_user_answer,
|
||||
error("oracle_confirm_bug: no user answer")
|
||||
;
|
||||
UserResponse = abort_diagnosis,
|
||||
Confirmation = abort_diagnosis
|
||||
}.
|
||||
user_confirm_bug(Bug, Confirmation, User0, User),
|
||||
{ set_oracle_user(Oracle0, User, Oracle) }.
|
||||
|
||||
%-----------------------------------------------------------------------------%
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
% Purpose:
|
||||
% This module performs all the user interaction of the front
|
||||
% end of the declarative debugger. It is responsible for displaying
|
||||
% edt_nodes in a human-readable format, and for getting responses to
|
||||
% debugger queries from the user.
|
||||
% questions and bugs in a human-readable format, and for getting
|
||||
% responses to debugger queries from the user.
|
||||
%
|
||||
|
||||
:- module mdb__declarative_user.
|
||||
:- interface.
|
||||
:- import_module mdb__declarative_debugger.
|
||||
:- import_module list, io, string.
|
||||
:- import_module list, io.
|
||||
|
||||
:- type user_response
|
||||
---> user_answer(decl_answer)
|
||||
@@ -38,9 +38,9 @@
|
||||
|
||||
% Confirm that the node found is indeed an e_bug or an i_bug.
|
||||
%
|
||||
:- pred user_confirm_bug(string, decl_question, user_response, user_state,
|
||||
user_state, io__state, io__state).
|
||||
:- mode user_confirm_bug(in, in, out, in, out, di, uo) is det.
|
||||
:- pred user_confirm_bug(decl_bug, decl_confirmation, user_state, user_state,
|
||||
io__state, io__state).
|
||||
:- mode user_confirm_bug(in, out, in, out, di, uo) is det.
|
||||
|
||||
%-----------------------------------------------------------------------------%
|
||||
|
||||
@@ -120,6 +120,13 @@ decl_question_prompt(missing_answer(_, _), "Complete? ").
|
||||
browse_edt_node(_Node, User, User) -->
|
||||
io__write_string("Sorry, not implemented.\n").
|
||||
|
||||
:- pred browse_decl_bug(decl_bug, user_state, user_state,
|
||||
io__state, io__state).
|
||||
:- mode browse_decl_bug(in, in, out, di, uo) is det.
|
||||
|
||||
browse_decl_bug(_Bug, User, User) -->
|
||||
io__write_string("Sorry, not implemented.\n").
|
||||
|
||||
% Reverse the first argument and append the second to it.
|
||||
%
|
||||
:- pred reverse_and_append(list(T), list(T), list(T)).
|
||||
@@ -214,20 +221,18 @@ command_chars(['?' | _], help).
|
||||
|
||||
%-----------------------------------------------------------------------------%
|
||||
|
||||
user_confirm_bug(Message, Question, Response, User0, User) -->
|
||||
{ User0 = user(_, OutStr) },
|
||||
io__write_string(OutStr, Message),
|
||||
write_decl_question(Question, User0),
|
||||
user_confirm_bug(Bug, Response, User0, User) -->
|
||||
write_decl_bug(Bug, User0),
|
||||
get_command("Is this a bug? ", Command, User0, User1),
|
||||
(
|
||||
{ Command = yes }
|
||||
->
|
||||
{ Response = user_answer(Question - yes) },
|
||||
{ Response = confirm_bug },
|
||||
{ User = User1 }
|
||||
;
|
||||
{ Command = no }
|
||||
->
|
||||
{ Response = user_answer(Question - no) },
|
||||
{ Response = overrule_bug },
|
||||
{ User = User1 }
|
||||
;
|
||||
{ Command = abort }
|
||||
@@ -237,11 +242,11 @@ user_confirm_bug(Message, Question, Response, User0, User) -->
|
||||
;
|
||||
{ Command = browse }
|
||||
->
|
||||
browse_edt_node(Question, User1, User2),
|
||||
user_confirm_bug(Message, Question, Response, User2, User)
|
||||
browse_decl_bug(Bug, User1, User2),
|
||||
user_confirm_bug(Bug, Response, User2, User)
|
||||
;
|
||||
user_confirm_bug_help(User1),
|
||||
user_confirm_bug(Message, Question, Response, User1, User)
|
||||
user_confirm_bug(Bug, Response, User1, User)
|
||||
).
|
||||
|
||||
%-----------------------------------------------------------------------------%
|
||||
@@ -268,6 +273,28 @@ write_decl_question(missing_answer(Call, Solns), User) -->
|
||||
list__foldl(write_decl_atom(OutStr, "\t"), Solns)
|
||||
).
|
||||
|
||||
:- pred write_decl_bug(decl_bug, user_state, io__state, io__state).
|
||||
:- mode write_decl_bug(in, in, di, uo) is det.
|
||||
|
||||
write_decl_bug(e_bug(EBug), User) -->
|
||||
{ User = user(_, OutStr) },
|
||||
(
|
||||
{ EBug = incorrect_contour(Atom, _) },
|
||||
io__write_string(OutStr, "Found incorrect contour:\n"),
|
||||
write_decl_atom(OutStr, "", Atom)
|
||||
;
|
||||
{ EBug = partially_uncovered_atom(Atom) },
|
||||
io__write_string(OutStr, "Found partially uncovered atom:\n"),
|
||||
write_decl_atom(OutStr, "", Atom)
|
||||
).
|
||||
|
||||
write_decl_bug(i_bug(IBug), User) -->
|
||||
{ User = user(_, OutStr) },
|
||||
{ IBug = inadmissible_call(Parent, _, Call) },
|
||||
io__write_string(OutStr, "Found inadmissible call:\n"),
|
||||
write_decl_atom(OutStr, "Parent", Parent),
|
||||
write_decl_atom(OutStr, "Call ", Call).
|
||||
|
||||
:- pred write_decl_atom(io__output_stream, string, decl_atom,
|
||||
io__state, io__state).
|
||||
:- mode write_decl_atom(in, in, in, di, uo) is det.
|
||||
|
||||
@@ -17,7 +17,7 @@ r('a', 10)
|
||||
Valid? yes
|
||||
s(10, 30)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p('a', 30)
|
||||
Is this a bug? yes
|
||||
15: 2 2 EXIT pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
||||
@@ -28,7 +28,7 @@ mdb> finish
|
||||
mdb> dd
|
||||
p('a', 31)
|
||||
Valid? no
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p('a', 31)
|
||||
Is this a bug? yes
|
||||
20: 2 2 EXIT pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
||||
@@ -47,7 +47,7 @@ Complete? yes
|
||||
Call q('b', _)
|
||||
No solutions.
|
||||
Complete? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p('a', 32)
|
||||
Is this a bug? yes
|
||||
35: 2 2 EXIT pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
||||
@@ -67,12 +67,8 @@ Solutions:
|
||||
q('a', 'a')
|
||||
q('a', 'b')
|
||||
Complete? yes
|
||||
Incorrect node found:
|
||||
Call p('a', _)
|
||||
Solutions:
|
||||
p('a', 30)
|
||||
p('a', 31)
|
||||
p('a', 32)
|
||||
Found partially uncovered atom:
|
||||
p('a', _)
|
||||
Is this a bug? yes
|
||||
41: 2 2 FAIL pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
||||
mdb> continue
|
||||
|
||||
@@ -17,7 +17,7 @@ r('a', 10)
|
||||
Valid? yes
|
||||
s(10, 30)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p('a', 30)
|
||||
Is this a bug? yes
|
||||
15: 2 2 EXIT pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
||||
@@ -28,7 +28,7 @@ mdb> finish
|
||||
mdb> dd
|
||||
p('a', 31)
|
||||
Valid? no
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p('a', 31)
|
||||
Is this a bug? yes
|
||||
22: 2 2 EXIT pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
||||
@@ -47,7 +47,7 @@ Complete? yes
|
||||
Call q('b', _)
|
||||
No solutions.
|
||||
Complete? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p('a', 32)
|
||||
Is this a bug? yes
|
||||
39: 2 2 EXIT pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
||||
@@ -67,12 +67,8 @@ Solutions:
|
||||
q('a', 'a')
|
||||
q('a', 'b')
|
||||
Complete? yes
|
||||
Incorrect node found:
|
||||
Call p('a', _)
|
||||
Solutions:
|
||||
p('a', 30)
|
||||
p('a', 31)
|
||||
p('a', 32)
|
||||
Found partially uncovered atom:
|
||||
p('a', _)
|
||||
Is this a bug? yes
|
||||
47: 2 2 FAIL pred aadebug:p/2-0 (nondet) aadebug.m:24 (aadebug.m:9)
|
||||
mdb> continue
|
||||
|
||||
@@ -31,7 +31,7 @@ app([2, 3, 4, 5], [6, 7, 8], [2, 3, 4, 5, 6, 7, 8])
|
||||
Valid? no
|
||||
app([3, 4, 5], [6, 7, 8], [3, 4, 5, 6, 7, 8])
|
||||
Valid? no
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
app([3, 4, 5], [6, 7, 8], [3, 4, 5, 6, 7, 8])
|
||||
Is this a bug? yes
|
||||
19: 2 2 EXIT pred app:app/3-0 (det) app.m:26 (app.m:13)
|
||||
@@ -61,7 +61,7 @@ app([9, 0, 1, 2, 3, 4, 5], [6, 7, 8], [9, 0, 1, 2, 3, 4, 5, 6, 7, 8])
|
||||
Valid? no
|
||||
app([0, 1, 2, 3, 4, 5], [6, 7, 8], [0, 1, 2, 3, 4, 5, 6, 7, 8])
|
||||
Valid? no
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
app([3, 4, 5], [6, 7, 8], [3, 4, 5, 6, 7, 8])
|
||||
Is this a bug? yes
|
||||
67: 8 2 EXIT pred app:app/3-0 (det) app.m:26 (app.m:18)
|
||||
|
||||
@@ -31,15 +31,15 @@ app([2, 3, 4, 5], [6, 7, 8], [2, 3, 4, 5, 6, 7, 8])
|
||||
Valid? no
|
||||
app([3, 4, 5], [6, 7, 8], [3, 4, 5, 6, 7, 8])
|
||||
Valid? no
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
app([3, 4, 5], [6, 7, 8], [3, 4, 5, 6, 7, 8])
|
||||
Is this a bug? yes
|
||||
19: 2 2 EXIT pred app:app/3-0 (det) app.m:26 (app.m:13)
|
||||
mdb> continue
|
||||
append([1, 2, 3, 4, 5], [6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 8]).
|
||||
24: 584 2 CALL pred app:app/3-0 (det) app.m:26 (app.m:18)
|
||||
24: 608 2 CALL pred app:app/3-0 (det) app.m:26 (app.m:18)
|
||||
mdb> finish -n
|
||||
71: 584 2 EXIT pred app:app/3-0 (det) app.m:26 (app.m:18)
|
||||
71: 608 2 EXIT pred app:app/3-0 (det) app.m:26 (app.m:18)
|
||||
mdb> dd
|
||||
app([1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5], [6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8])
|
||||
Valid? no
|
||||
@@ -61,9 +61,9 @@ app([9, 0, 1, 2, 3, 4, 5], [6, 7, 8], [9, 0, 1, 2, 3, 4, 5, 6, 7, 8])
|
||||
Valid? no
|
||||
app([0, 1, 2, 3, 4, 5], [6, 7, 8], [0, 1, 2, 3, 4, 5, 6, 7, 8])
|
||||
Valid? no
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
app([3, 4, 5], [6, 7, 8], [3, 4, 5, 6, 7, 8])
|
||||
Is this a bug? yes
|
||||
71: 584 2 EXIT pred app:app/3-0 (det) app.m:26 (app.m:18)
|
||||
71: 608 2 EXIT pred app:app/3-0 (det) app.m:26 (app.m:18)
|
||||
mdb> continue
|
||||
append([1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5], [6, 7, 8], [1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8]).
|
||||
|
||||
@@ -13,7 +13,7 @@ p(1, 16, 3, 20, 5)
|
||||
Valid? no
|
||||
my_succeed
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(1, 16, 3, 20, 5)
|
||||
Is this a bug? yes
|
||||
7: 2 2 EXIT pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
||||
@@ -24,7 +24,7 @@ mdb> finish
|
||||
mdb> dd
|
||||
p(1, -2, 3, 2, 5)
|
||||
Valid? no
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(1, -2, 3, 2, 5)
|
||||
Is this a bug? yes
|
||||
14: 2 2 EXIT pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
||||
@@ -38,11 +38,8 @@ Solutions:
|
||||
p(1, 16, 3, 20, 5)
|
||||
p(1, -2, 3, 2, 5)
|
||||
Complete? no
|
||||
Incorrect node found:
|
||||
Call p(1, _, 3, _, 5)
|
||||
Solutions:
|
||||
p(1, 16, 3, 20, 5)
|
||||
p(1, -2, 3, 2, 5)
|
||||
Found partially uncovered atom:
|
||||
p(1, _, 3, _, 5)
|
||||
Is this a bug? yes
|
||||
18: 2 2 FAIL pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
||||
mdb> continue
|
||||
|
||||
@@ -13,7 +13,7 @@ p(1, 16, 3, 20, 5)
|
||||
Valid? no
|
||||
my_succeed
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(1, 16, 3, 20, 5)
|
||||
Is this a bug? yes
|
||||
9: 2 2 EXIT pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
||||
@@ -24,7 +24,7 @@ mdb> finish
|
||||
mdb> dd
|
||||
p(1, -2, 3, 2, 5)
|
||||
Valid? no
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(1, -2, 3, 2, 5)
|
||||
Is this a bug? yes
|
||||
20: 2 2 EXIT pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
||||
@@ -38,11 +38,8 @@ Solutions:
|
||||
p(1, 16, 3, 20, 5)
|
||||
p(1, -2, 3, 2, 5)
|
||||
Complete? no
|
||||
Incorrect node found:
|
||||
Call p(1, _, 3, _, 5)
|
||||
Solutions:
|
||||
p(1, 16, 3, 20, 5)
|
||||
p(1, -2, 3, 2, 5)
|
||||
Found partially uncovered atom:
|
||||
p(1, _, 3, _, 5)
|
||||
Is this a bug? yes
|
||||
26: 2 2 FAIL pred args:p/5-0 (nondet) args.m:24 (args.m:10)
|
||||
mdb> continue
|
||||
|
||||
@@ -23,7 +23,7 @@ Solutions:
|
||||
q(1, 2)
|
||||
q(1, 3)
|
||||
Complete? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(1, no)
|
||||
Is this a bug? yes
|
||||
17: 2 2 EXIT pred backtrack:p/2-0 (det) backtrack.m:23 (backtrack.m:9)
|
||||
|
||||
@@ -24,7 +24,7 @@ c(2, 6)
|
||||
Valid? yes
|
||||
f(6, -12)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(-12)
|
||||
Is this a bug? yes
|
||||
26: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
||||
@@ -39,7 +39,7 @@ c(2, 7)
|
||||
Valid? yes
|
||||
f(7, -14)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(-14)
|
||||
Is this a bug? yes
|
||||
33: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
||||
@@ -64,7 +64,7 @@ e(1, 10)
|
||||
Valid? yes
|
||||
f(10, -20)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(-20)
|
||||
Is this a bug? yes
|
||||
65: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
||||
@@ -79,7 +79,7 @@ e(1, 11)
|
||||
Valid? yes
|
||||
f(11, -22)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(-22)
|
||||
Is this a bug? yes
|
||||
72: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
||||
@@ -105,7 +105,7 @@ Solutions:
|
||||
c(2, 6)
|
||||
c(2, 7)
|
||||
Complete? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(2)
|
||||
Is this a bug? yes
|
||||
109: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
||||
@@ -149,14 +149,8 @@ c(4, 9)
|
||||
Valid? yes
|
||||
g(9, 99)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Call p(_)
|
||||
Solutions:
|
||||
p(-12)
|
||||
p(-14)
|
||||
p(-20)
|
||||
p(-22)
|
||||
p(2)
|
||||
Found partially uncovered atom:
|
||||
p(_)
|
||||
Is this a bug? yes
|
||||
137: 2 2 FAIL pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
||||
mdb> continue
|
||||
|
||||
@@ -24,7 +24,7 @@ c(2, 6)
|
||||
Valid? yes
|
||||
f(6, -12)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(-12)
|
||||
Is this a bug? yes
|
||||
28: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
||||
@@ -39,7 +39,7 @@ c(2, 7)
|
||||
Valid? yes
|
||||
f(7, -14)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(-14)
|
||||
Is this a bug? yes
|
||||
35: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
||||
@@ -64,7 +64,7 @@ e(1, 10)
|
||||
Valid? yes
|
||||
f(10, -20)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(-20)
|
||||
Is this a bug? yes
|
||||
71: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
||||
@@ -79,7 +79,7 @@ e(1, 11)
|
||||
Valid? yes
|
||||
f(11, -22)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(-22)
|
||||
Is this a bug? yes
|
||||
78: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
||||
@@ -105,7 +105,7 @@ Solutions:
|
||||
c(2, 6)
|
||||
c(2, 7)
|
||||
Complete? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(2)
|
||||
Is this a bug? yes
|
||||
115: 2 2 EXIT pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
||||
@@ -149,14 +149,8 @@ c(4, 9)
|
||||
Valid? yes
|
||||
g(9, 99)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Call p(_)
|
||||
Solutions:
|
||||
p(-12)
|
||||
p(-14)
|
||||
p(-20)
|
||||
p(-22)
|
||||
p(2)
|
||||
Found partially uncovered atom:
|
||||
p(_)
|
||||
Is this a bug? yes
|
||||
143: 2 2 FAIL pred big:p/1-0 (nondet) big.m:23 (big.m:11)
|
||||
mdb> continue
|
||||
|
||||
@@ -17,7 +17,7 @@ c(2, 11)
|
||||
Valid? yes
|
||||
f(11)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
a(11)
|
||||
Is this a bug? yes
|
||||
23: 2 2 EXIT pred gcf:a/1-0 (nondet) gcf.m:26 (gcf.m:10)
|
||||
@@ -32,7 +32,7 @@ c(2, 12)
|
||||
Valid? yes
|
||||
f(12)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
a(12)
|
||||
Is this a bug? yes
|
||||
30: 2 2 EXIT pred gcf:a/1-0 (nondet) gcf.m:26 (gcf.m:10)
|
||||
@@ -49,7 +49,7 @@ c(3, 20)
|
||||
Valid? yes
|
||||
f(20)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
a(20)
|
||||
Is this a bug? yes
|
||||
42: 2 2 EXIT pred gcf:a/1-0 (nondet) gcf.m:26 (gcf.m:10)
|
||||
|
||||
@@ -15,7 +15,7 @@ a(0)
|
||||
Valid? yes
|
||||
b(1)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
ite(0, 1)
|
||||
Is this a bug? yes
|
||||
9: 2 2 EXIT pred if_then_else:ite/2-0 (det) if_then_else.m:22 (if_then_else.m:8)
|
||||
@@ -30,7 +30,7 @@ Valid? no
|
||||
Call a(1)
|
||||
No solutions.
|
||||
Complete? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
ite(1, 0)
|
||||
Is this a bug? yes
|
||||
17: 5 2 EXIT pred if_then_else:ite/2-0 (det) if_then_else.m:22 (if_then_else.m:12)
|
||||
|
||||
@@ -15,24 +15,24 @@ a(0)
|
||||
Valid? yes
|
||||
b(1)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
ite(0, 1)
|
||||
Is this a bug? yes
|
||||
9: 2 2 EXIT pred if_then_else:ite/2-0 (det) if_then_else.m:22 (if_then_else.m:8)
|
||||
mdb> continue
|
||||
ite(0, 1).
|
||||
16: 368 2 CALL pred if_then_else:ite/2-0 (det) if_then_else.m:22 (if_then_else.m:12)
|
||||
16: 387 2 CALL pred if_then_else:ite/2-0 (det) if_then_else.m:22 (if_then_else.m:12)
|
||||
mdb> finish
|
||||
23: 368 2 EXIT pred if_then_else:ite/2-0 (det) if_then_else.m:22 (if_then_else.m:12)
|
||||
23: 387 2 EXIT pred if_then_else:ite/2-0 (det) if_then_else.m:22 (if_then_else.m:12)
|
||||
mdb> dd
|
||||
ite(1, 0)
|
||||
Valid? no
|
||||
Call a(1)
|
||||
No solutions.
|
||||
Complete? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
ite(1, 0)
|
||||
Is this a bug? yes
|
||||
23: 368 2 EXIT pred if_then_else:ite/2-0 (det) if_then_else.m:22 (if_then_else.m:12)
|
||||
23: 387 2 EXIT pred if_then_else:ite/2-0 (det) if_then_else.m:22 (if_then_else.m:12)
|
||||
mdb> continue
|
||||
ite(1, 0).
|
||||
|
||||
@@ -15,7 +15,7 @@ q(3)
|
||||
Valid? yes
|
||||
r(3, 13)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(1, 13)
|
||||
Is this a bug? yes
|
||||
10: 2 2 EXIT pred lpe_example:p/2-0 (nondet) lpe_example.m:17
|
||||
@@ -28,7 +28,7 @@ p(1, 23)
|
||||
Valid? no
|
||||
r(3, 23)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(1, 23)
|
||||
Is this a bug? yes
|
||||
15: 2 2 EXIT pred lpe_example:p/2-0 (nondet) lpe_example.m:17
|
||||
@@ -39,7 +39,7 @@ mdb> finish
|
||||
mdb> dd
|
||||
p(1, 3)
|
||||
Valid? no
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(1, 3)
|
||||
Is this a bug? yes
|
||||
20: 2 2 EXIT pred lpe_example:p/2-0 (nondet) lpe_example.m:17
|
||||
@@ -59,12 +59,8 @@ Solutions:
|
||||
r(3, 13)
|
||||
r(3, 23)
|
||||
Complete? yes
|
||||
Incorrect node found:
|
||||
Call p(1, _)
|
||||
Solutions:
|
||||
p(1, 13)
|
||||
p(1, 23)
|
||||
p(1, 3)
|
||||
Found partially uncovered atom:
|
||||
p(1, _)
|
||||
Is this a bug? yes
|
||||
22: 2 2 FAIL pred lpe_example:p/2-0 (nondet) lpe_example.m:17
|
||||
mdb> continue
|
||||
|
||||
@@ -15,7 +15,7 @@ q(3)
|
||||
Valid? yes
|
||||
r(3, 13)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(1, 13)
|
||||
Is this a bug? yes
|
||||
11: 3 3 EXIT pred lpe_example:p/2-0 (nondet) lpe_example.m:17 (std_util.m:590)
|
||||
@@ -28,7 +28,7 @@ p(1, 23)
|
||||
Valid? no
|
||||
r(3, 23)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(1, 23)
|
||||
Is this a bug? yes
|
||||
16: 3 3 EXIT pred lpe_example:p/2-0 (nondet) lpe_example.m:17 (std_util.m:590)
|
||||
@@ -39,7 +39,7 @@ mdb> finish
|
||||
mdb> dd
|
||||
p(1, 3)
|
||||
Valid? no
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(1, 3)
|
||||
Is this a bug? yes
|
||||
21: 3 3 EXIT pred lpe_example:p/2-0 (nondet) lpe_example.m:17 (std_util.m:590)
|
||||
@@ -59,12 +59,8 @@ Solutions:
|
||||
r(3, 13)
|
||||
r(3, 23)
|
||||
Complete? yes
|
||||
Incorrect node found:
|
||||
Call p(1, _)
|
||||
Solutions:
|
||||
p(1, 13)
|
||||
p(1, 23)
|
||||
p(1, 3)
|
||||
Found partially uncovered atom:
|
||||
p(1, _)
|
||||
Is this a bug? yes
|
||||
23: 3 3 FAIL pred lpe_example:p/2-0 (nondet) lpe_example.m:17 (std_util.m:590)
|
||||
mdb> continue
|
||||
|
||||
@@ -26,7 +26,7 @@ Solutions:
|
||||
q(0, 0)
|
||||
q(0, 1)
|
||||
Complete? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(0)
|
||||
Is this a bug? yes
|
||||
18: 2 2 EXIT pred neg_conj:p/1-0 (semidet) neg_conj.m:19 (neg_conj.m:9)
|
||||
|
||||
@@ -24,7 +24,7 @@ Solutions:
|
||||
r(1, 11)
|
||||
r(1, 21)
|
||||
Complete? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(1, 42)
|
||||
Is this a bug? yes
|
||||
23: 2 2 EXIT pred negation:p/2-0 (det) negation.m:29 (negation.m:14)
|
||||
|
||||
@@ -13,7 +13,7 @@ a(99, 99, 99)
|
||||
Valid? no
|
||||
b(99)
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
a(99, 99, 99)
|
||||
Is this a bug? yes
|
||||
10: 2 2 EXIT pred oracle_db:a/3-0 (semidet) oracle_db.m:19 (oracle_db.m:9)
|
||||
|
||||
@@ -15,7 +15,7 @@ a
|
||||
Valid? no
|
||||
c
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
a
|
||||
Is this a bug? yes
|
||||
11: 2 2 EXIT pred propositional:a/0-0 (semidet) propositional.m:27 (propositional.m:10)
|
||||
@@ -30,7 +30,7 @@ f
|
||||
Valid? no
|
||||
i
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
f
|
||||
Is this a bug? yes
|
||||
22: 5 2 EXIT pred propositional:b/0-0 (semidet) propositional.m:29 (propositional.m:10)
|
||||
|
||||
@@ -15,14 +15,14 @@ a
|
||||
Valid? no
|
||||
c
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
a
|
||||
Is this a bug? yes
|
||||
15: 2 2 EXIT pred propositional:a/0-0 (semidet) propositional.m:27 (propositional.m:10)
|
||||
mdb> continue
|
||||
16: 299 2 CALL pred propositional:b/0-0 (semidet) propositional.m:29 (propositional.m:10)
|
||||
16: 315 2 CALL pred propositional:b/0-0 (semidet) propositional.m:29 (propositional.m:10)
|
||||
mdb> finish
|
||||
30: 299 2 EXIT pred propositional:b/0-0 (semidet) propositional.m:29 (propositional.m:10)
|
||||
30: 315 2 EXIT pred propositional:b/0-0 (semidet) propositional.m:29 (propositional.m:10)
|
||||
mdb> dd
|
||||
b
|
||||
Valid? no
|
||||
@@ -30,9 +30,9 @@ f
|
||||
Valid? no
|
||||
i
|
||||
Valid? yes
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
f
|
||||
Is this a bug? yes
|
||||
30: 299 2 EXIT pred propositional:b/0-0 (semidet) propositional.m:29 (propositional.m:10)
|
||||
30: 315 2 EXIT pred propositional:b/0-0 (semidet) propositional.m:29 (propositional.m:10)
|
||||
mdb> continue
|
||||
yes
|
||||
|
||||
@@ -51,9 +51,8 @@ Call qdelete(_, [1], _)
|
||||
Solutions:
|
||||
qdelete(1, [1], [])
|
||||
Complete? yes
|
||||
Incorrect node found:
|
||||
Call qperm([1], _)
|
||||
No solutions.
|
||||
Found partially uncovered atom:
|
||||
qperm([1], _)
|
||||
Is this a bug? yes
|
||||
161: 3 2 FAIL pred queens:queen/2-0 (nondet) queens.m:41 (queens.m:15)
|
||||
mdb> continue
|
||||
|
||||
@@ -11,7 +11,7 @@ mdb> finish
|
||||
mdb> dd
|
||||
p(42)
|
||||
Valid? no
|
||||
Incorrect node found:
|
||||
Found incorrect contour:
|
||||
p(42)
|
||||
Is this a bug? yes
|
||||
3: 2 2 EXIT pred small:p/1-0 (det) small.m:14 (small.m:8)
|
||||
|
||||
Reference in New Issue
Block a user