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

Cryptol is not lazy enough (array of tuples issue) #268

Closed
TomMD opened this issue Aug 11, 2015 · 2 comments
Closed

Cryptol is not lazy enough (array of tuples issue) #268

TomMD opened this issue Aug 11, 2015 · 2 comments
Assignees
Labels
semantics Issues related to the dynamic semantics of Cryptol.
Milestone

Comments

@TomMD
Copy link
Contributor

TomMD commented Aug 11, 2015

The below code does not terminate in the REPL evaluator as of commit 4874ad0. The main pattern is xs = [(0,x) | (x,_) <- xs]. If this is my invalid expectation then feel free to close.

xs : [10]([8],[8]) 
xs = take `{10} zs where zs = [(0,0)] # [ (0, z) | (z,_) <- drop `{1} zs]

vs : [10]([8],[8])
vs = take `{10} zs where zs = [ (0, z) | (z,_) <- zs]

Observe the lack of timely termination:

version 2.3.0 (4874ad0)

Loading module Cryptol
Loading module Main
Main> xs
^C

Same with vs.

@dylanmc dylanmc added the semantics Issues related to the dynamic semantics of Cryptol. label Mar 9, 2016
@brianhuffman
Copy link
Contributor

Once we write down the intended semantics of Cryptol, it should be clear whether this would be required to terminate. (I suspect that for any reasonable semantics we might choose, it should terminate.)

@robdockins
Copy link
Contributor

New evaluator (#338) fixes this issue

@acfoltzer acfoltzer added this to the Cryptol 2.5 milestone Jun 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semantics Issues related to the dynamic semantics of Cryptol.
Projects
None yet
Development

No branches or pull requests

5 participants