cclyzerpp icon indicating copy to clipboard operation
cclyzerpp copied to clipboard

Configurable entrypoints

Open 1396510211 opened this issue 2 years ago • 4 comments

In some scenarios, there is no main function. Is there any way to configure an entry point, such as test(), so that Call Graph can be generated from any root node?

1396510211 avatar Apr 27 '23 03:04 1396510211

There is some support for this in the Datalog code:

https://github.com/GaloisInc/cclyzerpp/blob/1a64af9ffe1cf6729614ead76157dfb46828cef9/datalog/options/user-options.dl#L79-L91

Ideally, it would be exposed through the command-line options of the FactGenerator, like how context-sensitivity is done now. For now, you could try modifying the default value there. Let me know how that works!

langston-barrett avatar Apr 27 '23 13:04 langston-barrett

This is not currently configurable, though it ought to be. As a quick hack, you could modify this line to use the name of your entry point.

The right solution is that the reachable_context relation should use the entry_point relation here and here and this relation should be populated via signatures or command line options.

thinkmoore avatar Apr 27 '23 13:04 thinkmoore

This is not currently configurable, though it ought to be. As a quick hack, you could modify this line to use the name of your entry point.

The right solution is that the reachable_context relation should use the entry_point relation here and here and this relation should be populated via signatures or command line options.

Ooops, it looks like this code might be redundant now with the code @langston-barrett shared. We should clean this up. It would be nice if the user option let you specify some specific functions...

thinkmoore avatar Apr 27 '23 13:04 thinkmoore

Thank you both for your replies. This is exactly what I'm trying to do, it does work, and I hope this can be a configuration item

1396510211 avatar Apr 27 '23 13:04 1396510211