Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Make k-limits into command line options #112

Open
hermanventer opened this issue Apr 3, 2019 · 2 comments
Open

Make k-limits into command line options #112

hermanventer opened this issue Apr 3, 2019 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@hermanventer
Copy link
Contributor

Issue

Currently a set of constants in checker/src/k_limits.rs provides limits on how much computation MIRAI will do in various places. With these limits in place, largish crates can be analyzed in a somewhat reasonable time frame. The limits do, however, impact on precision and may lead to false negatives. By making these into variables that can be set via command line options, it will become possible to schedule longer runs that may find more issues than more limited runs. The greater precision allowed by such runs can also be used to weed out false positives.

The recommended way to complete this task is to turn the constants in k_limits into the fields of a struct and to provide a constructor that sets the fields to default values, along with a command line processor that updates the values from options in the command line.

The limits struct should then be made part of the visitor state (checker/src/visitor.rs).

Ideally, there should also be a way to set these options to non default values for integration test cases. See also #52.

@ryaneghrari
Copy link

I began working on this issue, it appears that the k_limit constants also need to be integrated into callbacks (checker/src/callbacks.rs), is this correct?

@hermanventer
Copy link
Contributor Author

Yes, you need to construct the limits struct in main.rs and pass it to the constructor of MiraiCallbacks, who then needs to pass it to the visitor.

ryaneghrari pushed a commit to ryaneghrari/MIRAI that referenced this issue Apr 17, 2019
@ryaneghrari ryaneghrari mentioned this issue Apr 17, 2019
10 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants