Skip to Content.
Sympa Menu

k-user - Re: [K-user] multiple instances of a cell in a rule

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

Re: [K-user] multiple instances of a cell in a rule


Chronological Thread 
  • From: "Moore, Brandon Michael" <bmmoore AT illinois.edu>
  • To: Omar Duhaiby <3omarz AT gmail.com>, "k-user AT cs.uiuc.edu" <k-user AT cs.uiuc.edu>
  • Subject: Re: [K-user] multiple instances of a cell in a rule
  • Date: Tue, 11 Nov 2014 22:19:22 +0000
  • Accept-language: en-US
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
  • List-id: <k-user.cs.uiuc.edu>

We never thought about allowing multiplicity annotations also in rules, I don't know how hard it would be to add.

Right now, you can probably define a function that counts cells yourself, for some of those purposes.

Brandon

From: k-user-bounces AT cs.uiuc.edu [k-user-bounces AT cs.uiuc.edu] on behalf of Omar Duhaiby [3omarz AT gmail.com]
Sent: Tuesday, November 11, 2014 3:12 PM
To: k-user AT cs.uiuc.edu
Subject: [K-user] multiple instances of a cell in a rule


Hello,
Can I do something like:
rule
<threads>...
  <thread multiplicity=5>...
    <k> E:Exp </k>
...</thread>
...</threads>

What I mean to check here is that I have exactly 5 threads which have an Exp in their k cell. Could that be done?

Generalizing this, we can check for: multiplicity = all (all such cells)
multiplicity = + (at least one, which is the default behavior)
multiplicity = 0. this one is very powerful if it can be programmed, because it enables checking for non existence.

Is it technically possible to program such a feature? From what I understood, the way the K framework is built makes this difficult. Is that true?

Thank you
Omar Alzuhaibi




Archive powered by MHonArc 2.6.16.

Top of Page