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

Add CIL's ptranal for EvalFunvar queries #1063

Merged
merged 5 commits into from
Jan 23, 2024
Merged

Add CIL's ptranal for EvalFunvar queries #1063

merged 5 commits into from
Jan 23, 2024

Conversation

vesalvojdani
Copy link
Member

This will add the option to use Cil's Ptranal module to deal with dynamic function calls. This would avoid having to run the base analysis for fast analyses. The problem is that the Ptranal module's points to queries are really literal, so *fp (which is how function pointer calls are normalized by CIL) does not point to anything, you have to remove the dererefence and query fp, and then for cases like calling through pointers within structs, the analysis is flow-insensitive and that causes some issues.

  • This is currently implemented as a wrapper / unit analysis to answer the queries. Should decide if this rather belongs properly to the base functionality of the framework. Depends on how much code is still needed to handle things.
  • The expressions fed to Ptranal is still not very robust: there are dead code on some bench repo examples.
  • Filter compatible function calls since the pointer analysis is flow-insensitive.

@sim642 sim642 added feature performance Analysis time, memory usage labels May 26, 2023
@sim642 sim642 mentioned this pull request Oct 6, 2023
@michael-schwarz
Copy link
Member

What are our plans with this?

@sim642
Copy link
Member

sim642 commented Nov 24, 2023

Since Goblint CIL still has Ptranal and this Goblint "analysis" is very simple, there's no reason to not have this around for some modular/base-less analysis experiments.

@michael-schwarz
Copy link
Member

Since Goblint CIL still has Ptranal and this Goblint "analysis" is very simple, there's no reason to not have this around for some modular/base-less analysis experiments.

I think in this case it would be a good idea to address the open remarks and then merge this.

@michael-schwarz
Copy link
Member

I have now brought this up-to-date with master. Should we merge it as-is or address the comments above before?

@michael-schwarz
Copy link
Member

The failing indentation is already on master.

@sim642 sim642 marked this pull request as ready for review January 22, 2024 14:07
Copy link
Member

@sim642 sim642 left a comment

Choose a reason for hiding this comment

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

I made a few small changes to make this merge-ready.

@sim642 sim642 changed the title Rely on ptranal for EvalFunvar queries Add CIL's ptranal for EvalFunvar queries Jan 22, 2024
@sim642 sim642 added this to the v2.4.0 milestone Jan 22, 2024
@sim642 sim642 merged commit 591154f into master Jan 23, 2024
17 checks passed
@sim642 sim642 deleted the evalfun-ptranal branch January 23, 2024 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature performance Analysis time, memory usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants