-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- optimize ep term generation - make matching filters for user-defined term generators more restrictive - improve command line option documentation
- Loading branch information
Showing
13 changed files
with
134 additions
and
53 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
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
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
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,59 @@ | ||
// Structure and predicate declarations for nested lists with head pointers | ||
|
||
struct OuterNode { | ||
var onext: OuterNode; | ||
var down: InnerNode; | ||
} | ||
|
||
struct InnerNode { | ||
var inext: InnerNode; | ||
var head: OuterNode; | ||
} | ||
|
||
function lseg_footprint(x: InnerNode, y: InnerNode) | ||
returns (FP: Set<Loc>) | ||
{ | ||
forall z: Loc :: z in FP == (Btwn(inext, x, z, y) && z != y && z in InnerNode) | ||
} | ||
|
||
predicate lseg(x: InnerNode, y: InnerNode, FP: Set<Loc>) { | ||
Reach(inext, x, y) && | ||
FP == lseg_footprint(x, y) | ||
} | ||
|
||
function nlseg_outer_footprint(x: OuterNode, y: OuterNode) | ||
returns (FP: Set<Loc>) | ||
{ | ||
forall z: Loc :: z in FP == (Btwn(onext, x, z, y) && z != y && z in OuterNode) | ||
} | ||
|
||
function dinext() returns(m: Map<Loc, Loc>) { | ||
forall x: Loc, y: Loc :: x.m == y == (x.down == y || x.inext == y) | ||
@(matching x.down yields m[x]) | ||
@(matching x.inext yields m[x]) | ||
} | ||
|
||
function nlseg_inner_footprint(x: OuterNode, y: OuterNode) | ||
returns (FP: Set<Loc>) | ||
{ | ||
(forall z: Loc, zh: Loc :: z in FP ==> | ||
z.head in nlseg_outer_footprint(x, y)) && | ||
(forall z: Loc, zh: Loc :: z in FP && zh == z.head ==> | ||
/* z in lseg_footprint(zh.down, null) */ | ||
Btwn(inext, zh.down, z, null) && z != null && z in InnerNode | ||
@(matching z yields z.head) | ||
@(matching zh yields zh.down)) && | ||
(forall zh: Loc, z: Loc :: | ||
zh in nlseg_outer_footprint(x, y) && | ||
/*z in lseg_footprint(zh.down, null)*/ | ||
Btwn(inext, zh.down, z, null) && z != null && z in InnerNode ==> z in FP) | ||
} | ||
|
||
predicate nlseg(x: OuterNode, y: OuterNode, FP: Set<Loc>) { | ||
Reach(onext, x, y) && | ||
(forall u: OuterNode, v: InnerNode :: | ||
u in nlseg_outer_footprint(x, y) && v in nlseg_inner_footprint(x, y) && | ||
Reach(inext, u.down, v) ==> v.head == u) && | ||
(forall u: OuterNode :: u in nlseg_outer_footprint(x, y) ==> Reach(inext, u.down, null)) && | ||
FP == nlseg_outer_footprint(x, y) ++ nlseg_inner_footprint(x, y) | ||
} |