@@ -52,10 +52,11 @@ Sindi also includes a **Witness Generator**. If a predicate is weakened (e.g., a
5252
5353``` bash
5454pip install Sindi
55-
5655```
5756
58- ###From source (this repo)```bash
57+ ### From source (this repo)
58+
59+ ``` bash
5960# Clone, then in repo root:
6061python -m pip install -r requirements.txt
6162# Optional: editable install
@@ -68,25 +69,27 @@ The comparator uses `z3-solver` (already listed in requirements).
6869
6970---
7071
71- ##Quick start (CLI)The CLI is exposed via `main.py` (or `sindi` if installed):
72+ ## Quick start (CLI)The CLI is exposed via ` main.py ` (or ` sindi ` if installed):
7273
73- ```
74+ ``` bash
7475Sindi rewrite < predicate> [--from-file]
7576Sindi tokenize < predicate> [--json]
7677Sindi parse < predicate> [--tree| --json]
7778Sindi simplify < predicate> [--show-sympy]
7879Sindi compare < p1> < p2> [--light] [--verbose| --json]
7980Sindi witness < new_pred> < old_pred> [--domains " var:type" ] [--json]
80-
8181```
8282
83- ###1. Comparison```bash
83+ ### 1. Comparison
84+
85+ ``` bash
8486python main.py compare " msg.sender == msg.origin && a >= b" " msg.sender == msg.origin"
8587# -> The first predicate is stronger.
86-
8788```
8889
89- ###2 . Witness Generation (Find Security Regression)If you suspect a constraint was weakened, ask for a witness:
90+ ### 2. Witness Generation (Find Security Regression)
91+
92+ If you suspect a constraint was weakened, ask for a witness:
9093
9194``` bash
9295# Example: Boundary weakening
@@ -95,7 +98,6 @@ python main.py witness "x <= 100" "x < 100"
9598# Status: SAT (Weakening Found)
9699# Witness Model:
97100# x = 100
98-
99101```
100102
101103** With specific domains:**
@@ -105,7 +107,6 @@ Sometimes `x != 0` and `x > 0` look different unless you know `x` is a `uint`.
105107python main.py witness " val != 0" " val > 0" --domains " val:uint"
106108# Output:
107109# Status: UNSAT (No weakening found / Equivalent)
108-
109110```
110111
111112** Complex Boolean Logic:**
@@ -157,12 +158,13 @@ from src.sindi.parser import Parser
157158rw, tk = Rewriter(), Tokenizer()
158159s = rw.apply(" SafeMath.add(a,b) > c" )
159160ast = Parser(tk.tokenize(s)).parse()
160-
161161```
162162
163163---
164164
165- ##The pipeline (architecture at a glance)1. ** Rewriting / Normalization** (string → string)
165+ ## The pipeline (architecture at a glance)
166+
167+ 1 . ** Rewriting / Normalization** (string → string)
166168Fixes cross-version and library-specific surface differences.
1671692 . ** Tokenization & Parsing** (string → tokens → AST)
168170Produces a structured AST (` ASTNode ` ).
@@ -175,20 +177,24 @@ Infers types (`Bool` vs `Real`), applies domain constraints (`uint256`), and sol
175177
176178---
177179
178- ##Notes & limitations* ** Numerics / domains:** For comparison, variables are assumed non-negative by default (Solidity-like). Witness generation allows strict ` uint ` /` int ` bit-width constraints.
180+ ## Notes & limitations
181+
182+ * ** Numerics / domains:** For comparison, variables are assumed non-negative by default (Solidity-like). Witness generation allows strict ` uint ` /` int ` bit-width constraints.
179183* ** Division:** We model ` a / b ` as ` a * (b ** -1) ` in symbolic form.
180184* ** Functions & arrays:** Uninterpreted unless specialized; treated as symbols (e.g., ` balanceOf(user) ` is a symbol ` balanceOf_user ` ).
181185* ** Scope:** Focused on boolean predicates used in ` require ` /` assert ` —not full contract semantics.
182186
183187---
184188
185- ##ContributingIssues and PRs are welcome. If you add rewrite rules or parser coverage, please include targeted tests.
189+ ## Contributing
190+
191+ Issues and PRs are welcome. If you add rewrite rules or parser coverage, please include targeted tests.
186192
187193---
188194
189- ##Citation (paper & code)If you use Sindi in academic work, please cite the ** Sindi ** paper (upcoming) and this repository.
195+ ## Citation (paper & code)
190196
191- * Cite our preprint report:
197+ If you use Sindi in academic work, please cite the ** Sindi ** paper (upcoming) and this repository.
192198
193199``` bibtex
194200@techreport{SInDi,
0 commit comments