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

Intellij support for checker framework inference #93

Open
shashiranjan opened this issue Jan 10, 2019 · 1 comment
Open

Intellij support for checker framework inference #93

shashiranjan opened this issue Jan 10, 2019 · 1 comment

Comments

@shashiranjan
Copy link

shashiranjan commented Jan 10, 2019

Also where can I specify project name or project source path for which I want to run inference script ? I ran the below command and it failed.

 ./scripts/inference --logLevel FINE --mode TYPECHECK --checker ostrusted.OsTrustedChecker --solver checkers.inference.solver.PropagationSolver -afud [source_file_path_for_which_I_want_to_run_this_script]

--- Typechecking ---

javac: invalid flag: source_file_path_for_which_I_want_to_run_this_script
Usage: javac <options> <source files>
use -help for a list of possible options

--- Typechecking failed ---

I couldn't find any step by step instructions with example for running this tool on command line or on intellij. Suppose I have a java project on intellij how do I run this tool to auto generate type inference code from command line or from intellij?

Thanks,
Shashi

@jyluo
Copy link
Contributor

jyluo commented Jan 23, 2019

Hi @shashiranjan ,

As the readme says, the correct command structure is

./scripts/inference --log-level FINE --mode MODE --checker CHECKER --solver SOLVER -afud /path/to/Annotation/File/Utilities/output/directory [List of files]

The path given after -afud is where CFI will output annotated source code. The list of files following the AFUD path is the list of java source files for which CFI will perform type check or inference on depending on the mode chosen.

If you only intend to run in typecheck mode, then -afud and the path can be omitted.

There isn't an Intellij plugin for CFI, but you might be able to configure Intellij to run scripts/inference as a shell script with the command line options and supply the list of Java files.

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

No branches or pull requests

2 participants