proof-systems icon indicating copy to clipboard operation
proof-systems copied to clipboard

Abstract out the `LookupContext` logic in prover as a couple of generic functions that can be reused

Open jspada opened this issue 3 years ago • 2 comments

Sometimes, e.g., in unit tests we need to set up the lookup context / environment. There's quite a bit of code required to do this. We should abstract out the LookupContext logic in prover as a couple of generic functions that can be reused elsewhere. Anais suggested this interface could use a builder pattern.

jspada avatar Jun 03 '22 11:06 jspada

Note that I don't think the LookupContext struct is necessarily the best approach we can take. It's cleaner than the previous approach for sure, but I think it might make sense to find a different even cleaner approach.

Instead of having a single large function for the prover (create), we could have a number of functions being called from within create. With this approach it might be natural to get rid of that LookupContext. I'm not sure though :o)

mimoo avatar Jun 03 '22 11:06 mimoo

I think you're probably right, but in any case separating this logic into a function is a good first step that we can break down into more functions later.

jspada avatar Jun 23 '22 10:06 jspada