// RUN: %boogie /typeEncoding:predicates /logPrefix:p "%s" > "%t" // RUN: %boogie /typeEncoding:arguments /logPrefix:a "%s" >> "%t" // RUN: %diff "%s.expect" "%t" const C:int; const D:bool; function empty() returns (alpha); function eqC(x:alpha) returns (bool) { x == C } function giveEmpty() returns (alpha) { empty() } function {:inline true} eqC2(x:alpha) returns (bool) { x == C } function {:inline true} giveEmpty2() returns (alpha) { empty() } function eqC3(x:alpha) returns (bool); axiom {:inline true} (forall x:alpha :: eqC3(x) == (x == C)); function giveEmpty3() returns (alpha); axiom {:inline true} (forall :: giveEmpty3():alpha == empty()); procedure P() { assert eqC(C); assert eqC2(C); assert eqC3(C); assert eqC2(D); // should not be provable } procedure Q() { assert giveEmpty() == empty(); assert giveEmpty() == empty():int; assert giveEmpty():bool == empty(); assert giveEmpty2() == empty(); assert giveEmpty2() == empty():int; assert giveEmpty2():bool == empty(); assert giveEmpty3() == empty(); assert giveEmpty3() == empty():int; assert giveEmpty3():bool == empty(); assert giveEmpty3() == C; // should not be provable }