-
Notifications
You must be signed in to change notification settings - Fork 0
Home
SynthC edited this page May 6, 2012
·
7 revisions
Sign is an interpreter and type-checker for Abstract Categorial Grammars (ACG).
Requirements : GHC must be installed
Running the REPL:
runhaskell Signs.hs
You should now see the welcome screen:
_______ _________ _______ _ _ _______
( ____ \\__ __/( ____ \( \ ( )/ ____ \
| ( \/ ) ( | ( \/| \ | || ( \/
| (_____ | | | | | \ | || (_____
(_____ ) | | | | ____ | |\ \| |(_____ )
) | | | | | \_ )| | \ | ) |
/\____) |___) (___| (___) || | \ |/\____) |
\_______)\_______/(_______)(_) \_)\_______)
v0.96 Chris Blom 2012
enter :help to list the available commands.
type :load opt to load the grammar defined in the opt.signs file
:load opt
loading... opt.signs : OK
type checking... : OK
>
If there are no errors in the grammars, we can now enter some terms:
>JOHN
The interpreter will lookup the term in the grammar, and print it's sign, along with types.
JOHN :: np =
< "John" :: f
, John :: e
>
Any well-typed closed lambda term over abstract terms can be interpreter, for example:
>LIKES JOHN MARY
Evaluates to:
LIKES(JOHN)(MARY) :: vp =
< "Mary" + "likes" + "John" :: f
, \e.Likes(e) /\ AG(e,Mary) /\ PAT(e,John) :: et
>