[m-rev.] for review: port tcl/tk binding to Mac OS X

Ian MacLarty maclarty at cs.mu.OZ.AU
Thu Aug 11 22:59:48 AEST 2005


On Thu, 11 Aug 2005, Julien Fischer wrote:

>
> On Wed, 10 Aug 2005, Ian MacLarty wrote:
>
> > For review by anyone.
> >
> > Estimated hours taken: 5
> > Branches: main
>
> This may as well go on the release branch as well.
>

Okay.

> >
> > Port the Tcl/Tk binding to Mac OS X.
> >
> > extras/graphics/mercury_tcltk/HOWTO:
> > 	Remove the remark about interior pointers since it is no longer
> > 	applicable.
> >
> I'm pretty sure that you can still disable the recognition of interior
> pointers if you wish, so the remark is not entirely useful.  It may be
> better to keep it and just mention that this is the default beahviour.
>

I've left a modified version of the remark in. See the interdiff at the end
of this email.

> >
> > extras/graphics/samples/calc/calc.m:
> > 	Add spaces around some of the characters on the buttons, so that they
> > 	are visible in Mac OS X.
> >
> Does that affect them on Linux?
>

It makes the buttons have different sizes.  I have fixes this now by
adding spaces around all the buttons.

> It may be worth adding a news item to the webpage mentioning the OS X
> Tcl/Tk port (as well as the GLUT/OpenGL ports
>

Okay, I'll do that in another diff.  In the mean time I've added some items
to the NEWS file.  I've also piggybacked some declarative debugger news in this
diff.  See the interdiff at the end of this email.

> > @@ -0,0 +1,25 @@
> > +#-----------------------------------------------------------------------------#
> > +# Copyright (C) 1998, 2001, 2003 The University of Melbourne.
> > +# This file may only be copied under the terms of the GNU Library General
> > +# Public License - see the file COPYING.LIB in the Mercury distribution.
>
> The years in the copyright message are wrong.
>

Fixed.

> > +#-----------------------------------------------------------------------------#
> > +# To compile the Mercury Tcl/Tk binding on MacOSX you must first install the
> > +# Tcl/Tk Aqua framework, available from http://tcltkaqua.sourceforge.net/.
>
> Is Tcl/Tk supplied with Tiger?
>

I believe so, but I haven't tested it.

> > +To build the Tcl/Tk binding on MacOSX see Mmakefile.MacOSX.
> > +
> >  	The mercury_tcltk package is free software, but is Copyright
> >  	(C) 1997-1998 The University of Melbourne. It is distributed
> >  	under the terms of the GNU Library General Public License.
>
> While, you're here the years in that copyright message need updating.
>

I've deleted this since there is a copyright message in the source files.

Here's the interdiff:

diff -u extras/graphics/mercury_tcltk/HOWTO extras/graphics/mercury_tcltk/HOWTO
--- extras/graphics/mercury_tcltk/HOWTO	10 Aug 2005 11:43:48 -0000
+++ extras/graphics/mercury_tcltk/HOWTO	11 Aug 2005 11:40:40 -0000
@@ -35,0 +35,6 @@
+
+The Mercury Tcl/Tk binding will work only with a version of the garbage
+collector which has recognition of interior pointers enabled.  This is the
+default.  If you compiled the garbage collector without interior pointer
+recognition, then you must set the GC_ALL_INTERIOR_POINTERS environment
+variable before running your program.
diff -u extras/graphics/mercury_tcltk/Mmakefile.MacOSX extras/graphics/mercury_tcltk/Mmakefile.MacOSX
--- extras/graphics/mercury_tcltk/Mmakefile.MacOSX	10 Aug 2005 11:43:48 -0000
+++ extras/graphics/mercury_tcltk/Mmakefile.MacOSX	11 Aug 2005 03:43:02 -0000
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------#
-# Copyright (C) 1998, 2001, 2003 The University of Melbourne.
+# Copyright (C) 2005 The University of Melbourne.
 # This file may only be copied under the terms of the GNU Library General
 # Public License - see the file COPYING.LIB in the Mercury distribution.
 #-----------------------------------------------------------------------------#
diff -u extras/graphics/mercury_tcltk/README extras/graphics/mercury_tcltk/README
--- extras/graphics/mercury_tcltk/README	10 Aug 2005 11:43:48 -0000
+++ extras/graphics/mercury_tcltk/README	11 Aug 2005 03:45:33 -0000
@@ -1,4 +1,3 @@
-
 This directory contains the package `mercury_tcltk', which is a Mercury
 binding for Tcl/Tk. You will need the Mercury compiler to build
 it (see <http://www.cs.mu.oz.au/mercury> to find out more about Mercury).
@@ -17,6 +16,0 @@
-
-	The mercury_tcltk package is free software, but is Copyright
-	(C) 1997-1998 The University of Melbourne. It is distributed
-	under the terms of the GNU Library General Public License.
-	See the file COPYING.LIB for copying permission.
-
diff -u extras/graphics/samples/calc/README extras/graphics/samples/calc/README
--- extras/graphics/samples/calc/README	10 Aug 2005 11:43:48 -0000
+++ extras/graphics/samples/calc/README	10 Aug 2005 12:09:28 -0000
@@ -19,5 +19,2 @@
-then you will need to use a Mmakefile like the following:
-MAIN_TARGET = calc
-EXTRA_LIB_DIRS = $(INSTALL_PREFIX)/lib/mercury
-EXTRA_LIBRARIES = mercury_tcltk
-depend : calc.depend
+then you will need to use the following command to build the example:
+mmc calc -lmercury_tcltk
diff -u extras/graphics/samples/calc/calc.m extras/graphics/samples/calc/calc.m
--- extras/graphics/samples/calc/calc.m	10 Aug 2005 11:43:48 -0000
+++ extras/graphics/samples/calc/calc.m	11 Aug 2005 11:54:05 -0000
@@ -79,25 +79,25 @@

 	frame(Interp, [], Frame, NumPad),

-	button(Interp, [text("0")], NumPad, Zero),
-	button(Interp, [text("1")], NumPad, One),
-	button(Interp, [text("2")], NumPad, Two),
-	button(Interp, [text("3")], NumPad, Three),
-	button(Interp, [text("4")], NumPad, Four),
-	button(Interp, [text("5")], NumPad, Five),
-	button(Interp, [text("6")], NumPad, Six),
-	button(Interp, [text("7")], NumPad, Seven),
-	button(Interp, [text("8")], NumPad, Eight),
-	button(Interp, [text("9")], NumPad, Nine),
-	button(Interp, [text("/")], NumPad, Div),
-	button(Interp, [text("x")], NumPad, Times),
-	button(Interp, [text("-")], NumPad, Minus),
+	button(Interp, [text(" 0 ")], NumPad, Zero),
+	button(Interp, [text(" 1 ")], NumPad, One),
+	button(Interp, [text(" 2 ")], NumPad, Two),
+	button(Interp, [text(" 3 ")], NumPad, Three),
+	button(Interp, [text(" 4 ")], NumPad, Four),
+	button(Interp, [text(" 5 ")], NumPad, Five),
+	button(Interp, [text(" 6 ")], NumPad, Six),
+	button(Interp, [text(" 7 ")], NumPad, Seven),
+	button(Interp, [text(" 8 ")], NumPad, Eight),
+	button(Interp, [text(" 9 ")], NumPad, Nine),
+	button(Interp, [text(" / ")], NumPad, Div),
+	button(Interp, [text(" x ")], NumPad, Times),
+	button(Interp, [text(" - ")], NumPad, Minus),
 	button(Interp, [text(" . ")], NumPad, Dot),
-	button(Interp, [text("=")], NumPad, Equal),
-	button(Interp, [text("+")], NumPad, Plus),
+	button(Interp, [text(" = ")], NumPad, Equal),
+	button(Interp, [text(" + ")], NumPad, Plus),
 	button(Interp, [text(" ( ")], NumPad, LParen),
 	button(Interp, [text(" ) ")], NumPad, RParen),
-	button(Interp, [text("C")], NumPad, Clear),
+	button(Interp, [text(" C ")], NumPad, Clear),

 	layout_grid(Interp, [
 		[yes(Clear), no, yes(LParen), yes(RParen)],
only in patch2:
--- extras/graphics/mercury_tcltk/mtk.m	30 Aug 2004 13:31:38 -0000	1.6
+++ extras/graphics/mercury_tcltk/mtk.m	11 Aug 2005 03:45:11 -0000
@@ -1,5 +1,5 @@
 %-----------------------------------------------------------------------------%
-% Copyright (C) 1997-1998,2000, 2003-2004 The University of Melbourne.
+% Copyright (C) 1997-1998,2000, 2003-2005 The University of Melbourne.
 % Copyright (C) 2001 The Rationalizer Intelligent Software AG
 % This file may only be copied under the terms of the GNU Library General
 % Public License - see the file COPYING.LIB in the Mercury distribution.
only in patch2:
--- NEWS	22 Jul 2005 12:31:47 -0000	1.380
+++ NEWS	11 Aug 2005 12:54:01 -0000
@@ -83,6 +83,8 @@
 * Users can now save runtime values to files.
 * Users can now tell the declarative debugger to trust entire modules or
   individual predicates or functions.
+* The declarative debugger can track the origins of subterms.
+* The declarative debugger can now use the divide-and-query search strategy.

 Changes to the compiler back-ends:
 * The .NET CLR back-end now bootstraps.
@@ -96,6 +98,7 @@
   simple interactive graphical applications.
 * Major improvements to the OpenGL binding.
 * We've added a binding to GLUT (the GL utility toolkit).
+* The OpenGL, GLUT and Tcl/Tk bindings have been ported to Mac OS X.

 DETAILED LISTING
 ================
@@ -437,12 +440,26 @@
   We've added a new mdb command, `save_to_file', that saves a specified term
   to a specified file.

-* Ability to tell the declarative debugger to trust entire modules or
-  individual predicates or functions.
+* The declarative debugger can now be told to trust entire modules or
+  individual predicates or functions using the `trust' mdb command.

-  We've added a `trust' command that lets the user tell the declarative
-  debugger to assume that the code in certain modules and or predicates is
-  correct.
+* The declarative debugger can now also tell you where a value
+  appearing in an atom came from (i.e. the call which constructed the value).
+  To track the origin of a value follow these steps:
+  	1. Compile your program in a .decldebug grade (by passing
+	   the --decldebug option to mmc).
+	2. Start the declarative debugger at the exit, fail or excp event
+	   containing the value you wish to know the origin of.
+	3. Type `browse' at the declarative debugger question.
+	4. Navigate to the subterm of interested using the `cd' command.
+	5. Type `mark'.
+	6. The next question will be about the call the subterm was constructed
+	   in.  To find out which unification generated the subterm type
+	   `info'.
+
+* The declarative debugger also now supports a divide-and-query search mode.
+  You can tell the declarative debugger to use this search mode by invoking
+  it with the command `dd -s divide_and_query'.

 * The "pretty" and "raw_pretty" print formats have had their names swapped, so
   the "pretty" format is now prettier than the "raw_pretty" format.

--------------------------------------------------------------------------
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