Repository logo
Log in(current)
Repository logoMIT Open ScholarshipDSpace@MIT
  1. Home
  2. Computer Science and Artificial Intelligence Lab (CSAIL)
  3. CSAIL Digital Archive
  4. CSAIL Technical Reports (July 1, 2003 - present)
  5. On Algorithms and Complexity for Sets with Cardinality Constraints

On Algorithms and Complexity for Sets with Cardinality Constraints

Thumbnail Image
Download
Name

MIT-CSAIL-TR-2005-050.ps

Size

31.63 MB

Format

PostScript

Checksum (MD5)

d57193fa6bc1de55645660951a591449

Thumbnail Image
Download
Name

MIT-CSAIL-TR-2005-050.pdf

Size

1.59 MB

Format

Adobe PDF

Checksum (MD5)

324a293dedbf1d507ae112f828e53d84

Author(s)
Marnette, Bruno
•
Kuncak, Viktor
•
Rinard, Martin
Date Issued
August 3, 2005
Series/Report no.
Massachusetts Institute of Technology Computer Science and Artificial Intelligence Laboratory
Abstract
Typestate systems ensure many desirable properties of imperativeprograms, including initialization of object fields and correct use ofstateful library interfaces. Abstract sets with cardinalityconstraints naturally generalize typestate properties: relationshipsbetween the typestates of objects can be expressed as subset anddisjointness relations on sets, and elements of sets can berepresented as sets of cardinality one. In addition, sets withcardinality constraints provide a natural language for specifyingoperations and invariants of data structures.Motivated by these program analysis applications, thispaper presents new algorithms and new complexity results forconstraints on sets and their cardinalities. We studyseveral classes of constraints and demonstrate a trade-offbetween their expressive power and their complexity.Our first result concerns a quantifier-free fragment of BooleanAlgebra with Presburger Arithmetic. We give a nondeterministicpolynomial-time algorithm for reducing the satisfiability of sets withsymbolic cardinalities to constraints on constant cardinalities, andgive a polynomial-space algorithm for the resulting problem. The bestpreviously existing algorithm runs in exponential space andnondeterministic exponential time.In a quest for more efficient fragments, we identify severalsubclasses of sets with cardinality constraints whose satisfiabilityis NP-hard. Finally, we identify a class of constraints that haspolynomial-time satisfiability and entailment problems and can serveas a foundation for efficient program analysis. We give a system ofrewriting rules for enforcing certain consistency properties of theseconstraints and show how to extract complete information fromconstraints in normal form. This result implies the soundness andcompleteness of our algorithms.
Persistent DSpace Link
http://hdl.handle.net/1721.1/30561
Repository logo
PrivacyPermissionsAccessibilityContact us
Repository logo
Notify us about copyright concerns.