Skip to Content.
Sympa Menu

maude-help - [Maude-help] full maude tuples usage

maude-help AT lists.cs.illinois.edu

Subject: Maude-help mailing list

List archive

[Maude-help] full maude tuples usage


Chronological Thread 
  • From: Edgar Honing <ephoning AT gmail.com>
  • To: maude-help AT cs.uiuc.edu
  • Subject: [Maude-help] full maude tuples usage
  • Date: Wed, 14 Apr 2010 23:34:24 -0600
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help>
  • List-id: <maude-help.cs.uiuc.edu>

Hi,

In the context of trying to implement some standard func. programming idioms (such as fold/zip/zipWith/etc.) I have a need for parameterized types/sorts for such constructs as lists of 2-tuples and 2-tuples of lists. When trying to define these I keep getting presented with the following warning (followed up by parsing issues):

Warning: <metalevel>: declaration for `(_`,_`) has the same domain kinds as the declaration on <metalevel> but a different range kind.

In order to try and get to the bottom of this I came up with the following minimalistic full maude text that results in this same problem:


(view List{A :: TRIV} from TRIV to LIST{A} is
    sort Elt to List{A} .
endv)

(fmod SOMETYPES is
    pr TUPLE[2]{Nat,Nat} .
    pr TUPLE[2]{List{Nat},List{Nat}} .
endfm)

(red (1,2) .)           <- gives parse error
(red (1 2,3 4) .)     <- gives parse error


Changing 'pr TUPLE[2]{Nat,Nat} .' to, say, 'pr TUPLE[2]{String,String} .', or 'pr TUPLE[2]{Nat,String} .' avoids this "clash" / warning + parsing issue.
Any pointers on what I am doing wrong  / how to resolve this would be much appreciated!

Thanks much in advance,
Edgar



Archive powered by MHonArc 2.6.16.

Top of Page