Is there a pre-defined max value constant in CVL?

Hi, are constants like UINT128_MAX implemented already by any chance? I was trying this:

definition UINT128_MAX() returns uint256 = 0xffffffffffffffffffffffffffffffff;
definition UINT64_MAX() returns uint256 = 0xffffffffffffffff;

methods { // << line 6
    sqrt(uint256 a) returns (uint256) envfree


But I am getting a

[main] ERROR log.Logger - Spec file:6:1: Syntax error: unexpected token near methods

Any suggestions?

The following constants values are pre-defined in CVL:

max_uint, max_uint256, max_uint160, max_uint128, max_uint96, max_uint64, max_uint32, max_uint16, max_uint8.


You can find out more in the documentation: Types

1 Like