Implementation plan:
- Add SharC's reference counting to Ivy (done!)
- Specify a fully-annotated version of SharC that allows for separate compilation
- Separate-out dynamic-vs-private inference into a separate tool, with results output to a separate file (done!)
- Integrate fully-annotated SharC into Ivy, allowing dynamic-vs-private annotations to come from the inference tool's output file
Dynamic-vs-private inference:
- single-pass over all source files
- tool1: collect and save necessary information from each C source file
- tool2: perform dynamic-vs-private inference based on collected information, output as (human-readable?) file for input into Ivy
The dynamic-vs-private inference works as follows:
- When a build begins a merger process is forked off to the side.
- The compiler runs as usual, but spits the Cil globals it sees at the merger process through a named pipe. The merger process arranges these globals into a single file.
- When the build is over, the merger process runs the dynamic-vs-private inference over all the globals it saw, complaining about library functions whose code it didn't see.