You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My guess is that we could be able to do it by analyzing the AST built from Clang (cr #17) and emitting the dependencies of the module.
The idea is that we begin by including everything, then we parse the dependencies and we remove what is unnecessary, unluckily we have to include everything first, otherwise the libclang will refuse to compile.
Otherwise we can just do something static and analyze the keywords emitted by the Nodes, easier to implement.
An easier strategy could be keeping a set of requirements at Program level and pushing new Module objects to it from semantic rules at parse time. For instance, every time an assert_stmt is parsed, the semantic rule could contain:
As per the title. For instance, if
assert()
is never used in the program, then:should not be emitted.
The text was updated successfully, but these errors were encountered: