[m-rev.] [reuse] diff: remove alias_as dependency in module_info and proc_info

Nancy Mazur Nancy.Mazur at cs.kuleuven.ac.be
Fri Jun 25 12:30:52 AEST 2004


Hi,


===================================================================


Estimated hours taken: 2
Branches: reuse

Remove the alias-as dependency from the modules "hlds_module" and "hlds_pred".
This means that in the HLDS, aliases are stored in there public representation,
i.e. "aliases_domain" (defined in prog_data), instead of the representation
private to the alias-analysis. Also change the pragma "possible_aliases" so
that it uses aliases_domain, instead of alias_as. 

prog_data.m:
	New type "aliases_domain". 
	Change type of the alias-argument in pragma "possible_aliases".

hlds_module.m:
hlds_pred.m:
	Remove dependency to module pa_alias_as, change type. 	

make_hlds.m:
	Effect of type-change of the possible_aliases pragma. 

pa_alias_as.m:
pa_alias_set.m:
	Change the printing and parsing routines to use the public aliases
	representation instead of alias_as. This will move to a separate
	module in a later change. 

pa_prelim_run.m:
	Effect of type-change of the possible_aliases pragma. 

pa_run.m:
sr_data.m:
sr_profile_run.m:
	Effect of type-change in the HLDS-structure. 
	


Index: hlds_module.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/hlds_module.m,v
retrieving revision 1.59.2.13
diff -u -r1.59.2.13 hlds_module.m
--- hlds_module.m	11 Jun 2004 06:01:00 -0000	1.59.2.13
+++ hlds_module.m	25 Jun 2004 01:50:51 -0000
@@ -27,8 +27,6 @@
 :- import_module hlds__special_pred.
 :- import_module libs__globals, backend_libs__foreign.
 :- import_module relation, map, std_util, list, set, multi_map, counter.
-:- import_module possible_alias.
-:- import_module possible_alias__pa_alias_as.
 :- import_module structure_reuse.
 :- import_module structure_reuse__sr_data.
 
@@ -129,7 +127,7 @@
 :- type unproc_alias_pragma 
 	--->	unproc_alias_pragma(pred_or_func, sym_name, list(mode),
 			list(prog_var), list((type)), 
-			alias_as).
+			aliases_domain).
 
 	% The unprocessed pragma reuse information.  This information is not
 	% processed until just prior to the alias pass in the compiler so that
Index: hlds_pred.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/hlds_pred.m,v
retrieving revision 1.81.2.23
diff -u -r1.81.2.23 hlds_pred.m
--- hlds_pred.m	11 Jun 2004 02:56:49 -0000	1.81.2.23
+++ hlds_pred.m	25 Jun 2004 01:51:09 -0000
@@ -21,8 +21,6 @@
 :- import_module libs__globals.
 
 :- import_module bool, list, set, map, std_util, term, varset.
-:- import_module possible_alias.
-:- import_module possible_alias__pa_alias_as.
 :- import_module structure_reuse.
 :- import_module structure_reuse__sr_data.
 
@@ -1790,10 +1788,10 @@
 :- pred proc_info_set_rl_exprn_id(proc_info, rl_exprn_id, proc_info).
 :- mode proc_info_set_rl_exprn_id(in, in, out) is det.
 
-:- pred proc_info_possible_aliases(proc_info, maybe(pa_alias_as__alias_as)).
+:- pred proc_info_possible_aliases(proc_info, maybe(aliases_domain)).
 :- mode proc_info_possible_aliases(in, out) is det.
 
-:- pred proc_info_set_possible_aliases(proc_info, alias_as, proc_info).
+:- pred proc_info_set_possible_aliases(proc_info, aliases_domain, proc_info).
 :- mode proc_info_set_possible_aliases(in, in, out) is det.
 
 :- pred proc_info_global_use(proc_info, maybe(set(prog_var))).
@@ -2095,7 +2093,7 @@
 
 :- type pa_sr_info
 	--->	pa_sr_information(
-			maybe_alias_as :: maybe(alias_as),
+			maybe_alias :: maybe(aliases_domain),
 		                        % `Possible' aliases annotations per
 		                        % procedure. This field is set by the
 		                        % possible alias analysis.
@@ -2286,7 +2284,7 @@
 proc_info_get_rl_exprn_id(ProcInfo, ProcInfo^maybe_aditi_rl_id).
 :- pred proc_info_alias_reuse_info(proc_info::in, pa_sr_info::out) is det.
 proc_info_alias_reuse_info(ProcInfo, ProcInfo^alias_reuse_info).
-proc_info_possible_aliases(ProcInfo, AliasReuseInfo^maybe_alias_as):-
+proc_info_possible_aliases(ProcInfo, AliasReuseInfo^maybe_alias):-
 	proc_info_alias_reuse_info(ProcInfo, AliasReuseInfo).
 proc_info_global_use(ProcInfo, AliasReuseInfo^maybe_global_use):-
 	proc_info_alias_reuse_info(ProcInfo, AliasReuseInfo).
@@ -2333,7 +2331,7 @@
 proc_info_set_possible_aliases(ProcInfo0, Aliases, ProcInfo):- 
 	proc_info_alias_reuse_info(ProcInfo0, AliasReuseInfo), 
 	proc_info_set_alias_reuse_info(ProcInfo0,
-			AliasReuseInfo^maybe_alias_as := yes(Aliases),
+			AliasReuseInfo^maybe_alias := yes(Aliases),
 			ProcInfo). 
 proc_info_set_global_use(ProcInfo0, GlobalUse, ProcInfo):- 
 	proc_info_alias_reuse_info(ProcInfo0, AliasReuseInfo), 
Index: make_hlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make_hlds.m,v
retrieving revision 1.347.2.24
diff -u -r1.347.2.24 make_hlds.m
--- make_hlds.m	11 Jun 2004 06:01:02 -0000	1.347.2.24
+++ make_hlds.m	25 Jun 2004 01:52:24 -0000
@@ -1571,7 +1571,7 @@
 			list(mode)::in,
 			list(var(T))::in, 
 			list( (type) )::in, 
-			maybe(alias_as)::in,
+			maybe(aliases_domain)::in,
 			module_info::in, module_info::out, 
 			io__state::di, io__state::uo) is det.
 
Index: pa_alias_as.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/pa_alias_as.m,v
retrieving revision 1.1.2.36
diff -u -r1.1.2.36 pa_alias_as.m
--- pa_alias_as.m	24 Jun 2004 06:05:09 -0000	1.1.2.36
+++ pa_alias_as.m	25 Jun 2004 01:52:32 -0000
@@ -223,28 +223,29 @@
 %-----------------------------------------------------------------------------%
 	% Dump the alias information (used in hlds_dumps). 
 	% Each alias will be preceded by the string "% ". 
-:- pred print_maybe_possible_aliases(maybe(alias_as)::in, proc_info::in, 
+:- pred print_maybe_possible_aliases(maybe(aliases_domain)::in, proc_info::in, 
 		pred_info::in, io__state::di, io__state::uo) is det.
 
 	% Dump the alias information printing a given string between each alias
 	% expressed by the abstract description. 
-:- pred print_maybe_possible_aliases(string::in, maybe(alias_as)::in, 
+:- pred print_maybe_possible_aliases(string::in, maybe(aliases_domain)::in, 
 		proc_info::in, pred_info::in, 
 		io__state::di, io__state::uo) is det.
 
 	% Print alias information suitable for using in the trans_opt interface
 	% files, and therefore mmc-readable. 
-:- pred print_maybe_interface_aliases(maybe(alias_as)::in, 
+:- pred print_maybe_interface_aliases(maybe(aliases_domain)::in, 
 		proc_info::in, pred_info::in, 
 		io__state::di, io__state::uo) is det.
 
 	% Print mmc-readable aliases. Mainly used for printing intermediate
 	% aliasing descriptions during the analysis process, with Verbosity
 	% switched on. 
-:- pred print_aliases(alias_as, proc_info, pred_info, io__state, io__state).
+:- pred print_aliases(aliases_domain, proc_info, pred_info, 
+		io__state, io__state).
 :- mode print_aliases(in, in, in, di, uo) is det.
 
-:- pred print_brief_aliases(int::in, alias_as::in, proc_info::in,
+:- pred print_brief_aliases(int::in, aliases_domain::in, proc_info::in,
 		pred_info::in, io__state::di, io__state::uo) is det.
 
 %-----------------------------------------------------------------------------%
@@ -254,13 +255,14 @@
 	% Parse the aliases as stored in the trans_opt interface files.
 	% This is the reverse routine for print_maybe_interface_aliases.
 	% Precondition: the list should contain only one element. 
-:- pred parse_read_aliases(list(term(T))::in, alias_as::out) is det.
+:- pred parse_read_aliases(list(term(T))::in, aliases_domain::out) is det.
 
 	% Parse the aliases as stored in the trans_opt interface files. Unlike
 	% in the previous routine, the alias is here dscribed by one single
 	% term (instead of a list of one single term). 
-:- pred parse_read_aliases_from_single_term(term(T)::in, alias_as::out) is det.
+:- pred parse_read_aliases_from_single_term(term(T)::in, 
+		aliases_domain::out) is det.
 
 	% Parse the used declared aliases (pragma aliasing). 
 	% XXX This routine is definitely on the wrong place and should be moved
@@ -313,6 +315,11 @@
 		list(mode)::in, list(type)::in) is semidet.
 
 %-----------------------------------------------------------------------------%
+:- pred from_aliases_domain_to_alias_as(aliases_domain::in, 
+		alias_as::out) is det.
+:- pred from_alias_as_to_aliases_domain(alias_as::in, 
+		aliases_domain::out) is det.
+%-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%
 :- implementation.
 
@@ -626,52 +633,43 @@
 	
 
 %-----------------------------------------------------------------------------%
-extend_unification(HLDS, ProcInfo, Unif, GoalInfo, ASin, ASout):-
+extend_unification(HLDS, ProcInfo, Unif, GoalInfo, !AS) :- 
 	pa_alias__from_unification(HLDS, ProcInfo, Unif, GoalInfo, AUnif),
 	from_pair_alias_list(AUnif, AliasSetUnif), 
 	wrap(AliasSetUnif, ASUnif0),
 		% pa_alias__from_unification does not ensure that the created
 		% aliases are normalized, hence this must be explicitly done: 
 	normalize_wti(HLDS, ProcInfo, ASUnif0, ASUnif),
-	extend(HLDS, ProcInfo, ASUnif, ASin, ASout0), 
+	extend(HLDS, ProcInfo, ASUnif, !AS), 
 	(
 		Unif = construct(_, _, _, _, _, _, _)
 	-> 
-		optimization_remove_deaths(ProcInfo, ASout0, GoalInfo, ASout)
+		optimization_remove_deaths(ProcInfo, GoalInfo, !AS)
 	;
-		ASout = ASout0
+		true
 	).
 
-extend_unification(HLDS, ProcInfo, PredInfo, Unif, GoalInfo, ASin, ASout) --> 
-	{ pa_alias__from_unification(HLDS, ProcInfo, Unif, GoalInfo, AUnif) },
-	{ from_pair_alias_list(AUnif, AliasSetUnif) } ,
-	{ wrap(AliasSetUnif, ASUnif0) },
+extend_unification(HLDS, ProcInfo, _PredInfo, Unif, GoalInfo, !AS, !IO) :-
+	pa_alias__from_unification(HLDS, ProcInfo, Unif, GoalInfo, AUnif),
+	from_pair_alias_list(AUnif, AliasSetUnif),
+	wrap(AliasSetUnif, ASUnif0),
 		% pa_alias__from_unification does not ensure that the created
 		% aliases are normalized, hence this must be explicitly done: 
-	{ normalize_wti(HLDS, ProcInfo, ASUnif0, ASUnif) },
-	io__write_string("\n--> New aliases: "),
-	io__write_strings(["(size = ", 
-			int_to_string(pa_alias_as__size(ASUnif)), 
-			"/",
-			int_to_string(list__length(AUnif)),
-			") "]),
-	print_aliases(ASUnif, ProcInfo, PredInfo),
-	{
-	extend(HLDS, ProcInfo, ASUnif, ASin, ASout0), 
+	normalize_wti(HLDS, ProcInfo, ASUnif0, ASUnif),
+	extend(HLDS, ProcInfo, ASUnif, !AS),
 	(
 		Unif = construct(_, _, _, _, _, _, _)
 	-> 
-		optimization_remove_deaths(ProcInfo, ASout0, GoalInfo, ASout)
+		optimization_remove_deaths(ProcInfo, GoalInfo, !AS) 
 	;
-		ASout = ASout0
-	)}.
+		true
+	).
 
 
-:- pred optimization_remove_deaths(proc_info, alias_as, 
-					hlds_goal_info, alias_as).
-:- mode optimization_remove_deaths(in, in, in, out) is det.
+:- pred optimization_remove_deaths(proc_info::in, hlds_goal_info::in, 
+			alias_as::in, alias_as::out) is det.
 
-optimization_remove_deaths(ProcInfo, ASin, GI, ASout) :-
+optimization_remove_deaths(ProcInfo, GI, ASin, ASout) :-
 	proc_info_headvars(ProcInfo, HeadVars), 
 	set__list_to_set(HeadVars, HeadVarsSet), 
 	hlds_llds__goal_info_get_post_deaths(GI, Deaths0),
@@ -955,11 +953,11 @@
 
 	% print_possible_aliases(Abstract Substitution, Proc Info).
 	% print alias abstract substitution
-:- pred print_possible_aliases(string::in, alias_as::in, proc_info::in, 
+:- pred print_possible_aliases(string::in, aliases_domain::in, proc_info::in, 
 		pred_info::in, io__state::di, io__state::uo) is det.
 print_possible_aliases(RepeatingStart, AS, ProcInfo, PredInfo) -->
 	(
-		{ AS = real_as(Aliases) }
+		{ AS = real(Aliases) }
 	->
 		io__nl, 
 		print(PredInfo, ProcInfo, Aliases, 
@@ -980,6 +978,8 @@
 		io__write_string(Msg)
 	).
 
+
+
 	% MaybeAs = yes(Alias_as) -> print `yes(printed Alias_as)'
 	%         = no		  -> print `not_available'
 print_maybe_interface_aliases(MaybeAS, ProcInfo, PredInfo) -->
@@ -995,7 +995,7 @@
 
 print_aliases(AS, ProcInfo, PredInfo) --> 
 	(
-		{ AS = real_as(Aliases) }
+		{ AS = real(Aliases) }
 	->
 		io__write_string("["),
 		print(PredInfo, ProcInfo, Aliases, 
@@ -1011,7 +1011,7 @@
 
 print_brief_aliases(Threshold, AS, ProcInfo, PredInfo) --> 
 	(
-		{ AS = real_as(Aliases) }
+		{ AS = real(Aliases) }
 	->
 		io__write_string("["),
 		print_brief(Threshold, PredInfo, ProcInfo, Aliases, 
@@ -1052,9 +1052,10 @@
 			CONS = "[|]"
 		->
 			parse_list_alias_term(OneITEM, Aliases),
-			from_pair_alias_list(Aliases, 
-					AliasSet), 
-			wrap(AliasSet, AS)
+			% from_pair_alias_list(Aliases, 
+			%		AliasSet), 
+			% wrap(AliasSet, AS)
+			AS = real(Aliases)
 			% AS = bottom
 		;
 			CONS = "bottom"
@@ -1068,7 +1069,7 @@
 			string__append_list(["imported top (", 
 				ContextString, ")"], 
 					Msg),
-			top(Msg, AS)
+			AS = top([Msg])
 		;
 			string__append(
 		"(pa_alias_as) parse_read_aliases_from_single_term: could not parse aliases, top cons: ", CONS, Msg),
@@ -1421,4 +1422,16 @@
 % live(ModuleInfo, ProcInfo, IN_USE, LIVE_0, AS) = LIVE :- 
 	% live(ModuleInfo, ProcInfo, IN_USE, LIVE_0, AS, LIVE).
 
+
+%-----------------------------------------------------------------------------%
+from_aliases_domain_to_alias_as(bottom, bottom).
+from_aliases_domain_to_alias_as(real(Aliases), AliasAS):- 
+	from_pair_alias_list(Aliases, AliasSet), 
+	wrap(AliasSet, AliasAS).
+from_aliases_domain_to_alias_as(top(Msg), top(Msg)).
+
+from_alias_as_to_aliases_domain(bottom, bottom).
+from_alias_as_to_aliases_domain(real_as(AliasSet), real(Aliases)):-
+	to_pair_alias_list(AliasSet, Aliases).
+from_alias_as_to_aliases_domain(top(Msg), top(Msg)).
 
Index: pa_alias_set.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/pa_alias_set.m,v
retrieving revision 1.1.2.13
diff -u -r1.1.2.13 pa_alias_set.m
--- pa_alias_set.m	24 Jun 2004 03:02:30 -0000	1.1.2.13
+++ pa_alias_set.m	25 Jun 2004 01:52:39 -0000
@@ -113,11 +113,11 @@
 	% Prints each alias as a parsable pair of datastructs, each
 	% alias preceded with the StartingString, and ended with the
 	% EndString.
-:- pred print(pred_info::in, proc_info::in, alias_set::in, 
+:- pred print(pred_info::in, proc_info::in, aliases::in, 
 		string::in, string::in, 
 		io__state::di, io__state::uo) is det.
 
-:- pred print_brief(int::in, pred_info::in, proc_info::in, alias_set::in, 
+:- pred print_brief(int::in, pred_info::in, proc_info::in, aliases::in, 
 		string::in, string::in, 
 		io__state::di, io__state::uo) is det.
 
@@ -126,12 +126,12 @@
 	% Prints each alias as a parsable pair of datastructs. Each alias
 	% is preceded with a StartingString, and Ended with an EndString. 
 	% Between aliases, the MiddleString is printed. 
-:- pred print(pred_info::in, proc_info::in, alias_set::in, 
+:- pred print(pred_info::in, proc_info::in, aliases::in, 
 		string::in, string::in, string::in, 
 		io__state::di, io__state::uo) is det.
 
 :- pred print_brief(maybe(int)::in, pred_info::in, proc_info::in,
-		alias_set::in, string::in, 
+		aliases::in, string::in, 
 		string::in, string::in, 
 		io__state::di, io__state::uo) is det.
 
@@ -670,22 +670,22 @@
 		Widening = no
 	).
 
-print(PredInfo, ProcInfo, AliasSet, StartingString, EndString) -->
-	print(PredInfo, ProcInfo, AliasSet, StartingString, ", ", EndString).
+print(PredInfo, ProcInfo, AliasList, StartingString, EndString) -->
+	print(PredInfo, ProcInfo, AliasList, StartingString, ", ", EndString).
 
-print_brief(Threshold, PredInfo, ProcInfo, AliasSet, 
+print_brief(Threshold, PredInfo, ProcInfo, AliasList, 
 		StartingString, EndString) --> 
-	print_brief(yes(Threshold), PredInfo, ProcInfo, AliasSet, 
+	print_brief(yes(Threshold), PredInfo, ProcInfo, AliasList, 
 		StartingString, ", ", EndString).
 
-print(PredInfo, ProcInfo, AliasSet, StartingString, MiddleString, 
+print(PredInfo, ProcInfo, AliasList, StartingString, MiddleString, 
 		EndString) --> 
-	print_brief(no, PredInfo, ProcInfo, AliasSet, 
+	print_brief(no, PredInfo, ProcInfo, AliasList, 
 		StartingString, MiddleString, EndString).
 
-print_brief(MaybeThreshold, PredInfo, ProcInfo, AliasSet, 
+print_brief(MaybeThreshold, PredInfo, ProcInfo, AliasList, 
 		StartingString, MiddleString, EndString) --> 
-	{ to_pair_alias_list(AliasSet, AliasList) },
+	% { to_pair_alias_list(AliasSet, AliasList) },
 	(
 		{ MaybeThreshold = yes(Limit) }
  	-> 
Index: pa_prelim_run.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/pa_prelim_run.m,v
retrieving revision 1.1.2.11
diff -u -r1.1.2.11 pa_prelim_run.m
--- pa_prelim_run.m	24 Jun 2004 06:05:09 -0000	1.1.2.11
+++ pa_prelim_run.m	25 Jun 2004 01:52:41 -0000
@@ -93,7 +93,7 @@
 	list__foldl2(
 		process_unproc_alias_pragma(ModuleInfo), 
 		UnprocAliasPragmas, alias_as_table_init , AliasTable).
-	
+
 
 :- pred process_unproc_alias_pragma(module_info::in, unproc_alias_pragma::in, 
 		alias_as_table::in, alias_as_table::out,
@@ -102,7 +102,8 @@
 process_unproc_alias_pragma(ModuleInfo, UnprocAliasPragma, AliasTable0, 
 		AliasTable) --> 
 	{ UnprocAliasPragma = unproc_alias_pragma(PredOrFunc, SymName,
-		Modes, HeadVars, Types, Alias0) },
+		Modes, HeadVars, Types, PublicAliases) },
+	{ from_aliases_domain_to_alias_as(PublicAliases, Alias0) },
 
 	globals__io_lookup_bool_option(very_verbose, VeryVerbose),
 
Index: pa_run.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/pa_run.m,v
retrieving revision 1.1.2.32
diff -u -r1.1.2.32 pa_run.m
--- pa_run.m	24 Jun 2004 06:05:09 -0000	1.1.2.32
+++ pa_run.m	25 Jun 2004 01:52:45 -0000
@@ -150,7 +150,8 @@
 record_alias_in_hlds(PredProcId, AliasAs, ModuleInfo0, ModuleInfo) :- 
 	module_info_pred_proc_info(ModuleInfo0, PredProcId, 
 		PredInfo0, ProcInfo0),
-	proc_info_set_possible_aliases(ProcInfo0, AliasAs, ProcInfo),
+	from_alias_as_to_aliases_domain(AliasAs, PublicAliases),	
+	proc_info_set_possible_aliases(ProcInfo0, PublicAliases, ProcInfo),
 	module_info_set_pred_proc_info(ModuleInfo0, PredProcId, 
 		PredInfo0, ProcInfo, ModuleInfo).
 
Index: prog_data.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/prog_data.m,v
retrieving revision 1.58.2.18
diff -u -r1.58.2.18 prog_data.m
--- prog_data.m	11 Jun 2004 06:01:16 -0000	1.58.2.18
+++ prog_data.m	25 Jun 2004 01:52:51 -0000
@@ -301,7 +301,7 @@
 
 	;	possible_alias(pred_or_func, sym_name, list(mode),
 				list(prog_var), list( (type) ), 
-				maybe(alias_as))
+				maybe(aliases_domain))
 			% the list(mode) is the declared argmodes of the
 			% procedure. 
 			% This pragma is used to define information about
@@ -467,6 +467,7 @@
 	% datasutructures. 
 :- type alias == pair(datastruct).
 :- type aliases == list(alias).
+:- type aliases_domain ---> bottom; real(aliases); top(list(string)).
 
 	% A reuse-tuple is used to describe the condition for which reuse
 	% within a particular procedure is allowed. 
Index: sr_data.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/sr_data.m,v
retrieving revision 1.1.2.25
diff -u -r1.1.2.25 sr_data.m
--- sr_data.m	11 Jun 2004 02:56:54 -0000	1.1.2.25
+++ sr_data.m	25 Jun 2004 01:53:14 -0000
@@ -365,7 +365,8 @@
 	io__write_string("], "),
 
 		% write out LAiH, the aliases at the reuse-point
-	pa_alias_as__print_aliases(LAiH, ProcInfo, PredInfo),	
+	{ from_alias_as_to_aliases_domain(LAiH, PublicLAiH) },
+	pa_alias_as__print_aliases(PublicLAiH, ProcInfo, PredInfo),	
 
 	io__write_string(")").
 
@@ -627,7 +628,10 @@
 				nodes_parse(NodesTerm, NodesList),
 				set__list_to_set(NodesList, Nodes), 
 				vars_parse(LUiHTerm, LUiH),
-				pa_alias_as__parse_read_aliases_from_single_term(LAiHTerm, LAiH),
+				parse_read_aliases_from_single_term(LAiHTerm, 	
+						LAiH_Domain),
+				from_aliases_domain_to_alias_as(LAiH_Domain,
+						LAiH),
 				Cond = condition(Nodes, LUiH, LAiH)
 			;
 				list__length(Args, L),
Index: sr_profile_run.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/sr_profile_run.m,v
retrieving revision 1.1.2.8
diff -u -r1.1.2.8 sr_profile_run.m
--- sr_profile_run.m	2 Jun 2004 10:30:54 -0000	1.1.2.8
+++ sr_profile_run.m	25 Jun 2004 01:53:15 -0000
@@ -27,6 +27,7 @@
 :- import_module libs__globals.
 :- import_module libs__options.
 :- import_module parse_tree__prog_out. 
+:- import_module parse_tree__prog_data.
 :- import_module possible_alias__pa_alias_as.
 :- import_module structure_reuse__sr_data.
 :- import_module structure_reuse__sr_profile.
@@ -111,23 +112,20 @@
 			PosAliases = yes(As)
 		->
 			(
-				is_bottom(As)
-			->
+				As = bottom,
 				AliasSize = 0, 
 				BottomAlias = yes, 
 				TopAlias = no
 			;
-				(
-					is_top(As)
-				->
-					AliasSize = 0,
-					BottomAlias = no, 
-					TopAlias = yes
-				;
-					AliasSize = size(As),
-					BottomAlias = no, 
-					TopAlias = no
-				)
+				As = top(_),
+				AliasSize = 0,
+				BottomAlias = no, 
+				TopAlias = yes
+			;
+				As = real(AliasList), 
+				AliasSize = length(AliasList),
+				BottomAlias = no, 
+				TopAlias = no
 			)
 		;
 			AliasSize = 0, 


-- 
nancy.mazur at cs.kuleuven.ac.be ------------ Katholieke Universiteit Leuven -
tel: +32-16-327596 - fax: +32-16-327996 ------- Dept. of Computer Science -
--------------------------------------------------------------------------
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