Skip to Content.
Sympa Menu

maude-help - [Maude-help] Some help needed starting off...

maude-help AT lists.cs.illinois.edu

Subject: Maude-help mailing list

List archive

[Maude-help] Some help needed starting off...


Chronological Thread 
  • 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.




Archive powered by MHonArc 2.6.16.

Top of Page