-
Notifications
You must be signed in to change notification settings - Fork 31
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
Framework for pluggable analysis? #169
Comments
Hi, sorry for my late response. Could you provide a concrete example of what kind of reports you'd like to have (or even ignore) by implementing a plugin ? It would be easy to make it possible for users to inject their own analysis code into JET's abstract interpretation routine (just like JET itself does for Julia's abstract interpretation routine) by subtyping |
This is an alternative for #204, and will supersedes it. This PR setups `report_pass::ReportPass` interface, which controls overall `JETInterpreter`'s error report analysis and can be extensively configured by trait overloads; now users can implement their own report pass and set up new report logic, ignore existing reports, etc. By default, JET offers `BasicPass<:ReportPass` and `SoundPass<:ReportPass`, but the latter is still in very WIP. Also, the configuration support via TOML file would be really hard given this PR. I think we will move to Julia file based configuration support. This interface also suggests the possibility of pluggable analysis requested #169, by allowing users to subtype `JETInterpreter`. The changes are kinda really big, and so maybe I will focus on coding in this PR and leave documentation and examples to another PR.
This is an alternative for #204, and will supersedes it. This PR setups `report_pass::ReportPass` interface, which controls overall `JETInterpreter`'s error report analysis and can be extensively configured by trait overloads; now users can implement their own report pass and set up new report logic, ignore existing reports, etc. By default, JET offers `BasicPass<:ReportPass` and `SoundPass<:ReportPass`, but the latter is still in very WIP. Also, the configuration support via TOML file would be really hard given this PR. I think we will move to Julia file based configuration support. This interface also suggests the possibility of pluggable analysis requested #169, by allowing users to subtype `JETInterpreter`. The changes are kinda really big, and so maybe I will focus on coding in this PR and leave documentation and examples to another PR.
I think the idea is that other libraries can use JET as a framework to provide their own static analyses without having to write the abstract interpretation and error reporting logic themselves. For example, MLStyle.jl could extend JET to statically detect type errors in pattern matching just like an ML language. It's kind of like using JET to write a domain-specific linter. |
yeah, I've actually implemented something locally that makes JET pluggable. Let's see how it fits. Let me ping you once I've pushed changes. |
Related: JuliaLang/julia#40992 |
This is an alternative for #204, and will supersedes it. This PR setups `report_pass::ReportPass` interface, which controls overall `JETInterpreter`'s error report analysis and can be extensively configured by trait overloads; now users can implement their own report pass and set up new report logic, ignore existing reports, etc. By default, JET offers `BasicPass<:ReportPass` and `SoundPass<:ReportPass`, but the latter is still in very WIP. Also, the configuration support via TOML file would be really hard given this PR. I think we will move to Julia file based configuration support. This interface also suggests the possibility of pluggable analysis requested #169, by allowing users to subtype `JETInterpreter`. The changes are kinda really big, and so maybe I will focus on coding in this PR and leave documentation and examples to another PR.
I meant checks like https://fbinfer.com/docs/next/checker-cost/ and https://fbinfer.com/docs/next/checker-liveness/ |
This is an alternative for #204, and will supersedes it. This PR setups `report_pass::ReportPass` interface, which controls overall `JETInterpreter`'s error report analysis and can be extensively configured by trait overloads; now users can implement their own report pass and set up new report logic, ignore existing reports, etc. By default, JET offers `BasicPass<:ReportPass` and `SoundPass<:ReportPass`, but the latter is still in very WIP. Also, the configuration support via TOML file would be really hard given this PR. I think we will move to Julia file based configuration support. This interface also suggests the possibility of pluggable analysis requested #169, by allowing users to subtype `JETInterpreter`. The changes are kinda really big, and so maybe I will focus on coding in this PR and leave documentation and examples to another PR.
Implemented by #208. You can take a look at an example plug-in analyzer and the API documentation. The framework API is very experimental, and its documentation is very WIP, |
Very cool, @aviatesk. In the part
that section might benefit from some higher-level APIs. I don't know too much about the |
I wonder if it's possible to provide type checking as just one of many analyses that could be used with the JET framework. For example, performance analysis, numerical stability, taint analysis. It could be a pluggable framework.
The text was updated successfully, but these errors were encountered: