首页> 外文会议>International conference on integrated formal methods >Model-Checking Software Library API Usage Rules
【24h】

Model-Checking Software Library API Usage Rules

机译:模型检查软件库API使用规则

获取原文

摘要

Modern software increasingly relies on using libraries which are accessed via Application Programming Interfaces (APIs). Libraries usually impose constraints on how API functions can be used (API usage rules) and programmers have to obey these API usage rules. However, API usage rules often are not well-documented or documented informally. In this work, we show how to use the SCTPL logic to precisely specify API usage rules in libraries, where SCTPL can be seen as an extension of the branching-time temporal logic CTL with variables, quantifiers, and predicates over the stack. This allows library providers to formally describe API usage rules without knowing how their libraries will be used by programmers. We also propose an approach to automatically check whether programs using libraries violate or not the corresponding API usage rules. Our approach consists in modeling programs as pushdown systems (PDSs), and checking API usage rules on programs using SCTPL model checking for PDSs. To make the model-checking procedure more efficient, we propose an abstraction that reduces drastically the size of the program model. Moreover, we characterize a sub-logic rSCTPL of SCTPL preserved by the abstraction. rSCTPL is sufficient to precisely specify all the API usage rules we met. We implemented our techniques in a tool and applied it to check several API usage rules. Our tool detected several previously unknown errors in well-known programs, such as Nssl, Verbs, Acacia+, Walksat and Getafix. Our experimental results are encouraging.
机译:现代软件越来越依赖使用通过应用程序编程接口(API)访问的库。库通常会限制如何使用API​​函数(API使用规则),并且程序员必须遵守这些API使用规则。但是,API使用规则通常没有得到充分的文档记录或非正式的文档记录。在这项工作中,我们将展示如何使用SCTPL逻辑在库中精确指定API使用规则,其中SCTPL可以看作是分支时间临时逻辑CTL的扩展,包括变量,量词和谓词。这使库提供者可以正式描述API使用规则,而无需知道程序员将如何使用他们的库。我们还提出一种方法来自动检查使用库的程序是否违反了相应的API使用规则。我们的方法包括将程序建模为下推系统(PDS),并使用SCTPL模型检查PDS检查程序上的API使用规则。为了使模型检查过程更有效,我们提出了一种抽象,可以大大减少程序模型的大小。此外,我们描述了通过抽象保留的SCTPL的子逻辑rSCTPL。 rSCTPL足以精确指定我们满足的所有API使用规则。我们在一个工具中实现了我们的技术,并将其应用于检查多个API使用规则。我们的工具在知名程序(例如Nssl,Verbs,Acacia +,Walksat和Getafix)中检测到多个以前未知的错误。我们的实验结果令人鼓舞。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号