Skip to Content.
Sympa Menu

k-user - [K-user] implementing swap in K

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

[K-user] implementing swap in K


Chronological Thread 
  • From: Abdul Dakkak <abduld AT wolfram.com>
  • To: k-user <k-user AT cs.uiuc.edu>
  • Subject: [K-user] implementing swap in K
  • Date: Fri, 14 Dec 2012 10:51:13 -0600 (CST)
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
  • List-id: <k-user.cs.uiuc.edu>



how does one go about implementing swap


rule <k> swapLocations(L1, L2) => . ...</k>
<store>... L1 |-> (V1 => V2) ... L2 |-> (V2 => V1) ....</store>
when L1 <Int L2

rule <k> swapLocations(L1, L2) => . ...</k>
<store>... L2 |-> (V2 => V1) ... L1 |-> (V1 => V2) ....</store>
when L1 >Int L2

rule swapLocations(L1, L2) => .
when L1 ==Int L2

the above does not work because K cannot do more than 2 tears. Is there a way
around that?

thanks

-adk-




Archive powered by MHonArc 2.6.16.

Top of Page