maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: Ajay S Tirumala <tirumala AT uiuc.edu>
- To: maude-help AT peepal.cs.uiuc.edu
- Cc:
- Subject: [Maude-help] Some help needed starting off...
- Date: Thu, 5 Aug 2004 15:33:03 -0500 (CDT)
- List-archive: <http://maude.cs.uiuc.edu/pipermail/maude-help>
- List-id: Maude help list <maude-help.maude.cs.uiuc.edu>
The following is taken from Prof.Rosu's 322 notes... I think if I just
load the following modules
-- start --
fmod NAME-SYNTAX is protecting QID .
sort Name .
subsort Qid < Name .
ops q w e r t y u i o p a s d f g h j k l z x c v b n m : -> Name .
endfm
fmod EXP-SYNTAX is protecting NAME-SYNTAX .
protecting INT .
sort Exp .
subsorts Int Name < Exp .
op _+_ : Exp Exp -> Exp [ditto] .
op _-_ : Exp Exp -> Exp [ditto] .
op _*_ : Exp Exp -> Exp [ditto] .
op _/_ : Exp Exp -> Exp [prec 31] .
endfm
fmod GENERIC-STMT-SYNTAX is
sort Stmt .
op skip : -> Stmt .
endfm
fmod ASSIGNMENT-SYNTAX is extending GENERIC-STMT-SYNTAX .
protecting EXP-SYNTAX .
op _=_ : Name Exp -> Stmt [prec 33].
endfm
-- end --
The following execution is correct
Maude> parse a = b + c .
Stmt: a = b + c
While this should return an error
Maude> parse a + c = b .
[Stmt]: (a + c) = b
Why is (a + c) being converted to a Name type?
Thanks,
Ajay.
- [Maude-help] Some help needed starting off..., Ajay S Tirumala, 08/05/2004
- Re: [Maude-help] Some help needed starting off..., Steven Eker, 08/06/2004
Archive powered by MHonArc 2.6.16.