Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Designing "plugin" interface #165

Open
odashi opened this issue Dec 11, 2022 · 3 comments
Open

Designing "plugin" interface #165

odashi opened this issue Dec 11, 2022 · 3 comments
Assignees
Labels
Milestone

Comments

@odashi
Copy link
Collaborator

odashi commented Dec 11, 2022

Description

We eventually need some mechanism to apply separate rules.

Ideas of the solution

Provide a way to implement "plugins", that provides

  • Additional AST transformer
  • Additional expression rules

Additional context

@odashi odashi added the feature label Dec 11, 2022
@odashi odashi added this to the v0.4 milestone Dec 11, 2022
@odashi odashi self-assigned this Dec 11, 2022
@odashi
Copy link
Collaborator Author

odashi commented Dec 11, 2022

I don't plan to fix the final interface of plugins until the v1 release and we can start with ad-hoc implementations.

For now, the most significant issue is how we define additional expression rules for Call. We can start with only defining the interface to provide additinal function rules.

@ZibingZhang
Copy link
Contributor

I believe array, ndarray, zeros, identity cases in ExprCodegen.visit_Call should belong in latexify.plugins.numpy.array

@odashi
Copy link
Collaborator Author

odashi commented Dec 12, 2022

Yes I think so. Maybe sum and prod are also the candidates (and we can include them as a default plugin)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants