Skip to content

Signed version of prelude function toInteger #1266

@brianhuffman

Description

@brianhuffman

The Cryptol prelude has a function toInteger that can convert a bitvector of type [n] to a non-negative integer in the range 0 to 2^^n-1. We need a signed variant of this function that converts a signed bitvector to an integer in the range -2^^(n-1) to 2^^(n-1)-1. Such a function exists in the saw prelude (called sbvToInt), but not in Cryptol.

Metadata

Metadata

Assignees

Labels

languageChanges or extensions to the language

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions