CUTECat:计算法的合流执行
CUTECat: Concolic Execution for Computational Law
AI总结:
CUTECat利用合流执行结合默认逻辑,针对计算法实现生成测试用例,覆盖所有分支,提升法律程序正确性,推动形式化方法在立法中的应用。
摘要:
许多法律计算,包括公民应缴税额、是否有资格获得社会福利,或国家公务员应得工资,都是由计算法规定的。然而,这些计算法的应用是由旨在忠实将法律转录为计算机代码的专家计算机程序执行的。这些程序中的错误可能导致严重的社会影响,例如向雇员支付不正确的金额,或未向有需要的家庭发放福利。为解决此问题,我们考虑合流单元测试,即具体执行与基于SMT的符号执行的结合,并提出CUTECat,一个针对计算法实现的合流执行工具。此类法律通常遵循一种模式,即基础案例随后被后续法律条款中的许多例外所细化,这种模式可以使用默认逻辑进行形式化建模。我们展示了如何在合流执行工具中处理默认逻辑,并在Catala(一种最近为实施计算法而定制的领域特定语言)的背景下实现我们的方法。我们在多个程序上评估CUTECat,包括法国住房福利的Catala实现和美国税法第132条。我们表明,CUTECat可以成功生成数十万个测试用例,覆盖这些法律主体的所有分支。通过几种启发式方法,我们提高了CUTECat的可扩展性和可用性,使测试用例对律师和程序员都易于理解。我们相信CUTECat因此为在立法过程中使用形式化方法铺平了道路。
英文摘要:
Many legal computations, including the amount of tax owed by a citizen, whether they are eligible to social benefits, or the wages due to civil state servants, are specified by computational laws. Their application, however, is performed by expert computer programs intended to faithfully transcribe the law into computer code. Bugs in these programs can lead to dramatic societal impact, e.g., paying employees incorrect amounts, or not awarding benefits to families in need. To address this issue, we consider concolic unit testing, a combination of concrete execution with SMT-based symbolic execution, and propose CUTECat, a concolic execution tool targeting implementations of computational laws. Such laws typically follow a pattern where a base case is later refined by many exceptions in following law articles, a pattern that can be formally modeled using default logic. We show how to handle default logic inside a concolic execution tool, and implement our approach in the context of Catala, a recent domain-specific language tailored to implement computational laws. We evaluate CUTECat on several programs, including the Catala implementation of the French housing benefits and Section 132 of the US tax code. We show that CUTECat can successfully generate hundreds of thousands of testcases covering all branches of these bodies of law. Through several heuristics, we improve CUTECat's scalability and usability, making the testcases understandable by lawyers and programmers alike. We believe CUTECat thus paves the way for the use of formal methods during legislative processes.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。