-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Teach the typechecker a bit more about exponents.
This fixes issue #734, and partially addresses #930. The basic issue with 734 was that the solver was chosing spurious counterexamples for the exponent function; in particular, models where the output was not at least 1. The fairly restricted axiom we add here just says that the exponent function is at least as large as its base for positive inputs.
- Loading branch information
1 parent
e3c4e37
commit 2a9e315
Showing
4 changed files
with
24 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
f : {a} (fin a) => [2^^a - 1] -> [3*(2^^a - 1)] | ||
f x = x # x # x | ||
|
||
asdf1 : {r} (fin r, width (2^^r)==r+1) => [r+1] | ||
asdf1 = `(2^^r) | ||
|
||
asdf2 : {r} (fin r, width(2^^r-1)==r) => [r] | ||
asdf2 = `(2^^r-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,6 @@ | ||
:l issue734.cry | ||
|
||
f`{3} 0b1010101 | ||
|
||
asdf1`{8} | ||
asdf2`{8} |
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,6 @@ | ||
Loading module Cryptol | ||
Loading module Cryptol | ||
Loading module Main | ||
0x156ad5 | ||
0x100 | ||
0xff |