Skip to content

Conversation

@Autoparallel
Copy link
Contributor

I made a small little DSL that will allow you to write Rust to generate the arithmetic expressions. My goal is to get this to yield circuits that can then be used along with our polynomial modules and etc.

@Autoparallel
Copy link
Contributor Author

@lonerapier Do you want to chat about this at all? It's brainworming me at the moment. Maybe we could cook together?

Copy link
Contributor

@lonerapier lonerapier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

absolutely love this direction. API based DSL will save a lot of errors that arise due to language parsing, and it's so easy to extend than separate language as in #60.

@Autoparallel would love to help in any way possible.


pub mod dsl;

pub struct Wire {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how will wires have input and output? maybe a better name could be Constraint?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah, that is better. I think I was trippin'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the input and output here were going to be the gates or inputs this wire was connected to.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, got it. I got confused then. I remember previously it was names as Connection Maybe that made more sense? IDK, i'll let you cook.

}

pub struct Circuit {
pub gates: DiGraph<Gate, Wire>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe instead of picturing a circuit as graph, a simple tuple of (Gate, Constraint) that extends to rows and column in execution trace?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I do want to trash the graph, this is a relic of my first pass. I will remove it for now.

One thing I also want to do is impl a nice Display for our circuits, so that's on my mind as far as this goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants