首页> 外文期刊>Software and systems modeling >Model-checking software library API usage rules
【24h】

Model-checking software library API usage rules

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

获取原文
获取原文并翻译 | 示例
           

摘要

Modern software increasingly relies on using third-party 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 and SLTPL logics to precisely and formally specify API usage rules in libraries, where SCTPL/SLTPL can be seen as an extension of the branching/linear temporal logic CTL/LTL 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 propose an automated approach to check whether programs using libraries violate API usage rules or not. Our approach consists in modeling programs as pushdown systems (PDSs) and checking API usage rules by SCTPL/SLTPL model-checking for PDSs. To make the model-checking procedure more efficient and precise, we propose an abstraction that reduces drastically the size of the program model and integrate may-alias analysis into our approach to reduce false alarms. Moreover, we characterize two sublogics rSCTPL and rSLTPL of SCTPL and SLTPL that are preserved by the abstraction. We implement our techniques in a tool and apply the tool to check several open-source programs. Our tool finds several previously unknown bugs in several programs. The may-alias analysis avoids most of the false alarms that occur using SCTPL or SLTPL model-checking techniques without may-alias analysis.
机译:现代软件越来越依赖使用通过应用程序编程接口(API)访问的第三方库。库通常会对如何使用API​​函数(API使用规则)施加约束,而程序员必须遵守这些API使用规则。但是,API使用规则通常没有得到很好的记录或非正式的记录。在这项工作中,我们展示了如何使用SCTPL和SLTPL逻辑在库中精确和正式地指定API使用规则,其中SCTPL / SLTPL可被视为分支/线性时间逻辑CTL / LTL的扩展,具有变量,量词和谓词遍历整个堆栈。这使库提供者可以正式描述API使用规则,而无需知道程序员将如何使用他们的库。我们提出一种自动方法来检查使用库的程序是否违反API使用规则。我们的方法包括将程序建模为下推系统(PDS),并通过SCTPL / SLTPL模型检查PDS来检查API使用规则。为了使模型检查过程更高效,更精确,我们提出了一种抽象方法,该方法可以大幅减少程序模型的大小,并将may-alias分析集成到我们的方法中,以减少错误警报。此外,我们还描述了通过抽象保留的SCTPL和SLTPL的两个子逻辑rSCTPL和rSLTPL。我们在工具中实施我们的技术,并将该工具应用于检查多个开源程序。我们的工具可在多个程序中找到多个以前未知的错误。无别名分析避免了使用SCTPL或SLTPL模型检查技术而发生的大多数错误警报,而无需进行无别名分析。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号