Skip to content

Non-terminating code may be synthesised #34

@JonasAlaif

Description

@JonasAlaif

Given the following example (with dll defined as in the examples):

{ [x, 3] ** x :-> v ** (x + 1) :-> 0 ** (x + 2) :-> r ** dll(r, a, s) }
void helper (loc r)
{ dll(x, b, {v} ++ s) }

When run with -c 2 SuSLik outputs:

void helper (loc r) {
  if (r == 0) {
  } else {
    let y = *(r + 1);
    *(r + 2) = y;
    *(r + 1) = 0;
    helper(y);
    helper(r);
  }
}

Which, when called with r != 0 will recursively call itself with the same argument forever.
I tried to explore the tree in the online IDE, but am not familiar enough with the rules to figure out why the second recursive call was allowed. Possibly an issue in SuSLik or Cyclist, I'm not sure.

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