maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: Francisco Durán <duran AT lcc.uma.es>
- To: Paolo Picci <paolo.picci AT gmail.com>
- Cc: maude-help AT cs.uiuc.edu
- Subject: Re: [Maude-help] Universa type help
- Date: Tue, 15 Mar 2011 13:10:39 +0100
- List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help>
- List-id: <maude-help.cs.uiuc.edu>
Hi Paolo,
>From the Maude book, probably it is in the manual as well:
Advisory. In fact, the symbol Universal does not denote a real sort: it is
instead a place holder for parsing purposes that is given an interpretation
by the
polymorphic attribute (see Section 4.4.4). The concrete effect of the
interpretation
of Universal is the instantiation in each connected component of the
operators with
one or more Universal arguments.
What you need is probably a parameterized module.
Cheers,
Paco
El 12/03/2011, a las 14:27, Paolo Picci escribió:
> 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 mailing list
> Maude-help AT cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/maude-help
- [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.