Skip to content

Silicon generates invalid SMT code ("unknown constant") for QPs in functions #321

@viper-admin

Description

@viper-admin

Created by bitbucket user gishors on 2018-04-04 07:13
Last updated on 2019-05-08 14:00

Important: This issue's cause roots in quantified permissions. If you get "unknown constant"/`"unknown function"` errors but don’t use quantified permissions, please file a new issue.

Silicon is able to verify false in this example.

    field next : Ref

    method join()
    {
        assert false
    }

    domain Foobar {
        function foo(x: Set[Ref]): Bool
        function bar(y: Set[Int]): Bool
    }

    function getEdges(nodes : Set[Ref]): Set[Int]
        requires forall n : Ref :: { n.next } n in nodes ==> acc(n.next)

        ensures forall subnodes: Set[Ref] :: 
            { foo( subnodes ) } 
                subnodes subset nodes ==> bar(getEdges(subnodes))

When using Viper Online, Silicon and Carbon are not able to verify it, but Silicon-nightly and Carbon-nightly are, even though Silicon-nightly has the following original output:

  Interaction with Z3 (instance 02) failed: Unexpected output of Z3. Expected &<https://github.com/viperproject/silicon/issues/39>;success&<https://github.com/viperproject/silicon/issues/39>; but found: (error &<https://github.com/viperproject/silicon/issues/34>;line 509 column 44: unknown constant subnodes@4@00&<https://github.com/viperproject/silicon/issues/34>;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions