Skip to content

Commit

Permalink
Rename: symtest to halmos (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
daejunpark authored Jan 31, 2023
1 parent 137ee33 commit 0c7f39e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# SymTest
# Halmos

_Symbolic Bounded Model Checker for Ethereum Smart Contracts Bytecode_

**_Symbolic_:** symtest executes the given contract bytecode against symbolic function arguments and symbolic storage states. This makes symtest to systematically explore all possible behaviors of the contract.
**_Symbolic_:** Halmos executes the given contract bytecode against symbolic function arguments and symbolic storage states. This makes Halmos to systematically explore all possible behaviors of the contract.

**_Bounded_:** symtest unrolls unbounded loops up to a specific bound, and set variable-length arrays to be of a specific size. This allows symtest to run automatically without requiring additional user annotations.
**_Bounded_:** Halmos unrolls unbounded loops up to a specific bound, and set variable-length arrays to be of a specific size. This allows Halmos to run automatically without requiring additional user annotations.

**_Model Checking_:** symtest proves that assertions are never violated by any inputs; otherwise, it provides a counter-example. This means that symtest can be used for finding bugs as well as formal verification of the given contract.
**_Model Checking_:** Halmos proves that assertions are never violated by any inputs; otherwise, it provides a counter-example. This means that Halmos can be used for finding bugs as well as formal verification of the given contract.

## Installation

```
$ pip install symtest
$ pip install halmos
```

## Usage

```
$ cd /path/to/src
$ symtest
$ halmos
```

For more details:
```
$ symtest --help
$ halmos --help
```

## Examples
Expand Down Expand Up @@ -57,12 +57,12 @@ $ forge test

Once it passes, you can also run **symbolic testing** to check the same properties for **all possible inputs** (up to a certain bound):
```
$ symtest
$ halmos
[FAIL] testTotalPriceBuggy(uint96,uint32) (paths: 6, time: 0.10s, bounds: [])
Counterexample: [p_price_uint96 = 39614081294025656978550816768, p_quantity_uint32 = 1073741824]
```

_(In this particular example, symtest found an input that violates the assertion, which was missed by the fuzzer!)_
_(In this particular example, Halmos found an input that violates the assertion, which was missed by the fuzzer!)_

## Disclaimer

Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ build-backend = "setuptools.build_meta"
[tool.setuptools_scm]

[project]
name = "symtest"
description = "SymTest: Symbolic Bounded Model Checker for Ethereum Smart Contracts Bytecode"
name = "halmos"
description = "Halmos: Symbolic Bounded Model Checker for Ethereum Smart Contracts Bytecode"
readme = "README.md"
authors = [
{ name="Daejun Park" },
Expand All @@ -24,7 +24,7 @@ dependencies = [
dynamic = ["version"]

[project.scripts]
symtest = "symtest.__main__:main"
halmos = "halmos.__main__:main"

[project.urls]
"Homepage" = "https://github.com/a16z/symtest"
"Homepage" = "https://github.com/a16z/halmos"
File renamed without changes.
4 changes: 2 additions & 2 deletions src/symtest/__main__.py → src/halmos/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from .sevm import *

def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(prog='symtest', epilog='For more information, see https://github.com/a16z/symtest')
parser = argparse.ArgumentParser(prog='halmos', epilog='For more information, see https://github.com/a16z/halmos')

parser.add_argument('target', metavar='TARGET_DIRECTORY', nargs='?', default=os.getcwd(), help='source root directory (default: current directory)')
parser.add_argument('--contract', metavar='CONTRACT_NAME', help='run tests in the given contract only')
Expand Down Expand Up @@ -371,7 +371,7 @@ def main() -> int:
num_passed += 1
else:
num_failed += 1
print(f'Symtest result: {num_passed} passed; {num_failed} failed')
print(f'Symbolic test result: {num_passed} passed; {num_failed} failed')
total_passed += num_passed
total_failed += num_failed

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0c7f39e

Please sign in to comment.