Skip to content

Commit 8d67a30

Browse files
committed
Update documentation and comments
1 parent 2a16546 commit 8d67a30

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

doc/src/architecture.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,13 @@ Expressions in this language can have the following types:
6868
- `Logs`: EVM logs
6969

7070
## Control Flow
71-
An EVM program is represented by an `Expr End`, which is either a single end
72-
state for a program without branches, or a series of nested if-then-else terms,
73-
where each leaf is an end state. Some end states (e.g. `Return`) contain copies
74-
of any externally observable data (i.e. returndata and post call storage).
75-
76-
As an example the following Expr encodes a program that branches based on the
77-
equality of two symbolic words ("a" and "b"), and returns if they are equal and
78-
reverts if they are not:
71+
An EVM program is represented by an `[Expr End]`, which is a list of all
72+
possible end states for a program without branches. As an example the following
73+
two `Expr End`-s encode a program that branches based on the equality of two symbolic
74+
words ("a" and "b"), and returns if they are equal and reverts if they are not:
7975
```haskell
80-
(ITE (Eq (Var "a") (Var "b")) (Success ...) (Failure ...))
76+
[ Success [PEq (Var "a") (Var "b")] ...,
77+
, Failure [PNeg (PEq (Var "a") (Var "b"))] ...]
8178
```
8279

8380
## Buffers

src/EVM/SymExec.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,7 @@ getOneExpr task inst availableInstances resChan numTasks allDone = do
424424
when (n' == 0) $ putTMVar allDone ()
425425

426426
-- | Symbolic interpreter that explores all paths. Returns an
427-
-- 'Expr End' representing the possible executions. This Expr End is NOT flattened,
428-
-- i.e. it (likely) contains ITE-s. The only End-s possible are: Partial, Failure, Success, ITE
427+
-- '[Expr End]' representing the possible execution leafs.
429428
interpretInternal :: forall m . App m
430429
=> InterpTask m
431430
-> TChan (Expr End)

0 commit comments

Comments
 (0)