Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a README describing the Heapster implication rules #1554

Merged
merged 23 commits into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
40e1704
added a README describing the Heapster implication rules
Jan 11, 2022
89a9a22
started filling out the description of the implication prover
Jan 17, 2022
8c9cd60
more work explaining the implication prover
Jan 20, 2022
35b7c48
finished describing needed and determined variables
Jan 20, 2022
06986e4
added a bit more explanation about ImplM being a state-continuation m…
Jan 20, 2022
eac8d7b
finished describing the proofs for named perms, started describing pr…
Jan 20, 2022
93542fa
finished describing proveVarAtomicImpl`
Jan 20, 2022
83988d7
added a description of how to prove field permissions
Jan 21, 2022
90081cb
Merge branch 'master' into heapster/type-system-docs
Jun 3, 2022
2bd62f8
moved most of the documentation into new files in the doc subdirectory
Jun 4, 2022
f7f2a84
outlined a section on overall Rust verification
Jun 6, 2022
a0dc691
explained argument layout in RustTrans.md
Jun 7, 2022
4e94a3d
defined the argument layout function Arg(sh)
Jun 8, 2022
9cf9562
finished the mathematical definition of translating a Rust function t…
Jun 8, 2022
e8f54af
added more text to describe argument layout
Jun 9, 2022
3917f8d
added a note to clarify the relationship between argument layout and …
Jun 9, 2022
3641bf2
added function type translation examples; also updated the translatio…
Jun 10, 2022
085182f
finished describing all the pieces of the Rust function type translation
Jun 10, 2022
a339b97
finished removing all the FIXMEs from the document!
Jun 10, 2022
cc36a29
added a few more examples to rust_data.rs
Jun 10, 2022
9e7e014
Merge branch 'master' into heapster/type-system-docs
Jun 10, 2022
adac5e4
whoops, removed an example that does not work yet...
Jun 14, 2022
37d83b0
Merge branch 'master' into heapster/type-system-docs
Jun 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
277 changes: 277 additions & 0 deletions heapster-saw/doc/ImplProver.md

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions heapster-saw/doc/Permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ In this document, we use the following metavariables to refer to different sorts



Permission types
Value Types
================

A permission type includes regular crucible types as well as heapster-specific types
The Heapster value types include the regular crucible types as well as heapster-specific types:

| **Permission Types `a`** | **Description** |
| :---: | :--- |
Expand Down Expand Up @@ -75,6 +75,8 @@ In addition to the above expressions, we also have shape expressions, which we s
| `fieldsh(sz,p)` | `llvmshape w` | Like `fieldsh(p)`, but where the permission acts on a pointer of size `sz`. |
| `arraysh(s,len,sh)` | `llvmshape w` | A shape for an array with the given stride, length (in number of elements = total length / stride), and fields `sh` |
| `exsh x:a.sh` | `llvmshape w` | An existential shape |
| `falsesh` | `llvmshape w` | The unsatisfiable or contradictory shape |


Value permissions
=================
Expand Down Expand Up @@ -108,6 +110,7 @@ For a variable `x:a`, the proposition `x:p` means "`x` has permission `p`": this
| `p1 * p2` | `perm(a)` | separating conjunction; `p1` and `p2` (both satisfying `perm(a)`) must be atomic permissions (not a disjunction, existential, or equality permission) |
| `eq(e)` | `perm(a)` | a value equal to the expression `e:a` |
| `exists x:a. p` | `perm(b)` | there exists some expression `e:a` such that `p[e/x]:perm(b)` holds |
| `false` | `perm(a)` | The unsatisfiable or contradictory permission |
| `x<e1,..,e2>@o` | `perm(a)` | A named permission with expression arguments, with optional offset expression `o`. Named permissions can either be (1) defined permissions (aliases) (2) recursive permissions, or (3) opaque permissions (axioms). |
| `[l]array(rw, off,<len,*stride,sh)` | `perm(llvmptr w)` | a permission for a pointer to an array, where: <ul><li>`l` is the lifetime during which this permission is active;</li> <li>`off` is a permission expression representing the offset of this array from the pointer in bytes;</li> <li>`len` is a permission expression representing the number of cells in the array;</li> <li>`stride` is a permission expression representing the number of bytes in a cell;</li> <li>`sh` is a shape expression representing the shape of elements in the array</li> </ul> |
| `[l]memblock(rw,o,len,sh)` | `perm(llvmptr w)` | gives read or write access to a memory block, whose contents also give some permissions, where: <ul> <li> `rw` indicates whether this is a read or write block permission </li> <li> `l` is the lifetime during which this block permission is active </li> <li> `o` is the offset of the block from the pointer in bytes </li> <li> `len` is the length of the block in bytes </li> <li> `sh` is the shape of the block </li> </ul> |
Expand Down
115 changes: 115 additions & 0 deletions heapster-saw/doc/Rules.md

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions heapster-saw/doc/Rust.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

# Type-checking Rust with Heapster

FIXME: write a simple tutorial
- Defining types
- Symbols and name-mangling
- Assuming standard library functions
- Assuming low-level primitives like `memcpy`; refer to the
[Rust Translation](RustTrans.md) for more detail about the relationship between
Rust and Heapster types
- Type-checking
Loading