Skip to content

Commit

Permalink
improve rustdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
einar-polygon committed Oct 1, 2024
1 parent 00e72c0 commit bcfe58c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions evm_arithmetization/src/cpu/kernel/optimizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ fn is_push_or_dup(op: &Item) -> bool {
false
}

/// First law: (not A) and (not B) = not (A or B)
/// e.g. [PUSH a, NOT, PUSH b, NOT, AND] -> [PUSH a, PUSH b, OR, NOT]
/// Second law: (not A) or (not B) = not (A and B)
/// e.g. [PUSH a, NOT, PUSH b, NOT, OR] -> [PUSH a, PUSH b, AND, NOT]
/// De Morgan's First Law: `(not A) and (not B) = not (A or B)`.
/// e.g. `[PUSH a, NOT, PUSH b, NOT, AND] -> [PUSH a, PUSH b, OR, NOT]`.
/// De Morgan's Second Law: `(not A) or (not B) = not (A and B)`.
/// e.g. `[PUSH a, NOT, PUSH b, NOT, OR] -> [PUSH a, PUSH b, AND, NOT]`.
/// This also handles `DUP` operations.
fn de_morgan(code: &mut Vec<Item>) {
replace_windows(code, |window| {
Expand Down

0 comments on commit bcfe58c

Please sign in to comment.