Skip to Content.
Sympa Menu

maude-help - [Maude-help] chained rules?

maude-help AT lists.cs.illinois.edu

Subject: Maude-help mailing list

List archive

[Maude-help] chained rules?


Chronological Thread 
  • 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.




Archive powered by MHonArc 2.6.16.

Top of Page