Skip to content
This repository was archived by the owner on Feb 1, 2020. It is now read-only.
This repository was archived by the owner on Feb 1, 2020. It is now read-only.

Swap #2410

@tyrbentsen

Description

@tyrbentsen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions