-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Monomorphization of polymorphic maps and binders (#669)
* first commit * moved test to the correct location * first successful verification of polymorphic lambda * bug fix * more bug fixes * minor cleanup * refactoring * fixpoint now detects increase in instantiated declarations * another bug fix * added support for type instantiation based on instantiated type constructors * enabled binder instantiation * fixed bug * bug fixes * added representative Viper subset for monomorphization * add file with parametric Viper domains * added Dafny files for monomorphization * remove system information from Viper monomorphization files * fixed bugs * refactored MonomorphicExpr() interface method * split axiom conjuncts into separate axioms * some typos and minor cleanup * added dafny and viper tests (but with /noVerify) * added some documentation * some refactoring * fixed bugs and added documentation * more documentation * List -> HashSet for instantiationHints * added two more tests Co-authored-by: gauravpartha <[email protected]>
- Loading branch information
1 parent
88cd431
commit 76b6a37
Showing
44 changed files
with
87,187 additions
and
178 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
using System; | ||
using System.Linq; | ||
using System.Collections.Generic; | ||
using Microsoft.Boogie.GraphUtil; | ||
|
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,29 @@ | ||
// RUN: %parallel-boogie /monomorphize "%s" > "%t" | ||
// RUN: %diff "%s.expect" "%t" | ||
|
||
type Field T; | ||
type ref; | ||
type HeapType = [ref]<alpha>[Field alpha]alpha; | ||
|
||
var $Heap: HeapType; | ||
const unique alloc: Field bool; | ||
const null: ref; | ||
|
||
function {:inline} read<alpha>(H: HeapType, r: ref, f: Field alpha) : alpha | ||
{ | ||
H[r][f] | ||
} | ||
|
||
procedure p($r: ref) | ||
requires $r != null; | ||
requires $Heap[$r][alloc]; | ||
{ | ||
var $Frame: <beta>[ref,Field beta]bool; | ||
var i: int; | ||
|
||
$Frame := (lambda<alpha> $o: ref, $f: Field alpha :: | ||
$o != null && read($Heap, $o, alloc) ==> false); | ||
|
||
assert $Frame[null, alloc]; | ||
assert !$Frame[$r, alloc]; | ||
} |
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,2 @@ | ||
|
||
Boogie program verifier finished with 1 verified, 0 errors |
Oops, something went wrong.