On 21/12/11, Richard O'Keefe <o...@cs.otago.ac.nz> wrote:
So what exactly is the program supposed to do? 

I am trying to see whether Haskell modules can be used for blending[1].  The original MAUDE [2,3] program just sets up an arbitrary meeting point, which is assumed to be time-2 and location-2. Then in MONK_MEETS_HIMSELF the up and down versions of these are made match. To do this I wish to declare the function location in MONK_ON_MOVE. Then I require different equations for that same location function in MONK_ON_MOVE_DOWN and MONK_ON_MOVE_UP  both of which  import MONK_ON_MOVE. Finally, I wish to import MONK_ON_MOVE_DOWN and MONK_ON_MOVE_UP into MONK_MEETS_HIMSELF and use the combined set of equations to check locations.

 

So far I cannot figure out how the location function and the constructors can be shared in this way using Haskell modules.

I have tried various combination import/export options, type classes, and newtype. I have also tried to use Strings instead of constructors.

 

I had trouble using Haskell equations with pure constructors. Due to my ignorance of Haskell semantics I am not sure what Constructor1 = Constructor2 means. But in the original Maude there are constructor only equations such as Timed2 = Timeu2 which in Maude means that the constructor Timed2 could be replaced with Timeu2. I wrote Haskell functions to try to achieve a similar effect e.g.

timed2 :: TimeOfDay -> TimeOfDay

timed2  Timed2 = Timeu2

 


[1] http://cseweb.ucsd.edu/~goguen/pps/taspm.pdf
[2] http://lists.cs.uiuc.edu/pipermail/maude-help/2010-December/000456.html
[3] http://lists.cs.uiuc.edu/pipermail/maude-help/2010-December/000462.html

 

 

 


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to