k-user AT lists.cs.illinois.edu
Subject: K-user mailing list
List archive
- From: Markus Knecht <markus.knecht85 AT gmail.com>
- To: Daniel Schnetzer Fava <danielsf AT ifi.uio.no>
- Cc: "k-user AT lists.cs.illinois.edu" <k-user AT lists.cs.illinois.edu>
- Subject: Re: [[K-user] ] Staging the evaluation of rules
- Date: Thu, 04 Jan 2018 15:55:18 +0000
- Authentication-results: illinois.edu; spf=pass smtp.mailfrom=markus.knecht85 AT gmail.com
What error do you get?
Does the evaluation get Stuck at aBoolean ~> selFindEnBs(...) , or does IsSelBranchEnabled(BHead) fails to evaluate to a boolean? or did it not kompile at all? Some things to check:
if something follows selFindEnBs you need to add ... before </k>.
is Bool declared as KResult [do you have syntax KResult ::= Bool somwhere]
Independent tips:
I don't think the brackets before => are necessary
instead of true/false ~> ... you could capture both in one statement with Res:Bool ~> ...
Independent tips:
I don't think the brackets before => are necessary
instead of true/false ~> ... you could capture both in one statement with Res:Bool ~> ...
Daniel Schnetzer Fava <danielsf AT ifi.uio.no> schrieb am Do., 4. Jan. 2018 um 16:25 Uhr:
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 Land then continue evaluating selFindEnBs on BTail.
Any help is highly appreciated!
Thanks,
Daniel
- [[K-user] ] Staging the evaluation of rules, Daniel Schnetzer Fava, 01/04/2018
- Re: [[K-user] ] Staging the evaluation of rules, Markus Knecht, 01/04/2018
- Re: [[K-user] ] Staging the evaluation of rules, Daniel Schnetzer Fava, 01/05/2018
- Re: [[K-user] ] Staging the evaluation of rules, Markus Knecht, 01/05/2018
- Re: [[K-user] ] Staging the evaluation of rules, Daniel Schnetzer Fava, 01/05/2018
- Re: [[K-user] ] Staging the evaluation of rules, Daniel Schnetzer Fava, 01/05/2018
- Re: [[K-user] ] Staging the evaluation of rules, Daniel Schnetzer Fava, 01/05/2018
- Re: [[K-user] ] Staging the evaluation of rules, Daniel Schnetzer Fava, 01/05/2018
- Re: [[K-user] ] Staging the evaluation of rules, Markus Knecht, 01/05/2018
- Re: [[K-user] ] Staging the evaluation of rules, Daniel Schnetzer Fava, 01/05/2018
- Re: [[K-user] ] Staging the evaluation of rules, Markus Knecht, 01/05/2018
- [[K-user] ] size(ListItem(42)) does not reduce, Daniel Schnetzer Fava, 01/05/2018
- Re: [[K-user] ] Staging the evaluation of rules, Daniel Schnetzer Fava, 01/05/2018
- Re: [[K-user] ] Staging the evaluation of rules, Daniel Schnetzer Fava, 01/05/2018
- Re: [[K-user] ] Staging the evaluation of rules, Daniel Schnetzer Fava, 01/05/2018
- Re: [[K-user] ] Staging the evaluation of rules, Markus Knecht, 01/05/2018
- Re: [[K-user] ] Staging the evaluation of rules, Daniel Schnetzer Fava, 01/05/2018
- Re: [[K-user] ] Staging the evaluation of rules, Markus Knecht, 01/04/2018
Archive powered by MHonArc 2.6.19.