https://github.com/leanprover/lnsym
Armv8 Native Code Symbolic Simulator in Lean
https://github.com/leanprover/lnsym
lean4
Last synced: 7 months ago
JSON representation
Armv8 Native Code Symbolic Simulator in Lean
- Host: GitHub
- URL: https://github.com/leanprover/lnsym
- Owner: leanprover
- License: apache-2.0
- Created: 2024-01-04T14:50:35.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-09T19:19:00.000Z (over 1 year ago)
- Last Synced: 2024-12-25T17:11:14.266Z (over 1 year ago)
- Topics: lean4
- Language: Lean
- Homepage:
- Size: 196 MB
- Stars: 66
- Watchers: 8
- Forks: 18
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# LNSym: Native Code Symbolic Simulator in Lean
[](https://github.com/leanprover/LNSym/actions/workflows/makefile.yml)
LNSym is a symbolic simulator for Armv8 machine-code programs.
Please see the [LICENSE](./LICENSE) file for LNSym's licensing and
[CONTRIBUTING.md](./CONTRIBUTING.md) for external contribution
guidelines.
## Prerequisites
Install Lean4 and your preferred editor's plug-in on your machine by
following [these
instructions](https://leanprover-community.github.io/get_started.html).
## Build Instructions
Run `make` at the top-level of LNSym to fetch the Lean4 dependencies,
build this library (including the proofs), and run conformance
testing. Note that if you are not on an Aarch64 machine, conformance
testing will be skipped.
The default `make` command corresponds to the following invocation:
```make all VERBOSE=--verbose NUM_TESTS=20```
### Other Makefile targets
`clean`: remove build outputs.
`clean_all`: `clean` plus remove Lean dependencies and
all benchmarking and profiling data.
`specs`: [run under `all`] builds only the specifications of
native-code programs of interest.
`proofs`: [run under `all`] builds only the proofs.
`tests`: [run under `all`] builds concrete tests.
`cosim`: [run under `all`] perform conformance testing.
`awslc_elf`: perform ELF loading tests for AWS-LC.
`benchmarks`: run benchmarks for the symbolic simulator.
`profiler`: run a single round of each benchmark, with the profiler enabled
### Makefile variables that can be passed in at the command line
`VERBOSE`: Verbose mode; prints disassembly of the instructions being
tested. Default: on.
`NUM_TESTS`: Number of random tests/instruction class. Default: 20.
## Directory Overview
- `Arm`: Formalization of the Armv8 Aarch64 ISA
- `Specs`: Specifications of algorithms of interest
- `Proofs`: Proofs of Arm native-code programs
- `Tests`: Concrete tests of Arm native-code programs