Skip to content

Refute side condition by transitivity of equality #2095

@ttuegel

Description

@ttuegel

Follow-up to #2089.

This is another unsatisfiable side condition which is not detected by Z3 or the backend itself:

    #Ceil ( #lookup ( 'QuesUnds'3 , int , 'QuesUnds'4:Int , int ) )
  #And
    {
      #lookup ( 'QuesUnds'3 , int , 'QuesUnds'4:Int , int )
    #Equals
      None
    }
  #And
    {
      #lookup ( 'QuesUnds'3 , int , 'QuesUnds'4:Int , int )
    #Equals
      Some I3:Int
    }

This side condition is unsatisfiable because None and Some are distinct constructors. #lookup isn't translated for the SMT solver because it is a partial function. However, it is known to be defined, so we could take advantage of that fact. (How?)

We could also use the first equality as a substitution to simplify the second equality. This would also solve #2032. We would need some heuristic for doing this; maybe: given \equals(function, constructor-at-top), substitute the right-hand side for the left-hand side everywhere.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions