[m-rev.] for post commit review: split DISJ events

Zoltan Somogyi zs at csse.unimelb.edu.au
Wed May 2 11:42:01 AEST 2007


For review by Mark when he comes back.

Zoltan.

Currently, all disjuncts from a disjunction generate an event with the same
port: MR_PORT_DISJ. However, the declarative debugger treats first disjuncts
differently from later ones, and the g12 visualizer will want this distinction
too. Therefore this diff splits MR_PORT_DISJ into two: MR_PORT_DISJ_FIRST
and MR_PORT_DISJ_LATER.

(The visualizer will also probably want to know when the disjunction is
complete, but it is not yet known whether this should be done as a separate
port type for the last disjunct or a new kind of event that happens when
execution backtracks out of the disjunction overall, so we hold off for now.)

runtime/mercury_trace_base.[ch]:
	Make the split described above.

	Move the user-visible names of ports from the source file to the
	header file to make them easier to maintain.

	Update the list of places that need to be updated when the list of
	ports is changed.

	Have two sets of names for trace ports: one that uniquely identifies
	each port, and one that conflates MR_PORT_DISJ_FIRsT and
	MR_PORT_DISJ_LATER. The first is for use by automatic tools,
	the second is for presentation to humans (so that mdb output,
	for example, remains the same.)

	Put some parts of the header file in a more logical order.

browser/declarative_execution.m:
mdbcomp/prim_data.m:
mdbcomp/trace_counts.m:
compiler/layout_out.m:
trace/mercury_trace_internal.m:
trace/mercury_trace_tables.m:
	Conform to the above changes.

compiler/trace_params.m:
	Conform to the above changes. Start numbering ports from 0, since C
	enums start from 0. This change has no repercussions since we don't
	yet have any code that depends on the details of the encoding.

compiler/trace_gen.m:
	Decide which kind of disj event to create.

trace/mercury_trace_declarative.c:
	Handle first and later disjuncts separately.

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_execution.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/declarative_execution.m,v
retrieving revision 1.58
diff -u -b -r1.58 declarative_execution.m
--- browser/declarative_execution.m	19 Apr 2007 04:24:46 -0000	1.58
+++ browser/declarative_execution.m	1 May 2007 06:54:22 -0000
@@ -972,8 +972,8 @@
 trace_node_port(node_fail(_, _, _, _, _, _))     = port_fail.
 trace_node_port(node_excp(_, _, _, _, _, _, _))  = port_exception.
 trace_node_port(node_switch(_, _))               = port_switch.
-trace_node_port(node_first_disj(_, _))           = port_disj.
-trace_node_port(node_later_disj(_, _, _))        = port_disj.
+trace_node_port(node_first_disj(_, _))           = port_disj_first.
+trace_node_port(node_later_disj(_, _, _))        = port_disj_later.
 trace_node_port(node_cond(_, _, _))              = port_ite_cond.
 trace_node_port(node_then(_, _, _))              = port_ite_then.
 trace_node_port(node_else(_, _, _))              = port_ite_else.
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/layout_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/layout_out.m,v
retrieving revision 1.89
diff -u -b -r1.89 layout_out.m
--- compiler/layout_out.m	18 Mar 2007 23:34:53 -0000	1.89
+++ compiler/layout_out.m	1 May 2007 10:15:07 -0000
@@ -830,7 +830,8 @@
 trace_port_to_string(port_neg_enter) =           "NEG_ENTER".
 trace_port_to_string(port_neg_success) =         "NEG_SUCCESS".
 trace_port_to_string(port_neg_failure) =         "NEG_FAILURE".
-trace_port_to_string(port_disj) =                "DISJ".
+trace_port_to_string(port_disj_first) =          "DISJ_FIRST".
+trace_port_to_string(port_disj_later) =          "DISJ_LATER".
 trace_port_to_string(port_switch) =              "SWITCH".
 trace_port_to_string(port_nondet_foreign_proc_first) = "FOREIGN_PROC_FIRST".
 trace_port_to_string(port_nondet_foreign_proc_later) = "FOREIGN_PROC_LATER".
Index: compiler/trace_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/trace_gen.m,v
retrieving revision 1.16
diff -u -b -r1.16 trace_gen.m
--- compiler/trace_gen.m	15 Jan 2007 02:23:51 -0000	1.16
+++ compiler/trace_gen.m	1 May 2007 10:13:27 -0000
@@ -695,8 +695,12 @@
                 LastStep = step_switch(_, _),
                 PortPrime = port_switch
             ;
-                LastStep = step_disj(_),
-                PortPrime = port_disj
+                LastStep = step_disj(DisjunctNum),
+                ( DisjunctNum = 1 ->
+                    PortPrime = port_disj_first
+                ;
+                    PortPrime = port_disj_later
+                )
             ;
                 LastStep = step_ite_cond,
                 PortPrime = port_ite_cond
Index: compiler/trace_params.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/trace_params.m,v
retrieving revision 1.40
diff -u -b -r1.40 trace_params.m
--- compiler/trace_params.m	3 Jan 2007 07:20:37 -0000	1.40
+++ compiler/trace_params.m	1 May 2007 10:08:33 -0000
@@ -459,7 +459,8 @@
 convert_port_name("neg_failure") = port_neg_failure.
 convert_port_name("swtc") = port_switch.
 convert_port_name("switch") = port_switch.
-convert_port_name("disj") = port_disj.
+convert_port_name("disj_first") = port_disj_first.
+convert_port_name("disj_later") = port_disj_later.
 convert_port_name("frst") = port_nondet_foreign_proc_first.
 convert_port_name("nondet_foreign_proc_first") =
     port_nondet_foreign_proc_first.
@@ -473,7 +474,8 @@
 convert_port_class_name("interface") =
     [port_call, port_exit, port_redo, port_fail, port_exception].
 convert_port_class_name("internal") =
-    [port_ite_then, port_ite_else, port_switch, port_disj].
+    [port_ite_then, port_ite_else, port_switch,
+    port_disj_first, port_disj_later].
 convert_port_class_name("context") =
     [port_ite_cond, port_neg_enter, port_neg_success, port_neg_failure].
 
@@ -546,7 +548,8 @@
 trace_port_category(port_neg_success)         = port_cat_context.
 trace_port_category(port_neg_failure)         = port_cat_context.
 trace_port_category(port_switch)              = port_cat_internal.
-trace_port_category(port_disj)                = port_cat_internal.
+trace_port_category(port_disj_first)          = port_cat_internal.
+trace_port_category(port_disj_later)          = port_cat_internal.
 trace_port_category(port_nondet_foreign_proc_first) = port_cat_internal.
 trace_port_category(port_nondet_foreign_proc_later) = port_cat_internal.
 trace_port_category(port_user)                = port_cat_user.
@@ -602,18 +605,19 @@
 
 :- func port_number(trace_port) = int.
 
-port_number(port_call) = 1.
-port_number(port_exit) = 2.
-port_number(port_redo) = 3.
-port_number(port_fail) = 4.
-port_number(port_exception) = 5.
-port_number(port_ite_cond) = 6.
-port_number(port_ite_then) = 7.
-port_number(port_ite_else) = 8.
-port_number(port_neg_enter) = 9.
-port_number(port_neg_success) = 10.
-port_number(port_neg_failure) = 11.
-port_number(port_disj) = 12.
+port_number(port_call) = 0.
+port_number(port_exit) = 1.
+port_number(port_redo) = 2.
+port_number(port_fail) = 3.
+port_number(port_exception) = 4.
+port_number(port_ite_cond) = 5.
+port_number(port_ite_then) = 6.
+port_number(port_ite_else) = 7.
+port_number(port_neg_enter) = 8.
+port_number(port_neg_success) = 9.
+port_number(port_neg_failure) = 10.
+port_number(port_disj_first) = 11.
+port_number(port_disj_later) = 12.
 port_number(port_switch) = 13.
 port_number(port_nondet_foreign_proc_first) = 14.
 port_number(port_nondet_foreign_proc_later) = 15.
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_allegro
cvs diff: Diffing extras/graphics/mercury_allegro/examples
cvs diff: Diffing extras/graphics/mercury_allegro/samples
cvs diff: Diffing extras/graphics/mercury_allegro/samples/demo
cvs diff: Diffing extras/graphics/mercury_allegro/samples/mandel
cvs diff: Diffing extras/graphics/mercury_allegro/samples/pendulum2
cvs diff: Diffing extras/graphics/mercury_allegro/samples/speed
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/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/prim_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/mdbcomp/prim_data.m,v
retrieving revision 1.20
diff -u -b -r1.20 prim_data.m
--- mdbcomp/prim_data.m	19 Apr 2007 02:12:49 -0000	1.20
+++ mdbcomp/prim_data.m	1 May 2007 06:54:07 -0000
@@ -46,7 +46,8 @@
     ;       port_neg_enter
     ;       port_neg_success
     ;       port_neg_failure
-    ;       port_disj
+    ;       port_disj_first
+    ;       port_disj_later
     ;       port_switch
     ;       port_nondet_foreign_proc_first
     ;       port_nondet_foreign_proc_later
Index: mdbcomp/trace_counts.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/mdbcomp/trace_counts.m,v
retrieving revision 1.20
diff -u -b -r1.20 trace_counts.m
--- mdbcomp/trace_counts.m	19 Jan 2007 07:05:05 -0000	1.20
+++ mdbcomp/trace_counts.m	1 May 2007 06:56:02 -0000
@@ -697,7 +697,8 @@
 string_to_trace_port("NEGE", port_neg_enter).
 string_to_trace_port("NEGS", port_neg_success).
 string_to_trace_port("NEGF", port_neg_failure).
-string_to_trace_port("DISJ", port_disj).
+string_to_trace_port("DSJF", port_disj_first).
+string_to_trace_port("DSJL", port_disj_later).
 string_to_trace_port("SWTC", port_switch).
 string_to_trace_port("FRST", port_nondet_foreign_proc_first).
 string_to_trace_port("LATR", port_nondet_foreign_proc_later).
@@ -729,7 +730,8 @@
     port_and_path(port_neg_success, GoalPath).
 make_path_port(GoalPath, port_neg_failure) =
     port_and_path(port_neg_failure, GoalPath).
-make_path_port(GoalPath, port_disj) = path_only(GoalPath).
+make_path_port(GoalPath, port_disj_first) = path_only(GoalPath).
+make_path_port(GoalPath, port_disj_later) = path_only(GoalPath).
 make_path_port(GoalPath, port_switch) = path_only(GoalPath).
 make_path_port(GoalPath, port_nondet_foreign_proc_first) = path_only(GoalPath).
 make_path_port(GoalPath, port_nondet_foreign_proc_later) = path_only(GoalPath).
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
Index: runtime/mercury_trace_base.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_trace_base.c,v
retrieving revision 1.81
diff -u -b -r1.81 mercury_trace_base.c
--- runtime/mercury_trace_base.c	18 Feb 2007 08:01:56 -0000	1.81
+++ runtime/mercury_trace_base.c	1 May 2007 10:23:00 -0000
@@ -106,26 +106,8 @@
 
 #endif
 
-const char  *MR_port_names[] =
-{
-    "CALL",
-    "EXIT",
-    "REDO",
-    "FAIL",
-    "EXCP",
-    "COND",
-    "THEN",
-    "ELSE",
-    "NEGE",
-    "NEGS",
-    "NEGF",
-    "DISJ",
-    "SWTC",
-    "FRST",
-    "LATR",
-    "USER",
-    "NONE",
-};
+const char  *MR_actual_port_names[] = { MR_TRACE_PORT_ACTUAL_NAMES };
+const char  *MR_simplified_port_names[] = { MR_TRACE_PORT_SIMPLIFIED_NAMES };
 
 static  const void  *MR_get_orig_number(const void *record);
 static  int         MR_hash_orig_number(const void *orig_number);
