Jose Balado | 7 Feb 23:29 2008
Picon

Debugging Alice ML

Hi, I would like to know how could I debug programs in Alice ML or
Standard ML, it seems there is no debugger like in Oz or SWI-Prolog.
My intention is to trace program execution to help me understand
algorithms and programs writenn in Alice. Any hints or links to
bibliography would be very helpful, thanks.

Best regards,
Jose
Andreas Rossberg | 8 Feb 11:32 2008
Picon

Re: Debugging Alice ML

On Feb 7, 2008, at 23.29h, Jose Balado wrote:

> Hi, I would like to know how could I debug programs in Alice ML or
> Standard ML, it seems there is no debugger like in Oz or SWI-Prolog.
> My intention is to trace program execution to help me understand
> algorithms and programs writenn in Alice. Any hints or links to
> bibliography would be very helpful, thanks.

Short answer is: there is no debugger for Alice ML. There is a half- 
finished one in the CVS, but it is orphaned at the moment. The  
Inspector might help a bit with tracing data structures, though.

As for other SMLs, I am not aware of any either, except that there  
was a relatively fancy time travelling debugger for early versions of  
SML/NJ.

One of the reasons is lack of resources of course. But there also is  
the experience that classical debuggers are less useful (due to  
higher-order functions) and less needed (because complex state is  
mostly avoided) for functional programming. Often, "print debugging"  
is just as fine, especially if you have complex data structures that  
you need to pre-process for inspection.

- Andreas
Vesa Karvonen | 20 Feb 21:30 2008
Picon

Re: Debugging Alice ML

On Fri, Feb 8, 2008 at 12:32 PM, Andreas Rossberg
<rossberg <at> mpi-sws.mpg.de> wrote:
> On Feb 7, 2008, at 23.29h, Jose Balado wrote:
>  > Hi, I would like to know how could I debug programs in Alice ML or
>  > Standard ML, it seems there is no debugger like in Oz or SWI-Prolog.
[...]
>  As for other SMLs, I am not aware of any either, except that there
>  was a relatively fancy time travelling debugger for early versions of
>  SML/NJ.

Poly/ML has an experimental debugger:
http://www.polyml.org/docs/Debugging.html .  I haven't used it though.

>  > My intention is to trace program execution to help me understand
>  > algorithms and programs writenn in Alice. Any hints or links to
>  > bibliography would be very helpful, thanks.
[...]
>  [...] Often, "print debugging"
>  is just as fine, especially if you have complex data structures that
>  you need to pre-process for inspection.

For tracing program execution, a generic pretty printer can be useful:

  http://mlton.org/pipermail/mlton-user/2008-January/001341.html

Unfortunately it has not been ported to Alice ML (it currently works
with MLton, SML/NJ, and Poly/ML).  The following example and the link
to the article might also be useful:

  http://mlton.org/cgi-bin/viewsvn.cgi/*checkout*/mltonlib/trunk/com/ssh/generic/unstable/example/memoize.sml?rev=6297
(Continue reading)

Mattias Waldau | 22 Feb 06:56 2008
Picon

Re: Debugging Alice ML

>> On Feb 7, 2008, at 23.29h, Jose Balado wrote:
>>  > Hi, I would like to know how could I debug programs in Alice ML or
>>  > Standard ML, it seems there is no debugger like in Oz or SWI-Prolog.
> [...]

Ocaml, another ML language, has a very nice debugger. You can even step 
backwards. Very useful to understand why you are at a breakpoint.

F#, a dotnet version of ocaml, has a debugger, the one in MS Visual Studio.
Fred Hosch | 1 Mar 01:06 2008

some 1.4 questions...

I'm just getting back to Alice after a year or so, and have a few questions
about 1.4:

-- is there a list of changes from 1.3 posted somewhere? (I've looked around
the web site, but not too diligently :)

-- equality types are now supported, yes?

-- has there been a change in the semantics of cyclically satisfied futures? I
believe (?) the following generated an exception (Hole.Cyclic or something
like that) in 1.3:

  val p:int promise = promise();
  fulfill(p,future p);

now the future appears to be satisfied by a default value:

  (val p:int promise = promise(); fulfill(p,future p); future p) ==> 0

thanks for any help.

---fred

(sorry if this is a duplicate post.)

Fred Hosch                                      fred <at> cs.uno.edu
Fred Hosch | 29 Feb 17:09 2008

some 1.4 questions...

I'm just getting back to Alice after a year or so, and have a few 
questions about 1.4:

-- is there a list of changes from 1.3 posted somewhere? (I've looked 
around the web site, but not too diligently :)

-- equality types are now supported, yes?

-- has there been a change in the semantics of cyclically satisfied 
futures? I believe (?) the following generated an exception (Hole.Cyclic 
or something like that) in 1.3:

   val p:int promise = promise();
   fulfill(p,future p);

now the future appears to be satisfied by a default value:

   (val p:int promise = promise(); fulfill(p,future p); future p) ==> 0

thanks for any help.

---fred

(sorry if this is a duplicate post.)
Andreas Rossberg | 1 Mar 10:48 2008
Picon

Re: some 1.4 questions...

"Fred Hosch" <fred <at> cs.uno.edu> wrote:
>
> -- is there a list of changes from 1.3 posted somewhere? (I've looked 
> around
> the web site, but not too diligently :)

Yes, the link is hidden on the download page:

http://www.ps.uni-sb.de/alice/download/CHANGES

> -- equality types are now supported, yes?

Yes.

> -- has there been a change in the semantics of cyclically satisfied 
> futures? I
> believe (?) the following generated an exception (Hole.Cyclic or something
> like that) in 1.3:
>
>  val p:int promise = promise();
>  fulfill(p,future p);
>
> now the future appears to be satisfied by a default value:
>
>  (val p:int promise = promise(); fulfill(p,future p); future p) ==> 0

Erk?? Now this certainly is a regression. Very weird. I added it to the 
Bugzilla.

- Andreas
(Continue reading)


Gmane