Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPCBridge

An implementation of RPCBridge from "Static Analysis of Remote Procedure Call in Java Programs" (Cui, Qu, Tang, Zhang — ICSE 2025). It recovers the client→server links that ordinary static analyzers lose at the RPC boundary: it identifies RPC registration and connection operations via an adapter, performs points-to reasoning to match each client proxy to its server handler, and constructs the missing RPC call-graph edges (with argument/return value flow).

This artifact covers all three things asked of a reproduction:

  1. RPCBridge itself — the analysis, as a Tai-e plugin (src/com/rpcbridge/). See doc/DESIGN.md for how the paper's model (Fig. 2–4) maps onto the implementation and the optimizations over the paper's staged Datalog approach.
  2. Adapter auto-generation agent — given a framework repo + version, it discovers the register/connect APIs and emits an adapter JSON (agent/adapter_agent.py), plus hand-verified adapters for Hadoop, gRPC, Dubbo, RMI, Thrift (adapters/).
  3. Experiment — a 5-framework executable micro-benchmark and a runner that reproduces the paper's RQ1/RQ2 tables (benchmark/, experiment/, results in doc/RESULTS.md).

Layout

frameworks/tai-e/src/com/rpcbridge/         RPCBridge plugin
  adapter/                 adapter data model + JSON loader (Role, OpSpec, Adapter, AdapterSet)
  pta/RPCBridgePlugin.java the 3 inference rules, on-the-fly in Tai-e's solver
  report/RPCReport.java    RQ1/RQ2 stats + HTML report + @RPCActual/@RPCVirtual persistence
adapters/                  hand-verified adapters: hadoop, grpc, dubbo, rmi, thrift (+ agent/generated/)
agent/adapter_agent.py     adapter auto-generation agent
benchmark/                 executable micro-benchmarks (loopback transport) for each framework
experiment/run_experiment.py  end-to-end runner -> output/results_table.md + results.csv
lib/tai-e-all-0.5.4.jar    Tai-e (downloaded; also bundles Soot+Spark+FlowDroid)
frameworks/                RPCBridge on other analysis frameworks (portability)
  soot/                    real Soot+Spark backend (run) — cross-validates Tai-e
  doop/rpcbridge.dl        the 3 rules as Datalog (paper's native form)
  sootup/ , wala/          API-mapping designs
build.ps1 / run.ps1 / build_bench.ps1   Windows helper scripts

Cross-framework

RPCBridge's adapter model + 3 rules are framework-portable. Besides the Tai-e backend, a Soot+Spark backend is implemented and run (frameworks/soot/), the rules are given as Datalog for Doop (frameworks/doop/), and SootUp/WALA are API-mapped. The two run backends (Tai-e, Soot) agree on 4/6 systems exactly; the differences are explained in doc/COMPARISON.md.

Requirements

  • JDK 17 (Tai-e requires 17; the analyzed benchmarks are compiled with the same JDK).
  • Python 3 (for the adapter agent and the experiment runner).
  • No Maven/Gradle needed — the plugin is compiled with plain javac against the Tai-e fat jar.

Quick start

# 1. compile the plugin
./build.ps1

# 2. compile + analyze one benchmark
./build_bench.ps1 -fw hadoop
./run.ps1 -tag hadoop -cp benchmark\hadoop\out -main mb.hadoop.Main -adapters adapters\hadoop.json
#   -> output\hadoop.rpc.json  (RQ1 counts)
#      output\hadoop.edges.txt (@RPCVirtual client call  ==RPC==>  @RPCActual server handler)
#      output\hadoop.rpc.html  (visual report)

# 3. full experiment (all frameworks, RQ1/RQ2 tables)
python experiment\run_experiment.py     # -> output\results_table.md, output\results.csv

How it runs inside Tai-e

RPCBridge is a standard Tai-e Plugin, loaded via the pta analysis option:

-a pta=cs:ci;plugins:[com.rpcbridge.pta.RPCBridgePlugin]

Configuration is passed via JVM system properties: -Drpcbridge.adapters=<files/dirs>, -Drpcbridge.out=<dir>, -Drpcbridge.tag=<name>, -Drpcbridge.debug=true. (JDK-17 needs the --add-opens flags in run.ps1, already set.)

Scope

Models Unary RPC (single request → single response), exactly as the paper. Streaming RPC is out of scope (paper §V). The approach is orthogonal to analysis sensitivity; it runs under cs:ci (Spark-like, matching the paper) but works unchanged under context-sensitive settings.

Citation

@inproceedings{DBLP:conf/icse/CuiQTZ25,
  author       = {Baoquan Cui and
                  Rong Qu and
                  Zhen Tang and
                  Jian Zhang},
  title        = {Static Analysis of Remote Procedure Call in Java Programs},
  booktitle    = {47th {IEEE/ACM} International Conference on Software Engineering,
                  {ICSE} 2025, Ottawa, ON, Canada, April 26 - May 6, 2025},
  pages        = {1101--1113},
  publisher    = {{IEEE}},
  year         = {2025},
  url          = {https://doi.org/10.1109/ICSE55347.2025.00151},
  doi          = {10.1109/ICSE55347.2025.00151},
  timestamp    = {Tue, 14 Oct 2025 19:36:50 +0200},
  biburl       = {https://dblp.org/rec/conf/icse/CuiQTZ25.bib},
  bibsource    = {dblp computer science bibliography, https://dblp.org}
}

About

RPCBridge

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages