Skip to Content.
Sympa Menu

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

k-user AT lists.cs.illinois.edu

Subject: K-user mailing list

List archive

Re: [K-user] implementing swap in K


Chronological Thread 
  • From: "Rosu, Grigore" <grosu AT illinois.edu>
  • To: Abdul Dakkak <abduld AT wolfram.com>, k-user <k-user AT cs.uiuc.edu>
  • Subject: Re: [K-user] implementing swap in K
  • Date: Fri, 14 Dec 2012 16:53:49 +0000
  • Accept-language: en-US
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/k-user/>
  • List-id: <k-user.cs.uiuc.edu>

This is simpler and should work:

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

Grigore



________________________________________
From:
k-user-bounces AT cs.uiuc.edu

[k-user-bounces AT cs.uiuc.edu]
on behalf of Abdul Dakkak
[abduld AT wolfram.com]
Sent: Friday, December 14, 2012 10:51 AM
To: k-user
Subject: [K-user] implementing swap in K

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-
_______________________________________________
k-user mailing list
k-user AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/k-user




Archive powered by MHonArc 2.6.16.

Top of Page