[m-dev.] [reuse] diff: easy radical alias widening
Nancy Mazur
Nancy.Mazur at cs.kuleuven.ac.be
Fri Nov 24 02:02:22 AEDT 2000
Hi,
===================================================================
Estimated hours taken: 1
If the aliases get too big, there is no use in really trying to spend
hours and hours making computations with them... A drastic widening
is added (when the size of the alias-set exceeds a certain size, give
up, and throw a top abstract substitution).
At some point the widening should become less drastic.
pa_alias_as.m:
Each time one computes a new set of aliases, test whether
the set becomes too big or not. If zo, set the alias to top.
Index: pa_alias_as.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/pa_alias_as.m,v
retrieving revision 1.1.2.7
diff -u -r1.1.2.7 pa_alias_as.m
--- pa_alias_as.m 2000/10/23 07:31:35 1.1.2.7
+++ pa_alias_as.m 2000/11/23 14:59:12
@@ -176,8 +176,10 @@
% constants
:- func alias_limit = int.
+:- func top_limit = int.
-alias_limit = 100000.
+alias_limit = 100.
+top_limit = 1000.
%-----------------------------------------------------------------------------%
@@ -402,6 +404,10 @@
;
Alias0 = real_as(_),
(
+ size(Alias0) > top_limit
+ ->
+ top("Size too big", Alias)
+ ;
size(Alias0) > alias_limit
->
normalize_with_goal_info( ProcInfo, HLDS, GoalInfo,
@@ -418,7 +424,8 @@
(
A2 = real_as(OLD)
->
- pa_alias__extend(ProcInfo, HLDS, OLD, NEW, Aliases),
+ pa_alias__extend(ProcInfo, HLDS,
+ OLD, NEW, Aliases),
wrap(Aliases,RESULT)
;
A2 = top(_)
@@ -840,6 +847,11 @@
LIST = []
->
AS = bottom
+ ;
+ list__length(LIST,Length),
+ Length > top_limit
+ ->
+ top("Size too big", AS)
;
AS = real_as(LIST)
).
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list