maude-help AT lists.cs.illinois.edu
Subject: Maude-help mailing list
List archive
- From: Paolo Picci <paolo.picci AT gmail.com>
- To: maude-help AT cs.uiuc.edu
- Subject: [Maude-help] Universa type help
- Date: Sat, 12 Mar 2011 14:27:10 +0100
- List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help>
- List-id: <maude-help.cs.uiuc.edu>
hi all
how i can use Universal type?
Universal is not a real type i can't declare sometings like X:Universal .
fmod HET-LIST is
protecting CONVERSION .
sort List .
op nil : -> List .
op __ : Universal List -> List [ctor poly (1)] .
endfm
this is an example from the book of maude.
now how can use this list in the common use?
how i can write a common function like head or tail over this
function?
i need a function like find for type String so:
op find : String List -> Bool .
eq find(X:String, nil) = false .
eq find(X:String, X:String XSHL:List) = true .
but the recursive case i cant write
eq find(X:String, X1:String XSHL:List) = find(X:String,
XSHL:List) .
because for example the list 1 2.2 "foo" 'qid "bar" don't match
the 3 eq
- [Maude-help] Universa type help, Paolo Picci, 03/12/2011
- Re: [Maude-help] Universa type help, Francisco Durán, 03/15/2011
Archive powered by MHonArc 2.6.16.