Skip to Content.
Sympa Menu

k-user - Re: [[K-user] ] how to set the priority of the rule

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

Re: [[K-user] ] how to set the priority of the rule


Chronological Thread 
  • From: Nishant Rodrigues <nishantjr AT gmail.com>
  • To: 璟临天下 <qjq793437528 AT 163.com>
  • Cc: k-user AT lists.cs.illinois.edu
  • Subject: Re: [[K-user] ] how to set the priority of the rule
  • Date: Tue, 30 Jan 2018 00:56:52 -0600

Hi!

Could you send us a snippet of your code?
If you want your program/language to have deterministic behavior, only a single rule should match and have it's require clause satisfied at a time.
You could try using the require clause to have the rules only fire when you need then to.

For example:
    rule W0 /Word 0  => 0
    rule W0 /Word W1 => chop( W0 /Int W1 ) requires W1 =/=K 0
Here, the second rule will fire only when W1 is nonzero.

Best,
Nishant

On Jan 29, 2018 11:08 PM, "璟临天下" <qjq793437528 AT 163.com> wrote:

there are multiple rules with the same configuration state which means they can be activated at the same time ,so i try to set the priority of rules. but how to do it . which the attribute it is or something else?

Thanks in advance.



 




  • Re: [[K-user] ] how to set the priority of the rule, Nishant Rodrigues, 01/30/2018

Archive powered by MHonArc 2.6.19.

Top of Page