Checking temporal patterns of API usage without code execution

Autor: Michalis Famelis, Erick Raelijohn, Houari Sahraoui
Rok vydání: 2021
Předmět:
Zdroj: FormaliSE@ICSE
Popis: In theory, Application Programming Interfaces (APIs) allow developers to write client code that reuses library code without needing to know its internals. In practice, correctly using APIs requires respecting explicit and implicit constraints and usage temporal patterns. Ignoring such patterns could lead to errors and design flaws. These often cannot be detected prior to integration and system testing. We propose the Temporal Usage PAttern Checker (Tupac) for APIs, an interprocedural static analysis approach that can verify that client code conforms to temporal API usage patterns as it is being developed. We evaluated the effectiveness of our approach on 4 projects with 4 different APIs. Our evaluation shows that Tupac allows to accurately check the conformance of the client code to the patterns in under 1 second. This means that Tupac can realistically be deployed in an IDE without stalling the regular coding rhythm.
Databáze: OpenAIRE