[m-rev.] diff: switch detection and calls in clause heads
Zoltan Somogyi
zs at cs.mu.OZ.AU
Tue Feb 15 11:09:35 AEDT 2005
For both branches.
Zoltan.
Fix a limitation of switch detection and common subexpression elimination.
The limitation was that when they looked for deconstruction unifications,
they stopped looking when encountering a call, even if the call came from
the clause head.
compiler/hlds_goal.m:
Add a goal feature denoting that the goal came from the clause head.
compiler/goal_util.m:
Add a predicate for attaching goal features to all subgoals of a goal.
compiler/make_hlds.m:
Use the predicate in goal_util.m to mark goals that came from the
clause head.
compiler/switch_detection.m:
Make the predicate used by both switch detection and common
subexpression elimination use the new goal feature to look past
goals that came from the clause head.
Make the relevant predicates use state variables better.
compiler/hlds_out.m:
Print out goal features even for goals in clause_infos, since there
is now a goal feature that makes sense in such goals. Make the code
for computing the set of annotations we print in clauses more
maintainable.
compiler/saved_vars.m:
Handle the new goal feature.
tests/valid/func_in_head.m:
New test case to test the fix.
tests/valid/Mmakefile:
Enable the new test case.
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/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/goal_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/goal_util.m,v
retrieving revision 1.101
diff -u -b -r1.101 goal_util.m
--- compiler/goal_util.m 19 Jan 2005 03:10:33 -0000 1.101
+++ compiler/goal_util.m 12 Feb 2005 12:25:52 -0000
@@ -79,6 +79,11 @@
:- pred goal_util__generic_call_vars(generic_call::in, list(prog_var)::out)
is det.
+ % Attach the given goal features to the given goal and all its
+ % subgoals.
+:- pred goal_util__attach_features_to_all_goals(list(goal_feature)::in,
+ hlds_goal::in, hlds_goal::out) is det.
+
%
% goal_util__extra_nonlocal_typeinfos(TypeInfoMap, TypeClassInfoMap,
% VarTypes, ExistQVars, NonLocals, NonLocalTypeInfos):
@@ -693,6 +698,74 @@
%-----------------------------------------------------------------------------%
+attach_features_to_all_goals(Features, Goal0, Goal) :-
+ Goal0 = GoalExpr0 - GoalInfo0,
+ attach_features_goal_expr(Features, GoalExpr0, GoalExpr),
+ goal_info_add_features(Features, GoalInfo0, GoalInfo),
+ Goal = GoalExpr - GoalInfo.
+
+:- pred attach_features_to_case(list(goal_feature)::in,
+ case::in, case::out) is det.
+
+attach_features_to_case(Features, case(ConsId, Goal0), case(ConsId, Goal)) :-
+ attach_features_to_all_goals(Features, Goal0, Goal).
+
+:- pred attach_features_goal_expr(list(goal_feature)::in,
+ hlds_goal_expr::in, hlds_goal_expr::out) is det.
+
+attach_features_goal_expr(Features, GoalExpr0, GoalExpr) :-
+ (
+ GoalExpr0 = conj(Goals0),
+ list__map(attach_features_to_all_goals(Features),
+ Goals0, Goals),
+ GoalExpr = conj(Goals)
+ ;
+ GoalExpr0 = par_conj(Goals0),
+ list__map(attach_features_to_all_goals(Features),
+ Goals0, Goals),
+ GoalExpr = par_conj(Goals)
+ ;
+ GoalExpr0 = disj(Goals0),
+ list__map(attach_features_to_all_goals(Features),
+ Goals0, Goals),
+ GoalExpr = disj(Goals)
+ ;
+ GoalExpr0 = switch(Var, CanFail, Cases0),
+ list__map(attach_features_to_case(Features), Cases0, Cases),
+ GoalExpr = switch(Var, CanFail, Cases)
+ ;
+ GoalExpr0 = if_then_else(Vars, Cond0, Then0, Else0),
+ attach_features_to_all_goals(Features, Cond0, Cond),
+ attach_features_to_all_goals(Features, Then0, Then),
+ attach_features_to_all_goals(Features, Else0, Else),
+ GoalExpr = if_then_else(Vars, Cond, Then, Else)
+ ;
+ GoalExpr0 = not(Goal0),
+ attach_features_to_all_goals(Features, Goal0, Goal),
+ GoalExpr = not(Goal)
+ ;
+ GoalExpr0 = some(Vars, CanRemove, Goal0),
+ attach_features_to_all_goals(Features, Goal0, Goal),
+ GoalExpr = some(Vars, CanRemove, Goal)
+ ;
+ GoalExpr0 = call(_, _, _, _, _, _),
+ GoalExpr = GoalExpr0
+ ;
+ GoalExpr0 = generic_call(_, _, _, _),
+ GoalExpr = GoalExpr0
+ ;
+ GoalExpr0 = unify(_, _, _, _, _),
+ GoalExpr = GoalExpr0
+ ;
+ GoalExpr0 = foreign_proc(_, _, _, _, _, _),
+ GoalExpr = GoalExpr0
+ ;
+ GoalExpr0 = shorthand(_),
+ GoalExpr = GoalExpr0
+ ).
+
+%-----------------------------------------------------------------------------%
+
goal_util__extra_nonlocal_typeinfos(TypeVarMap, TypeClassVarMap, VarTypes,
ExistQVars, NonLocals, NonLocalTypeInfos) :-
set__to_sorted_list(NonLocals, NonLocalsList),
@@ -746,19 +819,20 @@
Size = Size1 + Size2.
clause_list_size(Clauses, GoalSize) :-
- GetClauseSize =
- (pred(Clause::in, Size0::in, Size::out) is det :-
- Clause = clause(_, ClauseGoal, _, _),
- goal_size(ClauseGoal, ClauseSize),
- Size = Size0 + ClauseSize
- ),
- list__foldl(GetClauseSize, Clauses, 0, GoalSize0),
+ list__foldl(clause_size_increment, Clauses, 0, GoalSize0),
( Clauses = [_] ->
GoalSize = GoalSize0
;
% Add one for the disjunction.
GoalSize = GoalSize0 + 1
).
+
+:- pred clause_size_increment(clause::in, int::in, int::out) is det.
+
+clause_size_increment(Clause, Size0, Size) :-
+ Clause = clause(_, ClauseGoal, _, _),
+ goal_size(ClauseGoal, ClauseSize),
+ Size = Size0 + ClauseSize.
:- pred cases_size(list(case)::in, int::out) is det.
Index: compiler/hlds_goal.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_goal.m,v
retrieving revision 1.124
diff -u -b -r1.124 hlds_goal.m
--- compiler/hlds_goal.m 2 Feb 2005 02:58:41 -0000 1.124
+++ compiler/hlds_goal.m 13 Feb 2005 07:38:48 -0000
@@ -774,6 +774,9 @@
---> constraint % This is included if the goal is
% a constraint. See constraint.m
% for the definition of this.
+ ; from_head % This goal was originally in the head of the
+ % clause, and was put into the body by the
+ % superhomogeneous form transformation.
; (impure) % This goal is impure. See hlds_pred.m.
; (semipure) % This goal is semipure. See hlds_pred.m.
; not_impure_for_determinism
Index: compiler/hlds_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_out.m,v
retrieving revision 1.348
diff -u -b -r1.348 hlds_out.m
--- compiler/hlds_out.m 9 Feb 2005 07:39:28 -0000 1.348
+++ compiler/hlds_out.m 13 Feb 2005 05:24:44 -0000
@@ -1071,21 +1071,29 @@
set_dump_opts_for_clauses(SavedDumpStr, !IO) :-
globals__io_lookup_string_option(dump_hlds_options, SavedDumpStr, !IO),
- DumpStr0 = "",
+ some [!DumpStr] (
+ !:DumpStr = "",
( string__contains_char(SavedDumpStr, 'c') ->
- DumpStr1 = DumpStr0 ++ "c"
+ !:DumpStr = !.DumpStr ++ "c"
;
- DumpStr1 = DumpStr0
+ true
),
( string__contains_char(SavedDumpStr, 'n') ->
- DumpStr2 = DumpStr1 ++ "n"
+ !:DumpStr = !.DumpStr ++ "n"
;
- DumpStr2 = DumpStr1
+ true
),
( string__contains_char(SavedDumpStr, 'v') ->
- DumpStr = DumpStr2 ++ "v"
+ !:DumpStr = !.DumpStr ++ "v"
;
- DumpStr = DumpStr2
+ true
+ ),
+ ( string__contains_char(SavedDumpStr, 'g') ->
+ !:DumpStr = !.DumpStr ++ "g"
+ ;
+ true
+ ),
+ DumpStr = !.DumpStr
),
globals__io_set_option(dump_hlds_options, string(DumpStr), !IO).
Index: compiler/make_hlds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make_hlds.m,v
retrieving revision 1.497
diff -u -b -r1.497 make_hlds.m
--- compiler/make_hlds.m 14 Feb 2005 08:26:33 -0000 1.497
+++ compiler/make_hlds.m 14 Feb 2005 13:59:47 -0000
@@ -6486,8 +6486,9 @@
;
ArgContext = head(PredOrFunc, Arity),
insert_arg_unifications(HeadVars, Args, Context, ArgContext,
- HeadGoal0, HeadGoal, !VarSet, !ModuleInfo, !QualInfo, !SInfo,
- !IO)
+ HeadGoal0, HeadGoal1, !VarSet, !ModuleInfo, !QualInfo, !SInfo,
+ !IO),
+ attach_features_to_all_goals([from_head], HeadGoal1, HeadGoal)
),
prepare_for_body(FinalSVarMap, !VarSet, !SInfo),
transform_goal(Body0, Subst, Body, !VarSet, !ModuleInfo, !QualInfo,
Index: compiler/saved_vars.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/saved_vars.m,v
retrieving revision 1.43
diff -u -b -r1.43 saved_vars.m
--- compiler/saved_vars.m 19 Oct 2004 22:13:49 -0000 1.43
+++ compiler/saved_vars.m 13 Feb 2005 08:01:37 -0000
@@ -191,6 +191,7 @@
:- func ok_to_duplicate(goal_feature) = bool.
ok_to_duplicate(constraint) = no.
+ok_to_duplicate(from_head) = yes.
ok_to_duplicate(impure) = no.
ok_to_duplicate(semipure) = no.
ok_to_duplicate(not_impure_for_determinism) = no.
Index: compiler/switch_detection.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/switch_detection.m,v
retrieving revision 1.107
diff -u -b -r1.107 switch_detection.m
--- compiler/switch_detection.m 20 Jul 2004 16:06:40 -0000 1.107
+++ compiler/switch_detection.m 12 Feb 2005 17:40:37 -0000
@@ -444,11 +444,10 @@
%-----------------------------------------------------------------------------%
-find_bind_var(Var, ProcessUnify, Goal0, Goal, Result0, Result, Info0, Info,
- FoundDeconstruct) :-
- map__init(Substitution),
- find_bind_var(Var, ProcessUnify, Goal0, Goal, Substitution,
- _, Result0, Result, Info0, Info, DeconstructSearch),
+find_bind_var(Var, ProcessUnify, !Goal, !Result, !Info, FoundDeconstruct) :-
+ map__init(Subst),
+ find_bind_var(Var, ProcessUnify, !Goal, Subst, _, !Result, !Info,
+ DeconstructSearch),
(
DeconstructSearch = before_deconstruct,
FoundDeconstruct = no
@@ -472,16 +471,16 @@
Info::in, Info::out, deconstruct_search::out) is det.
find_bind_var(Var, ProcessUnify, Goal0 - GoalInfo, Goal,
- Substitution0, Substitution, Result0, Result, Info0, Info,
+ Subst0, Subst, Result0, Result, Info0, Info,
FoundDeconstruct) :-
( Goal0 = some(Vars, CanRemove, SubGoal0) ->
find_bind_var(Var, ProcessUnify, SubGoal0, SubGoal,
- Substitution0, Substitution, Result0, Result,
+ Subst0, Subst, Result0, Result,
Info0, Info, FoundDeconstruct),
Goal = some(Vars, CanRemove, SubGoal) - GoalInfo
; Goal0 = conj(SubGoals0) ->
conj_find_bind_var(Var, ProcessUnify, SubGoals0, SubGoals,
- Substitution0, Substitution, Result0, Result,
+ Subst0, Subst, Result0, Result,
Info0, Info, FoundDeconstruct),
Goal = conj(SubGoals) - GoalInfo
; Goal0 = unify(A, B, _, UnifyInfo0, _) ->
@@ -489,38 +488,40 @@
% check whether the unification is a deconstruction
% unification on Var or a variable aliased to Var
UnifyInfo0 = deconstruct(UnifyVar, _, _, _, _, _),
- term__apply_rec_substitution(
- term__variable(Var),
- Substitution0, term__variable(Var1)),
- term__apply_rec_substitution(
- term__variable(UnifyVar),
- Substitution0, term__variable(UnifyVar1)),
+ term__apply_rec_substitution(term__variable(Var),
+ Subst0, term__variable(Var1)),
+ term__apply_rec_substitution(term__variable(UnifyVar),
+ Subst0, term__variable(UnifyVar1)),
Var1 = UnifyVar1
->
call(ProcessUnify, Var, Goal0 - GoalInfo, Goals,
Result0, Result, Info0, Info),
conj_list_to_goal(Goals, GoalInfo, Goal),
FoundDeconstruct = found_deconstruct,
- Substitution = Substitution0
+ Subst = Subst0
;
Goal = Goal0 - GoalInfo,
FoundDeconstruct = before_deconstruct,
% otherwise abstractly interpret the unification
Result = Result0,
Info = Info0,
- ( interpret_unify(A, B, Substitution0, Substitution1) ->
- Substitution = Substitution1
+ ( interpret_unify(A, B, Subst0, Subst1) ->
+ Subst = Subst1
;
% the unification must fail - just ignore it
- Substitution = Substitution0
+ Subst = Subst0
)
)
;
Goal = Goal0 - GoalInfo,
- Substitution = Substitution0,
+ Subst = Subst0,
Result = Result0,
Info = Info0,
+ ( goal_info_has_feature(GoalInfo, from_head) ->
+ FoundDeconstruct = before_deconstruct
+ ;
FoundDeconstruct = given_up_search
+ )
).
:- pred conj_find_bind_var(prog_var::in,
@@ -529,15 +530,15 @@
prog_substitution::in, prog_substitution::out, Result::in, Result::out,
Info::in, Info::out, deconstruct_search::out) is det.
-conj_find_bind_var(_Var, _, [], [], !Substitution, !Result, !Info,
+conj_find_bind_var(_Var, _, [], [], !Subst, !Result, !Info,
before_deconstruct).
conj_find_bind_var(Var, ProcessUnify, [Goal0 | Goals0], [Goal | Goals],
- !Substitution, !Result, !Info, FoundDeconstruct) :-
- find_bind_var(Var, ProcessUnify, Goal0, Goal, !Substitution,
+ !Subst, !Result, !Info, FoundDeconstruct) :-
+ find_bind_var(Var, ProcessUnify, Goal0, Goal, !Subst,
!Result, !Info, FoundDeconstruct1),
( FoundDeconstruct1 = before_deconstruct ->
conj_find_bind_var(Var, ProcessUnify, Goals0, Goals,
- !Substitution, !Result, !Info, FoundDeconstruct)
+ !Subst, !Result, !Info, FoundDeconstruct)
;
FoundDeconstruct = FoundDeconstruct1,
Goals = Goals0
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
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/graphics
cvs diff: Diffing extras/graphics/easyx
cvs diff: Diffing extras/graphics/easyx/samples
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/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
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/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/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
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
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
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/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
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 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/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
Index: tests/valid/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/valid/Mmakefile,v
retrieving revision 1.148
diff -u -b -r1.148 Mmakefile
--- tests/valid/Mmakefile 14 Feb 2005 04:49:17 -0000 1.148
+++ tests/valid/Mmakefile 14 Feb 2005 05:27:59 -0000
@@ -82,6 +82,7 @@
followcode_det_problem \
foreign_underscore_var \
func_default_modes \
+ func_in_head \
func_int_bug_main \
headvar_not_found \
higher_order \
Index: tests/valid/func_in_head.m
===================================================================
RCS file: tests/valid/func_in_head.m
diff -N tests/valid/func_in_head.m
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/valid/func_in_head.m 12 Feb 2005 12:51:34 -0000
@@ -0,0 +1,35 @@
+% This is a regression test for a limitation of switch detection and
+% common subexpression elimination. The limitation was that when they looked
+% for deconstruction unifications, they stopped looking when encountering
+% a call, even if the call came from the clause head.
+%
+% In the test predicate below, they failed to recognize the common
+% deconstruction of Pair with - and the different deconstructions of List
+% with [] and [|], leading determinism analysis to conclude that test may
+% have more than one solution, leading to a bogus determinism error.
+
+:- module func_in_head.
+
+:- interface.
+
+:- import_module io.
+
+:- pred main(io::di, io::uo) is det.
+
+:- implementation.
+
+:- import_module list, set, std_util.
+
+main(!IO) :-
+ test([1, 2] - "dummy", Set),
+ io__write_list(set__to_sorted_list(Set), ", ", io__write_int, !IO).
+
+:- pred test(pair(list(T), U)::in, set(T)::out) is det.
+
+test(Pair, set__init) :-
+ Pair = List - _,
+ List = [].
+test(Pair, Set) :-
+ Pair = List - _,
+ List = [_ | _],
+ set__list_to_set(List, Set).
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
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: 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