maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
[Maude-help] Answer to earlier question "Problem with parameterized view involving 3 parameters"
Chronological Thread
- From: "Scott" <scottxyz AT usa.net>
- To: <maude-help AT maude.cs.uiuc.edu>
- Subject: [Maude-help] Answer to earlier question "Problem with parameterized view involving 3 parameters"
- Date: Tue, 20 Jun 2006 18:02:38 -0400
- List-archive: <http://maude.cs.uiuc.edu/pipermail/maude-help>
- List-id: Maude help list <maude-help.maude.cs.uiuc.edu>
- Z-usanet-msgid: XID850kFTwcn0293X40
Hello --
I think I've answered my own question posted here:
http://maude.cs.uiuc.edu/pipermail/maude-help/2006-February/000161.html
and mentioned again here:
http://maude.cs.uiuc.edu/pipermail/maude-help/2006-April/thread.html
In my original post, I asked why the following code would not compile:
(view Tuple3{X :: TRIV , Y :: TRIV , Z :: TRIV} from TRIV to TUPLE[3]{X,Y,Z}
is
sort Elt to Tuple{X,Y,Z} .
endv)
(fmod SET-TUPLE3{X :: TRIV , Y :: TRIV , Z :: TRIV}
is
pr SET{Tuple3{X,Y,Z}} .
endfm)
(fmod SET-TUPLE3-NNN is
pr SET-TUPLE3{Nat,Nat,Nat} .
endfm)
Now I see it should have been written more simply:
(view Tuple3{X :: TRIV , Y :: TRIV , Z :: TRIV} from TRIV to TUPLE[3]{X,Y,Z}
is
sort Elt to Tuple{X,Y,Z} .
endv)
(fmod SET-TUPLE3-NNN is
pr SET{Tuple3{Nat,Nat,Nat}} .
endfm)
I parameterized in too many places in my original post, leading to a module
which would not compile. The module SET-TUPLE3{X :: TRIV , Y :: TRIV , Z ::
TRIV} was not necessary.
Given the module SET already parameterized over {X0} and the module
constructor TUPLE[3] already parameterized over {X1,X2,X3}, it was redundant
to introduce a module SET-TUPLE3 parameterized over {X4,X5,X6}. The
parameterized view from TRIV to TUPLE[3]{X1,X2,X3} was sufficient to allow
creating a module SET{Tuple3{X1,X2,X3}}.
-- Scott Alexander
- [Maude-help] Answer to earlier question "Problem with parameterized view involving 3 parameters", Scott, 06/20/2006
Archive powered by MHonArc 2.6.16.