Skip to Content.
Sympa Menu

k-user - [K-user] a question on custom heating/cooling rules

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

[K-user] a question on custom heating/cooling rules


Chronological Thread 
  • From: Daniele Filaretti <dfilaretti AT gmail.com>
  • To: k-user AT cs.uiuc.edu
  • Subject: [K-user] a question on custom heating/cooling rules
  • Date: Mon, 25 Feb 2013 11:26:55 +0000
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
  • List-id: <k-user.cs.uiuc.edu>

Hi everyone,
I was trying to write my own heating/cooling rules for assignment (the reason
is that I need to precess the LHS and RHS differently, and I would like to
distinguish the two cases by setting a particular "LHS-mode" flag in my
configuration as needed, so that the particular rules that need the two cases
can pattern match on this flag and behave accordingly).

Before adding any additional stuff, I just tried to write standard
heating/cooling rules (ideally I would like to achieve the same effect given
by the stricness flag):

> rule L:K = R:K => R ~> (L = HOLE)
> rule R:KResult ~> (L:K = HOLE) => L = R
>
> rule L:K = R:KResult => L ~> (HOLE = R)
> rule L:KResult ~> (HOLE = R:KResult) => L = R

but apparently it loops forever. I guess the reason is that I have to specify
(e.g. in the first rule) something like "if R is not a KResult", but I
could't find the appropriate syntax for that. Anyone knows how to do it?

After this, I'd like to add something to the rules, so that they also change
some part of my configuration where I store some control flags. Basically
the heating rule turns on the flag, while the cooling rule restores it.
Sounds like a good idea (w.r.t. the style of K definitions)?

Thank you!

Daniele



  • [K-user] a question on custom heating/cooling rules, Daniele Filaretti, 02/25/2013

Archive powered by MHonArc 2.6.16.

Top of Page