Skip to content

Commit 764d793

Browse files
Update README.md
1 parent 66a6017 commit 764d793

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Δ SInDi — Semantic Invariant Differencing for Solidity Smart Contracts
1+
# Δ Sindi: Semantic Invariant Differencing for Solidity Smart Contracts
22

3-
SInDi compares two Solidity boolean predicates (e.g., the guards in `require`/`assert`) and decides whether they are **equivalent**, **one is stronger**, or **unrelated**. It’s designed to survive real-world Solidity syntax variations across versions and frameworks (e.g., OpenZeppelin patterns) by normalizing source, tokenizing, parsing to an AST, and reasoning over the structure.
3+
Sindi compares two Solidity boolean predicates (e.g., the guards in `require`/`assert`) and decides whether they are **equivalent**, **one is stronger**, or **unrelated**. It’s designed to survive real-world Solidity syntax variations across versions and frameworks (e.g., OpenZeppelin patterns) by normalizing source, tokenizing, parsing to an AST, and reasoning over the structure.
44

55
---
66

7-
## Why SInDi?
7+
## Why Sindi?
88

9-
* **Contract evolution:** When you refactor or upgrade a contract (proxy patterns, library changes, Solidity version bumps), the *same* invariant often appears in a different syntactic form. SInDi checks whether behavior is preserved.
10-
* **Invariant denoising:** Auto-mined invariants can be redundant or weak. SInDi helps find equivalences and strength relationships to keep only the strongest set.
11-
* **Fast iteration:** The API lets you run individual stages (rewrite → tokenize → parse → simplify → compare), so you can see what SInDi “understands” at each step.
9+
* **Contract evolution:** When you refactor or upgrade a contract (proxy patterns, library changes, Solidity version bumps), the *same* invariant often appears in a different syntactic form. Sindi checks whether behavior is preserved.
10+
* **Invariant denoising:** Auto-mined invariants can be redundant or weak. Sindi helps find equivalences and strength relationships to keep only the strongest set.
11+
* **Fast iteration:** The API lets you run individual stages (rewrite → tokenize → parse → simplify → compare), so you can see what Sindi “understands” at each step.
1212

1313
---
1414

@@ -48,7 +48,7 @@ SInDi compares two Solidity boolean predicates (e.g., the guards in `require`/`a
4848
### From PyPI
4949

5050
```bash
51-
pip install sindi
51+
pip install Sindi
5252
```
5353

5454
### From source (this repo)
@@ -70,11 +70,11 @@ We pin SymPy in `requirements.txt`. The full comparator uses `z3-solver` (alread
7070
The new CLI is exposed by `main.py` with subcommands:
7171

7272
```
73-
sindi rewrite <predicate> [--from-file]
74-
sindi tokenize <predicate> [--from-file] [--skip-rewrite] [--json]
75-
sindi parse <predicate> [--from-file] [--skip-rewrite] [--tree|--json]
76-
sindi simplify <predicate> [--from-file] [--skip-rewrite] [--show-sympy] [--json]
77-
sindi compare <p1> <p2> [--p1-file] [--p2-file] [--light] [--verbose|--json] [--debug-logs]
73+
Sindi rewrite <predicate> [--from-file]
74+
Sindi tokenize <predicate> [--from-file] [--skip-rewrite] [--json]
75+
Sindi parse <predicate> [--from-file] [--skip-rewrite] [--tree|--json]
76+
Sindi simplify <predicate> [--from-file] [--skip-rewrite] [--show-sympy] [--json]
77+
Sindi compare <p1> <p2> [--p1-file] [--p2-file] [--light] [--verbose|--json] [--debug-logs]
7878
```
7979

8080
Run via Python:
@@ -128,7 +128,7 @@ By default, the CLI silences internal debug prints.
128128
Enable logs with:
129129

130130
* `--debug-logs` (per-command), or
131-
* `SINDI_QUIET=0` (environment variable)
131+
* `Sindi_QUIET=0` (environment variable)
132132

133133
---
134134

@@ -137,7 +137,7 @@ Enable logs with:
137137
If you installed from PyPI:
138138

139139
```python
140-
from src.sindi.comparator import Comparator
140+
from src.Sindi.comparator import Comparator
141141

142142
cmp = Comparator()
143143
print(cmp.compare("a < b", "a <= b"))
@@ -147,18 +147,18 @@ print(cmp.compare("a < b", "a <= b"))
147147
From source (without installing the package), set your `PYTHONPATH` or use relative imports:
148148

149149
```bash
150-
PYTHONPATH=src:. python -c 'from src.sindi.comparator import Comparator; \
150+
PYTHONPATH=src:. python -c 'from src.Sindi.comparator import Comparator; \
151151
print(Comparator().compare("a > b", "a < b"))'
152152
# The predicates are not equivalent and neither is stronger.
153153
```
154154

155155
You can also use building blocks:
156156

157157
```python
158-
from src.sindi.rewriter import Rewriter
159-
from src.sindi.tokenizer import Tokenizer
160-
from src.sindi.parser import Parser
161-
from src.sindi.simplifier import Simplifier
158+
from src.Sindi.rewriter import Rewriter
159+
from src.Sindi.tokenizer import Tokenizer
160+
from src.Sindi.parser import Parser
161+
from src.Sindi.simplifier import Simplifier
162162

163163
rw, tk, sp = Rewriter(), Tokenizer(), Simplifier()
164164

@@ -193,7 +193,7 @@ simplified_ast = sp.simplify(ast)
193193
A lightweight comparator (no Z3, purely structural/rewrites/AST reasoning) can be provided at:
194194

195195
```
196-
src/sindi/comparator_rules.py
196+
src/Sindi/comparator_rules.py
197197
```
198198

199199
If present, the CLI gains `--light`. Some **light** tests (`tests/test_cli_light.py`) will run only if this file exists; otherwise they are skipped. The **full** test suite does not require it.
@@ -245,7 +245,7 @@ PYTHONPATH=src:. pytest -q tests/test_cli_light.py
245245
* **Division:** We model `a / b` as `a * (b ** -1)` in symbolic form (not integer division).
246246
* **Functions & arrays:** Uninterpreted in reasoning unless specialized; treated as symbols or function terms.
247247
* **Scope:** Focused on boolean predicates used in `require`/`assert`—not full contract semantics.
248-
* **Logging:** All internal debug goes through `src.sindi.utils.printer`. Set `SINDI_QUIET=1` to suppress globally.
248+
* **Logging:** All internal debug goes through `src.Sindi.utils.printer`. Set `Sindi_QUIET=1` to suppress globally.
249249

250250
---
251251

@@ -263,5 +263,5 @@ Issues and PRs are welcome. If you add rewrite rules or parser coverage, please
263263

264264
If you use Sindi in academic work, please cite the **Sindi** paper (upcoming) and this repository.
265265

266-
* Tool: `https://github.com/mojtaba-eshghie/SInDi`
267-
* PyPI: `https://pypi.org/project/sindi/`
266+
* Tool: `https://github.com/mojtaba-eshghie/Sindi`
267+
* PyPI: `https://pypi.org/project/Sindi/`

0 commit comments

Comments
 (0)