maude-help AT lists.siebelschool.illinois.edu
Subject: Maude-help mailing list
List archive
- From: Francisco Durán <duran AT lcc.uma.es>
- To: Michael George Hart <michael.george.hart AT gmail.com>
- Cc: maude-help AT cs.uiuc.edu
- Subject: Re: [Maude-help] chained rules?
- Date: Tue, 18 May 2010 09:56:38 +0200
- List-archive: <http://lists.cs.uiuc.edu/pipermail/maude-help>
- List-id: <maude-help.cs.uiuc.edu>
Hi,
The only way I see to do such kind of things is using execution
strategies. And I think it is not enough with the currently proposed
strategy language, you'll need to use reflection. There you'l have
absolute control on the execution process, although you'll have to pay
the price.
Cheers,
Francisco
On Mon, May 17, 2010 at 4:30 PM, Michael George Hart
<michael.george.hart AT gmail.com>
wrote:
> I too would ber very interested in seeing how this can be done
> On Monday 17 May 2010 09:24:17 am wilson wrote:
>> 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 mailing list
>> Maude-help AT cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/maude-help
>
>
>
> --
> I, the unwilling, was led by the unqualified, to do the unbelievable for so
> long with so little, that I attempted the impossible with nothing......"
> _______________________________________________
> Maude-help mailing list
> Maude-help AT cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/maude-help
>
- [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.