maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: Roberto Vigo <rvig AT imm.dtu.dk>
- To: maude-help AT cs.uiuc.edu
- Subject: [Maude-help] containers instantiation
- Date: Mon, 06 Aug 2012 12:58:57 +0200
- List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help>
- List-id: <maude-help.cs.uiuc.edu>
- Organization: DTU
Dear all,
I am leading out with Maude, and have some difficulties with containers. I was able to instantiate SET{X :: TRIV} to Set{MyType} in this way:
view MyType from TRIV to MYTYPE is
sort Elt to MyType .
endv
fmod MYTYPE-SET is
inc MYTYPE .
protecting SET{MyType} * (sort NeSet{MyType} to NeMyTypeSet,
sort Set{MyType} to MyTypeSet) .
endfm
as found in the Maude manual. However, if I then try to make an instantiation of a List in the same way (say List{MyType2}) I get the error:
Warning: <standard input>, line 476 (fmod MYMODULE): declaration for __
has different attributes from declaration on "prelude.maude", line 997 (fmod LIST).
How to use both List and Set? The manual also mention the following approach to container instantiation:
fmod INT-SET is
pr SET{Int} .
endfm
but then how to refer to the type SET{Int}?
Thanks in advance for paying attention.
Best regards,
Roberto
- [Maude-help] containers instantiation, Roberto Vigo, 08/06/2012
- Re: [Maude-help] containers instantiation, Steven Eker, 08/06/2012
- <Possible follow-up(s)>
- Re: [Maude-help] Containers instantiation, Roberto Vigo, 08/08/2012
Archive powered by MHonArc 2.6.16.