maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: wilson <wmtan00 AT gmail.com>
- To: maude-help AT cs.uiuc.edu
- Subject: [Maude-help] chained rules?
- Date: Mon, 17 May 2010 21:24:17 +0800
- List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help>
- List-id: <maude-help.cs.uiuc.edu>
Hello Maude Help,
Is there an existing way of implementing "chained rules" in Maude?
What I basically want is the conditional application of a rule depending on the previous application of another rule.
For example
rl [1] : ... .
rl [2] : ... .
I want rule 2 to be considered only if 1 was applied previously.
I'm aiming in the long run to be able to "defer" the application of rewriting rules. For instance, I want a rule to be applied only on the third application possibility found. Thus I would need to count the instances the rule could have been applied. In pseudo C formalism, something like
rl [mate-non-applied] :
{
equation => equation . --- do nothing
iterator = iterator + 1
}
crl [mate-applied]:
{
equation => rewritten equation .
iterator = 0
}
if iterator > 2 .
I must admit, I'm having problems with making the rule "do nothing but increment the iterator". I could make the iteration a separate conditional rule, but then I can't make it dependent on the "application" of the "do nothing" rule(hence, my original question on "chained rules").
Could this be done with current Maude? Or do I have to do some tweaking with the Maude source code?
Thanks a lot, guys.
- [Maude-help] chained rules?, wilson, 05/17/2010
- Re: [Maude-help] chained rules?, Michael George Hart, 05/17/2010
- Re: [Maude-help] chained rules?, Francisco DurĂ¡n, 05/18/2010
- Re: [Maude-help] chained rules?, Todd Wilson, 05/18/2010
- Re: [Maude-help] chained rules?, Francisco DurĂ¡n, 05/18/2010
- Re: [Maude-help] chained rules?, Michael George Hart, 05/17/2010
Archive powered by MHonArc 2.6.16.