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

type error with the program in issue #3 #16

Closed
LeventErkok opened this issue Apr 27, 2014 · 10 comments
Closed

type error with the program in issue #3 #16

LeventErkok opened this issue Apr 27, 2014 · 10 comments
Assignees
Labels
bug Something not working correctly typechecker Issues related to type-checking Cryptol code.
Milestone

Comments

@LeventErkok
Copy link
Contributor

when I load the program Dylan put in issue #3, I actually get a bunch of type-checking errors unless I put an explicit annotation zero : [1] in the expression z'.

The constraints look solvable to me, but maybe a rewrite is missing? Here's what I get:

error] at T.cry:5:11--5:39:
  Unsolved constraint:
    33 >= ?i3 + 0
      arising from
      matching types
      at T.cry:5:11--5:39
  where
  ?i3 is 1st type parameter
         of expression (#)
         at T.cry:5:22--5:23
[error] at T.cry:5:16--5:39:
  Unsolved constraint:
    ?i3 + (33 - ?i3) >= ?b3 + 0
      arising from
      matching types
      at T.cry:5:16--5:39
  where
  ?b3 is 1st type parameter
         of expression (#)
         at T.cry:5:35--5:36
  ?i3 is 1st type parameter
         of expression (#)
         at T.cry:5:22--5:23
[error] at T.cry:5:35--5:36:
  Unsolved constraint:
    fin ?b3
      arising from
      use of expression (#)
      at T.cry:5:35--5:36
  where
  ?b3 is 1st type parameter
         of expression (#)
         at T.cry:5:35--5:36
[error] at T.cry:2:1--5:39:
  Unsolved constraint:
    32 == ?i3 + (33 - ?i3) - ?b3
      arising from
      matching types
      at T.cry:2:1--5:39
  where
  ?b3 is 1st type parameter
         of expression (#)
         at T.cry:5:35--5:36
  ?i3 is 1st type parameter
         of expression (#)
         at T.cry:5:22--5:23
[error] at T.cry:2:1--5:39:
  Unsolved constraint:
    32 == 33 - ?i3
      arising from
      matching types
      at T.cry:2:1--5:39
  where
  ?i3 is 1st type parameter
         of expression (#)
         at T.cry:5:22--5:23
@dylanmc
Copy link
Contributor

dylanmc commented May 6, 2014

Iavor is about to replace the type-checking constraint solver, so it should be okay with this code "real soon now".

@kiniry kiniry added this to the Cryptol 2.1 milestone Jun 24, 2014
@kiniry kiniry added the bug label Jun 24, 2014
@kiniry
Copy link
Member

kiniry commented Jun 24, 2014

We'll relate this to #36 and assign to @yav to double-check.

This was referenced Sep 8, 2014
@kiniry kiniry modified the milestones: Cryptol 2.1, Cryptol 2.2 Sep 23, 2014
@yav
Copy link
Member

yav commented Oct 1, 2014

Relevant example from closed issue 083.

x : ([31], [31]) -> [32]
x (y, z) = w
  where w = (zero # y) + (zero # z)

@kiniry kiniry added the typechecker Issues related to type-checking Cryptol code. label Dec 3, 2014
@elliottt
Copy link
Contributor

I reworked the typechecker to check against signatures when present, and infer types when they're not. This change means that the type information for the arguments in the example @yav provided is present immediately, instead of when the signature is being checked after inference.

@acfoltzer
Copy link
Contributor

@elliottt after these changes were merged in, we shot up to 85 test failures across the various platforms on Jenkins. It looks like most of the errors are due to being unable to typecheck take and drop from the prelude. I was thinking this was a CVC4 thing at first, as only some of our Jenkins platforms have CVC4, but it looks to be happening across the board. Thoughts?

@elliottt
Copy link
Contributor

elliottt commented Jan 3, 2015

That's odd, the tests ran fine for me, which is why I merged the changes :)

@elliottt
Copy link
Contributor

elliottt commented Jan 3, 2015

I just completely cleaned out my local build env, and re-ran the tests from scratch. I'm still unable to reproduce the failures that are showing up on Jenkins, so I'm at a loss as to why things aren't working there.

@elliottt
Copy link
Contributor

elliottt commented Jan 3, 2015

OK, so I built master in a Fedora 20 vm, with GHC-7.8.3, and CVC4 version 1.3, and I only get 4 test failures. I think that there's something off with the Jenkins machines, we should diagnose this more on Monday :)

@elliottt
Copy link
Contributor

elliottt commented Jan 3, 2015

Actually, scratch that. I get 85 failures when I remove CVC4. I'll add this to the ticket about getting CVC4 on all the Jenkins machines :)

@elliottt
Copy link
Contributor

elliottt commented Jan 3, 2015

OK, so adding $CVC4 to the path as specified in #150 by @atomb has fixed the problem on build slaves that have CVC4 installed. Most are back to 4/85 failing, but the ones that lack CVC4 are still failing 85/85.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something not working correctly typechecker Issues related to type-checking Cryptol code.
Projects
None yet
Development

No branches or pull requests

6 participants