[m-dev.] [reuse] diff: fixes wrt type-widening
Nancy Mazur
Nancy.Mazur at cs.kuleuven.ac.be
Wed Feb 14 01:16:35 AEDT 2001
Hi,
===================================================================
Estimated hours taken: 6
Kind of bugfixes.
1. The fixpoint-table used for keeping track of the
alias-results used to compare two subsequent abstract substitutions
on exact equality. This was correct as long as one was working with
normal selectors. In the presence of type-selectors and type-widening
it requires a less-or-equal comparison or else the analysis might
never stop (in some run, the abstract substitutions might be widened,
whereas in the next run it will not be the case... they are not equal
as such, but one will be less-or-equal wrt the other).
2. Correct the normalization-step. Normalization was not adapted to
deal with type-selectors and hence produced wrong results.
3. cleaning up here and there... + small changes...
pa_run.m:
pa_util.m:
Adaptation of the fixpoint table used for the alias abstract
substitutions: instead of testing on equality, we now test
on less-or-equal'ness.
pa_selector.m:
Correction of the normalization-predicate: also handle type-selectors
adequately (instead of just ignoring them).
pa_alias.m:
Cleanup + eliminate use of pa_selector__less_or_equal/3 which
may only be used when no type-selectors are involved.
pa_alias_as.m:
Renaming of leq into less_or_equal.
pa_datastruct.m:
New predicate for creating a datastruct given a program variable
and selector.
Index: pa_alias.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/pa_alias.m,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 pa_alias.m
--- pa_alias.m 2001/02/07 10:36:15 1.1.2.4
+++ pa_alias.m 2001/02/13 14:03:23
@@ -417,119 +417,6 @@
% alias_altclosure( ProcInfo, HLDS, NEW, OLD, RESULT).
altclosure_altclos( HLDS, ProcInfo, NEW, OLD, RESULT).
- % alias_altclosure( NEW, OLD, RESULT)
- % computes the alternating closure of two lists of aliases.
- % RESULT = NEW + OLD + path2(NEW,OLD) + path3(NEW,OLD).
- % where path2(NEW,OLD) is: (a,b), such that (a,c) in NEW,
- % and (c,b) in OLD
- % where path3(NEW,OLD) is: (a,b), such that (a,c) in NEW,
- % (c,d) in OLD,
- % (d,b) in NEW
- % taking into account termshifts.
-:- pred alias_altclosure( proc_info, module_info,
- list(alias),list(alias),list(alias)).
-:- mode alias_altclosure( in, in, in,in,out) is det.
-
-alias_altclosure( ProcInfo, HLDS, NEW, OLD, RESULT) :-
- (
- NEW = []
- ->
- RESULT = OLD
- ;
- OLD = []
- ->
- RESULT = NEW
- ;
- altclosure_path2_3(NEW,OLD,PATH2,PATH3),
- % NEW is not necessaraly minimal wrt subsumption
- % OLD is guaranteed to be minimal
- % so the next foldl operation should have as a starting
- % point: OLD and not NEW !
- list__foldl(pa_alias__least_upper_bound_lists(ProcInfo,HLDS),
- [OLD,NEW,PATH2,PATH3],[],RESULT)
- ).
-
-:- pred altclosure_path2_3(list(alias),list(alias),list(alias),list(alias)).
-:- mode altclosure_path2_3(in,in,out,out) is det.
-
-altclosure_path2_3(NEW,OLD,PATH2,PATH3):-
- % not only this returns the path2 results,
- % but these results are also such that:
- % ALIAS = D1 - D2, where D1 is from NEW, en D2
- % from OLD
- % constructs paths from NEW to OLD
- list__foldl(altclos_ordered_path(OLD),NEW,[],PATH2),
- % constructs paths from PATH2 (NEW -> OLD) to NEW
- list__foldl(altclos_ordered_path(NEW),PATH2,[],PATH3).
-
-
- % altclos_ordered_path( to_aliases, from_alias, temporary result,
- % new result).
-:- pred altclos_ordered_path(list(alias),alias,list(alias),list(alias)).
-:- mode altclos_ordered_path(in,in,in,out) is det.
-
-altclos_ordered_path( TO_LIST, FROM_ALIAS, LISTin, LISTout) :-
- list__filter_map(single_altclos(FROM_ALIAS),TO_LIST,NEW),
- list__append(NEW,LISTin,LISTout).
-
- % single_altclos( FROM_ALIAS, TO_ALIAS, RESULT_ALIAS).
- % --> semidet!
-:- pred single_altclos(alias,alias,alias).
-:- mode single_altclos(in,in,out) is semidet.
-
-single_altclos( FROM , TO , RESULT ) :-
- FROM = DFa - DFb,
- TO = DTa - DTb,
- (
- pa_datastruct__same_vars(DFb,DTa)
- ->
- single_directed_altclos(FROM, TO, RESULT)
- ;
- pa_datastruct__same_vars(DFa,DTa)
- ->
- switch(FROM,FROMsw),
- single_directed_altclos(FROMsw,TO,RESULT)
- ;
- pa_datastruct__same_vars(DFb,DTb)
- ->
- switch(TO,TOsw),
- single_directed_altclos(FROM,TOsw,RESULT)
- ;
- pa_datastruct__same_vars(DFa,DTb)
- ->
- switch(FROM,FROMsw),
- switch(TO,TOsw),
- single_directed_altclos(FROMsw,TOsw,RESULT)
- ;
- fail
- ).
-
- % single_directed_altclos(FROM,TO, RESULT), with matching
- % middle vars!
-:- pred single_directed_altclos(alias,alias,alias).
-:- mode single_directed_altclos(in,in,out) is semidet.
-
-single_directed_altclos( FROM, TO, RESULT) :-
- FROM = DFa - DFb,
- TO = DTa - DTb,
- pa_datastruct__get_selector(DFb,SF),
- pa_datastruct__get_selector(DTa,ST),
- (
- pa_selector__less_or_equal(ST,SF,EXT1)
- ->
- % SF.EXT1 = ST
- pa_datastruct__termshift(DFa,EXT1,DRa),
- RESULT = DRa - DTb
- ;
- pa_selector__less_or_equal(SF,ST,EXT2)
- ->
- % ST.EXT1 = SF
- pa_datastruct__termshift(DTb,EXT2,DRb),
- RESULT = DFa - DRb
- ;
- fail
- ).
-
%-----------------------------------------------------------------------------%
%-----------------------------------------------------------------------------%
@@ -548,6 +435,15 @@
% altclos computations.
+ % altclosure_altclos( ModuleInfo, ProcInfo, NEW, OLD, RESULT)
+ % computes the alternating closure of two lists of aliases.
+ % RESULT = NEW + OLD + path2(NEW,OLD) + path3(NEW,OLD).
+ % where path2(NEW,OLD) is: (a,b), such that (a,c) in NEW,
+ % and (c,b) in OLD
+ % where path3(NEW,OLD) is: (a,b), such that (a,c) in NEW,
+ % (c,d) in OLD,
+ % (d,b) in NEW
+ % taking into account termshifts.
:- pred altclosure_altclos( module_info::in, proc_info::in,
list(alias)::in, list(alias)::in,
list(alias)::out ) is det.
@@ -562,7 +458,8 @@
->
ComputedAliases = NewAliases
;
- altclosure_altclos_path2_3( NewAliases, OldAliases,
+ altclosure_altclos_path2_3( ModuleInfo, ProcInfo,
+ NewAliases, OldAliases,
Path2, Path3),
list__foldl(
pa_alias__least_upper_bound_lists(ProcInfo, ModuleInfo),
@@ -572,14 +469,17 @@
).
% altclosure_altclos_path2_3( NewAliases, OldAliases, Path2, Path3)
-:- pred altclosure_altclos_path2_3( list(alias)::in, list(alias)::in,
+:- pred altclosure_altclos_path2_3( module_info::in, proc_info::in,
+ list(alias)::in, list(alias)::in,
list(alias)::out, list(alias)::out) is det.
-altclosure_altclos_path2_3( NewAliases, OldAliases, Path2, Path3):-
+altclosure_altclos_path2_3( ModuleInfo, ProcInfo,
+ NewAliases, OldAliases, Path2, Path3):-
list__map( alias_to_altclos_path, NewAliases, StartPaths ),
list__foldl(
pred( StartPath::in, Acc::in, NewPaths::out) is det :-
(
- altclos_ordered_altclos_path( StartPath,
+ altclos_ordered_altclos_path( ModuleInfo,
+ ProcInfo, StartPath,
OldAliases, Acc, NewPaths)
),
StartPaths,
@@ -588,7 +488,8 @@
list__foldl(
pred( StartPath::in, Acc::in, NewPaths::out) is det :-
(
- altclos_ordered_altclos_path( StartPath,
+ altclos_ordered_altclos_path( ModuleInfo,
+ ProcInfo, StartPath,
NewAliases, Acc, NewPaths)
),
PathsLength2,
@@ -597,10 +498,13 @@
list__map( altclos_path_to_alias, PathsLength2, Path2),
list__map( altclos_path_to_alias, PathsLength3, Path3).
-:- pred altclos_ordered_altclos_path( altclos_path::in, list(alias)::in,
+:- pred altclos_ordered_altclos_path( module_info::in, proc_info::in,
+ altclos_path::in, list(alias)::in,
list(altclos_path)::in, list(altclos_path)::out) is det.
-altclos_ordered_altclos_path( StartPath, EndAliases, AccPaths, NewPaths):-
- list__filter_map(single_altclos_path( StartPath ),
+altclos_ordered_altclos_path( ModuleInfo, ProcInfo,
+ StartPath, EndAliases, AccPaths, NewPaths):-
+ list__filter_map(single_altclos_path( ModuleInfo, ProcInfo,
+ StartPath ),
EndAliases, NewPaths0 ),
list__append( NewPaths0, AccPaths, NewPaths).
@@ -608,25 +512,29 @@
% Find a path starting from StartPath and ending in EndAlias.
% EndAlias can always be rotated. StartPath can only be
% rotated if it is a single path.
-:- pred single_altclos_path( altclos_path::in, alias::in,
+:- pred single_altclos_path( module_info::in, proc_info::in,
+ altclos_path::in, alias::in,
altclos_path::out) is semidet.
-single_altclos_path( StartPath, EndAlias, NewPath) :-
+single_altclos_path( ModuleInfo, ProcInfo, StartPath, EndAlias, NewPath) :-
(
StartPath = undirected(StartAlias)
->
(
- single_directed_altclos_path_verify(StartAlias,
+ single_directed_altclos_path_verify(ModuleInfo,
+ ProcInfo, StartAlias,
EndAlias, NewPath0)
->
NewPath = NewPath0
;
switch(StartAlias, StartAliasSW),
- single_directed_altclos_path_verify(StartAliasSW,
+ single_directed_altclos_path_verify(ModuleInfo,
+ ProcInfo, StartAliasSW,
EndAlias, NewPath)
)
;
StartPath = directed(StartAlias),
- single_directed_altclos_path_verify(StartAlias,
+ single_directed_altclos_path_verify(ModuleInfo,
+ ProcInfo, StartAlias,
EndAlias, NewPath)
).
@@ -634,37 +542,52 @@
% Compute a path starting from StartAlias to EndAlias. StartAlias
% may not be rotated. EndAlias can be rotated if needed. The middle
% alias still has to be verified.
-:- pred single_directed_altclos_path_verify( alias::in, alias::in,
+:- pred single_directed_altclos_path_verify( module_info::in,
+ proc_info::in, alias::in, alias::in,
altclos_path::out) is semidet.
-single_directed_altclos_path_verify( StartAlias, EndAlias, Path ) :-
+single_directed_altclos_path_verify( ModuleInfo, ProcInfo,
+ StartAlias, EndAlias, Path ) :-
StartAlias = _StartDatastructure1 - StartDatastructure2,
EndAlias = EndDatastructure1 - EndDatastructure2,
(
pa_datastruct__same_vars( StartDatastructure2,
EndDatastructure1)
->
- single_directed_altclos_path( StartAlias, EndAlias,
+ single_directed_altclos_path( ModuleInfo, ProcInfo,
+ StartAlias, EndAlias,
Path)
;
pa_datastruct__same_vars( StartDatastructure2,
EndDatastructure2),
switch( EndAlias, EndAliasSW ),
- single_directed_altclos_path( StartAlias, EndAliasSW,
+ single_directed_altclos_path( ModuleInfo, ProcInfo,
+ StartAlias, EndAliasSW,
Path)
).
% single_directed_altclos_path( StartAlias, EndAlias, NewPath).
% they already have matching middle vars.
-:- pred single_directed_altclos_path( alias::in, alias::in,
+:- pred single_directed_altclos_path( module_info::in, proc_info::in,
+ alias::in, alias::in,
altclos_path::out) is semidet.
-single_directed_altclos_path( StartAlias, EndAlias, NewPath):-
+single_directed_altclos_path( ModuleInfo, ProcInfo,
+ StartAlias, EndAlias, NewPath):-
StartAlias = StartDatastructure1 - StartDatastructure2,
EndAlias = EndDatastructure1 - EndDatastructure2,
pa_datastruct__get_selector(StartDatastructure2, StartSelector),
+ pa_datastruct__get_var( StartDatastructure2, Var),
pa_datastruct__get_selector(EndDatastructure1, EndSelector),
+
+ proc_info_vartypes( ProcInfo, VarTypes ),
+ map__lookup( VarTypes, Var, CommonVarType),
+
(
% either EndSelector <= StartSelector
- pa_selector__less_or_equal(EndSelector, StartSelector, Ext)
+ %pa_selector__less_or_equal( EndSelector, StartSelector,
+ % Ext)
+ pa_selector__less_or_equal(ModuleInfo,
+ EndSelector, StartSelector,
+ CommonVarType, Ext)
->
% StartSelector.Ext = EndSelector, and StartAlias has
% to be termshifted:
@@ -674,7 +597,11 @@
EndDatastructure2 )
;
% or StartSelector <= EndSelector
- pa_selector__less_or_equal(StartSelector, EndSelector, Ext)
+ %pa_selector__less_or_equal( StartSelector, EndSelector,
+ % Ext)
+ pa_selector__less_or_equal(ModuleInfo,
+ StartSelector, EndSelector,
+ CommonVarType, Ext)
->
% EndSelector.Ext = StartSelector, and EndAlias has to
% be termshifted:
@@ -876,6 +803,7 @@
normalize_wti(ProcInfo, HLDS, A0, A):-
A0 = Da0 - Db0,
+ % the two datastructs are normalized independently!
pa_datastruct__normalize_wti(ProcInfo, HLDS, Da0, Da),
pa_datastruct__normalize_wti(ProcInfo, HLDS, Db0, Db),
A = Da - Db.
Index: pa_alias_as.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/pa_alias_as.m,v
retrieving revision 1.1.2.9
diff -u -r1.1.2.9 pa_alias_as.m
--- pa_alias_as.m 2001/02/07 10:19:08 1.1.2.9
+++ pa_alias_as.m 2001/02/13 14:03:26
@@ -88,8 +88,8 @@
% first abstract subst. is less than or equal to second
% abstract subst. (for fixpoint). (not used)
-:- pred leq( proc_info, module_info, alias_as, alias_as).
-:- mode leq( in, in, in ,in ) is semidet.
+:- pred less_or_equal( module_info, proc_info, alias_as, alias_as).
+:- mode less_or_equal( in, in, in, in) is semidet.
% compute least upper bound.
:- pred least_upper_bound( proc_info, module_info,
@@ -355,7 +355,7 @@
( is_top(AS1), is_top(AS2) )
).
-leq( ProcInfo, HLDS, AS1, AS2 ):-
+less_or_equal( ModuleInfo, ProcInfo, AS1, AS2 ):-
(
AS1 = real_as(LIST1)
->
@@ -363,7 +363,7 @@
list__takewhile(
pred(AL::in) is semidet :-
( pa_alias__subsumed_by_list(ProcInfo,
- HLDS,AL, LIST2)),
+ ModuleInfo,AL, LIST2)),
LIST1,_,
AfterList),
AfterList = []
Index: pa_datastruct.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/pa_datastruct.m,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 pa_datastruct.m
--- pa_datastruct.m 2001/02/07 10:19:08 1.1.2.2
+++ pa_datastruct.m 2001/02/13 14:03:26
@@ -58,6 +58,8 @@
:- pred init(prog_var, cons_id, int, datastruct).
:- mode init(in, in, in, out) is det.
+:- pred create( prog_var::in, selector::in, datastruct::out) is det.
+
% Extend the given datastructure with an additional path.
:- pred termshift(datastruct, selector, datastruct).
:- mode termshift(in, in, out) is det.
@@ -158,6 +160,8 @@
init( V, Dout) :-
SEL = [],
Dout = cel(V, SEL).
+create( V, Sel, Dout ) :-
+ Dout = cel( V, Sel).
print( D, ProcInfo, PredInfo) -->
{ D = cel( ProgVar, SEL ) },
Index: pa_run.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/pa_run.m,v
retrieving revision 1.1.2.13
diff -u -r1.1.2.13 pa_run.m
--- pa_run.m 2001/02/07 14:30:18 1.1.2.13
+++ pa_run.m 2001/02/13 14:03:32
@@ -244,7 +244,8 @@
% XXX
NormSize = pa_alias_as__size( Alias ),
- pa_fixpoint_table_new_as( PRED_PROC_ID, Alias, FPtable1, FPtable)
+ pa_fixpoint_table_new_as( HLDS, ProcInfo,
+ PRED_PROC_ID, Alias, FPtable1, FPtable)
% end non-io
},
(
@@ -266,9 +267,9 @@
(
{ dummy_test(PRED_PROC_ID) }
->
- { dummy_test_here( Alias ) }
+ { dummy_test_here( Alias ) },
io__write_string("Alias = "),
- pa_alias_as__print_aliases(Alias, ProcInfo),
+ pa_alias_as__print_aliases(Alias, ProcInfo,PredInfo),
io__write_string("\n\n")
;
[]
Index: pa_selector.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/pa_selector.m,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 pa_selector.m
--- pa_selector.m 2001/02/07 10:19:09 1.1.2.2
+++ pa_selector.m 2001/02/13 14:03:33
@@ -71,6 +71,7 @@
% Predicate holds when S1 is less than or equal to S2 ("is
% subsumed by"), i.e. S1 can be selected by extending S2 with
% the extension EXT (output).
+ % PRECONDITION: the selectors do not contain any type-selectors.
:- pred less_or_equal(selector, selector, selector).
:- mode less_or_equal(in, in, out) is semidet.
@@ -257,63 +258,42 @@
normalize_wti_2( VarType, HLDS, B0, Acc0, SEL0, SEL ):-
(
- top( SEL0 )
+ SEL0 = [ US | SELR ]
->
- SEL = Acc0
- ;
- select_first_part( SEL0, US, SELR ),
- US = us(CONS, INDEX)
- ->
type_util__classify_type( VarType, HLDS, Class ),
(
Class = user_type
->
- type_util__get_cons_id_arg_types(HLDS, VarType, CONS,
- ArgTypes ),
+ % switch on the kind of selector, unit selector
+ % or type selector.
(
- list__index1(ArgTypes, INDEX, CType )
- ->
- (
- branch_map_search( B0, CType, BSel )
+ US = us(CONS, INDEX),
+ type_util__get_cons_id_arg_types(HLDS,
+ VarType, CONS, ArgTypes ),
+ (
+ list__index1(ArgTypes, INDEX, SubType )
->
- normalize_wti_2( CType, HLDS,
- B0, BSel, SELR, SEL )
+ CType = SubType
;
- unit_termshift( Acc0, US, Acc1 ),
- branch_map_insert( CType, Acc1, B0, B1 ),
- normalize_wti_2( CType, HLDS,
- B1, Acc1, SELR, SEL )
+ error(index_error_message(HLDS,
+ VarType, CONS, INDEX))
)
;
-
- get_type_defn(HLDS,VarType,TypeDefn),
- get_type_id(VarType,TypeID),
- hlds_data__get_type_defn_status(TypeDefn,
- TypeImportStatus),
- hlds_data__get_type_defn_body(TypeDefn,
- TypeBody),
-
- hlds_type_body_to_minimal_string(TypeBody,
- BodyString),
- hlds_pred__import_status_to_minimal_string(TypeImportStatus,
- StatusString),
- type_util__type_id_name(HLDS,TypeID,TypeName),
- type_util__type_id_module(HLDS,TypeID,
- ModuleName),
- prog_out__sym_name_to_string(ModuleName,
- "__", SModuleName),
- hlds_out__cons_id_to_string(CONS,SCONS),
- string__int_to_string(INDEX,SINDEX),
-
- string__append_list([
- "\n(pa_selector) normalize_wti_2: index not found.\n",
- "(pa) type is ", SModuleName, "::",TypeName,
- " -> ", SCONS, " -- ", SINDEX, "\n",
- "(pa) (", BodyString, " and ",
- StatusString, ").\n"], Msg),
-
- % error("(pa) pa_alias_as: index not found.")
- error(Msg)
+ US = ts( CType )
+ ),
+ (
+ branch_map_search( B0, CType,
+ BSel )
+ ->
+ normalize_wti_2( CType, HLDS,
+ B0, BSel, SELR, SEL )
+ ;
+ unit_termshift( Acc0, US,
+ Acc1 ),
+ branch_map_insert( CType,
+ Acc1, B0, B1 ),
+ normalize_wti_2( CType, HLDS,
+ B1, Acc1, SELR, SEL )
)
;
% if it's not a user type, SELR will be empty
@@ -324,9 +304,33 @@
)
;
-
- SEL = SEL0
+ % SEL0 = []
+ SEL = Acc0
).
+
+:- func index_error_message( module_info, (type), cons_id, int ) = string.
+index_error_message( HLDS, VarType, CONS, INDEX ) = Msg :-
+ get_type_defn(HLDS,VarType,TypeDefn),
+ get_type_id(VarType,TypeID),
+ hlds_data__get_type_defn_status(TypeDefn, TypeImportStatus),
+ hlds_data__get_type_defn_body(TypeDefn, TypeBody),
+
+ hlds_type_body_to_minimal_string(TypeBody, BodyString),
+ hlds_pred__import_status_to_minimal_string(TypeImportStatus,
+ StatusString),
+ type_util__type_id_name(HLDS,TypeID,TypeName),
+ type_util__type_id_module(HLDS,TypeID, ModuleName),
+ prog_out__sym_name_to_string(ModuleName, "__", SModuleName),
+ hlds_out__cons_id_to_string(CONS,SCONS),
+ string__int_to_string(INDEX,SINDEX),
+ string__append_list([
+ "\n(pa_selector) normalize_wti_2: index not found.\n",
+ "(pa) type is ", SModuleName, "::",TypeName,
+ " -> ", SCONS, " -- ", SINDEX, "\n",
+ "(pa) (", BodyString, " and ",
+ StatusString, ").\n"],
+ Msg).
+
:- pred get_type_id((type),type_id).
:- mode get_type_id(in,out) is det.
Index: pa_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/pa_util.m,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 pa_util.m
--- pa_util.m 2000/10/16 17:47:37 1.1.2.3
+++ pa_util.m 2001/02/13 14:03:34
@@ -37,9 +37,10 @@
% the new exit alias information is stored. This might
% change the stability of the table.
% if the pred_proc_id is not in the table --> error
-:- pred pa_fixpoint_table_new_as( pred_proc_id, alias_as,
+:- pred pa_fixpoint_table_new_as( module_info, proc_info,
+ pred_proc_id, alias_as,
pa_fixpoint_table, pa_fixpoint_table).
-:- mode pa_fixpoint_table_new_as( in, in, in, out) is det.
+:- mode pa_fixpoint_table_new_as( in, in, in, in, in, out) is det.
% retreive the alias abstract substitution of a given
% pred_proc_id. If this information is not available,
@@ -84,8 +85,15 @@
pa_fixpoint_table_all_stable( TABLE ) :-
fp_stable(TABLE).
-pa_fixpoint_table_new_as( PRED_PROC_ID, ALIAS_AS, Tin, Tout) :-
- fp_add(pa_alias_as__equal, PRED_PROC_ID, ALIAS_AS, Tin, Tout).
+pa_fixpoint_table_new_as( ModuleInfo, ProcInfo,
+ PRED_PROC_ID, ALIAS_AS, Tin, Tout) :-
+ fp_add(
+ pred(TabledElem::in, Elem::in) is semidet :-
+ (
+ pa_alias_as__less_or_equal(ModuleInfo, ProcInfo,
+ Elem, TabledElem)
+ ),
+ PRED_PROC_ID, ALIAS_AS, Tin, Tout).
pa_fixpoint_table_get_as( PRED_PROC_ID, ALIAS_AS, Tin, Tout) :-
fp_get(PRED_PROC_ID, ALIAS_AS, Tin, Tout).
--------------------------------------------------------------------------
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