Skip to Content.
Sympa Menu

k-user - [K-user] Thread to start execution with unassigned variables

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

[K-user] Thread to start execution with unassigned variables


Chronological Thread 
  • From: Omar Duhaiby <3omarz AT gmail.com>
  • To: "k-user AT cs.uiuc.edu" <k-user AT cs.uiuc.edu>
  • Subject: [K-user] Thread to start execution with unassigned variables
  • Date: Wed, 3 Sep 2014 01:09:34 +0300
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
  • List-id: <k-user.cs.uiuc.edu>

Hello,

I've been struggling with this problem for a while. I need to create a thread with a variable X mapped to nothing, and let it start execution until it reaches the unassigned variable and get stuck there. Don't worry. It won't be stuck forever, since another thread is going to assign a value to X thus by releasing our mighty thread from its bonds to continue execution with the newly assigned value to X.

How do I do that?!

Here is what I have tried. When I create the mighty thread, I do:
some condition here
 (. => <thread>...
        <k> E1 </k>
        <context> Context:Map (X |-> ?V:Val) </context>
    ...</thread>)
when notBool (X in keys(Context))

Then the savior rule acts like:
        <thread>...
            some conditions
            <context>... X |-> (_ => V) ...</context>
        ...</thread>

The problem is that the savior rule does this in the output:
       <context>
           X |-> #symVal(3)
       </context>


I hope it is clear. Please help.




Archive powered by MHonArc 2.6.16.

Top of Page