@@ -575,7 +557,7 @@
             switch (path_port) {
 
                 case PORT_ONLY:
-                    fputs(MR_port_names[port], fp);
+                    fputs(MR_actual_port_names[port], fp);
                     break;
 
                 case PATH_ONLY:
@@ -585,7 +567,7 @@
                     break;
 
                 case PORT_AND_PATH:
-                    fputs(MR_port_names[port], fp);
+                    fputs(MR_actual_port_names[port], fp);
                     putc(' ', fp);
                     putc('<', fp);
                     fputs(MR_label_goal_path(label), fp);
Index: runtime/mercury_trace_base.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_trace_base.h,v
retrieving revision 1.59
diff -u -b -r1.59 mercury_trace_base.h
--- runtime/mercury_trace_base.h	23 Jan 2007 03:45:39 -0000	1.59
+++ runtime/mercury_trace_base.h	1 May 2007 10:20:24 -0000
@@ -23,11 +23,12 @@
 #include <stdio.h>		/* for FILE; should be after mercury headers */
 
 /*
-** This enum should EXACTLY match the definition of the `trace_port_type'
-** type in mdbcomp/prim_data.m, the definition of the predicate
-** `layout_out.trace_port_to_string' and the function
-** `stack_layout.port_number', and the port names list
-** in the C source file of this module (mercury_trace_base.c),
+** This enum should EXACTLY match
+** - the macro `MR_TRACE_PORT_ACTUAL_NAMES' below,
+** - the macro `MR_TRACE_PORT_SIMPLIFIED_NAMES' below,
+** - the type `trace_port' in mdbcomp/prim_data.m,
+** - the predicate `trace_port_to_string' in compiler/layout_out.m, and
+** - the function `port_number' in compiler/trace_params.m.
 */
 
 typedef	enum {
@@ -42,7 +43,8 @@
 	MR_PORT_NEG_ENTER,
 	MR_PORT_NEG_SUCCESS,	/* negated goal failed; negation succeeds */
 	MR_PORT_NEG_FAILURE,	/* negated goal succeeded; negation fails */
-	MR_PORT_DISJ,
+	MR_PORT_DISJ_FIRST,
+	MR_PORT_DISJ_LATER,
 	MR_PORT_SWITCH,
 	MR_PORT_FOREIGN_PROC_FIRST,
 	MR_PORT_FOREIGN_PROC_LATER,
@@ -50,6 +52,51 @@
 	MR_PORT_NONE
 } MR_TracePort;
 
+#define	MR_PORT_NUM_PORTS		((int) MR_PORT_NONE + 1)
+
+#define	MR_TRACE_PORT_ACTUAL_NAMES \
+	"CALL",	\
+	"EXIT", \
+	"REDO", \
+	"FAIL", \
+	"EXCP", \
+	"COND", \
+	"THEN", \
+	"ELSE", \
+	"NEGE", \
+	"NEGS", \
+	"NEGF", \
+	"DSJF", \
+	"DSJL", \
+	"SWTC", \
+	"FRST", \
+	"LATR", \
+	"USER", \
+	"NONE"
+
+#define	MR_TRACE_PORT_SIMPLIFIED_NAMES \
+	"CALL",	\
+	"EXIT", \
+	"REDO", \
+	"FAIL", \
+	"EXCP", \
+	"COND", \
+	"THEN", \
+	"ELSE", \
+	"NEGE", \
+	"NEGS", \
+	"NEGF", \
+	"DISJ", \
+	"DISJ", \
+	"SWTC", \
+	"FRST", \
+	"LATR", \
+	"USER", \
+	"NONE"
+
+extern	const char 	*MR_actual_port_names[];
+extern	const char 	*MR_simplified_port_names[];
+
 /*
 ** The following array says if a label inside a procedure is
 ** uniquely identifiable by its goal path only, its port only or
@@ -60,14 +107,10 @@
     PATH_ONLY, PORT_ONLY, PORT_AND_PATH
 } MR_PathPort;
 
-extern	MR_PathPort     MR_named_count_port[MR_PORT_NONE + 1];
+extern	MR_PathPort     MR_named_count_port[MR_PORT_NUM_PORTS];
 
 extern	void		MR_trace_name_count_port_ensure_init(void);
 
-#define	MR_PORT_NUM_PORTS		((int) MR_PORT_NONE + 1)
-
-extern	const char 			*MR_port_names[];
-
 #define MR_trace_incr_seq()		((MR_Word) ++MR_trace_call_seqno)
 #define MR_trace_incr_depth()		((MR_Word) ++MR_trace_call_depth)
 
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/c_interface/standalone_c
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/solver_types
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
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
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
Index: trace/mercury_trace_declarative.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/trace/mercury_trace_declarative.c,v
retrieving revision 1.109
diff -u -b -r1.109 mercury_trace_declarative.c
--- trace/mercury_trace_declarative.c	3 Jan 2007 07:20:47 -0000	1.109
+++ trace/mercury_trace_declarative.c	1 May 2007 06:55:51 -0000
@@ -353,7 +353,9 @@
                                 MR_TraceNode prev);
 static    MR_TraceNode      MR_trace_decl_switch(MR_EventInfo *event_info,
                                 MR_TraceNode prev);
-static    MR_TraceNode      MR_trace_decl_disj(MR_EventInfo *event_info,
+static    MR_TraceNode      MR_trace_decl_disj_first(MR_EventInfo *event_info,
+                                MR_TraceNode prev);
+static    MR_TraceNode      MR_trace_decl_disj_later(MR_EventInfo *event_info,
                                 MR_TraceNode prev);
 static    MR_TraceNode      MR_trace_decl_cond(MR_EventInfo *event_info,
                                 MR_TraceNode prev);
@@ -695,8 +697,12 @@
             trace = MR_trace_decl_fail(event_info, trace);
             break;
 
-        case MR_PORT_DISJ:
-            trace = MR_trace_decl_disj(event_info, trace);
+        case MR_PORT_DISJ_FIRST:
+            trace = MR_trace_decl_disj_first(event_info, trace);
+            break;
+
+        case MR_PORT_DISJ_LATER:
+            trace = MR_trace_decl_disj_later(event_info, trace);
             break;
 
         case MR_PORT_SWITCH:
@@ -1158,20 +1164,28 @@
 }
 
 static MR_TraceNode
-MR_trace_decl_disj(MR_EventInfo *event_info, MR_TraceNode prev)
+MR_trace_decl_disj_first(MR_EventInfo *event_info, MR_TraceNode prev)
 {
     MR_TraceNode    node;
-    const char      *path = event_info->MR_event_path;
 
-    if (MR_trace_first_disjunct(event_info)) {
         MR_TRACE_CALL_MERCURY(
             node = (MR_TraceNode) MR_DD_construct_first_disj_node(
                 (MR_Word) prev, event_info->MR_event_sll);
         );
-    } else {
+
+    return node;
+}
+
+static MR_TraceNode
+MR_trace_decl_disj_later(MR_EventInfo *event_info, MR_TraceNode prev)
+{
+    MR_TraceNode    node;
+    const char      *path;
         MR_TraceNode    next;
         MR_TraceNode    first;
 
+    path = event_info->MR_event_path;
+
         /*
         ** Search through previous nodes for a matching DISJ event.
         */
@@ -1195,7 +1209,6 @@
                 MR_trace_node_store, (MR_Word) prev, event_info->MR_event_sll,
                 (MR_Word) first);
         );
