Skip to content

Problem with type aliases in SMT backend using version 0.15 #187

@rmn30

Description

@rmn30
default Order dec

$include <arith.sail>
$include <vector_dec.sail>

type r1 = range(0, ((2 ^ 32) - 1))

function foo (x : bits(32)) -> r1 = {
    unsigned(x)
}

$property
function prop (x : bits(32)) -> bool = {
    foo(x) == 0
}

Compiling the above file with sail -smt produces an error:

Type error:
test.sail:8.13-33:
8 |function foo (x : bits(32)) -> r1 = {
  |             ^------------------^
  | . range(0, (2 ^ 32 - 1)) and . r1 do not match between function and val spec

If you substitute the type alias manually the error goes away.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions