Skip to Content.
Sympa Menu

k-user - [[K-user] ] Staging the evaluation of rules

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

[[K-user] ] Staging the evaluation of rules


Chronological Thread 
  • From: Daniel Schnetzer Fava <danielsf AT ifi.uio.no>
  • To: "k-user AT lists.cs.illinois.edu" <k-user AT lists.cs.illinois.edu>
  • Subject: [[K-user] ] Staging the evaluation of rules
  • Date: Thu, 4 Jan 2018 15:25:06 +0000
  • Accept-language: en-US, nb-NO
  • Authentication-results: illinois.edu; spf=pass smtp.mailfrom=danielsf AT ifi.uio.no

Hi,

I am trying to write a rule that first evaluates another, then evaluates itself.
I think I ought to be using ~> but I am not sure exactly how.

Here is some attempt that does not seem to work:

rule <k> selFindEnBs({ BHead } BTail, L:List) =>
            IsSelBranchEnabled(BHead) ~> selFindEnBs(BTail, L) </k>
rule <k> (true ~> selFindEnBs(BTail, L)) => 
              selFindEnBs(BTail, L ListItem(true)) </k>
rule <k> (false ~> selFindEnBs(BTail, L)) => 
              selFindEnBs(BTail, L ListItem(false)) </k>

The goal is to have the result of “IsSelBranchEnabled(BHead)” appended to the list L
and then continue evaluating selFindEnBs on BTail.

Any help is highly appreciated!

Thanks,

Daniel



Archive powered by MHonArc 2.6.19.

Top of Page