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

Suppress defaulting warnings #768

Closed
robdockins opened this issue Jul 10, 2020 · 4 comments · Fixed by GaloisInc/saw-core#70 or #820
Closed

Suppress defaulting warnings #768

robdockins opened this issue Jul 10, 2020 · 4 comments · Fixed by GaloisInc/saw-core#70 or #820
Assignees
Labels
easy Issues that are expected to be easy to resolve and might therefore be good for new contributors usability An issue that impedes efficient understanding and use

Comments

@robdockins
Copy link
Contributor

Now that cryptol is using more conservative defaulting rules (defaulting will only ever choose unlimited precision types for literals), the default for the Cryptol REPL/interpreter is to suppress defaulting warnings. We should suppress these warnings in saw-script as well.

@robdockins robdockins added easy Issues that are expected to be easy to resolve and might therefore be good for new contributors usability An issue that impedes efficient understanding and use labels Jul 10, 2020
@brianhuffman
Copy link
Contributor

Is this issue intended to cover the defaulting warnings that saw now displays upon startup? I guess that the cryptol REPL does the same defaulting while checking the cryptol prelude (Cryptol.cry) but it just doesn't tell you about it.

 ┏━━━┓━━━┓━┓━┓━┓
 ┃ ━━┓ ╻ ┃ ┃ ┃ ┃
 ┣━━ ┃ ╻ ┃┓ ╻ ┏┛
 ┗━━━┛━┛━┛┗━┛━┛ version 0.4.0.99 (265ef9544d5430686b522a267d212a0f0288067a)

[warning] at Cryptol:1041:18--1041:24:
  Defaulting type argument 'ix' of '(Cryptol::!)' to Integer
[warning] at Cryptol:1032:18--1032:24:
  Defaulting type argument 'ix' of '(Cryptol::!)' to Integer
[warning] at Cryptol:921:37--921:43:
  Defaulting type argument 'ix' of '(Cryptol::<<)' to Integer
[warning] at Cryptol:889:19--889:25:
  Defaulting type argument 'ix' of '(Cryptol::<<)' to Integer
[warning] at Cryptol:861:28--861:33:
  Defaulting type argument 'ix' of '(Cryptol::!)' to Integer
[warning] at Cryptol:844:25--844:30:
  Defaulting type argument 'ix' of '(Cryptol::!)' to Integer
[warning] at Cryptol:756:11--756:17:
  Defaulting type argument 'ix' of '(Cryptol::!)' to Integer
[warning] at Cryptol:750:11--750:17:
  Defaulting type argument 'ix' of '(Cryptol::@)' to Integer
[warning] at Cryptol:648:22--648:25:
  Defaulting type argument 'ix' of '(Cryptol::@)' to Integer
[warning] at Cryptol:635:15--635:35:
  Defaulting type argument 'ix' of '(Cryptol::@)' to Integer
[warning] at Cryptol:628:10--628:13:
  Defaulting type argument 'ix' of '(Cryptol::@)' to Integer
[warning] at Cryptol:627:10--627:13:
  Defaulting type argument 'ix' of '(Cryptol::@)' to Integer
[warning] at Cryptol:626:10--626:13:
  Defaulting type argument 'ix' of '(Cryptol::@)' to Integer
sawscript>

@robdockins
Copy link
Contributor Author

Yes, and when importing other Cryptol files as well, I think. The Cryptol REPL now suppresses printing defaulting warnings by default, and we should do the same here.

@brianhuffman brianhuffman self-assigned this Aug 20, 2020
@brianhuffman
Copy link
Contributor

The startup warning messages are printed by this call to initCryptolEnv inside the buildTopLevelEnv function:

ce0 <- CEnv.initCryptolEnv sc

Function initCryptolEnv is implemented in the cryptol-saw-core package, so this will require a patch to the saw-core repository to fix.

@brianhuffman
Copy link
Contributor

brianhuffman pushed a commit to GaloisInc/saw-core that referenced this issue Aug 20, 2020
brianhuffman pushed a commit to GaloisInc/saw-core that referenced this issue Aug 21, 2020
brianhuffman pushed a commit that referenced this issue Aug 21, 2020
This incorporates GaloisInc/saw-core#70, which suppresses the
defaulting warning messages upon loading cryptol modules.

Fixes #768.
brianhuffman pushed a commit that referenced this issue Aug 21, 2020
This incorporates GaloisInc/saw-core#70, which suppresses the
defaulting warning messages upon loading cryptol modules.

Fixes #768.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy Issues that are expected to be easy to resolve and might therefore be good for new contributors usability An issue that impedes efficient understanding and use
Projects
None yet
2 participants