maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
Re: [Maude-help] Is it possible to use variable of a class type in the place of a parameter of Oid sort.
Chronological Thread
- From: Francisco Durán <duran AT lcc.uma.es>
- To: Mihoub Mazouz <mazouz_mihoub AT hotmail.fr>
- Cc: "maude-help AT cs.uiuc.edu" <maude-help AT cs.uiuc.edu>
- Subject: Re: [Maude-help] Is it possible to use variable of a class type in the place of a parameter of Oid sort.
- Date: Mon, 6 Jul 2015 09:30:42 +0200
- List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help/>
- List-id: <maude-help.cs.uiuc.edu>
Hi Mihoub,
Messages do not need to have an Oid as one of its arguments. You could use
the Cid sort for that. Something like
msg m : Cid -> Msg .
or directly
msg m : Account -> Msg .
Then you could do
rl < O:Oid : V:Account | > m(V:Account) => < O:Oid : V:Account | > .
Cheers,
Francisco
(omod ACCOUNT is
class Account .
msg m : Account -> Msg .
rl < O:Oid : V:Account | > m(V:Account) => < O:Oid : V:Account | > .
endom)
Maude> (rew < O:Oid : Account | none > m(Account) .)
rewrite in MODULE-NAME :
< O:Oid : Account | none > m(Account)
result Object :
< O:Oid : Account | none >
> On 3/7/2015, at 20:13, Mihoub Mazouz
> <mazouz_mihoub AT hotmail.fr>
> wrote:
>
> Hello.
> Looking to thes models :
>
> (omod MODULE-NAME is
> class className .
> msg messagename : className -> Msg .
> endom)
> ---------------------
> (fmod MESSAGE is
> including STRING .
> including CONFIGURATION .
>
> msg Message : String Msg Oid -> Msg .
>
> endfm)
> ---------------------------
> (omod TEST is
> protecting MODULE-NAME .
>
> var acc : Account .
>
> endom)
> ------------------------
> Is it possible to use the <acc> variable as the third parameter of the
> <Message> message.
> In general,
> Is it possible to use variable of a class type in the place of a parameter
> of Oid sort.
> Thank you so much.
> _______________________________________________
> Maude-help mailing list
> Maude-help AT cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/maude-help
- [Maude-help] Is it possible to use variable of a class type in the place of a parameter of Oid sort., Mihoub Mazouz, 07/03/2015
- Re: [Maude-help] Is it possible to use variable of a class type in the place of a parameter of Oid sort., Francisco Durán, 07/06/2015
Archive powered by MHonArc 2.6.16.