[m-rev.] diff: fix compilation of benchmarks

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Aug 14 16:12:15 AEST 2006


Estimated hours taken: 0.2
Branches: main

Fix compilation of the benchmarks suite.

benchmarks/*/*.m:
 	Conform to recent changes in the standard library.

benchmarks/compress/Mmakefile:
benchmarks/idfp2000/Mmakefile:
 	Ignore non-existent mmakefiles.

Julien.

Index: compress/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/benchmarks/progs/compress/Mmakefile,v
retrieving revision 1.1
diff -u -r1.1 Mmakefile
--- compress/Mmakefile	10 Jul 2002 08:32:57 -0000	1.1
+++ compress/Mmakefile	14 Aug 2006 06:05:40 -0000
@@ -1,6 +1,6 @@
-include Mmakefile.grade
-include Mmakefile.optlevel
-include Mmakefile.flags
+-include Mmakefile.grade
+-include Mmakefile.optlevel
+-include Mmakefile.flags

  PROG_MCFLAGS = \
  	--intermod-inline-simple-threshold 40 \
@@ -11,4 +11,4 @@
  PROG = harness
  ARGS = testbuf-1000000-t-11610884 1000000

-include ../Mmakefile.common
+-include ../Mmakefile.common
Index: icfp2000/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/benchmarks/progs/icfp2000/Mmakefile,v
retrieving revision 1.1
diff -u -r1.1 Mmakefile
--- icfp2000/Mmakefile	10 Jul 2002 08:33:00 -0000	1.1
+++ icfp2000/Mmakefile	14 Aug 2006 05:57:17 -0000
@@ -1,6 +1,6 @@
-include Mmakefile.grade
-include Mmakefile.optlevel
-include Mmakefile.flags
+-include Mmakefile.grade
+-include Mmakefile.optlevel
+-include Mmakefile.flags

  PROG_MCFLAGS = \
  	--intermod-inline-simple-threshold 40 \
@@ -11,4 +11,4 @@
  PROG = main
  ARGS = < dice.cpp

-include ../Mmakefile.common
+-include ../Mmakefile.common
Index: icfp2000/eval.m
===================================================================
RCS file: /home/mercury/mercury1/repository/benchmarks/progs/icfp2000/eval.m,v
retrieving revision 1.1
diff -u -r1.1 eval.m
--- icfp2000/eval.m	10 Jul 2002 08:33:01 -0000	1.1
+++ icfp2000/eval.m	14 Aug 2006 05:59:37 -0000
@@ -2,8 +2,9 @@

  :- module eval.
  :- interface.
-:- import_module bool, list, array, io, map, std_util.
+:- import_module bool, list, array, io, map.
  :- import_module gml, trans, vector.
+:- import_module maybe.

  :- type value
  	% base values
@@ -601,8 +602,12 @@
  :- pred extra_operator_mode(extra_operator::in,
  	extra_operator::out(extra_operator_inst)) is det.

-:- pragma c_code(extra_operator_mode(A::in, B::out(extra_operator_inst)), 
-	"B = A").
+:- pragma foreign_proc("C",
+	extra_operator_mode(A::in, B::out(extra_operator_inst)),
+	[will_not_call_mercury, promise_pure, thread_safe],
+"
+	B = A;
+").

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

Index: icfp2000/eval_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/benchmarks/progs/icfp2000/eval_util.m,v
retrieving revision 1.1
diff -u -r1.1 eval_util.m
--- icfp2000/eval_util.m	10 Jul 2002 08:33:01 -0000	1.1
+++ icfp2000/eval_util.m	14 Aug 2006 05:59:54 -0000
@@ -2,8 +2,9 @@

  :- interface.

-:- import_module io, std_util.
+:- import_module io.
  :- import_module eval, gml.
+:- import_module univ.

  :- pred write_env(env::in, io__state::di, io__state::uo) is det.
  :- pred write_stack(stack::in, io__state::di, io__state::uo) is det.
Index: icfp2000/globals.m
===================================================================
RCS file: /home/mercury/mercury1/repository/benchmarks/progs/icfp2000/globals.m,v
retrieving revision 1.1
diff -u -r1.1 globals.m
--- icfp2000/globals.m	10 Jul 2002 08:33:02 -0000	1.1
+++ icfp2000/globals.m	14 Aug 2006 06:00:16 -0000
@@ -15,7 +15,8 @@

  :- implementation.

-:- import_module map, require, string, std_util.
+:- import_module map, require, string.
+:- import_module univ.

  init-->
  	{ my_map_init(Map) },
Index: icfp2000/main.m
===================================================================
RCS file: /home/mercury/mercury1/repository/benchmarks/progs/icfp2000/main.m,v
retrieving revision 1.1
diff -u -r1.1 main.m
--- icfp2000/main.m	10 Jul 2002 08:33:02 -0000	1.1
+++ icfp2000/main.m	14 Aug 2006 06:00:31 -0000
@@ -9,7 +9,8 @@
  %-----------------------------------------------------------------------------%

  :- implementation.
-:- import_module globals, gml, eval, eval_util, std_util, exception, peephole.
+:- import_module globals, gml, eval, eval_util, exception, peephole.
+:- import_module unit.

  main -->
  	try_io(
Index: icfp2000/peephole.m
===================================================================
RCS file: /home/mercury/mercury1/repository/benchmarks/progs/icfp2000/peephole.m,v
retrieving revision 1.1
diff -u -r1.1 peephole.m
--- icfp2000/peephole.m	10 Jul 2002 08:33:03 -0000	1.1
+++ icfp2000/peephole.m	14 Aug 2006 06:00:48 -0000
@@ -10,7 +10,8 @@
  :- implementation.

  :- import_module eval, gml, op, vector.
-:- import_module bool, float, int, list, io, map, std_util, string.
+:- import_module bool, float, int, list, io, map, string.
+:- import_module maybe.

  :- type peephole
  	--->	state(
Index: icfp2000/precompute_lights.m
===================================================================
RCS file: /home/mercury/mercury1/repository/benchmarks/progs/icfp2000/precompute_lights.m,v
retrieving revision 1.1
diff -u -r1.1 precompute_lights.m
--- icfp2000/precompute_lights.m	10 Jul 2002 08:33:03 -0000	1.1
+++ icfp2000/precompute_lights.m	14 Aug 2006 06:01:22 -0000
@@ -25,8 +25,10 @@
  %------------------------------------------------------------------------------%
  :- implementation.

-:- import_module std_util, exception, float, int.
+:- import_module exception, float, int.
  :- import_module space_partition, renderer.
+:- import_module maybe.
+:- import_module pair.
  %------------------------------------------------------------------------------%

  % X_list - these functions go through an X, and return a list of all the objects
Index: icfp2000/renderer.m
===================================================================
RCS file: /home/mercury/mercury1/repository/benchmarks/progs/icfp2000/renderer.m,v
retrieving revision 1.1
diff -u -r1.1 renderer.m
--- icfp2000/renderer.m	10 Jul 2002 08:33:04 -0000	1.1
+++ icfp2000/renderer.m	14 Aug 2006 05:57:39 -0000
@@ -1,8 +1,7 @@
-
  :- module renderer.
  :- interface.
  :- import_module eval, space_partition, trans, vector, tree.
-:- import_module list, io, std_util.
+:- import_module list, io, maybe, pair.

  :- type render_params
  	---> render_params(
Index: icfp2000/space_partition.m
===================================================================
RCS file: /home/mercury/mercury1/repository/benchmarks/progs/icfp2000/space_partition.m,v
retrieving revision 1.2
diff -u -r1.2 space_partition.m
--- icfp2000/space_partition.m	6 Oct 2005 09:11:21 -0000	1.2
+++ icfp2000/space_partition.m	14 Aug 2006 06:04:46 -0000
@@ -2,8 +2,9 @@

  :- interface.

-:- import_module list,std_util.
+:- import_module list.
  :- import_module vector, eval, renderer, trans.
+:- import_module pair.

  :- func create_scene(object) = scene.

@@ -61,6 +62,7 @@

  :- import_module tree.
  :- import_module bool, exception, int, float, math.
+:- import_module maybe.

  create_scene(Obj) = scene(Tree, Others) :-
  	split_partitionable_objects(Obj, Partitionable, Others),
@@ -442,12 +444,12 @@
  #define LEFT	1
  #define MIDDLE	2

-Bool HitBoundingBox(double minB[3],double maxB[3], double origin[3],
+MR_bool HitBoundingBox(double minB[3],double maxB[3], double origin[3],
  		double dir[3], double coord[3]);
  ").


-:- pragma c_code("
+:- pragma foreign_code("C", "
  MR_bool HitBoundingBox(double minB[3],double maxB[3], double origin[3],
  		double dir[3], double coord[3])
  {
Index: icfp2000/vector.m
===================================================================
RCS file: /home/mercury/mercury1/repository/benchmarks/progs/icfp2000/vector.m,v
retrieving revision 1.1
diff -u -r1.1 vector.m
--- icfp2000/vector.m	10 Jul 2002 08:33:07 -0000	1.1
+++ icfp2000/vector.m	14 Aug 2006 05:58:25 -0000
@@ -3,7 +3,8 @@

  :- interface.

-:- import_module float, std_util.
+:- import_module float.
+:- import_module pair.

  :- type real == float.
  :- type vector ---> point(real, real, real).
Index: icfp2001/input.m
===================================================================
RCS file: /home/mercury/mercury1/repository/benchmarks/progs/icfp2001/input.m,v
retrieving revision 1.1
diff -u -r1.1 input.m
--- icfp2001/input.m	10 Jul 2002 08:33:08 -0000	1.1
+++ icfp2001/input.m	14 Aug 2006 06:09:21 -0000
@@ -76,7 +76,9 @@

  :- implementation.

-:- import_module std_util, int, list, char, exception, string, bool.
+:- import_module int, list, char, exception, string, bool.
+:- import_module maybe.
+:- import_module pair.

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

Index: nuc/nuc5.m
===================================================================
RCS file: /home/mercury/mercury1/repository/benchmarks/progs/nuc/nuc5.m,v
retrieving revision 1.2
diff -u -r1.2 nuc5.m
--- nuc/nuc5.m	6 Oct 2005 09:11:21 -0000	1.2
+++ nuc/nuc5.m	14 Aug 2006 06:08:19 -0000
@@ -22,11 +22,22 @@
  :- interface.
  :- import_module io.

-:- pred main(io__state::di, io__state::uo) is cc_multi.
+:- pred main(io::di, io::uo) is cc_multi.
+
+%----------------------------------------------------------------------------%
+%----------------------------------------------------------------------------%

  :- implementation.
-:- import_module int, float, math, bool, list, string, require, std_util.
+
  :- import_module benchmarking.
+:- import_module bool.
+:- import_module float.
+:- import_module int.
+:- import_module list.
+:- import_module math.
+:- import_module require.
+:- import_module solutions.
+:- import_module string.

  % -- POINTS ------------------------------------------------------------------

Index: tree234/tree234x.m
===================================================================
RCS file: /home/mercury/mercury1/repository/benchmarks/progs/tree234/tree234x.m,v
retrieving revision 1.2
diff -u -r1.2 tree234x.m
--- tree234/tree234x.m	6 Oct 2005 09:11:22 -0000	1.2
+++ tree234/tree234x.m	14 Aug 2006 06:06:53 -0000
@@ -171,7 +171,10 @@

  :- implementation.

-:- import_module int, require, bool, std_util.
+:- import_module bool.
+:- import_module int.
+:- import_module pair.
+:- import_module require.

  :- type tree234x(K, V)	--->
  		empty

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list