From dc76687f4541a0cc786f706a5e5d576028fe2414 Mon Sep 17 00:00:00 2001 From: Matthias Goergens Date: Thu, 17 Oct 2024 12:16:14 +0800 Subject: [PATCH 1/4] Improve doc comments for `Expression` --- ceno_zkvm/src/expression.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ceno_zkvm/src/expression.rs b/ceno_zkvm/src/expression.rs index e119198ba..1f834a24a 100644 --- a/ceno_zkvm/src/expression.rs +++ b/ceno_zkvm/src/expression.rs @@ -31,14 +31,15 @@ pub enum Expression { Instance(Instance), /// Constant poly Constant(E::BaseField), - /// This is the sum of two expression + /// This is the sum of two expressions Sum(Box>, Box>), /// This is the product of two polynomials Product(Box>, Box>), - /// This is x, a, b expr to represent ax + b polynomial - /// and x is one of wit / fixed / instance, a and b are either constant or challenge + /// ScaledSum(x, a, b) to represent a * x + b + /// where x is one of wit / fixed / instance, a and b are either constants or challenges ScaledSum(Box>, Box>, Box>), - Challenge(ChallengeId, usize, E, E), // (challenge_id, power, scalar, offset) + /// Challenge(challenge_id, power, scalar, offset) + Challenge(ChallengeId, usize, E, E), } /// this is used as finite state machine state From 3bc207364b4bd11bdccf36e7d0043b63722e028f Mon Sep 17 00:00:00 2001 From: Matthias Goergens Date: Thu, 17 Oct 2024 12:20:37 +0800 Subject: [PATCH 2/4] Improve Fixed --- ceno_zkvm/src/expression.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceno_zkvm/src/expression.rs b/ceno_zkvm/src/expression.rs index 1f834a24a..a2c62de2c 100644 --- a/ceno_zkvm/src/expression.rs +++ b/ceno_zkvm/src/expression.rs @@ -25,7 +25,7 @@ use crate::{ pub enum Expression { /// WitIn(Id) WitIn(WitnessId), - /// Fixed + /// This multi-linear polynomial is known at the setup/keygen phase. Fixed(Fixed), /// Public Values Instance(Instance), From 41c2854645a824e6bb642fd5c0149c840558bbfa Mon Sep 17 00:00:00 2001 From: Matthias Goergens Date: Wed, 30 Oct 2024 16:02:55 +0800 Subject: [PATCH 3/4] Fix typo --- ceno_zkvm/src/expression.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceno_zkvm/src/expression.rs b/ceno_zkvm/src/expression.rs index 72ffce275..4ddbcbd9c 100644 --- a/ceno_zkvm/src/expression.rs +++ b/ceno_zkvm/src/expression.rs @@ -33,7 +33,7 @@ pub enum Expression { Constant(E::BaseField), /// This is the sum of two expressions Sum(Box>, Box>), - /// This is the product of two polynomials + /// This is the product of two expressions Product(Box>, Box>), /// ScaledSum(x, a, b) to represent a * x + b /// where x is one of wit / fixed / instance, a and b are either constants or challenges From 5212eb434a05ac90a1c8b91ad5aecf9101dc37ad Mon Sep 17 00:00:00 2001 From: Matthias Goergens Date: Tue, 5 Nov 2024 13:07:18 +0800 Subject: [PATCH 4/4] Suggestion from review --- ceno_zkvm/src/expression.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ceno_zkvm/src/expression.rs b/ceno_zkvm/src/expression.rs index 4c0e67873..01197f1b6 100644 --- a/ceno_zkvm/src/expression.rs +++ b/ceno_zkvm/src/expression.rs @@ -36,7 +36,7 @@ pub enum Expression { Sum(Box>, Box>), /// This is the product of two expressions Product(Box>, Box>), - /// ScaledSum(x, a, b) to represent a * x + b + /// ScaledSum(x, a, b) represents a * x + b /// where x is one of wit / fixed / instance, a and b are either constants or challenges ScaledSum(Box>, Box>, Box>), /// Challenge(challenge_id, power, scalar, offset)