monte-language / typhon

A virtual machine for Monte.
Other
67 stars 10 forks source link

cannot run doctests: AssertionError (Pair?) #117

Closed dckc closed 8 years ago

dckc commented 8 years ago

Jul 06 18:20:07 DanC> let's see how the doctest suite is doing... Jul 06 18:43:43 DanC> hlfhvqsgqq87vzw37xihjcdw79m7kfhn-monte/bin/monte

Jul 06 18:50:57 DanC> Fatal RPython error: AssertionError Jul 06 18:50:57 DanC> /home/connolly/.nix-profile/bin/monte: line 40: 28190 Aborted Jul 06 18:51:33 simpson> DanC: If you can get me the assertion code by running untranslated, I can go to the problem spot quickly. Do you have a short way to reproduce? Jul 06 18:52:09 DanC> er... change _makeInt to _makeDouble in docs_examples.mt and make doctest Jul 06 18:53:09 DanC__> full log: https://gist.github.com/dckc/9972cdec592a9f56b1d67913c195460b

Jul 06 18:55:13 simpson> Ooh, a traceback.

RPython traceback:
  File "typhon_nano.c", line 25956, in Evaluator_visitEscapeOnlyExpr
  File "typhon_nano.c", line 19863, in Evaluator_visitSeqExpr
  File "typhon_nano.c", line 26611, in Evaluator_visitCallExpr
  File "implement_3.c", line 6152, in AstEval_recvNamed
  File "typhon_scopes.c", line 22491, in AstEval_evalToPair
  File "typhon_nano.c", line 55296, in evalToPair_1
  File "typhon_nano.c", line 1585, in evalMonte
  File "typhon_nano.c", line 19863, in Evaluator_visitSeqExpr
  File "typhon_nano.c", line 26231, in Evaluator_visitDefExpr
  File "typhon_nano.c", line 19863, in Evaluator_visitSeqExpr
  File "typhon_nano.c", line 26222, in Evaluator_visitDefExpr
  File "implement_2.c", line 5394, in Pass_visitPatt_4
Fatal RPython error: AssertionError

Jul 06 19:36:12 DanC> simpson, are you interested to explain the AssertionError in Pass_visitPatt_4 a bit? Jul 06 19:37:42 simpson> DanC: There's a keyword that should come with it which explains exactly went wrong; you can see the assertions in typhon/nanopass.py Jul 06 19:38:23 simpson> But basically it means that, for some reason, the recursion went wrong while evaluating, and the type-checker didn't catch it.

Jul 06 19:41:00 DanC__> hm. I don't get cabbage nor radish. Jul 06 19:41:15 simpson> Yeah, it appears that compiled RPython doesn't have the messages. :T

Jul 06 19:52:28 simpson> DanC__: BTW I have tried to repro and it's very spotty. The closest thing I've seen to an actual hint is that Pair is not working for some reason. I don't know why.

Jul 06 20:10:36 DanC__> simpson, are we still operating under the "invalid mast" hypothesis? any chance you can stare at docs_examples.mt and see why? Jul 06 20:11:21 simpson> DanC__: Nah, the code correctly compiles. And, what's more, it reproduces, but only with the $(monte eval ...) line.

(timestamps in America/Chicago time)

monte crash log

MostAwesomeDude commented 8 years ago

I have had trouble consistently reproducing this, but I'm aware of the issue.

dckc commented 8 years ago

Simon says this is fixed in b47a8e0; here's hoping for time to confirm.

dckc commented 8 years ago

fix confirmed

 TRACE: [["pass" => 168, "fail" => 1, "abort" => 0, "pending" => 0]]

mcdcxy4bcghb8qyclpj0pkhb3skbinw8-monte