Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apparent wildcard and possibly QP related incompleteness #816

Closed
marcoeilers opened this issue Mar 12, 2024 · 1 comment
Closed

Apparent wildcard and possibly QP related incompleteness #816

marcoeilers opened this issue Mar 12, 2024 · 1 comment

Comments

@marcoeilers
Copy link
Contributor

The following program verifies in Carbon, but results in a permission error in Silicon:

method keydict___init__() returns (self: Ref)
    ensures forall key: Ref :: {keydict___item__(self, key)} acc(keydict___item__(self, key).keydict_val) && !keydict___contains__(self, key)

function keydict___item__(self: Ref, key: Ref): Ref
    ensures keydict___item__inv(self, result) == key

function keydict___item__inv(self: Ref, val_ref: Ref): Ref

field keydict_val: Option[Ref]


function keydict___contains__(self: Ref, key: Ref) : Bool
    requires acc(keydict___item__(self, key).keydict_val, wildcard)
    ensures result == keydict___item__(self, key).keydict_val.isSome
    
    
    
adt Option[T] {
    Some(value:T)
    None()
}
@marcoeilers
Copy link
Contributor Author

This was fixed in PR #817

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant