Description
Many software systems consist of several programs that exchange data
through files and sockets. Static data-flow analysis can trace how data
moves within a program, but following it across program boundaries
requires connections between the operations that send and receive it.
This thesis investigates how these connections can be recovered from
source code without executing the programs.
We extended the CPG library with a static analysis for C and C++ that
links data-flow graphs across programs. The analysis identifies
resource operations, traces handles back to their origins, and recovers
identifying values such as file paths, ports, and service names. These
values may be passed through functions or stored in fields, so they can
be traced beyond the operations that send or receive data. It also
retains their origins, distinguishing values derived from a shared
declaration from equal values defined independently.
Before connecting two operations, the prototype checks which programs
they belong to, the direction of data transfer, whether the resource
types are compatible, and whether the recovered identities agree. It
then adds edges that existing data-flow queries can follow across
program boundaries. These edges model possible data transfers; they do
not guarantee that the programs communicate at runtime.
We evaluated the prototype using client/server programs and controlled
examples. The results demonstrate how source-level resource information
can support static data-flow queries across programs. Coverage depends
on the information available in the source and the prototype's ability
to recover it.
|