Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler hangs up when template uses function with potentially infinite loop #49

Open
3sGgpQ8H opened this issue Dec 15, 2019 · 0 comments

Comments

@3sGgpQ8H
Copy link

When I try to compile the following circuit:

function foo (x) {
  var y = 0;
  while (1) {
    if (x == 0) return y;
    x = x - 1;
    y = y + 1;
  }
}

template Bar () {
  signal input x;
  signal output y;

  y <-- foo (x);
  y === x;
}

component main = Bar ();

the compiler hangs up. Expected behavior is to compile it without errors and hang ups.

Function foo basically just returns its argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant