Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/firefighterduck/alice_rs
Alice_rs is a small proof-of-concept reference implementation of a decision procedure for A Decidable Fragment of Separation Logic.
https://github.com/firefighterduck/alice_rs
Last synced: 3 months ago
JSON representation
Alice_rs is a small proof-of-concept reference implementation of a decision procedure for A Decidable Fragment of Separation Logic.
- Host: GitHub
- URL: https://github.com/firefighterduck/alice_rs
- Owner: firefighterduck
- License: mit
- Created: 2020-09-06T14:36:49.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-17T08:53:26.000Z (almost 4 years ago)
- Last Synced: 2024-05-22T21:33:03.068Z (6 months ago)
- Language: Rust
- Homepage:
- Size: 55.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-rust-formalized-reasoning - Alice_rs - implementation of a decision procedure for A Decidable Fragment of Separation Logic. (Projects / Libraries)
README
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) ![GitHub](https://img.shields.io/github/license/firefighterduck/alice_rs)
# Alice_rs
Alice_rs is a small proof-of-concept reference implementation of a decision procedure for [A Decidable Fragment of Separation Logic](http://www0.cs.ucl.ac.uk/staff/p.ohearn/papers/unroll_collapse_withproofs.pdf) and was written as supplemental material for [this](https://www21.in.tum.de/teaching/sar/SS20/8.pdf) seminar paper.
The name comes from a wrong pronunciation of the ls structure. The correct pronunciation would be "list structure" but it could also be read as "al-as structure" which sounds a bit like alice.## Installation
Alice_rs is currently only available through this repository.
It is recommended to use a current version of the rust language compiler with cargo. Both can be obtained from [here](https://rustup.rs/).
The build process is based around the standard cargo build tool chain (it is recommended for non development builds to use the `--release` flag):
```bash
cargo build
```## Usage
Alice_rs takes an entailment as a string command line argument like this: `alice_rs "[here goes the entailment]"`.Example:
```bash
alice_rs "And[Neq(x,y)]|SepConj[x->y,y->Nil] |- True|SepConj[ls(x, Nil)]"
```
For those unexperienced in this kind of separation logic, here is a short introduction to the semantics:
An entailment describes that for all states (a formal description of a stack and heap architecture) for which the left formula holds the right formula should hold as well.
A formula consists of statements about a state.
These statements are organized in two parts: first the pure logic (reasons about equality) and the spatial logic (reasons about the heap structure).
For more information please have a look at the theoretical background mentioned above ([this](http://www0.cs.ucl.ac.uk/staff/p.ohearn/papers/unroll_collapse_withproofs.pdf) and [this](https://www21.in.tum.de/teaching/sar/SS20/8.pdf)).The grammar for the entailment strings is based on standard separation logic formulæ (definitions in order of priority):
Nonterminal | | Definition
------- | ---- | --------
*Entailment* | → | *Formula* \|- *Formula*
*Formula* | → | *Pure* \| *Spatial*
*Pure* | → | True
*Pure* | → | And[*Op_Vec*]
*Op_Vec* | → | *Op*, *Op_Vec*
*Op_Vec* | → | *Op*
*Op* | → | Eq(*Expr*, *Expr*)
*Op* | → | Neq(*Expr*, *Expr*)
*Spatial* | → | Emp
*Spatial* | → | SepConj[*Spatial_Vec*]
*Spatial_Vec* | → | *AtomicSpatial*, *Spatial_Vec*
*Spatial_Vec* | → | *AtomicSpatial*
*AtomicSpatial* | → | *Expr* -> *Expr*
*AtomicSpatial* | → | ls(*Expr*, *Expr*)
*Expr* | → | Nil
*Expr* | → | [a-zA-z]+To run in the development environment simply use `cargo run [here goes the entailment]` (the `--release` flag can be used with this as well.
Tests can be run with `cargo test`.
## Results
If the program returns nothing, the entailment is valid.
Otherwise either a parser error occurred or the entailment is found invalid. These errors are currently only handled via rust's panic mechanism. A more sophisticated error handling is yet to be implemented.## Project Status
Despite this project being a complete proof-of-concept implementation further development is planned. Especially the internal representation will be the issue of further improvements.## Contributing
See the [Contributing](CONTRIBUTING.md) file.## License
Alice_rs is licensed under the [MIT license](LICENSE).