尚未生成 AI 速览(可能缺少 API key 或等待下次运行补跑)。
REST APIs form the backbone of modern interconnected systems by providing a language-agnostic communication interface. REST API specifications should clearly describe all response types, but automatically generating specifications is difficult with existing tools. We present REST π , a type inference engine capable of automatically generating REST API specifications. The novel contribution of RES’ffi is our use of path-sensitive type inference, which encodes symbolic pathconstraints directly into a type system. This allows REST π to enumerate all response types by considering each distinct execution path through an endpoint implementation. We implement path-sensitive type inference for Ruby, a popular language used for REST API servers. We evaluate REST π by using it to infer types for 132 endpoints across 5 open-source REST API implementations without utilizing existing specifications or test suites. We find REST π performs type inference efficiently and produces types that are more precise and complete than those obtained via an HTTP proxy. Our results suggest that path-sensitivity is a key technique to enumerate distinct response types for REST endpoints.
DOI 原文 ·
@article{paperbot2880,
title = {RestPi: Path-Sensitive Type Inference for REST APIs},
author = {Mark W. Aldrich and Kyla H. Levin and Michael Coblenz and Jeffrey S. Foster},
journal = {Proceedings of the ACM on Programming Languages},
volume = {9},
number = {OOPSLA2},
year = {2025},
doi = {10.1145/3763055}
}