-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement support for triggers with lean-auto (#942)
Updates lean-auto dependency to get this functionality, and Lean itself along the way. Improve some messages, too.
- Loading branch information
Showing
10 changed files
with
77 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// RUN: %parallel-boogie -typeEncoding:p -logPrefix:0p "%s" > "%t" | ||
// RUN: %parallel-boogie -typeEncoding:a -logPrefix:0a "%s" > "%t" | ||
|
||
const ar : [int]bool; | ||
axiom {:include_dep} (forall x:int :: {ar[x]} !ar[x]); | ||
|
||
type S, T, C a b; | ||
|
||
function m(T,S) returns (bool); | ||
function n(T,T) returns (bool) uses { | ||
axiom (forall x:S, y:T :: l(x) && n(y, con) == m(y,x)); | ||
} | ||
|
||
function f<a>(C a T, a) returns (int); | ||
function f2<a>(C a T, a) returns (int) uses { | ||
axiom (forall x:C S T, y : S :: f(x,y) == f2(x,y)); | ||
} | ||
|
||
function g(T) returns (T) uses { | ||
axiom (forall x:T :: {g(h(x))} {g(x)} x == x); | ||
} | ||
|
||
function h<a>(a) returns (a) uses { | ||
axiom (forall <b> x:b :: {h(x)} x == x); | ||
} | ||
|
||
function k<a>(C a a) returns (bool) uses { | ||
axiom (forall <b> x:C b b :: k(x)); | ||
axiom (forall <b> x:C b b :: {k(x)} k(x)); | ||
} | ||
|
||
function l<a>(a) returns (bool); | ||
function o<a>(a) returns (bool) uses { | ||
axiom (forall <b> x:b, y:b :: {o(x), o(y)} o(x) ==> someConst == 42); | ||
} | ||
|
||
const con : T; | ||
const someConst : int; | ||
|
||
procedure P() returns () { | ||
var v0 : C S S, v1 : C S T, v2 : S, v3 : T; | ||
|
||
assert ar[27] == false; | ||
assert k(v0); | ||
assert f(v1, v2) == f2(v1, v2); | ||
assert n(v3, con) == m(v3, v2); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
../textbook/DivMod.bpl | ||
../textbook/Find.bpl | ||
../textbook/McCarthy-91.bpl | ||
./Triggers0Valid.bpl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
leanprover/lean4:v4.6.0-rc1 | ||
leanprover/lean4:v4.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters