Skip to content

Comparison operators are too strict #1925

@qsctr

Description

@qsctr

According to #398 (comment) and the behavior of the reference interpreter, comparisons should be lazy:

Cryptol> :eval (False, undefined) < (True, True)
True
Cryptol> :eval (False, undefined) == (True, True)
False

But the current behavior in the real interpreter seems to be too strict:

Cryptol> (False, undefined) < (True, True)

Run-time error: undefined
-- Backtrace --
Cryptol::error called at Cryptol:1062:13--1062:18
Cryptol::undefined called at <interactive>:1:9--1:18
(Cryptol::<) called at <interactive>:1:1--1:34
Cryptol> (False, undefined) == (True, True)

Run-time error: undefined
-- Backtrace --
Cryptol::error called at Cryptol:1062:13--1062:18
Cryptol::undefined called at <interactive>:2:9--2:18
(Cryptol::==) called at <interactive>:2:1--2:35

This should be fixed to align with the conclusion reached in #398.

Metadata

Metadata

Assignees

Labels

bugSomething not working correctlylanguageChanges or extensions to the languagesemanticsIssues related to the dynamic semantics of Cryptol.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions