This repository was archived by the owner on Feb 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Swap #2410
Copy link
Copy link
Open
Description
Hi,
I'd like to implement some kind of swap function. But I'm unable to specify multiple conditions in one cell. Is that possible. In case it is, how?
Currently I tried the following ways.
This way is not accepted by the kompile parser ("Inner Parser: Parse error: unexpected character 'X'.").
rule <k> swap(X1:Id, X2:Id) => . ...</k>
<env>... X1 |-> L1 ... X2 |-> L2 ...</env>
<store> ... L1 |-> (V1 => V2) ... L2 |-> (V2 => V1) </store>
This way compiles but crashes krun ("A fatal error has been detected by the Java Runtime Environment: # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fec43a7ba2, pid=9624, tid=0x0000000000003280"):
rule <k> swap(X1:Id, X2:Id) => . ...</k>
<env>... X1 |-> L1 X2 |-> L2 ...</env>
<store> ... L1 |-> (V1 => V2) L2 |-> (V2 => V1) </store>
Thank you for any hints.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels