Looking for a toy imperative language implementation in Haskell for research

Hi, I'm looking for a toy imperative language implementation in Haskell for research purposes. I imagine something like the language of arithmetic expressions from TAPL ch. 3 augmented with - while-loop (so the CFG has loops) - blocks (sequence of statements to put inside loops and conditionals) - assignment (otherwise we can't show any effects from sequences) I think there's probably nothing exactly like that so we might end up doing it ourselves but maybe there's already something out there. Thank you in advance. Regards, Igor Moreno

I wonder if something from The Programming Languages Zoo would be helpful: https://plzoo.andrej.com/ It’s in OCaml but might be a good starting point. Jeff
On Apr 5, 2021, at 5:32 PM, Igor Moreno Santos
wrote: Hi,
I'm looking for a toy imperative language implementation in Haskell for research purposes. I imagine something like the language of arithmetic expressions from TAPL ch. 3 augmented with - while-loop (so the CFG has loops) - blocks (sequence of statements to put inside loops and conditionals) - assignment (otherwise we can't show any effects from sequences)
I think there's probably nothing exactly like that so we might end up doing it ourselves but maybe there's already something out there.
Thank you in advance.
Regards, Igor Moreno
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

I have an implementation of a language that has all the features you
mention (ints + booleans, assignment, arithmetic and logic operators, if
statements, while and repeat loops, blocks), which I have used in my
Programming Languages class. It also has a typechecker. It is interpreted
--- not sure if that is OK or if you are looking for something with a
compiler. I would be happy to send it to you privately off-list if it
sounds like it might fit the bill.
-Brent
On Mon, Apr 5, 2021 at 7:34 PM Igor Moreno Santos
Hi,
I'm looking for a toy imperative language implementation in Haskell for research purposes. I imagine something like the language of arithmetic expressions from TAPL ch. 3 augmented with - while-loop (so the CFG has loops) - blocks (sequence of statements to put inside loops and conditionals) - assignment (otherwise we can't show any effects from sequences)
I think there's probably nothing exactly like that so we might end up doing it ourselves but maybe there's already something out there.
Thank you in advance.
Regards, Igor Moreno
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

https://github.com/e-wrks/edh It's dynamically typed, not sure you want that, and maybe overkill wrt features. Pending 0.3 release, which has a lot changed since 0.1 and 0.2. The latest branch may appear a bit more stable than the 0.3 branch, yet unrelease anyway. On 04/06/2021 08:32, Igor Moreno Santos wrote: Hi, I'm looking for a toy imperative language implementation in Haskell for research purposes. I imagine something like the language of arithmetic expressions from TAPL ch. 3 augmented with - while-loop (so the CFG has loops) - blocks (sequence of statements to put inside loops and conditionals) - assignment (otherwise we can't show any effects from sequences) I think there's probably nothing exactly like that so we might end up doing it ourselves but maybe there's already something out there. Thank you in advance. Regards, Igor Moreno _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

I have kempe - the backend is the interesting part I guess http://hackage.haskell.org/package/kempe It has blocks, it's effectful, it has no loops (just recursion) though. - Vanessa McHale On 4/5/21 7:32 PM, Igor Moreno Santos wrote:
Hi,
I'm looking for a toy imperative language implementation in Haskell for research purposes. I imagine something like the language of arithmetic expressions from TAPL ch. 3 augmented with - while-loop (so the CFG has loops) - blocks (sequence of statements to put inside loops and conditionals) - assignment (otherwise we can't show any effects from sequences)
I think there's probably nothing exactly like that so we might end up doing it ourselves but maybe there's already something out there.
Thank you in advance.
Regards, Igor Moreno
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

I have https://github.com/bollu/tiny-optimising-compiler which implements a
tiny compiler for SSA. It has everything you ask for. It generates MIPS
asm, so it performs register allocation as well.
On Wed, Apr 7, 2021 at 3:13 AM Vanessa McHale
I have kempe - the backend is the interesting part I guess http://hackage.haskell.org/package/kempe
It has blocks, it's effectful, it has no loops (just recursion) though.
- Vanessa McHale On 4/5/21 7:32 PM, Igor Moreno Santos wrote:
Hi,
I'm looking for a toy imperative language implementation in Haskell for research purposes. I imagine something like the language of arithmetic expressions from TAPL ch. 3 augmented with - while-loop (so the CFG has loops) - blocks (sequence of statements to put inside loops and conditionals) - assignment (otherwise we can't show any effects from sequences)
I think there's probably nothing exactly like that so we might end up doing it ourselves but maybe there's already something out there.
Thank you in advance.
Regards, Igor Moreno
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to:http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On Tuesday, 6 April 2021 00:32:59 UTC Igor Moreno Santos wrote:
Hi,
I'm looking for a toy imperative language implementation in Haskell for research purposes. I imagine something like the language of arithmetic expressions from TAPL ch. 3 augmented with - while-loop (so the CFG has loops) - blocks (sequence of statements to put inside loops and conditionals) - assignment (otherwise we can't show any effects from sequences)
I think there's probably nothing exactly like that so we might end up doing it ourselves but maybe there's already something out there.
Thank you in advance.
Regards, Igor Moreno
Hello Igor, There is an implementation of a subset of Tcl in Haskell. Not sure if this is what you need, but I tried playing with it some years ago and found it interesting. https://hackage.haskell.org/package/hiccup
participants (7)
-
Brent Yorgey
-
Compl Yue
-
Igor Moreno Santos
-
Jeff Clites
-
Lana Black
-
Siddharth Bhat
-
Vanessa McHale