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

LLVM type relations are both inputs and computed #86

Open
langston-barrett opened this issue Oct 13, 2022 · 0 comments
Open

LLVM type relations are both inputs and computed #86

langston-barrett opened this issue Oct 13, 2022 · 0 comments
Assignees

Comments

@langston-barrett
Copy link
Collaborator

langston-barrett commented Oct 13, 2022

The relations primitive_type, integer_type, fp_type, etc. are generated by the FactGenerator, but they also have rules in the Datalog code. This situation should at the very least be documented, but possibly changed so that only one of the two is responsible for adding facts to these relations.

Advantages to doing it in Datalog:

  • We know statically that there will be at least a few primitives types: i1, float, etc. Perhaps Souffle and Clang can take advantage of this when these are stated as facts and generate better code.

Advantages of doing it in the FactGenerator:

  • We account for only and exactly the types that actually appear in the module at hand
  • Less Datalog code leads to smaller synthesized C++ code, which means lower compile times

Also, I think this might be tied up with a difference in the output of cclyzer++ in the ntu-uaf.c test case, but I'm not sure exactly how.

@langston-barrett langston-barrett self-assigned this Oct 13, 2022
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

1 participant