Skip to content

Parametric ADT #24

@mgudemann

Description

@mgudemann

For these constraints

(set-logic ALL)
(set-option :produce-models true)

(declare-datatypes ((Ptr 1)) ((par (T) ((null_ptr)))))

( declare-datatypes
    (
        ( L
            0
        )
    )
    (
        (
            ( mk-L
                ( val
                    ( _
                        BitVec
                        8
                    )
                )
                ( e
                    ( Ptr
                        L
                    )
                )
            )
        )
    )
)
(declare-const l L)

(assert (= l (mk-L (_ bv0 8) (as null_ptr (Ptr L)))))

(check-sat)
(get-value (l))

Princess reports (error "Sort L not declared") while both Z3 and CVC5 correctly report sat.
What are the restrictions of using ADTs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions