[m-rev.] diff/for review: goal path unification
Zoltan Somogyi
zs at csse.unimelb.edu.au
Thu Jan 4 16:45:26 AEDT 2007
Eliminate some code duplication by unifying the two goal_path types have had
until now: one in mdbcomp/program_representation.m and compiler/hlds_goal.m,
which differed in only one detail (whether we record the total number of arms
in a switch). The new type is in program_representation.m, but with the
definition from goal_path.m.
Add a "step_" prefix to the function symbols of the goal_path_step type,
to avoid ambiguity with the hlds goals the steps describe.
Turn the predicates operating on goal_paths into functions for greater
convenience of use.
mdbcomp/program_representation.m:
compiler/hlds_goal.m:
Make the change described above.
browser/*.m:
compiler/*.m:
mdbcomp/*.m:
slice/*.m:
Conform to the change above.
tests/debugger/*.exp:
Expect the extra information now available for goal path steps
describing switches.
Zoltan.
cvs diff: Diffing .
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/libatomic_ops-1.2
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/doc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/hpc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ibmc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/icc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/msftc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/tests
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing boehm_gc/windows-untested
cvs diff: Diffing boehm_gc/windows-untested/vc60
cvs diff: Diffing boehm_gc/windows-untested/vc70
cvs diff: Diffing boehm_gc/windows-untested/vc71
cvs diff: Diffing browser
Index: browser/declarative_tree.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/declarative_tree.m,v
retrieving revision 1.48
diff -u -r1.48 declarative_tree.m
--- browser/declarative_tree.m 1 Dec 2006 15:03:44 -0000 1.48
+++ browser/declarative_tree.m 2 Jan 2007 07:14:31 -0000
@@ -1212,7 +1212,7 @@
Primitives0)
;
Goal = scope_rep(InnerGoal, MaybeCut),
- InnerPath = list.append(Path, [scope(MaybeCut)]),
+ InnerPath = list.append(Path, [step_scope(MaybeCut)]),
InnerAndPath = goal_and_path(InnerGoal, InnerPath),
MaybePrims = make_primitive_list(Store, [InnerAndPath | GoalPaths],
Contour, MaybeEnd, ArgNum, TotalArgs, HeadVars, AllTraced,
@@ -1245,7 +1245,7 @@
DisjPathStr = get_goal_path_from_label_layout(Label),
path_from_string_det(DisjPathStr, DisjPath),
list.append(Path, PathTail, DisjPath),
- PathTail = [disj(N)]
+ PathTail = [step_disj(N)]
->
list.index1_det(Disjs, N, Disj),
DisjAndPath = goal_and_path(Disj, DisjPath),
@@ -1264,7 +1264,7 @@
ArmPathStr = get_goal_path_from_label_layout(Label),
path_from_string_det(ArmPathStr, ArmPath),
list.append(Path, PathTail, ArmPath),
- PathTail = [switch(N)]
+ PathTail = [step_switch(N, _)]
->
list.index1_det(Arms, N, Arm),
ArmAndPath = goal_and_path(Arm, ArmPath),
@@ -1283,9 +1283,9 @@
CondPathStr = get_goal_path_from_label_layout(Label),
path_from_string_det(CondPathStr, CondPath),
list.append(Path, PathTail, CondPath),
- PathTail = [ite_cond]
+ PathTail = [step_ite_cond]
->
- ThenPath = list.append(Path, [ite_then]),
+ ThenPath = list.append(Path, [step_ite_then]),
CondAndPath = goal_and_path(Cond, CondPath),
ThenAndPath = goal_and_path(Then, ThenPath),
MaybePrims = make_primitive_list(Store,
@@ -1299,9 +1299,9 @@
CondPathStr = get_goal_path_from_label_layout(Label),
path_from_string_det(CondPathStr, CondPath),
list.append(Path, PathTail, CondPath),
- PathTail = [ite_cond]
+ PathTail = [step_ite_cond]
->
- ElsePath = list.append(Path, [ite_else]),
+ ElsePath = list.append(Path, [step_ite_else]),
ElseAndPath = goal_and_path(Else, ElsePath),
MaybePrims = make_primitive_list(Store, [ElseAndPath | GoalPaths],
ContourTail, MaybeEnd, ArgNum, TotalArgs, HeadVars, AllTraced,
@@ -1325,7 +1325,7 @@
->
% The end of the primitive list is somewhere inside
% NegGoal.
- NegPath = list.append(Path, [neg]),
+ NegPath = list.append(Path, [step_neg]),
NegAndPath = goal_and_path(NegGoal, NegPath),
MaybePrims = make_primitive_list(Store, [NegAndPath], ContourTail,
MaybeEnd, ArgNum, TotalArgs, HeadVars, AllTraced, Primitives0)
@@ -1739,7 +1739,7 @@
add_paths_to_conjuncts([], _, _, []).
add_paths_to_conjuncts([Goal | Goals], ParentPath, N,
[goal_and_path(Goal, Path) | GoalAndPaths]) :-
- Path = ParentPath ++ [conj(N)],
+ Path = ParentPath ++ [step_conj(N)],
add_paths_to_conjuncts(Goals, ParentPath, N + 1, GoalAndPaths).
%-----------------------------------------------------------------------------%
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/build_mode_constraints.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/build_mode_constraints.m,v
retrieving revision 1.23
diff -u -r1.23 build_mode_constraints.m
--- compiler/build_mode_constraints.m 3 Jan 2007 05:17:03 -0000 1.23
+++ compiler/build_mode_constraints.m 3 Jan 2007 05:29:18 -0000
@@ -24,6 +24,8 @@
:- import_module hlds.hlds_goal.
:- import_module hlds.hlds_pred.
:- import_module hlds.hlds_module.
+:- import_module mdbcomp.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.
:- import_module parse_tree.prog_data.
Index: compiler/code_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/code_info.m,v
retrieving revision 1.339
diff -u -r1.339 code_info.m
--- compiler/code_info.m 3 Jan 2007 07:20:30 -0000 1.339
+++ compiler/code_info.m 3 Jan 2007 07:32:42 -0000
@@ -43,6 +43,7 @@
:- import_module ll_backend.llds.
:- import_module ll_backend.trace_gen.
:- import_module mdbcomp.prim_data.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.prog_data.
:- import_module assoc_list.
Index: compiler/continuation_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/continuation_info.m,v
retrieving revision 1.86
diff -u -r1.86 continuation_info.m
--- compiler/continuation_info.m 14 Dec 2006 04:35:44 -0000 1.86
+++ compiler/continuation_info.m 2 Jan 2007 07:25:13 -0000
@@ -64,6 +64,7 @@
:- import_module ll_backend.llds.
:- import_module ll_backend.trace_gen.
:- import_module mdbcomp.prim_data.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.prog_data.
:- import_module assoc_list.
Index: compiler/deep_profiling.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/deep_profiling.m,v
retrieving revision 1.59
diff -u -r1.59 deep_profiling.m
--- compiler/deep_profiling.m 1 Dec 2006 15:03:53 -0000 1.59
+++ compiler/deep_profiling.m 2 Jan 2007 07:52:20 -0000
@@ -41,6 +41,7 @@
:- import_module libs.globals.
:- import_module libs.options.
:- import_module mdbcomp.prim_data.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.prog_data.
:- import_module parse_tree.prog_type.
:- import_module transform_hlds.
@@ -963,18 +964,18 @@
Goal = GoalExpr - GoalInfo
;
GoalExpr0 = negation(SubGoal0),
- deep_prof_transform_goal([neg | Path], SubGoal0, SubGoal,
+ deep_prof_transform_goal([step_neg | Path], SubGoal0, SubGoal,
AddedImpurity, !DeepInfo),
add_impurity_if_needed(AddedImpurity, GoalInfo0, GoalInfo),
GoalExpr = negation(SubGoal),
Goal = GoalExpr - GoalInfo
;
GoalExpr0 = if_then_else(IVars, Cond0, Then0, Else0),
- deep_prof_transform_goal([ite_cond | Path], Cond0, Cond,
+ deep_prof_transform_goal([step_ite_cond | Path], Cond0, Cond,
AddedImpurityC, !DeepInfo),
- deep_prof_transform_goal([ite_then | Path], Then0, Then,
+ deep_prof_transform_goal([step_ite_then | Path], Then0, Then,
AddedImpurityT, !DeepInfo),
- deep_prof_transform_goal([ite_else | Path], Else0, Else,
+ deep_prof_transform_goal([step_ite_else | Path], Else0, Else,
AddedImpurityE, !DeepInfo),
(
( AddedImpurityC = yes
@@ -1016,8 +1017,8 @@
AddForceCommit = yes
)
),
- deep_prof_transform_goal([scope(MaybeCut) | Path], SubGoal0, SubGoal,
- AddedImpurity, !DeepInfo),
+ deep_prof_transform_goal([step_scope(MaybeCut) | Path],
+ SubGoal0, SubGoal, AddedImpurity, !DeepInfo),
add_impurity_if_needed(AddedImpurity, GoalInfo0, GoalInfo),
(
AddForceCommit = no,
@@ -1041,8 +1042,8 @@
deep_prof_transform_conj(N, Path, [Goal0 | Goals0], [Goal | Goals],
AddedImpurity, !DeepInfo) :-
N1 = N + 1,
- deep_prof_transform_goal([conj(N1) | Path], Goal0, Goal, AddedImpurityFirst,
- !DeepInfo),
+ deep_prof_transform_goal([step_conj(N1) | Path], Goal0, Goal,
+ AddedImpurityFirst, !DeepInfo),
deep_prof_transform_conj(N1, Path, Goals0, Goals, AddedImpurityLater,
!DeepInfo),
bool.or(AddedImpurityFirst, AddedImpurityLater, AddedImpurity).
@@ -1055,8 +1056,8 @@
deep_prof_transform_disj(N, Path, [Goal0 | Goals0], [Goal | Goals],
AddedImpurity, !DeepInfo) :-
N1 = N + 1,
- deep_prof_transform_goal([disj(N1) | Path], Goal0, Goal, AddedImpurityFirst,
- !DeepInfo),
+ deep_prof_transform_goal([step_disj(N1) | Path], Goal0, Goal,
+ AddedImpurityFirst, !DeepInfo),
deep_prof_transform_disj(N1, Path, Goals0, Goals, AddedImpurityLater,
!DeepInfo),
bool.or(AddedImpurityFirst, AddedImpurityLater, AddedImpurity).
@@ -1069,7 +1070,7 @@
deep_prof_transform_switch(NumCases, N, Path, [case(Id, Goal0) | Goals0],
[case(Id, Goal) | Goals], AddedImpurity, !DeepInfo) :-
N1 = N + 1,
- deep_prof_transform_goal([switch(NumCases, N1) | Path], Goal0, Goal,
+ deep_prof_transform_goal([step_switch(NumCases, N1) | Path], Goal0, Goal,
AddedImpurityFirst, !DeepInfo),
deep_prof_transform_switch(NumCases, N1, Path, Goals0, Goals,
AddedImpurityLater, !DeepInfo),
Index: compiler/goal_path.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/goal_path.m,v
retrieving revision 1.39
diff -u -r1.39 goal_path.m
--- compiler/goal_path.m 27 Sep 2006 06:16:52 -0000 1.39
+++ compiler/goal_path.m 2 Jan 2007 07:51:42 -0000
@@ -5,13 +5,13 @@
% This file may only be copied under the terms of the GNU General
% Public License - see the file COPYING in the Mercury distribution.
%-----------------------------------------------------------------------------%
-%
+%
% File: goal_path.m.
% Main author: zs.
-%
+%
% This module looks after goal paths, which associate each goal with its
% position in a procedure definition,
-%
+%
%-----------------------------------------------------------------------------%
%-----------------------------------------------------------------------------%
@@ -63,6 +63,8 @@
:- import_module hlds.hlds_goal.
:- import_module libs.
:- import_module libs.compiler_util.
+:- import_module mdbcomp.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.prog_data.
:- import_module int.
@@ -99,7 +101,7 @@
fill_slots_in_clause(SlotInfo, Clause0, Clause, ClauseNum, ClauseNum + 1) :-
Clause0 = clause(ProcIds, Goal0, Lang, Context),
- fill_goal_slots([disj(ClauseNum)], SlotInfo, Goal0, Goal),
+ fill_goal_slots([step_disj(ClauseNum)], SlotInfo, Goal0, Goal),
Clause = clause(ProcIds, Goal, Lang, Context).
fill_goal_path_slots_in_goal(Goal0, VarTypes, ModuleInfo, Goal) :-
@@ -124,10 +126,10 @@
:- pred mode_equiv_step(goal_path_step::in) is semidet.
mode_equiv_step(Step) :-
- ( Step = disj(_)
- ; Step = neg
- ; Step = scope(_)
- ; Step = ite_else
+ ( Step = step_disj(_)
+ ; Step = step_neg
+ ; Step = step_scope(_)
+ ; Step = step_ite_else
).
:- pred fill_expr_slots(hlds_goal_info::in, goal_path::in, slot_info::in,
@@ -156,7 +158,7 @@
Goal = switch(Var, CanFail, Cases)
;
Goal0 = negation(SubGoal0),
- fill_goal_slots([neg | Path0], SlotInfo, SubGoal0, SubGoal),
+ fill_goal_slots([step_neg | Path0], SlotInfo, SubGoal0, SubGoal),
Goal = negation(SubGoal)
;
Goal0 = scope(Reason, SubGoal0),
@@ -168,14 +170,14 @@
;
MaybeCut = cut
),
- fill_goal_slots([scope(MaybeCut) | Path0], SlotInfo,
+ fill_goal_slots([step_scope(MaybeCut) | Path0], SlotInfo,
SubGoal0, SubGoal),
Goal = scope(Reason, SubGoal)
;
Goal0 = if_then_else(A, Cond0, Then0, Else0),
- fill_goal_slots([ite_cond | Path0], SlotInfo, Cond0, Cond),
- fill_goal_slots([ite_then | Path0], SlotInfo, Then0, Then),
- fill_goal_slots([ite_else | Path0], SlotInfo, Else0, Else),
+ fill_goal_slots([step_ite_cond | Path0], SlotInfo, Cond0, Cond),
+ fill_goal_slots([step_ite_then | Path0], SlotInfo, Then0, Then),
+ fill_goal_slots([step_ite_else | Path0], SlotInfo, Else0, Else),
Goal = if_then_else(A, Cond, Then, Else)
;
Goal0 = unify(LHS, RHS0, Mode, Kind, Context),
@@ -207,7 +209,7 @@
fill_conj_slots(_, _, _, [], []).
fill_conj_slots(Path0, N0, SlotInfo, [Goal0 | Goals0], [Goal | Goals]) :-
N1 = N0 + 1,
- fill_goal_slots([conj(N1) | Path0], SlotInfo, Goal0, Goal),
+ fill_goal_slots([step_conj(N1) | Path0], SlotInfo, Goal0, Goal),
fill_conj_slots(Path0, N1, SlotInfo, Goals0, Goals).
:- pred fill_disj_slots(goal_path::in, int::in, slot_info::in,
@@ -216,7 +218,7 @@
fill_disj_slots(_, _, _, [], []).
fill_disj_slots(Path0, N0, SlotInfo, [Goal0 | Goals0], [Goal | Goals]) :-
N1 = N0 + 1,
- fill_goal_slots([disj(N1) | Path0], SlotInfo, Goal0, Goal),
+ fill_goal_slots([step_disj(N1) | Path0], SlotInfo, Goal0, Goal),
fill_disj_slots(Path0, N1, SlotInfo, Goals0, Goals).
:- pred fill_switch_slots(goal_path::in, int::in, int::in, slot_info::in,
@@ -226,7 +228,8 @@
fill_switch_slots(Path0, N0, NumCases, SlotInfo,
[case(A, Goal0) | Cases0], [case(A, Goal) | Cases]) :-
N1 = N0 + 1,
- fill_goal_slots([switch(N1, NumCases) | Path0], SlotInfo, Goal0, Goal),
+ fill_goal_slots([step_switch(N1, NumCases) | Path0], SlotInfo,
+ Goal0, Goal),
fill_switch_slots(Path0, N1, NumCases, SlotInfo, Cases0, Cases).
%-----------------------------------------------------------------------------%
Index: compiler/hlds_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_data.m,v
retrieving revision 1.111
diff -u -r1.111 hlds_data.m
--- compiler/hlds_data.m 1 Dec 2006 15:03:58 -0000 1.111
+++ compiler/hlds_data.m 2 Jan 2007 07:29:40 -0000
@@ -18,8 +18,8 @@
:- interface.
:- import_module hlds.hlds_pred.
-:- import_module hlds.hlds_goal.
:- import_module mdbcomp.prim_data.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.prog_data.
:- import_module bool.
Index: compiler/hlds_goal.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_goal.m,v
retrieving revision 1.173
diff -u -r1.173 hlds_goal.m
--- compiler/hlds_goal.m 3 Jan 2007 05:17:03 -0000 1.173
+++ compiler/hlds_goal.m 3 Jan 2007 05:40:54 -0000
@@ -21,6 +21,7 @@
:- import_module hlds.hlds_pred.
:- import_module hlds.instmap.
:- import_module mdbcomp.prim_data.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.prog_data.
:- import_module bool.
@@ -1064,47 +1065,6 @@
% This goal contains a scope goal whose scope_reason is
% trace_goal(...).
- % We can think of the goal that defines a procedure to be a tree,
- % whose leaves are primitive goals and whose interior nodes are
- % compound goals. These two types describe the position of a goal
- % in this tree. A goal_path_step type says which branch to take at an
- % interior node; the integer counts start at one. (For switches,
- % the second int gives the total number of function symbols in the type
- % of the switched-on var; for builtin types such as integer and string,
- % for which this number is effectively infinite, we store a negative
- % number.) The goal_path type gives the sequence of steps from the root
- % to the given goal *in reverse order*, so that the step closest to
- % the root is last. (Keeping the list in reverse order makes the
- % common operations constant-time instead of linear in the length
- % of the list.)
- %
- % If any of the following three types is changed, then the
- % corresponding types in mdbcomp/program_representation.m must be
- % updated.
- %
-:- type goal_path == list(goal_path_step).
-
-:- type goal_path_step
- ---> conj(int)
- ; disj(int)
- ; switch(int, int)
- ; ite_cond
- ; ite_then
- ; ite_else
- ; neg
- ; scope(maybe_cut)
- ; first
- ; later.
-
-:- type maybe_cut
- ---> cut
- ; no_cut.
-
- % Convert a goal path to a string, using the format documented
- % in the Mercury user's guide.
- %
-:- func goal_path_to_string(goal_path) = string.
-
%-----------------------------------------------------------------------------%
%
% Get/set predicates for the extra_goal_info structure
@@ -1860,46 +1820,8 @@
goal_info_has_feature(GoalInfo, Feature).
%-----------------------------------------------------------------------------%
-
-goal_path_to_string(Path) = PathStr :-
- goal_path_steps_to_strings(Path, StepStrs),
- list.reverse(StepStrs, RevStepStrs),
- string.append_list(RevStepStrs, PathStr).
-
-:- pred goal_path_steps_to_strings(goal_path::in, list(string)::out) is det.
-
-goal_path_steps_to_strings([], []).
-goal_path_steps_to_strings([Step | Steps], [StepStr | StepStrs]) :-
- goal_path_step_to_string(Step, StepStr),
- goal_path_steps_to_strings(Steps, StepStrs).
-
- % The inverse of this procedure is implemented in
- % mdbcomp/program_representation.m, and must be updated if this
- % is changed.
- %
-:- pred goal_path_step_to_string(goal_path_step::in, string::out) is det.
-
-goal_path_step_to_string(conj(N), Str) :-
- string.int_to_string(N, NStr),
- string.append_list(["c", NStr, ";"], Str).
-goal_path_step_to_string(disj(N), Str) :-
- string.int_to_string(N, NStr),
- string.append_list(["d", NStr, ";"], Str).
-goal_path_step_to_string(switch(N, _), Str) :-
- string.int_to_string(N, NStr),
- string.append_list(["s", NStr, ";"], Str).
-goal_path_step_to_string(ite_cond, "?;").
-goal_path_step_to_string(ite_then, "t;").
-goal_path_step_to_string(ite_else, "e;").
-goal_path_step_to_string(neg, "~;").
-goal_path_step_to_string(scope(cut), "q!;").
-goal_path_step_to_string(scope(no_cut), "q;").
-goal_path_step_to_string(first, "f;").
-goal_path_step_to_string(later, "l;").
-
-%-----------------------------------------------------------------------------%
%
-% Miscellaneous utility procedures for dealing with HLDS goals
+% Miscellaneous utility procedures for dealing with HLDS goals.
%
goal_to_conj_list(Goal, ConjList) :-
Index: compiler/hlds_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_out.m,v
retrieving revision 1.420
diff -u -r1.420 hlds_out.m
--- compiler/hlds_out.m 3 Jan 2007 07:20:31 -0000 1.420
+++ compiler/hlds_out.m 3 Jan 2007 07:32:42 -0000
@@ -271,6 +271,7 @@
:- import_module libs.compiler_util.
:- import_module libs.globals.
:- import_module libs.options.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.mercury_to_mercury.
:- import_module parse_tree.prog_ctgc.
:- import_module parse_tree.prog_io_util.
@@ -1238,10 +1239,9 @@
goal_info_get_goal_path(GoalInfo, Path),
(
Path = [_ | _],
- PathStr = goal_path_to_string(Path),
write_indent(Indent, !IO),
io.write_string("% goal path: ", !IO),
- io.write_string(PathStr, !IO),
+ io.write_string(goal_path_to_string(Path), !IO),
io.write_string("\n", !IO)
;
Path = []
@@ -4040,8 +4040,7 @@
ConstraintType = unproven,
io.write_string("(A, ", !IO)
),
- GoalPathStr = goal_path_to_string(GoalPath),
- io.write_strings(["""", GoalPathStr, """, "], !IO),
+ io.write_strings(["""", goal_path_to_string(GoalPath), """, "], !IO),
io.write_int(N, !IO),
io.write_char(')', !IO).
Index: compiler/hlds_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_pred.m,v
retrieving revision 1.218
diff -u -r1.218 hlds_pred.m
--- compiler/hlds_pred.m 3 Jan 2007 05:17:05 -0000 1.218
+++ compiler/hlds_pred.m 3 Jan 2007 05:29:19 -0000
@@ -32,6 +32,7 @@
:- import_module hlds.special_pred.
:- import_module libs.globals.
:- import_module mdbcomp.prim_data.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.prog_data.
:- import_module transform_hlds.term_constr_main.
:- import_module transform_hlds.term_util.
Index: compiler/interval.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/interval.m,v
retrieving revision 1.25
diff -u -r1.25 interval.m
--- compiler/interval.m 6 Nov 2006 07:55:09 -0000 1.25
+++ compiler/interval.m 2 Jan 2007 07:29:11 -0000
@@ -35,6 +35,8 @@
:- import_module hlds.
:- import_module hlds.hlds_goal.
:- import_module hlds.hlds_module.
+:- import_module mdbcomp.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.
:- import_module parse_tree.prog_data.
Index: compiler/layout_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/layout_out.m,v
retrieving revision 1.85
diff -u -r1.85 layout_out.m
--- compiler/layout_out.m 3 Jan 2007 07:20:32 -0000 1.85
+++ compiler/layout_out.m 3 Jan 2007 07:32:42 -0000
@@ -110,6 +110,7 @@
:- import_module hlds.special_pred.
:- import_module libs.compiler_util.
:- import_module libs.trace_params.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.mercury_to_mercury.
:- import_module parse_tree.prog_data.
:- import_module parse_tree.prog_foreign.
@@ -2102,8 +2103,7 @@
io.write_string(""", ", !IO),
io.write_int(LineNumber, !IO),
io.write_string(", """, !IO),
- GoalPathStr = goal_path_to_string(GoalPath),
- io.write_string(GoalPathStr, !IO),
+ io.write_string(goal_path_to_string(GoalPath), !IO),
io.write_string(""" },\n", !IO).
:- pred output_call_site_static_decl(call_site_static_data::in,
Index: compiler/llds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/llds.m,v
retrieving revision 1.343
diff -u -r1.343 llds.m
--- compiler/llds.m 3 Jan 2007 07:20:33 -0000 1.343
+++ compiler/llds.m 3 Jan 2007 07:32:42 -0000
@@ -22,12 +22,12 @@
:- import_module backend_libs.rtti.
:- import_module hlds.code_model.
:- import_module hlds.hlds_data.
-:- import_module hlds.hlds_goal.
:- import_module hlds.hlds_llds.
:- import_module hlds.hlds_pred.
:- import_module libs.tree.
:- import_module ll_backend.layout.
:- import_module mdbcomp.prim_data.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.prog_data.
:- import_module parse_tree.prog_foreign.
Index: compiler/mode_constraint_robdd.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_constraint_robdd.m,v
retrieving revision 1.11
diff -u -r1.11 mode_constraint_robdd.m
--- compiler/mode_constraint_robdd.m 27 Sep 2006 06:16:54 -0000 1.11
+++ compiler/mode_constraint_robdd.m 2 Jan 2007 07:35:31 -0000
@@ -26,8 +26,9 @@
:- import_module parse_tree.
:- import_module parse_tree.prog_data.
:- import_module hlds.
-:- import_module hlds.hlds_goal.
:- import_module hlds.hlds_pred.
+:- import_module mdbcomp.
+:- import_module mdbcomp.program_representation.
:- import_module mode_robdd.
:- import_module bool.
@@ -144,6 +145,7 @@
:- implementation.
+:- import_module hlds.hlds_goal.
% :- import_module mode_robdd.tfeir.
:- import_module mode_robdd.tfeirn.
% :- import_module mode_robdd.check.
@@ -350,28 +352,28 @@
:- pred dump_goal_path_step(goal_path_step::in, io::di, io::uo) is det.
-dump_goal_path_step(conj(N)) -->
+dump_goal_path_step(step_conj(N)) -->
io.write_char('c'),
io.write_int(N).
-dump_goal_path_step(disj(N)) -->
+dump_goal_path_step(step_disj(N)) -->
io.write_char('d'),
io.write_int(N).
-dump_goal_path_step(switch(N, _)) -->
+dump_goal_path_step(step_switch(N, _)) -->
io.write_char('s'),
io.write_int(N).
-dump_goal_path_step(ite_cond) -->
+dump_goal_path_step(step_ite_cond) -->
io.write_char('c').
-dump_goal_path_step(ite_then) -->
+dump_goal_path_step(step_ite_then) -->
io.write_char('t').
-dump_goal_path_step(ite_else) -->
+dump_goal_path_step(step_ite_else) -->
io.write_char('e').
-dump_goal_path_step(neg) -->
+dump_goal_path_step(step_neg) -->
io.write_char('n').
-dump_goal_path_step(scope(_)) -->
+dump_goal_path_step(step_scope(_)) -->
io.write_char('q').
-dump_goal_path_step(first) -->
+dump_goal_path_step(step_first) -->
io.write_char('f').
-dump_goal_path_step(later) -->
+dump_goal_path_step(step_later) -->
io.write_char('l').
robdd_to_dot(Constraint, ProgVarSet, Info, FileName) -->
Index: compiler/mode_constraints.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_constraints.m,v
retrieving revision 1.37
diff -u -r1.37 mode_constraints.m
--- compiler/mode_constraints.m 27 Dec 2006 03:17:53 -0000 1.37
+++ compiler/mode_constraints.m 2 Jan 2007 07:26:51 -0000
@@ -67,6 +67,7 @@
:- import_module libs.options.
:- import_module mdbcomp.
:- import_module mdbcomp.prim_data.
+:- import_module mdbcomp.program_representation.
:- import_module mode_robdd.
% :- import_module mode_robdd.check.
% :- import_module mode_robdd.tfeir.
Index: compiler/mode_ordering.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_ordering.m,v
retrieving revision 1.19
diff -u -r1.19 mode_ordering.m
--- compiler/mode_ordering.m 27 Dec 2006 03:17:54 -0000 1.19
+++ compiler/mode_ordering.m 2 Jan 2007 07:42:42 -0000
@@ -57,6 +57,8 @@
:- import_module mode_robdd.tfeirn.
:- import_module libs.
:- import_module libs.compiler_util.
+:- import_module mdbcomp.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.
:- import_module parse_tree.prog_data.
@@ -411,7 +413,7 @@
(
G = _ - GI,
goal_info_get_goal_path(GI, GP),
- GP = [conj(Index0) | _]
+ GP = [step_conj(Index0) | _]
->
Index = Index0
;
Index: compiler/ordering_mode_constraints.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ordering_mode_constraints.m,v
retrieving revision 1.12
diff -u -r1.12 ordering_mode_constraints.m
--- compiler/ordering_mode_constraints.m 3 Jan 2007 05:17:06 -0000 1.12
+++ compiler/ordering_mode_constraints.m 3 Jan 2007 05:39:59 -0000
@@ -108,6 +108,8 @@
:- import_module hlds.hlds_goal.
:- import_module libs.
:- import_module libs.compiler_util.
+:- import_module mdbcomp.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.
:- import_module parse_tree.error_util.
:- import_module parse_tree.prog_data.
@@ -580,7 +582,7 @@
%
:- pred get_position_in_conj(mc_rep_var::in, conjunct_id::out) is semidet.
-get_position_in_conj(_ProgVar `in` _PredId `at` [conj(N) | _], N).
+get_position_in_conj(_ProgVar `in` _PredId `at` [step_conj(N) | _], N).
%-----------------------------------------------------------------------------%
@@ -756,8 +758,7 @@
dump_goal_goal_paths(Indent, GoalExpr - GoalInfo, !IO) :-
goal_info_get_goal_path(GoalInfo, GoalPath),
- GoalPathString = goal_path_to_string(GoalPath),
- GoalPathFormat = [words(GoalPathString), nl],
+ GoalPathFormat = [words(goal_path_to_string(GoalPath)), nl],
write_error_pieces_maybe_with_context(no, Indent, GoalPathFormat, !IO),
dump_goal_expr_goal_paths(Indent+1, GoalExpr, !IO).
Index: compiler/post_typecheck.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/post_typecheck.m,v
retrieving revision 1.115
diff -u -r1.115 post_typecheck.m
--- compiler/post_typecheck.m 27 Dec 2006 03:17:55 -0000 1.115
+++ compiler/post_typecheck.m 2 Jan 2007 07:36:21 -0000
@@ -125,6 +125,7 @@
:- import_module libs.compiler_util.
:- import_module libs.globals.
:- import_module libs.options.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.mercury_to_mercury.
:- import_module parse_tree.prog_type.
:- import_module parse_tree.prog_type_subst.
Index: compiler/stack_layout.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stack_layout.m,v
retrieving revision 1.130
diff -u -r1.130 stack_layout.m
--- compiler/stack_layout.m 3 Jan 2007 05:17:06 -0000 1.130
+++ compiler/stack_layout.m 3 Jan 2007 05:29:20 -0000
@@ -475,9 +475,8 @@
).
:- pred find_valid_return_context(
- assoc_list(code_addr, pair(prog_context, hlds_goal.goal_path))::in,
- code_addr::out, prog_context::out, hlds_goal.goal_path::out)
- is semidet.
+ assoc_list(code_addr, pair(prog_context, goal_path))::in,
+ code_addr::out, prog_context::out, goal_path::out) is semidet.
find_valid_return_context([TargetContext | TargetContexts],
ValidTarget, ValidContext, ValidGoalPath) :-
Index: compiler/stack_opt.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stack_opt.m,v
retrieving revision 1.31
diff -u -r1.31 stack_opt.m
--- compiler/stack_opt.m 1 Dec 2006 15:04:21 -0000 1.31
+++ compiler/stack_opt.m 2 Jan 2007 07:26:58 -0000
@@ -103,6 +103,7 @@
:- import_module ll_backend.live_vars.
:- import_module ll_backend.liveness.
:- import_module ll_backend.store_alloc.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.mercury_to_mercury.
:- import_module parse_tree.prog_data.
:- import_module parse_tree.prog_type.
Index: compiler/structure_reuse.direct.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/structure_reuse.direct.m,v
retrieving revision 1.5
diff -u -r1.5 structure_reuse.direct.m
--- compiler/structure_reuse.direct.m 1 Dec 2006 15:04:21 -0000 1.5
+++ compiler/structure_reuse.direct.m 2 Jan 2007 07:53:32 -0000
@@ -47,6 +47,7 @@
:- import_module hlds.passes_aux.
:- import_module libs.globals.
:- import_module libs.options.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.error_util.
:- import_module parse_tree.prog_out.
:- import_module transform_hlds.ctgc.structure_reuse.direct.choose_reuse.
@@ -251,28 +252,28 @@
:- pred dump_goal_path_step(goal_path_step::in, io::di, io::uo) is det.
-dump_goal_path_step(conj(N)) -->
+dump_goal_path_step(step_conj(N)) -->
io.write_char('c'),
io.write_int(N).
-dump_goal_path_step(disj(N)) -->
+dump_goal_path_step(step_disj(N)) -->
io.write_char('d'),
io.write_int(N).
-dump_goal_path_step(switch(N, _)) -->
+dump_goal_path_step(step_switch(N, _)) -->
io.write_char('s'),
io.write_int(N).
-dump_goal_path_step(ite_cond) -->
+dump_goal_path_step(step_ite_cond) -->
io.write_char('c').
-dump_goal_path_step(ite_then) -->
+dump_goal_path_step(step_ite_then) -->
io.write_char('t').
-dump_goal_path_step(ite_else) -->
+dump_goal_path_step(step_ite_else) -->
io.write_char('e').
-dump_goal_path_step(neg) -->
+dump_goal_path_step(step_neg) -->
io.write_char('n').
-dump_goal_path_step(scope(_)) -->
+dump_goal_path_step(step_scope(_)) -->
io.write_char('q').
-dump_goal_path_step(first) -->
+dump_goal_path_step(step_first) -->
io.write_char('f').
-dump_goal_path_step(later) -->
+dump_goal_path_step(step_later) -->
io.write_char('l').
dead_cell_table_init = map.init.
Index: compiler/trace_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/trace_gen.m,v
retrieving revision 1.12
diff -u -r1.12 trace_gen.m
--- compiler/trace_gen.m 3 Jan 2007 07:20:36 -0000 1.12
+++ compiler/trace_gen.m 3 Jan 2007 08:27:52 -0000
@@ -252,6 +252,7 @@
:- import_module ll_backend.layout_out.
:- import_module ll_backend.llds_out.
:- import_module mdbcomp.prim_data.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.prog_type.
:- import_module bool.
@@ -688,22 +689,22 @@
(
Path = [LastStep | _],
(
- LastStep = switch(_, _),
+ LastStep = step_switch(_, _),
PortPrime = port_switch
;
- LastStep = disj(_),
+ LastStep = step_disj(_),
PortPrime = port_disj
;
- LastStep = ite_cond,
+ LastStep = step_ite_cond,
PortPrime = port_ite_cond
;
- LastStep = ite_then,
+ LastStep = step_ite_then,
PortPrime = port_ite_then
;
- LastStep = ite_else,
+ LastStep = step_ite_else,
PortPrime = port_ite_else
;
- LastStep = neg,
+ LastStep = step_neg,
PortPrime = port_neg_enter
)
->
@@ -847,9 +848,9 @@
PortInfo = port_info_nondet_foreign_proc,
LiveVars = [],
( Port = port_nondet_foreign_proc_first ->
- Path = [first]
+ Path = [step_first]
; Port = port_nondet_foreign_proc_later ->
- Path = [later]
+ Path = [step_later]
;
unexpected(this_file,
"generate_event_code: bad nondet foreign_proc port")
Index: compiler/tupling.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/tupling.m,v
retrieving revision 1.34
diff -u -r1.34 tupling.m
--- compiler/tupling.m 1 Dec 2006 15:04:26 -0000 1.34
+++ compiler/tupling.m 2 Jan 2007 07:58:42 -0000
@@ -5,10 +5,10 @@
% This file may only be copied under the terms of the GNU General
% Public License - see the file COPYING in the Mercury distribution.
%-----------------------------------------------------------------------------%
-%
+%
% File: tupling.m.
% Author: wangp.
-%
+%
% This module takes the HLDS and performs a tupling transformation on the
% locally-defined procedures. That is, instead of passing all of the
% procedure's arguments separately, it will try to bundle some of them up and
@@ -78,7 +78,7 @@
%
% XXX: we need to check that mprof can demangle the names of the transformed
% procedures correctly
-%
+%
%-----------------------------------------------------------------------------%
:- module transform_hlds.tupling.
@@ -117,12 +117,12 @@
:- import_module ll_backend.live_vars.
:- import_module mdbcomp.prim_data.
:- import_module mdbcomp.trace_counts.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.prog_data.
:- import_module parse_tree.prog_mode.
:- import_module parse_tree.prog_type.
:- import_module parse_tree.prog_util.
:- import_module transform_hlds.dependency_graph.
-:- use_module mdbcomp.program_representation.
:- import_module assoc_list.
:- import_module bool.
@@ -1771,7 +1771,7 @@
rtti_varmaps::in, rtti_varmaps::out, transform_map::in) is det.
fix_calls_in_conj([], [], !VarSet, !VarTypes, !RttiVarMaps, _).
-fix_calls_in_conj([Goal0 | Goals0], Goals, !VarSet, !VarTypes,
+fix_calls_in_conj([Goal0 | Goals0], Goals, !VarSet, !VarTypes,
!RttiVarMaps, TransformMap) :-
fix_calls_in_goal(Goal0, Goal1, !VarSet, !VarTypes, !RttiVarMaps,
TransformMap),
@@ -1847,11 +1847,6 @@
% Trace count summaries.
%
-:- type mdbcomp_goal_path_step
- == mdbcomp.program_representation.goal_path_step.
-:- type mdbcomp_goal_path
- == mdbcomp.program_representation.goal_path.
-
:- pred get_proc_counts(trace_counts::in, proc_label_in_context::in,
maybe(proc_trace_counts)::out) is det.
@@ -1868,8 +1863,8 @@
map.lookup(ProcCounts, port_only(port_call), ContextCount),
Count = ContextCount ^ exec_count.
-:- pred get_path_only_count(proc_trace_counts::in, mdbcomp_goal_path::in,
- int::out) is det.
+:- pred get_path_only_count(proc_trace_counts::in, goal_path::in, int::out)
+ is det.
get_path_only_count(ProcCounts, GoalPath, Count) :-
PathPort = path_only(GoalPath),
@@ -1884,10 +1879,8 @@
get_ite_relative_frequencies(ProcCounts, ThenGoalPath, ElseGoalPath,
ThenRelFreq, ElseRelFreq) :-
- goal_path_to_mdbcomp_goal_path(ThenGoalPath, MdbThenGoalPath),
- goal_path_to_mdbcomp_goal_path(ElseGoalPath, MdbElseGoalPath),
- get_path_only_count(ProcCounts, MdbThenGoalPath, ThenCounts),
- get_path_only_count(ProcCounts, MdbElseGoalPath, ElseCounts),
+ get_path_only_count(ProcCounts, ThenGoalPath, ThenCounts),
+ get_path_only_count(ProcCounts, ElseGoalPath, ElseCounts),
Total = ThenCounts + ElseCounts,
( Total > 0 ->
ThenRelFreq = float(ThenCounts) / float(Total),
@@ -1901,14 +1894,11 @@
float::out) is det.
get_disjunct_relative_frequency(ProcCounts, GoalPath, RelFreq) :-
- ( GoalPath = [disj(Num) | GoalPathRest] ->
- goal_path_to_mdbcomp_goal_path(GoalPathRest, MdbGoalPathRest),
+ ( GoalPath = [step_disj(Num) | GoalPathRest] ->
get_path_only_count(ProcCounts,
- [mdbcomp.program_representation.disj(Num) |
- MdbGoalPathRest], DisjCount),
+ [step_disj(Num) | GoalPathRest], DisjCount),
get_path_only_count(ProcCounts,
- [mdbcomp.program_representation.disj(1) |
- MdbGoalPathRest], FirstDisjCount),
+ [step_disj(1) | GoalPathRest], FirstDisjCount),
( FirstDisjCount = 0 ->
RelFreq = 0.0
;
@@ -1924,25 +1914,24 @@
float::out) is det.
get_case_relative_frequency(ProcCounts, GoalPath, RelFreq) :-
- goal_path_to_mdbcomp_goal_path(GoalPath, MdbGoalPath),
- get_path_only_count(ProcCounts, MdbGoalPath, CaseTotal),
- get_switch_total_count(ProcCounts, MdbGoalPath, SwitchTotal),
+ get_path_only_count(ProcCounts, GoalPath, CaseTotal),
+ get_switch_total_count(ProcCounts, GoalPath, SwitchTotal),
( SwitchTotal = 0 ->
RelFreq = 0.0
;
RelFreq = float(CaseTotal) / float(SwitchTotal)
).
-:- pred get_switch_total_count(proc_trace_counts::in, mdbcomp_goal_path::in,
+:- pred get_switch_total_count(proc_trace_counts::in, goal_path::in,
int::out) is det.
-get_switch_total_count(ProcCounts, MdbGoalPath, Total) :-
- map.foldl(get_switch_total_count_2(MdbGoalPath), ProcCounts, 0, Total).
+get_switch_total_count(ProcCounts, GoalPath, Total) :-
+ map.foldl(get_switch_total_count_2(GoalPath), ProcCounts, 0, Total).
-:- pred get_switch_total_count_2(mdbcomp_goal_path::in, path_port::in,
+:- pred get_switch_total_count_2(goal_path::in, path_port::in,
line_no_and_count::in, int::in, int::out) is det.
-get_switch_total_count_2(SwitchGoalPath, PathPort, LineNoAndCount,
+get_switch_total_count_2(SwitchGoalPath, PathPort, LineNoAndCount,
!TotalAcc) :-
( case_in_switch(SwitchGoalPath, PathPort) ->
!:TotalAcc = !.TotalAcc + LineNoAndCount ^ exec_count
@@ -1950,50 +1939,10 @@
true
).
-:- pred case_in_switch(mdbcomp_goal_path::in, path_port::in) is semidet.
-
-case_in_switch([mdbcomp.program_representation.switch(_) | Prefix],
- path_only([mdbcomp.program_representation.switch(_) | Prefix])).
-
-%-----------------------------------------------------------------------------%
-
-% XXX: This would not be necessary if there were not two definitions of
-% goal_paths. The only difference between them is that the mdbcomp version
-% has switch/1 instead of switch/2.
-
-:- pred goal_path_to_mdbcomp_goal_path(goal_path::in, mdbcomp_goal_path::out)
- is det.
-
-goal_path_to_mdbcomp_goal_path(GoalPath, MdbGoalPath) :-
- list.map(goal_path_step_to_mdbcomp_goal_path_step, GoalPath, MdbGoalPath).
-
-:- pred goal_path_step_to_mdbcomp_goal_path_step(goal_path_step::in,
- mdbcomp_goal_path_step::out) is det.
+:- pred case_in_switch(goal_path::in, path_port::in) is semidet.
-goal_path_step_to_mdbcomp_goal_path_step(
- conj(N), mdbcomp.program_representation.conj(N)).
-goal_path_step_to_mdbcomp_goal_path_step(
- disj(N), mdbcomp.program_representation.disj(N)).
-goal_path_step_to_mdbcomp_goal_path_step(
- switch(N, _), mdbcomp.program_representation.switch(N)).
-goal_path_step_to_mdbcomp_goal_path_step(
- ite_cond, mdbcomp.program_representation.ite_cond).
-goal_path_step_to_mdbcomp_goal_path_step(
- ite_then, mdbcomp.program_representation.ite_then).
-goal_path_step_to_mdbcomp_goal_path_step(
- ite_else, mdbcomp.program_representation.ite_else).
-goal_path_step_to_mdbcomp_goal_path_step(
- neg, mdbcomp.program_representation.neg).
-goal_path_step_to_mdbcomp_goal_path_step(
- scope(cut), mdbcomp.program_representation.scope(
- mdbcomp.program_representation.cut)).
-goal_path_step_to_mdbcomp_goal_path_step(
- scope(no_cut), mdbcomp.program_representation.scope(
- mdbcomp.program_representation.no_cut)).
-goal_path_step_to_mdbcomp_goal_path_step(
- first, mdbcomp.program_representation.first).
-goal_path_step_to_mdbcomp_goal_path_step(
- later, mdbcomp.program_representation.later).
+case_in_switch([step_switch(_, _) | Prefix],
+ path_only([step_switch(_, _) | Prefix])).
%-----------------------------------------------------------------------------%
Index: compiler/typecheck.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typecheck.m,v
retrieving revision 1.416
diff -u -r1.416 typecheck.m
--- compiler/typecheck.m 27 Dec 2006 03:17:56 -0000 1.416
+++ compiler/typecheck.m 2 Jan 2007 07:36:33 -0000
@@ -124,6 +124,7 @@
:- import_module libs.options.
:- import_module mdbcomp.
:- import_module mdbcomp.prim_data.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.mercury_to_mercury.
:- import_module parse_tree.modules.
:- import_module parse_tree.prog_data.
Index: compiler/unify_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unify_gen.m,v
retrieving revision 1.175
diff -u -r1.175 unify_gen.m
--- compiler/unify_gen.m 3 Jan 2007 05:17:07 -0000 1.175
+++ compiler/unify_gen.m 3 Jan 2007 05:29:21 -0000
@@ -64,6 +64,7 @@
:- import_module ll_backend.layout.
:- import_module ll_backend.stack_layout.
:- import_module mdbcomp.prim_data.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.prog_data.
:- import_module parse_tree.prog_type.
Index: compiler/unneeded_code.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unneeded_code.m,v
retrieving revision 1.39
diff -u -r1.39 unneeded_code.m
--- compiler/unneeded_code.m 1 Dec 2006 15:04:27 -0000 1.39
+++ compiler/unneeded_code.m 2 Jan 2007 07:54:24 -0000
@@ -86,6 +86,7 @@
:- import_module libs.compiler_util.
:- import_module libs.globals.
:- import_module libs.options.
+:- import_module mdbcomp.program_representation.
:- import_module parse_tree.prog_data.
:- import_module assoc_list.
@@ -621,7 +622,7 @@
Cases0 = [case(_, _ - FirstCaseGoalInfo) | _],
goal_info_get_goal_path(FirstCaseGoalInfo, FirstCaseGoalPath),
FirstCaseGoalPath = [SwitchStep | _],
- SwitchStep = switch(_, NumCases)
+ SwitchStep = step_switch(_, NumCases)
->
NumAlt = NumCases
;
@@ -1101,17 +1102,17 @@
get_parent_branch_point([First | Rest], Parent, ParentStep,
BranchAlt, BranchNum) :-
- ( First = switch(Arm, NumAlts) ->
+ ( First = step_switch(Arm, NumAlts) ->
Parent = Rest,
ParentStep = First,
BranchAlt = alt_switch(NumAlts),
BranchNum = Arm
- ; First = ite_then ->
+ ; First = step_ite_then ->
Parent = Rest,
ParentStep = First,
BranchAlt = alt_ite,
BranchNum = 1
- ; First = ite_else ->
+ ; First = step_ite_else ->
Parent = Rest,
ParentStep = First,
BranchAlt = alt_ite,
@@ -1120,8 +1121,7 @@
get_parent_branch_point(Rest, Parent, ParentStep, BranchAlt, BranchNum)
).
-:- pred branch_point_is_complete(branch_alts::in, set(int)::in)
- is semidet.
+:- pred branch_point_is_complete(branch_alts::in, set(int)::in) is semidet.
branch_point_is_complete(alt_ite, Alts) :-
set.count(Alts, NumAlts),
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing debian/patches
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/base64
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/fixed
cvs diff: Diffing extras/gator
cvs diff: Diffing extras/gator/generations
cvs diff: Diffing extras/gator/generations/1
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/easyx
cvs diff: Diffing extras/graphics/easyx/samples
cvs diff: Diffing extras/graphics/mercury_glut
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/gears
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/log4m
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/mopenssl
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/net
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/solver_types
cvs diff: Diffing extras/solver_types/library
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/stream/tests
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/windows_installer_generator
cvs diff: Diffing extras/windows_installer_generator/sample
cvs diff: Diffing extras/windows_installer_generator/sample/images
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing extras/xml_stylesheets
cvs diff: Diffing java
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing mdbcomp
Index: mdbcomp/program_representation.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/mdbcomp/program_representation.m,v
retrieving revision 1.18
diff -u -r1.18 program_representation.m
--- mdbcomp/program_representation.m 2 Oct 2006 05:21:38 -0000 1.18
+++ mdbcomp/program_representation.m 2 Jan 2007 07:22:22 -0000
@@ -205,26 +205,35 @@
%-----------------------------------------------------------------------------%
- % The following three types are derived from compiler/hlds_goal.m.
+% We can think of the goal that defines a procedure to be a tree,
+% whose leaves are primitive goals and whose interior nodes are
+% compound goals. These two types describe the position of a goal
+% in this tree. A goal_path_step type says which branch to take at an
+% interior node; the integer counts start at one. (For switches,
+% the second int gives the total number of function symbols in the type
+% of the switched-on var; for builtin types such as integer and string,
+% for which this number is effectively infinite, we store a negative
+% number.) The goal_path type gives the sequence of steps from the root
+% to the given goal *in reverse order*, so that the step closest to
+% the root is last. (Keeping the list in reverse order makes the
+% common operations constant-time instead of linear in the length
+% of the list.)
:- type goal_path == list(goal_path_step).
-% This is similar to the type goal_path defined in the module
-% compiler/hlds_goal.m.
-
:- type goal_path_string == string.
:- type goal_path_step
- ---> conj(int)
- ; disj(int)
- ; switch(int)
- ; ite_cond
- ; ite_then
- ; ite_else
- ; neg
- ; scope(maybe_cut)
- ; first
- ; later.
+ ---> step_conj(int)
+ ; step_disj(int)
+ ; step_switch(int, int)
+ ; step_ite_cond
+ ; step_ite_then
+ ; step_ite_else
+ ; step_neg
+ ; step_scope(maybe_cut)
+ ; step_first
+ ; step_later.
% Does the scope goal have a different determinism inside than outside?
:- type maybe_cut
@@ -233,7 +242,15 @@
:- pred path_from_string_det(string::in, goal_path::out) is det.
-:- pred string_from_path(goal_path::in, string::out) is det.
+ % This leaves the reverses the steps before converting them to a string.
+ %
+:- func goal_path_to_string(goal_path) = string.
+
+ % This leaves the steps in the order in which they appear in goal_path;
+ % if the steps are reversed in the goal_path (as usual), the end result
+ % will be reversed too.
+ %
+:- func string_from_path(goal_path) = string.
:- pred path_from_string(string::in, goal_path::out) is semidet.
@@ -453,40 +470,46 @@
:- pred path_step_from_string_2(char::in, string::in, goal_path_step::out)
is semidet.
-path_step_from_string_2('c', NStr, conj(N)) :-
- string.to_int(NStr, N).
-path_step_from_string_2('d', NStr, disj(N)) :-
+path_step_from_string_2('c', NStr, step_conj(N)) :-
string.to_int(NStr, N).
-path_step_from_string_2('s', NStr, switch(N)) :-
+path_step_from_string_2('d', NStr, step_disj(N)) :-
string.to_int(NStr, N).
-path_step_from_string_2('?', "", ite_cond).
-path_step_from_string_2('t', "", ite_then).
-path_step_from_string_2('e', "", ite_else).
-path_step_from_string_2('~', "", neg).
-path_step_from_string_2('q', "!", scope(cut)).
-path_step_from_string_2('q', "", scope(no_cut)).
-path_step_from_string_2('f', "", first).
-path_step_from_string_2('l', "", later).
+path_step_from_string_2('s', Str, step_switch(N, M)) :-
+ string.words_separator(unify('-'), Str) = [NStr, MStr],
+ string.to_int(NStr, N),
+ string.to_int(MStr, M).
+path_step_from_string_2('?', "", step_ite_cond).
+path_step_from_string_2('t', "", step_ite_then).
+path_step_from_string_2('e', "", step_ite_else).
+path_step_from_string_2('~', "", step_neg).
+path_step_from_string_2('q', "!", step_scope(cut)).
+path_step_from_string_2('q', "", step_scope(no_cut)).
+path_step_from_string_2('f', "", step_first).
+path_step_from_string_2('l', "", step_later).
is_path_separator(';').
-string_from_path(GoalPath, GoalPathStr) :-
- list.map(string_from_path_step, GoalPath, GoalPathSteps),
- GoalPathStr = string.join_list(";", GoalPathSteps) ++ ";".
-
-:- pred string_from_path_step(goal_path_step::in, string::out) is det.
-
-string_from_path_step(conj(N), "c" ++ int_to_string(N)).
-string_from_path_step(disj(N), "d" ++ int_to_string(N)).
-string_from_path_step(switch(N), "s" ++ int_to_string(N)).
-string_from_path_step(ite_cond, "?").
-string_from_path_step(ite_then, "t").
-string_from_path_step(ite_else, "e").
-string_from_path_step(neg, "~").
-string_from_path_step(scope(cut), "q!").
-string_from_path_step(scope(no_cut), "q").
-string_from_path_step(first, "f").
-string_from_path_step(later, "l").
+goal_path_to_string(GoalPath) =
+ string.append_list(list.map(goal_path_step_to_string,
+ list.reverse(GoalPath))).
+
+string_from_path(GoalPath) =
+ string.append_list(list.map(goal_path_step_to_string, GoalPath)).
+
+:- func goal_path_step_to_string(goal_path_step) = string.
+
+goal_path_step_to_string(step_conj(N)) = "c" ++ int_to_string(N) ++ ";".
+goal_path_step_to_string(step_disj(N)) = "d" ++ int_to_string(N) ++ ";".
+goal_path_step_to_string(step_switch(N, M)) = "s" ++ int_to_string(N)
+ ++ "-" ++ int_to_string(M) ++ ";".
+goal_path_step_to_string(step_ite_cond) = "?;".
+goal_path_step_to_string(step_ite_then) = "t;".
+goal_path_step_to_string(step_ite_else) = "e;".
+goal_path_step_to_string(step_neg) = "~;".
+goal_path_step_to_string(step_scope(cut)) = "q!;".
+goal_path_step_to_string(step_scope(no_cut)) = "q;".
+goal_path_step_to_string(step_first) = "f;".
+goal_path_step_to_string(step_later) = "l;".
%-----------------------------------------------------------------------------%
Index: mdbcomp/slice_and_dice.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/mdbcomp/slice_and_dice.m,v
retrieving revision 1.12
diff -u -r1.12 slice_and_dice.m
--- mdbcomp/slice_and_dice.m 7 Dec 2006 05:10:36 -0000 1.12
+++ mdbcomp/slice_and_dice.m 2 Jan 2007 11:10:14 -0000
@@ -559,7 +559,7 @@
OtherTests = [_ | _],
TestsStrs = list.map(bracket_int, Tests),
TotalTestsStr = "(" ++ int_to_string_thousands(TotalTests) ++ ")",
- Columns = AlwaysColumns ++
+ Columns = AlwaysColumns ++
[right([TotalTestsStr | TestsStrs]) - no]
),
Str = string.format_table_max(Columns, " ") ++ "\n".
@@ -906,9 +906,7 @@
format_path_port(port_only(Port)) = Str :-
mdbcomp.trace_counts.string_to_trace_port(Str, Port).
-format_path_port(path_only(Path)) = Str :-
- mdbcomp.program_representation.string_from_path(Path, PathStr),
- Str = "<" ++ PathStr ++ ">".
+format_path_port(path_only(Path)) = "<" ++ string_from_path(Path) ++ ">".
format_path_port(port_and_path(Port, Path)) =
format_path_port(port_only(Port)) ++ " " ++
format_path_port(path_only(Path)).
Index: mdbcomp/trace_counts.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/mdbcomp/trace_counts.m,v
retrieving revision 1.18
diff -u -r1.18 trace_counts.m
--- mdbcomp/trace_counts.m 3 Jan 2007 07:20:46 -0000 1.18
+++ mdbcomp/trace_counts.m 3 Jan 2007 07:32:47 -0000
@@ -899,18 +899,16 @@
int_to_string(NumTests), "\n"], !IO).
write_path_port_count(path_only(Path),
line_no_and_count(LineNo, ExecCount, NumTests), !IO) :-
- string_from_path(Path, PathStr),
io.write_strings([
- "<", PathStr, "> ",
+ "<", string_from_path(Path), "> ",
int_to_string(LineNo), " ",
int_to_string(ExecCount), " ",
int_to_string(NumTests), "\n"], !IO).
write_path_port_count(port_and_path(Port, Path),
line_no_and_count(LineNo, ExecCount, NumTests), !IO) :-
string_to_trace_port(PortStr, Port),
- string_from_path(Path, PathStr),
io.write_strings([
- PortStr, " <", PathStr, "> ",
+ PortStr, " <", string_from_path(Path), "> ",
int_to_string(LineNo), " ",
int_to_string(ExecCount), " ",
int_to_string(NumTests), "\n"], !IO).
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing slice
Index: slice/mcov.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/slice/mcov.m,v
retrieving revision 1.3
diff -u -r1.3 mcov.m
--- slice/mcov.m 2 Oct 2006 05:21:42 -0000 1.3
+++ slice/mcov.m 3 Jan 2007 11:20:13 -0000
@@ -338,12 +338,10 @@
string_to_trace_port(PortStr, Port),
io.write_string(PortStr, !IO).
write_path_port_for_user(path_only(Path), !IO) :-
- string_from_path(Path, PathStr),
- io.write_strings(["<", PathStr, ">"], !IO).
+ io.write_strings(["<", string_from_path(Path), ">"], !IO).
write_path_port_for_user(port_and_path(Port, Path), !IO) :-
string_to_trace_port(PortStr, Port),
- string_from_path(Path, PathStr),
- io.write_strings([PortStr, " <", PathStr, ">"], !IO).
+ io.write_strings([PortStr, " <", string_from_path(Path), ">"], !IO).
%-----------------------------------------------------------------------------%
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
Index: tests/debugger/breakpoints.exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/debugger/breakpoints.exp,v
retrieving revision 1.15
diff -u -r1.15 breakpoints.exp
--- tests/debugger/breakpoints.exp 4 Apr 2006 07:37:16 -0000 1.15
+++ tests/debugger/breakpoints.exp 3 Jan 2007 12:10:39 -0000
@@ -112,7 +112,7 @@
1: + stop interface pred breakpoints.qperm/2-0 (nondet)
HeadVar__1 (pretty, nowarn), HeadVar__2 (pretty, nowarn)
mdb> continue
- E4: C3 SWTC pred breakpoints.qperm/2-0 (nondet) s2; breakpoints.m:65
+ E4: C3 SWTC pred breakpoints.qperm/2-0 (nondet) s2-2; breakpoints.m:65
mdb> finish -N
E5: C4 CALL pred breakpoints.qperm/2-0 (nondet) breakpoints.m:64 (breakpoints.m:68)
HeadVar__1
Index: tests/debugger/dice.exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/debugger/dice.exp,v
retrieving revision 1.4
diff -u -r1.4 dice.exp
--- tests/debugger/dice.exp 4 Apr 2006 07:37:17 -0000 1.4
+++ tests/debugger/dice.exp 3 Jan 2007 12:11:05 -0000
@@ -3,113 +3,113 @@
mdb> echo on
Command echo enabled.
mdb> dice -f dice.fail -p dice.passes -m dice
-Procedure Path/Port File:Line Pass (3) Fail Suspicion
-pred dice.main/2-0 CALL dice.m:17 3 (3) 1 0.25
-pred dice.main/2-0 EXIT dice.m:17 3 (3) 1 0.25
-pred dice.main/2-0 <c2;?;> dice.m:20 3 (3) 1 0.25
-pred dice.main/2-0 <c2;t;> dice.m:22 3 (3) 1 0.25
-pred dice.merge/3-0 CALL dice.m:64 18 (3) 7 0.28
-pred dice.merge/3-0 EXIT dice.m:64 18 (3) 7 0.28
-pred dice.merge/3-0 <s1;> dice.m:64 8 (3) 3 0.27
-pred dice.merge/3-0 <s2;> dice.m:64 10 (3) 4 0.29
-pred dice.merge/3-0 <s2;c2;s2;> dice.m:67 10 (3) 4 0.29
-pred dice.merge/3-0 <s2;c2;s2;c4;?;> dice.m:69 10 (3) 4 0.29
-pred dice.merge/3-0 <s2;c2;s2;c4;t;> dice.m:71 10 (3) 3 0.23
-pred dice.merge/3-0 <s2;c2;s2;c4;e;> dice.m:74 0 (0) 1 1.00
-pred dice.merge_sort/2-0 CALL dice.m:31 3 (3) 1 0.25
-pred dice.merge_sort/2-0 EXIT dice.m:31 3 (3) 1 0.25
-pred dice.msort_n/4-0 CALL dice.m:37 19 (3) 7 0.27
-pred dice.msort_n/4-0 EXIT dice.m:37 19 (3) 7 0.27
-pred dice.msort_n/4-0 <?;> dice.m:39 19 (3) 7 0.27
-pred dice.msort_n/4-0 <e;> dice.m:54 19 (3) 7 0.27
-pred dice.msort_n/4-0 <e;?;> dice.m:44 19 (3) 7 0.27
-pred dice.msort_n/4-0 <e;t;> dice.m:50 11 (3) 4 0.27
-pred dice.msort_n/4-0 <e;t;s2;> dice.m:47 11 (3) 4 0.27
-pred dice.msort_n/4-0 <e;e;> dice.m:55 8 (3) 3 0.27
+Procedure Path/Port File:Line Pass (3) Fail Suspicion
+pred dice.main/2-0 CALL dice.m:17 3 (3) 1 0.25
+pred dice.main/2-0 EXIT dice.m:17 3 (3) 1 0.25
+pred dice.main/2-0 <c2;?;> dice.m:20 3 (3) 1 0.25
+pred dice.main/2-0 <c2;t;> dice.m:22 3 (3) 1 0.25
+pred dice.merge/3-0 CALL dice.m:64 18 (3) 7 0.28
+pred dice.merge/3-0 EXIT dice.m:64 18 (3) 7 0.28
+pred dice.merge/3-0 <s1-2;> dice.m:64 8 (3) 3 0.27
+pred dice.merge/3-0 <s2-2;> dice.m:64 10 (3) 4 0.29
+pred dice.merge/3-0 <s2-2;c2;s2-2;> dice.m:67 10 (3) 4 0.29
+pred dice.merge/3-0 <s2-2;c2;s2-2;c4;?;> dice.m:69 10 (3) 4 0.29
+pred dice.merge/3-0 <s2-2;c2;s2-2;c4;t;> dice.m:71 10 (3) 3 0.23
+pred dice.merge/3-0 <s2-2;c2;s2-2;c4;e;> dice.m:74 0 (0) 1 1.00
+pred dice.merge_sort/2-0 CALL dice.m:31 3 (3) 1 0.25
+pred dice.merge_sort/2-0 EXIT dice.m:31 3 (3) 1 0.25
+pred dice.msort_n/4-0 CALL dice.m:37 19 (3) 7 0.27
+pred dice.msort_n/4-0 EXIT dice.m:37 19 (3) 7 0.27
+pred dice.msort_n/4-0 <?;> dice.m:39 19 (3) 7 0.27
+pred dice.msort_n/4-0 <e;> dice.m:54 19 (3) 7 0.27
+pred dice.msort_n/4-0 <e;?;> dice.m:44 19 (3) 7 0.27
+pred dice.msort_n/4-0 <e;t;> dice.m:50 11 (3) 4 0.27
+pred dice.msort_n/4-0 <e;t;s2-2;> dice.m:47 11 (3) 4 0.27
+pred dice.msort_n/4-0 <e;e;> dice.m:55 8 (3) 3 0.27
mdb> fail_trace_counts dice.fail
mdb> pass_trace_counts dice.passes
mdb> dice -sS -m dice
-Procedure Path/Port File:Line Pass (3) Fail Suspicion
-pred dice.merge/3-0 <s2;c2;s2;c4;e;> dice.m:74 0 (0) 1 1.00
-pred dice.merge/3-0 <s2;> dice.m:64 10 (3) 4 0.29
-pred dice.merge/3-0 <s2;c2;s2;> dice.m:67 10 (3) 4 0.29
-pred dice.merge/3-0 <s2;c2;s2;c4;?;> dice.m:69 10 (3) 4 0.29
-pred dice.merge/3-0 CALL dice.m:64 18 (3) 7 0.28
-pred dice.merge/3-0 EXIT dice.m:64 18 (3) 7 0.28
-pred dice.merge/3-0 <s1;> dice.m:64 8 (3) 3 0.27
-pred dice.msort_n/4-0 <e;e;> dice.m:55 8 (3) 3 0.27
-pred dice.msort_n/4-0 CALL dice.m:37 19 (3) 7 0.27
-pred dice.msort_n/4-0 EXIT dice.m:37 19 (3) 7 0.27
-pred dice.msort_n/4-0 <?;> dice.m:39 19 (3) 7 0.27
-pred dice.msort_n/4-0 <e;> dice.m:54 19 (3) 7 0.27
-pred dice.msort_n/4-0 <e;?;> dice.m:44 19 (3) 7 0.27
-pred dice.msort_n/4-0 <e;t;> dice.m:50 11 (3) 4 0.27
-pred dice.msort_n/4-0 <e;t;s2;> dice.m:47 11 (3) 4 0.27
-pred dice.main/2-0 CALL dice.m:17 3 (3) 1 0.25
-pred dice.main/2-0 EXIT dice.m:17 3 (3) 1 0.25
-pred dice.main/2-0 <c2;?;> dice.m:20 3 (3) 1 0.25
-pred dice.main/2-0 <c2;t;> dice.m:22 3 (3) 1 0.25
-pred dice.merge_sort/2-0 CALL dice.m:31 3 (3) 1 0.25
-pred dice.merge_sort/2-0 EXIT dice.m:31 3 (3) 1 0.25
-pred dice.merge/3-0 <s2;c2;s2;c4;t;> dice.m:71 10 (3) 3 0.23
+Procedure Path/Port File:Line Pass (3) Fail Suspicion
+pred dice.merge/3-0 <s2-2;c2;s2-2;c4;e;> dice.m:74 0 (0) 1 1.00
+pred dice.merge/3-0 <s2-2;> dice.m:64 10 (3) 4 0.29
+pred dice.merge/3-0 <s2-2;c2;s2-2;> dice.m:67 10 (3) 4 0.29
+pred dice.merge/3-0 <s2-2;c2;s2-2;c4;?;> dice.m:69 10 (3) 4 0.29
+pred dice.merge/3-0 CALL dice.m:64 18 (3) 7 0.28
+pred dice.merge/3-0 EXIT dice.m:64 18 (3) 7 0.28
+pred dice.merge/3-0 <s1-2;> dice.m:64 8 (3) 3 0.27
+pred dice.msort_n/4-0 <e;e;> dice.m:55 8 (3) 3 0.27
+pred dice.msort_n/4-0 CALL dice.m:37 19 (3) 7 0.27
+pred dice.msort_n/4-0 EXIT dice.m:37 19 (3) 7 0.27
+pred dice.msort_n/4-0 <?;> dice.m:39 19 (3) 7 0.27
+pred dice.msort_n/4-0 <e;> dice.m:54 19 (3) 7 0.27
+pred dice.msort_n/4-0 <e;?;> dice.m:44 19 (3) 7 0.27
+pred dice.msort_n/4-0 <e;t;> dice.m:50 11 (3) 4 0.27
+pred dice.msort_n/4-0 <e;t;s2-2;> dice.m:47 11 (3) 4 0.27
+pred dice.main/2-0 CALL dice.m:17 3 (3) 1 0.25
+pred dice.main/2-0 EXIT dice.m:17 3 (3) 1 0.25
+pred dice.main/2-0 <c2;?;> dice.m:20 3 (3) 1 0.25
+pred dice.main/2-0 <c2;t;> dice.m:22 3 (3) 1 0.25
+pred dice.merge_sort/2-0 CALL dice.m:31 3 (3) 1 0.25
+pred dice.merge_sort/2-0 EXIT dice.m:31 3 (3) 1 0.25
+pred dice.merge/3-0 <s2-2;c2;s2-2;c4;t;> dice.m:71 10 (3) 3 0.23
mdb> dice -sSF -m dice
-Procedure Path/Port File:Line Pass (3) Fail Suspicion
-pred dice.merge/3-0 <s2;c2;s2;c4;e;> dice.m:74 0 (0) 1 1.00
-pred dice.merge/3-0 <s2;> dice.m:64 10 (3) 4 0.29
-pred dice.merge/3-0 <s2;c2;s2;> dice.m:67 10 (3) 4 0.29
-pred dice.merge/3-0 <s2;c2;s2;c4;?;> dice.m:69 10 (3) 4 0.29
-pred dice.merge/3-0 CALL dice.m:64 18 (3) 7 0.28
-pred dice.merge/3-0 EXIT dice.m:64 18 (3) 7 0.28
-pred dice.merge/3-0 <s1;> dice.m:64 8 (3) 3 0.27
-pred dice.msort_n/4-0 <e;e;> dice.m:55 8 (3) 3 0.27
-pred dice.msort_n/4-0 CALL dice.m:37 19 (3) 7 0.27
-pred dice.msort_n/4-0 EXIT dice.m:37 19 (3) 7 0.27
-pred dice.msort_n/4-0 <?;> dice.m:39 19 (3) 7 0.27
-pred dice.msort_n/4-0 <e;> dice.m:54 19 (3) 7 0.27
-pred dice.msort_n/4-0 <e;?;> dice.m:44 19 (3) 7 0.27
-pred dice.msort_n/4-0 <e;t;> dice.m:50 11 (3) 4 0.27
-pred dice.msort_n/4-0 <e;t;s2;> dice.m:47 11 (3) 4 0.27
-pred dice.main/2-0 CALL dice.m:17 3 (3) 1 0.25
-pred dice.main/2-0 EXIT dice.m:17 3 (3) 1 0.25
-pred dice.main/2-0 <c2;?;> dice.m:20 3 (3) 1 0.25
-pred dice.main/2-0 <c2;t;> dice.m:22 3 (3) 1 0.25
-pred dice.merge_sort/2-0 CALL dice.m:31 3 (3) 1 0.25
-pred dice.merge_sort/2-0 EXIT dice.m:31 3 (3) 1 0.25
-pred dice.merge/3-0 <s2;c2;s2;c4;t;> dice.m:71 10 (3) 3 0.23
+Procedure Path/Port File:Line Pass (3) Fail Suspicion
+pred dice.merge/3-0 <s2-2;c2;s2-2;c4;e;> dice.m:74 0 (0) 1 1.00
+pred dice.merge/3-0 <s2-2;> dice.m:64 10 (3) 4 0.29
+pred dice.merge/3-0 <s2-2;c2;s2-2;> dice.m:67 10 (3) 4 0.29
+pred dice.merge/3-0 <s2-2;c2;s2-2;c4;?;> dice.m:69 10 (3) 4 0.29
+pred dice.merge/3-0 CALL dice.m:64 18 (3) 7 0.28
+pred dice.merge/3-0 EXIT dice.m:64 18 (3) 7 0.28
+pred dice.merge/3-0 <s1-2;> dice.m:64 8 (3) 3 0.27
+pred dice.msort_n/4-0 <e;e;> dice.m:55 8 (3) 3 0.27
+pred dice.msort_n/4-0 CALL dice.m:37 19 (3) 7 0.27
+pred dice.msort_n/4-0 EXIT dice.m:37 19 (3) 7 0.27
+pred dice.msort_n/4-0 <?;> dice.m:39 19 (3) 7 0.27
+pred dice.msort_n/4-0 <e;> dice.m:54 19 (3) 7 0.27
+pred dice.msort_n/4-0 <e;?;> dice.m:44 19 (3) 7 0.27
+pred dice.msort_n/4-0 <e;t;> dice.m:50 11 (3) 4 0.27
+pred dice.msort_n/4-0 <e;t;s2-2;> dice.m:47 11 (3) 4 0.27
+pred dice.main/2-0 CALL dice.m:17 3 (3) 1 0.25
+pred dice.main/2-0 EXIT dice.m:17 3 (3) 1 0.25
+pred dice.main/2-0 <c2;?;> dice.m:20 3 (3) 1 0.25
+pred dice.main/2-0 <c2;t;> dice.m:22 3 (3) 1 0.25
+pred dice.merge_sort/2-0 CALL dice.m:31 3 (3) 1 0.25
+pred dice.merge_sort/2-0 EXIT dice.m:31 3 (3) 1 0.25
+pred dice.merge/3-0 <s2-2;c2;s2-2;c4;t;> dice.m:71 10 (3) 3 0.23
mdb> dice -n 3 -s P -m dice
Procedure Path/Port File:Line Pass (3) Fail Suspicion
pred dice.msort_n/4-0 CALL dice.m:37 19 (3) 7 0.27
pred dice.msort_n/4-0 EXIT dice.m:37 19 (3) 7 0.27
pred dice.msort_n/4-0 <?;> dice.m:39 19 (3) 7 0.27
mdb> dice -s Fp -m dice
-Procedure Path/Port File:Line Pass (3) Fail Suspicion
-pred dice.merge/3-0 CALL dice.m:64 18 (3) 7 0.28
-pred dice.merge/3-0 EXIT dice.m:64 18 (3) 7 0.28
-pred dice.msort_n/4-0 CALL dice.m:37 19 (3) 7 0.27
-pred dice.msort_n/4-0 EXIT dice.m:37 19 (3) 7 0.27
-pred dice.msort_n/4-0 <?;> dice.m:39 19 (3) 7 0.27
-pred dice.msort_n/4-0 <e;> dice.m:54 19 (3) 7 0.27
-pred dice.msort_n/4-0 <e;?;> dice.m:44 19 (3) 7 0.27
-pred dice.merge/3-0 <s2;> dice.m:64 10 (3) 4 0.29
-pred dice.merge/3-0 <s2;c2;s2;> dice.m:67 10 (3) 4 0.29
-pred dice.merge/3-0 <s2;c2;s2;c4;?;> dice.m:69 10 (3) 4 0.29
-pred dice.msort_n/4-0 <e;t;> dice.m:50 11 (3) 4 0.27
-pred dice.msort_n/4-0 <e;t;s2;> dice.m:47 11 (3) 4 0.27
-pred dice.merge/3-0 <s1;> dice.m:64 8 (3) 3 0.27
-pred dice.msort_n/4-0 <e;e;> dice.m:55 8 (3) 3 0.27
-pred dice.merge/3-0 <s2;c2;s2;c4;t;> dice.m:71 10 (3) 3 0.23
-pred dice.merge/3-0 <s2;c2;s2;c4;e;> dice.m:74 0 (0) 1 1.00
-pred dice.main/2-0 CALL dice.m:17 3 (3) 1 0.25
-pred dice.main/2-0 EXIT dice.m:17 3 (3) 1 0.25
-pred dice.main/2-0 <c2;?;> dice.m:20 3 (3) 1 0.25
-pred dice.main/2-0 <c2;t;> dice.m:22 3 (3) 1 0.25
-pred dice.merge_sort/2-0 CALL dice.m:31 3 (3) 1 0.25
-pred dice.merge_sort/2-0 EXIT dice.m:31 3 (3) 1 0.25
+Procedure Path/Port File:Line Pass (3) Fail Suspicion
+pred dice.merge/3-0 CALL dice.m:64 18 (3) 7 0.28
+pred dice.merge/3-0 EXIT dice.m:64 18 (3) 7 0.28
+pred dice.msort_n/4-0 CALL dice.m:37 19 (3) 7 0.27
+pred dice.msort_n/4-0 EXIT dice.m:37 19 (3) 7 0.27
+pred dice.msort_n/4-0 <?;> dice.m:39 19 (3) 7 0.27
+pred dice.msort_n/4-0 <e;> dice.m:54 19 (3) 7 0.27
+pred dice.msort_n/4-0 <e;?;> dice.m:44 19 (3) 7 0.27
+pred dice.merge/3-0 <s2-2;> dice.m:64 10 (3) 4 0.29
+pred dice.merge/3-0 <s2-2;c2;s2-2;> dice.m:67 10 (3) 4 0.29
+pred dice.merge/3-0 <s2-2;c2;s2-2;c4;?;> dice.m:69 10 (3) 4 0.29
+pred dice.msort_n/4-0 <e;t;> dice.m:50 11 (3) 4 0.27
+pred dice.msort_n/4-0 <e;t;s2-2;> dice.m:47 11 (3) 4 0.27
+pred dice.merge/3-0 <s1-2;> dice.m:64 8 (3) 3 0.27
+pred dice.msort_n/4-0 <e;e;> dice.m:55 8 (3) 3 0.27
+pred dice.merge/3-0 <s2-2;c2;s2-2;c4;t;> dice.m:71 10 (3) 3 0.23
+pred dice.merge/3-0 <s2-2;c2;s2-2;c4;e;> dice.m:74 0 (0) 1 1.00
+pred dice.main/2-0 CALL dice.m:17 3 (3) 1 0.25
+pred dice.main/2-0 EXIT dice.m:17 3 (3) 1 0.25
+pred dice.main/2-0 <c2;?;> dice.m:20 3 (3) 1 0.25
+pred dice.main/2-0 <c2;t;> dice.m:22 3 (3) 1 0.25
+pred dice.merge_sort/2-0 CALL dice.m:31 3 (3) 1 0.25
+pred dice.merge_sort/2-0 EXIT dice.m:31 3 (3) 1 0.25
mdb> dice -sS -n 1 --module dice
-Procedure Path/Port File:Line Pass (3) Fail Suspicion
-pred dice.merge/3-0 <s2;c2;s2;c4;e;> dice.m:74 0 (0) 1 1.00
+Procedure Path/Port File:Line Pass (3) Fail Suspicion
+pred dice.merge/3-0 <s2-2;c2;s2-2;c4;e;> dice.m:74 0 (0) 1 1.00
mdb> break dice.m:74
0: + stop linenumber dice.m:74
mdb> c
- E2: C2 ELSE pred dice.merge/3-0 (det) s2;c2;s2;c4;e;
+ E2: C2 ELSE pred dice.merge/3-0 (det) s2-2;c2;s2-2;c4;e;
mdb> quit -y
Index: tests/debugger/implied_instance.exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/debugger/implied_instance.exp,v
retrieving revision 1.10
diff -u -r1.10 implied_instance.exp
--- tests/debugger/implied_instance.exp 17 Jan 2003 05:56:53 -0000 1.10
+++ tests/debugger/implied_instance.exp 3 Jan 2007 12:11:47 -0000
@@ -33,7 +33,7 @@
mdb> P
HeadVar__1 [42, 24, 1, 2, 3]
mdb> continue -a
- 11: 7 4 SWTC pred implied_instance.sum_int_list/2-0 (det) s2;
+ 11: 7 4 SWTC pred implied_instance.sum_int_list/2-0 (det) s2-2;
12: 8 5 CALL pred implied_instance.p/2-0 (det)
mdb> P
HeadVar__1 42
Index: tests/debugger/nondet_stack.exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/debugger/nondet_stack.exp,v
retrieving revision 1.13
diff -u -r1.13 nondet_stack.exp
--- tests/debugger/nondet_stack.exp 17 Jan 2005 05:58:08 -0000 1.13
+++ tests/debugger/nondet_stack.exp 3 Jan 2007 12:13:48 -0000
@@ -5,7 +5,7 @@
Contexts will not be printed.
mdb> register --quiet
mdb> goto 22
- E2: C2 SWTC pred nondet_stack.qperm/2-0 (nondet) s2;
+ E2: C2 SWTC pred nondet_stack.qperm/2-0 (nondet) s2-2;
mdb> nondet_stack -f 3
non 135: ordinary, 13 words
redoip: unnamed label
@@ -92,7 +92,7 @@
curfr = non 135
maxfr = non 135
mdb> nondet_stack -d
-non 135: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2;>
+non 135: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2-2;>
redoip: unnamed label
redofr: non 135
succip: unnamed label
@@ -114,7 +114,7 @@
top frame of a nondet side branch non 116
HeadVar__2 [3, 4, 5]
TypeInfo_for_T int
-non 103: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2;c2;>
+non 103: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2-2;c2;>
redoip: unnamed label
redofr: non 103
succip: unnamed label
@@ -138,7 +138,7 @@
top frame of a nondet side branch non 84
HeadVar__2 [2, 3, 4, 5]
TypeInfo_for_T int
-non 71: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2;c2;>
+non 71: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2-2;c2;>
redoip: unnamed label
redofr: non 71
succip: unnamed label
@@ -162,7 +162,7 @@
top frame of a nondet side branch non 52
HeadVar__2 [1, 2, 3, 4, 5]
TypeInfo_for_T int
-non 39: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2;c2;>
+non 39: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2-2;c2;>
redoip: unnamed label
redofr: non 39
succip: unnamed label
@@ -354,7 +354,7 @@
top frame of a nondet side branch non 180
HeadVar__2 [5]
TypeInfo_for_T int
-non 167: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2;c2;>
+non 167: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2-2;c2;>
redoip: unnamed label
redofr: non 167
succip: unnamed label
@@ -378,7 +378,7 @@
top frame of a nondet side branch non 148
HeadVar__2 [4, 5]
TypeInfo_for_T int
-non 135: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2;c2;>
+non 135: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2-2;c2;>
redoip: unnamed label
redofr: non 135
succip: unnamed label
@@ -402,7 +402,7 @@
top frame of a nondet side branch non 116
HeadVar__2 [3, 4, 5]
TypeInfo_for_T int
-non 103: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2;c2;>
+non 103: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2-2;c2;>
redoip: unnamed label
redofr: non 103
succip: unnamed label
@@ -426,7 +426,7 @@
top frame of a nondet side branch non 84
HeadVar__2 [2, 3, 4, 5]
TypeInfo_for_T int
-non 71: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2;c2;>
+non 71: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2-2;c2;>
redoip: unnamed label
redofr: non 71
succip: unnamed label
@@ -450,7 +450,7 @@
top frame of a nondet side branch non 52
HeadVar__2 [1, 2, 3, 4, 5]
TypeInfo_for_T int
-non 39: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2;c2;>
+non 39: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2-2;c2;>
redoip: unnamed label
redofr: non 39
succip: unnamed label
@@ -695,7 +695,7 @@
top frame of a nondet side branch non 228
HeadVar__2 [4]
TypeInfo_for_T int
-non 215: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2;c2;>
+non 215: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2-2;c2;>
redoip: unnamed label
redofr: non 215
succip: unnamed label
@@ -719,7 +719,7 @@
top frame of a nondet side branch non 196
HeadVar__2 [2, 4]
TypeInfo_for_T int
-non 183: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2;c2;>
+non 183: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2-2;c2;>
redoip: unnamed label
redofr: non 183
succip: unnamed label
@@ -769,7 +769,7 @@
A 2
TypeInfo_for_T int
Z [4, 5]
-non 119: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2;c2;>
+non 119: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2-2;c2;>
redoip: unnamed label
redofr: non 119
succip: unnamed label
@@ -806,7 +806,7 @@
A 2
TypeInfo_for_T int
Z [3, 4, 5]
-non 71: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2;c2;>
+non 71: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2-2;c2;>
redoip: unnamed label
redofr: non 71
succip: unnamed label
@@ -830,7 +830,7 @@
top frame of a nondet side branch non 52
HeadVar__2 [1, 2, 3, 4, 5]
TypeInfo_for_T int
-non 39: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2;c2;>
+non 39: ordinary, 13 words, pred nondet_stack.qperm/2-0 (nondet) <s2-2;c2;>
redoip: unnamed label
redofr: non 39
succip: unnamed label
Index: tests/debugger/queens.exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/debugger/queens.exp,v
retrieving revision 1.32
diff -u -r1.32 queens.exp
--- tests/debugger/queens.exp 29 Mar 2006 00:57:43 -0000 1.32
+++ tests/debugger/queens.exp 3 Jan 2007 12:14:50 -0000
@@ -34,7 +34,7 @@
mdb> print *
HeadVar__1 [1, 2, 3, 4, 5]
mdb>
- E6: C4 SWTC pred queens.qperm/2-0 (nondet) s2; queens.m:37
+ E6: C4 SWTC pred queens.qperm/2-0 (nondet) s2-2; queens.m:37
mdb> print *
HeadVar__1 [1, 2, 3, 4, 5]
mdb>
@@ -135,7 +135,7 @@
HeadVar__1 [2, 3, 4, 5]
mdb>
E11: C6 SWTC queens.m:37
- pred queens.qperm/2-0 (nondet) s2;
+ pred queens.qperm/2-0 (nondet) s2-2;
mdb> print *
HeadVar__1 [2, 3, 4, 5]
mdb>
@@ -160,7 +160,7 @@
pred queens.qperm/2-0 (nondet)
mdb> goto -a 21
E16: C8 SWTC queens.m:37
- pred queens.qperm/2-0 (nondet) s2;
+ pred queens.qperm/2-0 (nondet) s2-2;
E17: C9 CALL queens.m:45 (from queens.m:38)
pred queens.qdelete/3-0 (nondet)
E18: C9 DISJ queens.m:45
@@ -175,9 +175,9 @@
5 pred queens.main/2-0 (cc_multi) (queens.m:15)
mdb> stack -d
0 E20 C10 6 pred queens.qperm/2-0 (nondet) (queens.m:36) (empty)
- 1 E15 C8 5 pred queens.qperm/2-0 (nondet) (queens.m:40) s2;c3;
- 2 E10 C6 4 pred queens.qperm/2-0 (nondet) (queens.m:40) s2;c3;
- 3 E5 C4 3 pred queens.qperm/2-0 (nondet) (queens.m:40) s2;c3;
+ 1 E15 C8 5 pred queens.qperm/2-0 (nondet) (queens.m:40) s2-2;c3;
+ 2 E10 C6 4 pred queens.qperm/2-0 (nondet) (queens.m:40) s2-2;c3;
+ 3 E5 C4 3 pred queens.qperm/2-0 (nondet) (queens.m:40) s2-2;c3;
4 E4 C3 2 pred queens.queen/2-0 (nondet) (queens.m:30) c2;
5 E1 C1 1 pred queens.main/2-0 (cc_multi) (queens.m:15) ?;c2;q!;
mdb> stack 3
@@ -186,14 +186,14 @@
5 pred queens.main/2-0 (cc_multi) (queens.m:15)
mdb> stack -d 3
0 E20 C10 6 pred queens.qperm/2-0 (nondet) (queens.m:36) (empty)
- 1 E15 C8 5 pred queens.qperm/2-0 (nondet) (queens.m:40) s2;c3;
- 2 E10 C6 4 pred queens.qperm/2-0 (nondet) (queens.m:40) s2;c3;
+ 1 E15 C8 5 pred queens.qperm/2-0 (nondet) (queens.m:40) s2-2;c3;
+ 2 E10 C6 4 pred queens.qperm/2-0 (nondet) (queens.m:40) s2-2;c3;
<more stack frames snipped>
mdb> print *
HeadVar__1 [4, 5]
mdb>
E21: C10 SWTC queens.m:37
- pred queens.qperm/2-0 (nondet) s2;
+ pred queens.qperm/2-0 (nondet) s2-2;
mdb> retry
E20: C10 CALL queens.m:36 (from queens.m:40)
pred queens.qperm/2-0 (nondet)
@@ -201,7 +201,7 @@
HeadVar__1 [4, 5]
mdb> finish -a
E21: C10 SWTC queens.m:37
- pred queens.qperm/2-0 (nondet) s2;
+ pred queens.qperm/2-0 (nondet) s2-2;
E22: C11 CALL queens.m:45 (from queens.m:38)
pred queens.qdelete/3-0 (nondet)
E23: C11 DISJ queens.m:45
@@ -211,7 +211,7 @@
E25: C12 CALL queens.m:36 (from queens.m:40)
pred queens.qperm/2-0 (nondet)
E26: C12 SWTC queens.m:37
- pred queens.qperm/2-0 (nondet) s2;
+ pred queens.qperm/2-0 (nondet) s2-2;
E27: C13 CALL queens.m:45 (from queens.m:38)
pred queens.qdelete/3-0 (nondet)
E28: C13 DISJ queens.m:45
@@ -221,7 +221,7 @@
E30: C14 CALL queens.m:36 (from queens.m:40)
pred queens.qperm/2-0 (nondet)
E31: C14 SWTC queens.m:36
- pred queens.qperm/2-0 (nondet) s1;
+ pred queens.qperm/2-0 (nondet) s1-2;
E32: C14 EXIT queens.m:36 (from queens.m:40)
pred queens.qperm/2-0 (nondet)
E33: C12 EXIT queens.m:36 (from queens.m:40)
@@ -243,15 +243,15 @@
E38: C15 CALL queens.m:52 (from queens.m:31)
pred queens.safe/1-0 (semidet)
E39: C15 SWTC queens.m:53
- pred queens.safe/1-0 (semidet) s2;
+ pred queens.safe/1-0 (semidet) s2-2;
E40: C16 CALL queens.m:60 (from queens.m:54)
pred queens.nodiag/3-0 (semidet)
E41: C16 SWTC queens.m:61
- pred queens.nodiag/3-0 (semidet) s2;
+ pred queens.nodiag/3-0 (semidet) s2-2;
E42: C16 COND queens.m:64
- pred queens.nodiag/3-0 (semidet) s2;c6;?;
+ pred queens.nodiag/3-0 (semidet) s2-2;c6;?;
E43: C16 THEN queens.m:65
- pred queens.nodiag/3-0 (semidet) s2;c6;t;
+ pred queens.nodiag/3-0 (semidet) s2-2;c6;t;
E44: C16 FAIL queens.m:60 (from queens.m:54)
pred queens.nodiag/3-0 (semidet)
E45: C15 FAIL queens.m:52 (from queens.m:31)
Index: tests/debugger/synth_attr.exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/debugger/synth_attr.exp,v
retrieving revision 1.1
diff -u -r1.1 synth_attr.exp
--- tests/debugger/synth_attr.exp 14 Dec 2006 04:36:00 -0000 1.1
+++ tests/debugger/synth_attr.exp 3 Jan 2007 12:13:18 -0000
@@ -17,7 +17,7 @@
2
browser> quit
mdb> user
- E3: C3 USER <nodiag_fail> pred synth_attr.nodiag/3-0 (semidet) s2;c6;t;c4; synth_attr.m:75
+ E3: C3 USER <nodiag_fail> pred synth_attr.nodiag/3-0 (semidet) s2-2;c6;t;c4; synth_attr.m:75
mdb> vars
1 test_failed (attr 0)
2 arg_b (attr 1, B)
Index: tests/debugger/user_event.exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/debugger/user_event.exp,v
retrieving revision 1.2
diff -u -r1.2 user_event.exp
--- tests/debugger/user_event.exp 5 Dec 2006 03:51:15 -0000 1.2
+++ tests/debugger/user_event.exp 3 Jan 2007 12:13:35 -0000
@@ -15,7 +15,7 @@
2
browser> quit
mdb> user
- E3: C3 USER <nodiag_fail> pred user_event.nodiag/3-0 (semidet) s2;c6;t;c2; user_event.m:64
+ E3: C3 USER <nodiag_fail> pred user_event.nodiag/3-0 (semidet) s2-2;c6;t;c2; user_event.m:64
mdb> vars
1 test_failed (attr 0)
2 arg_b (attr 1, B)
Index: tests/debugger/user_event_shallow.exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/debugger/user_event_shallow.exp,v
retrieving revision 1.1
diff -u -r1.1 user_event_shallow.exp
--- tests/debugger/user_event_shallow.exp 5 Dec 2006 03:51:15 -0000 1.1
+++ tests/debugger/user_event_shallow.exp 3 Jan 2007 12:14:00 -0000
@@ -19,7 +19,7 @@
mdb> user_event_context proc
User events will get only procedure contexts printed.
mdb> user
- E3: C3 USER <nodiag_fail> pred user_event_shallow.nodiag/3-0 (semidet) s2;c4;t;c2;
+ E3: C3 USER <nodiag_fail> pred user_event_shallow.nodiag/3-0 (semidet) s2-2;c4;t;c2;
mdb> user_event_context none
User events will get no contexts printed.
mdb> current
@@ -29,7 +29,7 @@
mdb> user_event_context full
User events will get full contexts printed.
mdb> current
- E3: C3 USER <nodiag_fail> pred user_event_shallow.nodiag/3-0 (semidet) s2;c4;t;c2; user_event_shallow.m:64
+ E3: C3 USER <nodiag_fail> pred user_event_shallow.nodiag/3-0 (semidet) s2-2;c4;t;c2; user_event_shallow.m:64
mdb> user_event_context file
User events will get only file contexts printed.
mdb> current
cvs diff: Diffing tests/debugger/declarative
Index: tests/debugger/declarative/pd.exp
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/debugger/declarative/pd.exp,v
retrieving revision 1.3
diff -u -r1.3 pd.exp
--- tests/debugger/declarative/pd.exp 20 May 2005 05:40:28 -0000 1.3
+++ tests/debugger/declarative/pd.exp 3 Jan 2007 12:18:33 -0000
@@ -17,7 +17,7 @@
mdb> retry
3: 3 3 CALL func pd.rev_2/2-0 (det) pd.m:18 (pd.m:14)
mdb> step
- 4: 3 3 SWTC func pd.rev_2/2-0 (det) s2; pd.m:19
+ 4: 3 3 SWTC func pd.rev_2/2-0 (det) s2-2; pd.m:19
mdb> step
5: 4 4 CALL func pd.rev_2/2-0 (det) pd.m:18 (pd.m:19)
mdb> finish
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/par_conj
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/trailing
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list