diff --git a/acvm-repo/acvm/src/pwg/arithmetic.rs b/acvm-repo/acvm/src/pwg/arithmetic.rs index 42594b8df34..8a220a8a826 100644 --- a/acvm-repo/acvm/src/pwg/arithmetic.rs +++ b/acvm-repo/acvm/src/pwg/arithmetic.rs @@ -26,14 +26,14 @@ impl ExpressionSolver { /// Derives the rest of the witness in the provided expression based on the known witness values /// 1. Fist we simplify the expression based on the known values and try to reduce the multiplication and linear terms /// 2. If we end up with only the constant term; - /// - if it is 0 then the opcode is solved, if not, - /// - the assert_zero opcode is not satisfied and we return an error + /// - if it is 0 then the opcode is solved, if not, + /// - the assert_zero opcode is not satisfied and we return an error /// 3. If we end up with only linear terms on the same witness 'w', - /// we can regroup them and solve 'a*w+c = 0': - /// If 'a' is zero in the above expression; - /// - if c is also 0 then the opcode is solved - /// - if not that means the assert_zero opcode is not satisfied and we return an error - /// If 'a' is not zero, we can solve it by setting the value of w: 'w = -c/a' + /// we can regroup them and solve 'a*w+c = 0': + /// - If 'a' is zero in the above expression; + /// - if c is also 0 then the opcode is solved + /// - if not that means the assert_zero opcode is not satisfied and we return an error + /// - If 'a' is not zero, we can solve it by setting the value of w: 'w = -c/a' pub(crate) fn solve( initial_witness: &mut WitnessMap, opcode: &Expression, diff --git a/acvm-repo/acvm/src/pwg/mod.rs b/acvm-repo/acvm/src/pwg/mod.rs index f9a4ea8d447..6e734263990 100644 --- a/acvm-repo/acvm/src/pwg/mod.rs +++ b/acvm-repo/acvm/src/pwg/mod.rs @@ -677,7 +677,7 @@ impl<'a, F: AcirField, B: BlackBoxFunctionSolver> ACVM<'a, F, B> { /// Defer execution of the ACIR call opcode to the caller, or finalize the execution. /// 1. It first handles the predicate and return zero values if the predicate is false. /// 2. If the results of the execution are not available, it issues a 'AcirCallWaitInfo' - /// to notify the caller that it (the caller) needs to execute the ACIR function. + /// to notify the caller that it (the caller) needs to execute the ACIR function. /// 3. If the results are available, it updates the witness map and indicates that the opcode is solved. pub fn solve_call_opcode( &mut self, diff --git a/acvm-repo/brillig_vm/src/lib.rs b/acvm-repo/brillig_vm/src/lib.rs index 29191a03a9a..b0684e91928 100644 --- a/acvm-repo/brillig_vm/src/lib.rs +++ b/acvm-repo/brillig_vm/src/lib.rs @@ -408,8 +408,8 @@ impl<'a, F: AcirField, B: BlackBoxFunctionSolver> VM<'a, F, B> { /// Execute a single opcode: /// 1. Retrieve the current opcode using the program counter /// 2. Execute the opcode. - /// For instance a binary 'result = lhs+rhs' opcode will read the VM memory at the lhs and rhs addresses, - /// compute the sum and write it to the 'result' memory address. + /// - For instance a binary 'result = lhs+rhs' opcode will read the VM memory at the lhs and rhs addresses, + /// compute the sum and write it to the 'result' memory address. /// 3. Update the program counter, usually by incrementing it. /// /// - Control flow opcodes jump around the bytecode by setting the program counter.