
I just came across last year's thread about Ryan Ingram's "Prompt" monad ( http://www.mail-archive.com/haskell-cafe@haskell.org/msg33040.html ) and wondered if it might be useful for debugging and program analysis purposes. In particular, I thought about enforcing program decisions interactively. Consider for example modifying the heuristic function of a search algorithm at specific breakpoints. Is this possible with the "Prompt" monad? Furthermore, could somebody post the full code of it (and maybe a short example how to use it if at hand)? I was not able to run the code from the previous posts and the referring links are dead. Thanks a lot, Martin

Latest code is on hackage:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/MonadPrompt
There is a "sample" file with lots of other monads implemented in
terms of Prompt included, along with some links to other samples; I
seem to recall there being a "guess a number" game on paste.lisp.org
that used Prompt to switch between user control and AI control.
Let me know if you have any problems building it and I'll patch it up.
-- ryan
On Tue, Aug 12, 2008 at 5:50 AM, Martin Hofmann
I just came across last year's thread about Ryan Ingram's "Prompt" monad ( http://www.mail-archive.com/haskell-cafe@haskell.org/msg33040.html ) and wondered if it might be useful for debugging and program analysis purposes. In particular, I thought about enforcing program decisions interactively. Consider for example modifying the heuristic function of a search algorithm at specific breakpoints.
Is this possible with the "Prompt" monad? Furthermore, could somebody post the full code of it (and maybe a short example how to use it if at hand)? I was not able to run the code from the previous posts and the referring links are dead.
Thanks a lot,
Martin
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Thanks a lot. That is exactly what I have been looking for. Cheers, Martin On Tue, 2008-08-12 at 10:28 -0700, Ryan Ingram wrote:
Latest code is on hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/MonadPrompt
There is a "sample" file with lots of other monads implemented in terms of Prompt included, along with some links to other samples; I seem to recall there being a "guess a number" game on paste.lisp.org that used Prompt to switch between user control and AI control.
Let me know if you have any problems building it and I'll patch it up.
-- ryan
On Tue, Aug 12, 2008 at 5:50 AM, Martin Hofmann
wrote: I just came across last year's thread about Ryan Ingram's "Prompt" monad ( http://www.mail-archive.com/haskell-cafe@haskell.org/msg33040.html ) and wondered if it might be useful for debugging and program analysis purposes. In particular, I thought about enforcing program decisions interactively. Consider for example modifying the heuristic function of a search algorithm at specific breakpoints.
Is this possible with the "Prompt" monad? Furthermore, could somebody post the full code of it (and maybe a short example how to use it if at hand)? I was not able to run the code from the previous posts and the referring links are dead.
Thanks a lot,
Martin
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Dipl.-Wirtsch.Inf. (E.M.B.Sc.) Martin Hofmann Cognitive Systems Group Faculty Information Systems and Applied Computer Science University of Bamberg http://www.cogsys.wiai.uni-bamberg.de/members/hofmann http://www.inductive-programming.org

No problem. Let me know what you end up doing with it, or if you have
any questions!
-- ryan
On Tue, Aug 12, 2008 at 11:32 PM, Martin Hofmann
Thanks a lot. That is exactly what I have been looking for.
Cheers,
Martin
On Tue, 2008-08-12 at 10:28 -0700, Ryan Ingram wrote:
Latest code is on hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/MonadPrompt
There is a "sample" file with lots of other monads implemented in terms of Prompt included, along with some links to other samples; I seem to recall there being a "guess a number" game on paste.lisp.org that used Prompt to switch between user control and AI control.
Let me know if you have any problems building it and I'll patch it up.
-- ryan
On Tue, Aug 12, 2008 at 5:50 AM, Martin Hofmann
wrote: I just came across last year's thread about Ryan Ingram's "Prompt" monad ( http://www.mail-archive.com/haskell-cafe@haskell.org/msg33040.html ) and wondered if it might be useful for debugging and program analysis purposes. In particular, I thought about enforcing program decisions interactively. Consider for example modifying the heuristic function of a search algorithm at specific breakpoints.
Is this possible with the "Prompt" monad? Furthermore, could somebody post the full code of it (and maybe a short example how to use it if at hand)? I was not able to run the code from the previous posts and the referring links are dead.
Thanks a lot,
Martin
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Dipl.-Wirtsch.Inf. (E.M.B.Sc.) Martin Hofmann Cognitive Systems Group Faculty Information Systems and Applied Computer Science University of Bamberg http://www.cogsys.wiai.uni-bamberg.de/members/hofmann http://www.inductive-programming.org

I am working on a system to induce recursive functional programs from examples, e.g. 'learn' the reverse function from rev [] = [] rev [a] = [a] rev [a,b] = [b,a] rev [a,b,c] = [c,b,a] ... Although I use analytical methods to reduce search to a minimum, I have to handle a huge search space and traverse it relying on heuristics. For details see our project site http://www.cogsys.wiai.uni-bamberg.de/effalip/ where you can find a prototype of our system (however implemented in MAUDE and not in Haskell). To improve these heuristics I thought about intervening the search during testing. So set some kind of breakpoints where to decide which part of the search space to explore next. This is were your monad might be useful. However I just started to dip into this whole Monad and MonadT universe, so any kind of suggestions are very much appreciated. Martin
participants (2)
-
Martin Hofmann
-
Ryan Ingram