[m-rev.] diff: replcae deprecated mode and inst syntax in debugger

Julien Fischer juliensf at cs.mu.OZ.AU
Wed Jul 21 17:20:12 AEST 2004


Estimated hours taken: 0.2
Branches: main

browser/declarative_execution.m:
browser/declarative_tree.m:
browser/tree234_cc.m:
	Replace deprecated syntax for :- inst and :- mode
	declarations.

Julien.

Index: declarative_execution.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/declarative_execution.m,v
retrieving revision 1.25
diff -u -r1.25 declarative_execution.m
--- declarative_execution.m	7 Jul 2004 05:26:15 -0000	1.25
+++ declarative_execution.m	20 Jul 2004 07:34:42 -0000
@@ -293,13 +293,13 @@
 :- pred det_trace_node_from_id(S, R, trace_node(R)) <= annotated_trace(S, R).
 :- mode det_trace_node_from_id(in, in, out) is det.

-:- inst trace_node_call = bound(call(ground, ground, ground, ground,
-	ground, ground, ground, ground, ground)).
+:- inst trace_node_call ---> call(ground, ground, ground, ground,
+	ground, ground, ground, ground, ground).

 :- pred call_node_from_id(S, R, trace_node(R)) <= annotated_trace(S, R).
 :- mode call_node_from_id(in, in, out(trace_node_call)) is det.

-:- inst trace_node_redo = bound(redo(ground, ground)).
+:- inst trace_node_redo ---> redo(ground, ground).

 	% maybe_redo_node_from_id/3 fails if the argument is a
 	% NULL reference.
@@ -307,18 +307,18 @@
 :- pred maybe_redo_node_from_id(S, R, trace_node(R)) <= annotated_trace(S, R).
 :- mode maybe_redo_node_from_id(in, in, out(trace_node_redo)) is semidet.

-:- inst trace_node_exit = bound(exit(ground, ground, ground, ground,
-	ground, ground)).
+:- inst trace_node_exit ---> exit(ground, ground, ground, ground,
+	ground, ground).

 :- pred exit_node_from_id(S, R, trace_node(R)) <= annotated_trace(S, R).
 :- mode exit_node_from_id(in, in, out(trace_node_exit)) is det.

-:- inst trace_node_cond = bound(cond(ground, ground, ground)).
+:- inst trace_node_cond ---> cond(ground, ground, ground).

 :- pred cond_node_from_id(S, R, trace_node(R)) <= annotated_trace(S, R).
 :- mode cond_node_from_id(in, in, out(trace_node_cond)) is det.

-:- inst trace_node_neg = bound(neg(ground, ground, ground)).
+:- inst trace_node_neg ---> neg(ground, ground, ground).

 :- pred neg_node_from_id(S, R, trace_node(R)) <= annotated_trace(S, R).
 :- mode neg_node_from_id(in, in, out(trace_node_neg)) is det.
@@ -328,8 +328,9 @@
 :- pred first_disj_node_from_id(S, R, trace_node(R)) <= annotated_trace(S, R).
 :- mode first_disj_node_from_id(in, in, out(trace_node_first_disj)) is det.

-:- inst trace_node_disj = bound(first_disj(ground, ground);
-				later_disj(ground, ground, ground)).
+:- inst trace_node_disj
+	--->	first_disj(ground, ground)
+	;	later_disj(ground, ground, ground).

 :- pred disj_node_from_id(S, R, trace_node(R)) <= annotated_trace(S, R).
 :- mode disj_node_from_id(in, in, out(trace_node_disj)) is det.
@@ -630,10 +631,10 @@
 :- mode find_prev_contour(in, in, out) is semidet.
 :- mode find_prev_contour(in, in(trace_node_reverse), out) is det.

-:- inst trace_node_reverse =
-	bound(	fail(ground, ground, ground, ground)
+:- inst trace_node_reverse
+	---> 	fail(ground, ground, ground, ground)
 	;	redo(ground, ground)
-	;	neg_fail(ground, ground)).
+	;	neg_fail(ground, ground).

 find_prev_contour(Store, fail(_, Call, _, _), OnContour) :-
 	call_node_from_id(Store, Call, CallNode),
Index: declarative_tree.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/declarative_tree.m,v
retrieving revision 1.6
diff -u -r1.6 declarative_tree.m
--- declarative_tree.m	7 Jul 2004 05:26:15 -0000	1.6
+++ declarative_tree.m	19 Jul 2004 14:32:59 -0000
@@ -1046,10 +1046,10 @@
 	call_node_from_id(Store, Call, CallNode),
 	SeqNo = CallNode ^ call_seq.

-:- inst edt_return_node =
-		bound(	exit(ground, ground, ground, ground, ground, ground)
-		;	fail(ground, ground, ground, ground)
-		;	excp(ground, ground, ground, ground, ground)).
+:- inst edt_return_node
+	--->	exit(ground, ground, ground, ground, ground, ground)
+	;	fail(ground, ground, ground, ground)
+	;	excp(ground, ground, ground, ground, ground).

 :- pred det_edt_return_node_from_id(S::in, R::in,
 	trace_node(R)::out(edt_return_node)) is det <= annotated_trace(S, R).
Index: tree234_cc.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/tree234_cc.m,v
retrieving revision 1.1
diff -u -r1.1 tree234_cc.m
--- tree234_cc.m	2 May 2002 07:44:02 -0000	1.1
+++ tree234_cc.m	19 Jul 2004 14:35:58 -0000
@@ -158,26 +158,14 @@
 %------------------------------------------------------------------------------%
 %------------------------------------------------------------------------------%

-:- inst two(K, V, T) =
-	bound(
-		two(K, V, T, T)
-	).
+:- inst two(K, V, T)   ---> two(K, V, T, T).
+:- inst three(K, V, T) ---> three(K, V, K, V, T, T, T).
+:- inst four(K, V, T)  ---> four(K, V, K, V, K, V, T, T, T, T).

-:- inst three(K, V, T) =
-	bound(
-		three(K, V, K, V, T, T, T)
-	).
-
-:- inst four(K, V, T) =
-	bound(
-		four(K, V, K, V, K, V, T, T, T, T)
-	).
-
-:- mode out_two :: out(two(ground, ground, ground)).
-
-:- mode in_two :: in(two(ground, ground, ground)).
-:- mode in_three :: in(three(ground, ground, ground)).
-:- mode in_four :: in(four(ground, ground, ground)).
+:- mode out_two  == out(two(ground, ground, ground)).
+:- mode in_two   == in(two(ground, ground, ground)).
+:- mode in_three == in(three(ground, ground, ground)).
+:- mode in_four  == in(four(ground, ground, ground)).

 %------------------------------------------------------------------------------%


--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list