Skip to Content.
Sympa Menu

maude-help - [Maude-help] containers instantiation

maude-help AT lists.cs.illinois.edu

Subject: Maude-help mailing list

List archive

[Maude-help] containers instantiation


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




Archive powered by MHonArc 2.6.16.

Top of Page