-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve error messages, which mention module parameters.
Fixes #1560
- Loading branch information
Showing
17 changed files
with
255 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
:load issue1560/T1.cry | ||
:load issue1560/T2.cry | ||
:load issue1560/T3.cry | ||
:load issue1560/T4.cry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
Loading module Cryptol | ||
Loading module Cryptol | ||
Loading interface module T1__parameter | ||
Loading module T1 | ||
|
||
[error] at issue1560/T1.cry:7:5--7:6: | ||
Unsolved constraints: | ||
• fin n | ||
arising from | ||
use of literal or demoted expression | ||
at issue1560/T1.cry:7:5--7:6 | ||
where | ||
n is module parameter T1::n at issue1560/T1.cry:1:8--1:10 | ||
[error] at issue1560/T1.cry:7:5--7:6: | ||
Unsolved constraints: | ||
• n >= 1 | ||
arising from | ||
use of literal or demoted expression | ||
at issue1560/T1.cry:7:5--7:6 | ||
where | ||
n is module parameter T1::n at issue1560/T1.cry:1:8--1:10 | ||
Loading module Cryptol | ||
Loading interface module T2__parameter | ||
Loading module T2 | ||
|
||
[error] at issue1560/T2.cry:15:3--15:10: | ||
Failed to validate user-specified signature. | ||
in the definition of 'T2::F::b', at issue1560/T2.cry:15:3--15:4, | ||
we need to show that | ||
for any type m | ||
assuming | ||
• fin n | ||
the following constraints hold: | ||
• m == n | ||
arising from | ||
matching types | ||
at issue1560/T2.cry:15:9--15:10 | ||
where | ||
n is module parameter T2::n at issue1560/T2.cry:1:8--1:10 | ||
Loading module Cryptol | ||
Loading module T3 | ||
|
||
[error] at issue1560/T3.cry:1:1--23:13: | ||
Failed to validate user-specified signature. | ||
when checking the module's parameters, | ||
we need to show that | ||
assuming | ||
• x₁ >= 1 | ||
• x₁ <= 4 | ||
• x >= 1 | ||
• x <= 3 | ||
the following constraints hold: | ||
• x₁ == x | ||
arising from | ||
matching types | ||
at issue1560/T3.cry:23:12--23:13 | ||
where | ||
x is module parameter T3::F::I::x at issue1560/T3.cry:14:30--14:32 | ||
x₁ is module parameter T3::F::G::I::x at issue1560/T3.cry:20:32--20:34 | ||
Loading module Cryptol | ||
Loading module T3 | ||
|
||
[error] at issue1560/T4.cry:1:1--24:13: | ||
Failed to validate user-specified signature. | ||
when checking the module's parameters, | ||
we need to show that | ||
assuming | ||
• x₂ >= 1 | ||
• x₂ <= 4 | ||
• x₁ >= 1 | ||
• x₁ <= 4 | ||
• x >= 1 | ||
• x <= 3 | ||
the following constraints hold: | ||
• x₁ == x | ||
arising from | ||
matching types | ||
at issue1560/T4.cry:24:12--24:13 | ||
where | ||
x is module parameter T3::F::I::x at issue1560/T4.cry:14:30--14:32 | ||
x₁ is module parameter T3::F::G::I::x at issue1560/T4.cry:20:32--20:34 | ||
x₂ is module parameter T3::F::G::J::x at issue1560/T4.cry:21:32--21:34 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module T1 where | ||
|
||
parameter | ||
type n: # | ||
|
||
y: [n] | ||
y = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module T2 where | ||
|
||
parameter | ||
type n: # | ||
type constraint (fin n) | ||
|
||
a:[n] | ||
a = a | ||
|
||
submodule F where | ||
parameter | ||
type n: # | ||
|
||
b: {m} [n] -> [m] | ||
b _ = a | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module T3 where | ||
|
||
interface submodule I1 where | ||
type x: # | ||
type constraint (x >= 1, x <= 3) | ||
|
||
interface submodule I2 where | ||
type x: # | ||
type constraint (x >= 1, x <= 4) | ||
|
||
|
||
|
||
submodule F where | ||
import interface submodule I1 as I | ||
|
||
y: [I::x] | ||
y = 1 | ||
|
||
submodule G where | ||
import interface submodule I2 as I | ||
|
||
csum : [I::x] | ||
csum = y | ||
|
||
|
||
|
Oops, something went wrong.