You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Towards the top of page 10 in the "Programming in Cryptol" Textbook, there is an exercise which states:
Exercise 1.5. Compare the results of evaluating (5 : Z 7) + (6 : Z 7) with toInteger (5 : Z 7) + toInteger
(6 : Z 7) . What is the result of -3 : Z 7 ? Were the results what you expected?
However, entering 'toInteger (5 : Z 7) + toInteger (6 : Z 7)' into Cryptol results in the following error:
Unsolvable constraints:
• Integral (Z 7)
arising from
use of expression toInteger
at <interactive>:1:23--1:32
• Reason: Type 'Z 7' is not an integral type.
The textbook's answer manual at the end of the book claims that Cryptol should give an answer of 11.
The text was updated successfully, but these errors were encountered:
It looks like this was broken when we rearranged the type classes for cryptol 2.9. These uses of toInteger will need to be changed to fromZ, which has the appropriate type.
Towards the top of page 10 in the "Programming in Cryptol" Textbook, there is an exercise which states:
However, entering 'toInteger (5 : Z 7) + toInteger (6 : Z 7)' into Cryptol results in the following error:
The textbook's answer manual at the end of the book claims that Cryptol should give an answer of 11.
The text was updated successfully, but these errors were encountered: