maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: "Pierre Fourès" <pierre.foures AT gmail.com>
- To: "Francisco Durán" <duran AT lcc.uma.es>
- Cc: Maude Help Mailing List <maude-help AT maude.cs.uiuc.edu>
- Subject: Re: [Maude-help] metaXmatch & getContext
- Date: Thu, 18 Dec 2008 15:26:18 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=Bsp32vl+5rECp7lnJxBR3//Jh2wPSIb8HCxTZ2EdQZoXjUC20o4AsC6Ru3wRin/VQQ 2SbJiem0xr4NBHgezdB85kezisAg5Sh9a2kylg8quhwRnAKU6mCv/ZISWT/G6hQN/2nH DGKgUmdy6WLha2BNIhjNymBSxOFkCy3qCDe64=
- List-archive: <http://maude.cs.uiuc.edu/pipermail/maude-help>
- List-id: Maude help list <maude-help.maude.cs.uiuc.edu>
This was quite obvious indeed but i couldn't get my mind to work it out. I'm quite new to maude and rewriting logic and often block on easy issues. I think this was the "getContext()" who made me think like in object oriented programming and confused me while using the rewriting logic.
By the way, I now use the substituted values found by the metaXmatch instead of simply replacing the [] by 'nullThread.Thread]. I proceed quite the same way as you did and I got this :
op getSubst : Substitution Variable -> Term .
ceq getSubst((Sub ; Sub'), V)
= (getSubst(Sub, V); getSubst(Sub', V))
if Sub =/= none /\ Sub' =/= none .
eq getSubst((V <- T), V) = T .
eq getSubst(Sub, V) = none [owise] .
And I use it like that : getSubst(getSubstitution(tmpMatch), 'Tb:Trans) to retrieve the value.
It works fine this way but I was wondering if it was the by way to achieve it or if it's a cleaner way to retrieve the values ?
Thanks again for unlocking me,
Regards,
Pierre Fourès.
The important equation was missing...eq newTerm([], T) = T .
fmod FOO is
pr META-LEVEL .
var F : Qid .
var C : Constant .
var V : Variable .
vars GTL GTL' : GTermList .
var T : Term .
op newTerm : Context Term -> Term .
eq newTerm(F[GTL], T) = F[newTerm(GTL, T)] .
eq newTerm(C, T) = C .
eq newTerm(V, T) = V .Paco
ceq newTerm((GTL, GTL'), T)
= (newTerm(GTL, T), newTerm(GTL', T))
if GTL =/= empty /\ GTL' =/= empty .
endfm
red newTerm('`[_`,_`,_`]['null.Marking,'nullTransition.Trans,[]], 'nullThread.Thread) .
- [Maude-help] metaXmatch & getContext, Pierre Fourès, 12/15/2008
- Re: [Maude-help] metaXmatch & getContext, Francisco Durán, 12/16/2008
- Re: [Maude-help] metaXmatch & getContext, Francisco Durán, 12/16/2008
- Re: [Maude-help] metaXmatch & getContext, Pierre Fourès, 12/18/2008
- Re: [Maude-help] metaXmatch & getContext, Francisco Durán, 12/19/2008
- Re: [Maude-help] metaXmatch & getContext, Pierre Fourès, 12/18/2008
- Re: [Maude-help] metaXmatch & getContext, Francisco Durán, 12/16/2008
- Re: [Maude-help] metaXmatch & getContext, Francisco Durán, 12/16/2008
Archive powered by MHonArc 2.6.16.