arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv cs/0508123cs.PLcs.LOcs.SE
收藏

基数约束集合的算法及其复杂性

On Algorithms and Complexity for Sets with Cardinality Constraints

Bruno Marnette, Viktor Kuncak, Martin Rinard

摘要:

类型状态系统确保命令式程序的许多所需属性,包括对象字段的初始化和有状态库接口的正确使用。具有基数约束的抽象集合自然地概括了类型状态属性:对象的类型状态之间的关系可以表示为集合上的子集和不相交关系,集合的元素可以表示为基数为1的集合。受这些应用的启发,本文提出了新的算法和新的复杂性结果的限制集和他们的基数。我们研究了几类约束,并展示了他们的表达能力和复杂性之间的权衡。我们的第一个结果涉及一个无量词片段的布尔代数与Presburger算术。我们给出了一个不确定的多项式时间算法减少满足集的符号基数上的限制常数基数,并给出了一个多项式空间算法所产生的问题。在寻求更有效的片段,我们确定了几个子集的基数约束,其满足性是NP难的。最后,我们确定了一类约束,具有多项式时间的可满足性和蕴涵问题,可以作为有效的程序分析的基础。

英文摘要:

Typestate systems ensure many desirable properties of imperative programs, including initialization of object fields and correct use of stateful library interfaces. Abstract sets with cardinality constraints naturally generalize typestate properties: relationships between the typestates of objects can be expressed as subset and disjointness relations on sets, and elements of sets can be represented as sets of cardinality one. Motivated by these applications, this paper presents new algorithms and new complexity results for constraints on sets and their cardinalities. We study several classes of constraints and demonstrate a trade-off between their expressive power and their complexity. Our first result concerns a quantifier-free fragment of Boolean Algebra with Presburger Arithmetic. We give a nondeterministic polynomial-time algorithm for reducing the satisfiability of sets with symbolic cardinalities to constraints on constant cardinalities, and give a polynomial-space algorithm for the resulting problem. In a quest for more efficient fragments, we identify several subclasses of sets with cardinality constraints whose satisfiability is NP-hard. Finally, we identify a class of constraints that has polynomial-time satisfiability and entailment problems and can serve as a foundation for efficient program analysis.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