-    }
 
     return node;
 }
@@ -1283,7 +1296,7 @@
         port = (MR_TracePort) MR_DD_trace_node_port(node);
     );
 
-    if (port == MR_PORT_DISJ) {
+    if (port == MR_PORT_DISJ_FIRST || port == MR_PORT_DISJ_LATER) {
         node_path = MR_trace_node_path(node);
         return MR_trace_same_construct(path, node_path);
     } else {
Index: trace/mercury_trace_internal.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/trace/mercury_trace_internal.c,v
retrieving revision 1.233
diff -u -b -r1.233 mercury_trace_internal.c
--- trace/mercury_trace_internal.c	19 Jan 2007 04:42:50 -0000	1.233
+++ trace/mercury_trace_internal.c	1 May 2007 10:27:22 -0000
@@ -1473,7 +1473,8 @@
         fprintf(MR_mdb_out, "%8s: ", buf);
         snprintf(buf, 64, "C%ld", (long) call_num);
         fprintf(MR_mdb_out, "%6s ", buf);
-        fprintf(MR_mdb_out, "%s", MR_port_names[event_info->MR_trace_port]);
+        fprintf(MR_mdb_out, "%s",
+            MR_simplified_port_names[event_info->MR_trace_port]);
     } else {
 #ifdef  MR_USE_MINIMAL_MODEL_OWN_STACKS
         MR_Generator    *generator;
@@ -1489,7 +1490,7 @@
             (long) event_info->MR_event_number,
             (long) event_info->MR_call_seqno,
             (long) event_info->MR_call_depth,
-            MR_port_names[event_info->MR_trace_port]);
+            MR_simplified_port_names[event_info->MR_trace_port]);
     }
 
     /* The printf printed 24 characters. */
Index: trace/mercury_trace_tables.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/trace/mercury_trace_tables.c,v
retrieving revision 1.49
diff -u -b -r1.49 mercury_trace_tables.c
--- trace/mercury_trace_tables.c	19 Jan 2007 04:42:51 -0000	1.49
+++ trace/mercury_trace_tables.c	1 May 2007 10:29:43 -0000
@@ -1878,7 +1878,7 @@
     }
 
     for (port = 0; port < MR_PORT_NUM_PORTS; port++) {
-        fprintf(fp, "%4s %10d (%5.2f%%)\n", MR_port_names[port],
+        fprintf(fp, "%4s %10d (%5.2f%%)\n", MR_actual_port_names[port],
             histogram[port], ((float) 100 * histogram[port]) / total);
     }
     fprintf(fp, "%s %10d\n", "all ", total);
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