Lambda the Ultimate

inactiveTopic LPS: Language Prototyping System
started 9/11/2002; 2:10:31 AM - last post 9/12/2002; 7:56:08 AM
jon fernquest - LPS: Language Prototyping System  blueArrow
9/11/2002; 2:10:31 AM (reads: 2316, responses: 2)
LPS: Language Prototyping System
"LPS is a system for writing modular interpreters implemented in Haskell. It is part of ongoing research for my PhD Thesis. The goal is to provide a framework for the development of language prototypes."

The page includes a working version of the system to download and links to relevant papers by several authors.
Posted to functional by jon fernquest on 9/11/02; 2:19:55 AM

Ehud Lamm - Re: LPS: Language Prototyping System  blueArrow
9/11/2002; 6:01:24 AM (reads: 635, responses: 0)
This systems looks really interesting. Anyone tried it?

jon fernquest - Re: LPS: Language Prototyping System  blueArrow
9/12/2002; 7:56:08 AM (reads: 586, responses: 0)
> This systems looks really interesting. Anyone tried it?

Not completely.

Step 1:

Under Windows XP I used Hugs98 for .NET:

http://galois.com/~sof/hugs98.net/

I copied the Haskell source files from the LPS distribution into a directory and added some essential libraries:

A. Pretty.hs from:

http://www.cse.unsw.edu.au/~chak/software.html

http://www.cse.unsw.edu.au/~chak/haskell/code/Pretty.hs

B. The files from Parsec:

http://www.cs.uu.nl/~daan/parsec.html

http://www.cs.uu.nl/~daan/download/parsec/parsec.zip


Step 2:

Start an interpreter by double-clicking "Main.lhs". After the system loads enter "main" at the prompt. Then enter ":help" to get the commands available in the interpreter, ":change" to change between the three toy languages, and ":set debug <integer>" to set the debug level.

Example of how to use:

In the interpreter:

=> :load e1.w  <enter>
.
.
program loads
.
.
=> :exec
.
.
n
Input?
5
Left 16
.
.
=> :exec
.
.
n
Input?
3
Left 8

(Note: that there is no command line editing with backspacing, so if you make an error just hit return, receive an error and re-enter the command, don't try to use backspace.)


The following paper also seems to do the best job describing the system:

http://citeseer.nj.nec.com/labragayo01lps.html

I'll make a posting to LTU when I've finished reading it.

This system seems like the best way to start getting a handle on modular monadic semantics since Wansbrough's MS thesis requires Gofer the learning of which would be going off on a tangent.


Note that the imperative while language (in .w files) is based on the language presented in Formal Syntax and Semantics of Programming Languages: A Laboratory-Based Approach so it is probably a good place to begin experimenting with the LPS interpreter. The book's not online but the lecture notes and code are.

Lua [Language Homepage, Lua User's Wiki] is the smallest useful language that I know of. So it would be an interesting candidate for rigorous formal definition using modular monadic actions.