Skip to content

Loop detection too strict #640

@weaversa

Description

@weaversa

I'm really surprised that Cryptol thinks it's stuck in a loop here! Any idea about what's going on? The reference evaluator seems to work though.

f : [1] -> [2]
f x = out
  where out = x # [out@0]

g : [1] -> [2]
g x = out
  where out = x # (take out)
$ ./cryptol-2.7.1-2019-08-21-OSX-64/bin/cryptol
┏━╸┏━┓╻ ╻┏━┓╺┳╸┏━┓╻
┃  ┣┳┛┗┳┛┣━┛ ┃ ┃ ┃┃
┗━╸╹┗╸ ╹ ╹   ╹ ┗━┛┗━╸
version 2.7.1 (12805be, modified)

Loading module Cryptol
Cryptol> :l test.cry
Loading module Cryptol
Loading module Main
Main> f 0
0x0
Main> g 0

<<loop>> while evaluating (at ./test.cry:7:9--7:12, Main::out)
Main> :eval f 0
0x0
Main> :eval g 0
0x0
Main> 

Metadata

Metadata

Assignees

Labels

bugSomething not working correctly

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions