{"title":"LOUD: Synthesizing Strongest and Weakest Specifications","authors":"Kanghee Park, Xuanyu Peng, Loris D'Antoni","doi":"arxiv-2408.12539","DOIUrl":null,"url":null,"abstract":"Specifications allow us to formally state and understand what programs are\nintended to do. To help one extract useful properties from code, Park et al.\nrecently proposed a framework that given (i) a quantifier-free query posed\nabout a set of function definitions, and (ii) a domain-specific language L in\nwhich each extracted property is to be expressed (we call properties in the\nlanguage L-properties), synthesizes a set of L-properties such that each of the\nproperty is a strongest L-consequence for the query: the property is an\nover-approximation of query and there is no other L-property that\nover-approximates query and is strictly more precise than each property. The framework by Park et al. has two key limitations. First, it only supports\nquantifier-free query formulas and thus cannot synthesize specifications for\nqueries involving nondeterminism, concurrency, etc. Second, it can only compute\nL-consequences, i.e., over-approximations of the program behavior. This paper addresses these two limitations and presents a framework, Loud,\nfor synthesizing strongest L-consequences and weakest L-implicants (i.e.,\nunder-approximations of the query) for function definitions that can involve\nexistential quantifiers. We implemented a solver, Aspire, for problems expressed in Loud which can be\nused to describe and identify sources of bugs in both deterministic and\nnondeterministic programs, extract properties from concurrent programs, and\nsynthesize winning strategies in two-player games.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":"113 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-08-22","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2408.12539","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Specifications allow us to formally state and understand what programs are
intended to do. To help one extract useful properties from code, Park et al.
recently proposed a framework that given (i) a quantifier-free query posed
about a set of function definitions, and (ii) a domain-specific language L in
which each extracted property is to be expressed (we call properties in the
language L-properties), synthesizes a set of L-properties such that each of the
property is a strongest L-consequence for the query: the property is an
over-approximation of query and there is no other L-property that
over-approximates query and is strictly more precise than each property. The framework by Park et al. has two key limitations. First, it only supports
quantifier-free query formulas and thus cannot synthesize specifications for
queries involving nondeterminism, concurrency, etc. Second, it can only compute
L-consequences, i.e., over-approximations of the program behavior. This paper addresses these two limitations and presents a framework, Loud,
for synthesizing strongest L-consequences and weakest L-implicants (i.e.,
under-approximations of the query) for function definitions that can involve
existential quantifiers. We implemented a solver, Aspire, for problems expressed in Loud which can be
used to describe and identify sources of bugs in both deterministic and
nondeterministic programs, extract properties from concurrent programs, and
synthesize winning strategies in two-player games.
规范允许我们正式陈述和理解程序的意图。为了帮助人们从代码中提取有用的属性,Park 等人最近提出了一个框架。最近提出了一个框架,该框架给定(i)一个关于一组函数定义的无量纲查询,以及(ii)一种特定领域语言 L,在这种语言中,每个提取的属性都要用它来表达(我们称这种语言中的属性为 L-属性),然后合成一组 L-属性,使得每个属性都是查询的最强 L 后果:该属性是查询的过度逼近,并且没有其他 L-属性能够过度逼近查询,而且严格来说比每个属性都更精确。Park 等人的框架有两个主要局限。首先,它只支持无量子化查询公式,因此不能合成涉及非确定性、并发性等的查询规范。其次,它只能计算 L 后果,即程序行为的过度近似。本文针对这两个局限性,提出了一个框架 Loud,用于为可能涉及存在量词的函数定义合成最强 L 后果和最弱 L 因子(即查询的欠近似)。我们为用 Loud 表达的问题实现了一个求解器 Aspire,它可用于描述和识别确定性和非确定性程序中的错误源,从并发程序中提取属性,以及合成双人游戏中的获胜策略。