33 research outputs found

    A New Lower Bound on the Maximum Number of Satisfied Clauses in Max-SAT and its Algorithmic Applications

    Full text link
    A pair of unit clauses is called conflicting if it is of the form (x)(x), (xˉ)(\bar{x}). A CNF formula is unit-conflict free (UCF) if it contains no pair of conflicting unit clauses. Lieberherr and Specker (J. ACM 28, 1981) showed that for each UCF CNF formula with mm clauses we can simultaneously satisfy at least \pp m clauses, where \pp =(\sqrt{5}-1)/2. We improve the Lieberherr-Specker bound by showing that for each UCF CNF formula FF with mm clauses we can find, in polynomial time, a subformula F′F' with m′m' clauses such that we can simultaneously satisfy at least \pp m+(1-\pp)m'+(2-3\pp)n"/2 clauses (in FF), where n"n" is the number of variables in FF which are not in F′F'. We consider two parameterized versions of MAX-SAT, where the parameter is the number of satisfied clauses above the bounds m/2m/2 and m(5−1)/2m(\sqrt{5}-1)/2. The former bound is tight for general formulas, and the later is tight for UCF formulas. Mahajan and Raman (J. Algorithms 31, 1999) showed that every instance of the first parameterized problem can be transformed, in polynomial time, into an equivalent one with at most 6k+36k+3 variables and 10k10k clauses. We improve this to 4k4k variables and (25+4)k(2\sqrt{5}+4)k clauses. Mahajan and Raman conjectured that the second parameterized problem is fixed-parameter tractable (FPT). We show that the problem is indeed FPT by describing a polynomial-time algorithm that transforms any problem instance into an equivalent one with at most (7+35)k(7+3\sqrt{5})k variables. Our results are obtained using our improvement of the Lieberherr-Specker bound above

    On automatic class insertion with overloading

    Get PDF
    Also published in Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (OOPSLA)International audienceSeveral algorithms [Cas92, MS89, Run92, DDHL94a, DDHL95, GMM95] have been proposed to automatically insert a class into an inheritance hierarchy. But actual hierarchies all include overriden and overloaded properties that these algorithms handle either very partially or not at all. Partially handled means handled provided there is a separate given function f able to compare overloaded properties [DDHL95, GMM95].In this paper, we describe a new version of our algorithm (named Ares) which handles automatic class insertion more efficiently using such a function f. Although impossible to fully define, this function can be computed for a number of well defined cases of overloading and overriding. We give a classification of such cases and describe the computation process for a well-defined set of nontrivial cases.The algorithm preserves these important properties:- preservation of the maximal factorization of properties- preservation of the underlying structure (Galois lattice) of the input hierarchy- conservation of relevant classes of the input hierarchy with their properties

    Demeter interfaces: Adaptive programming without surprises

    No full text
    Abstract. Adaptive Programming (AP) allows for the separate definition of data structures and traversals with attached computations, performed during the traversal, that operate on these data structures. The loosely defined contexts, structure and computation, are composed according to a given traversal specification. Traversal specifications are defined against a graph-based model of the underlying data structure with the ability to abstract over graph node names, edges and subpaths. As such certain modifications to the data structure can be made without altering the programs overall behavior. The program adapts, or more precisely the computation can withstand, modifications to its underlying data structure. Currently AP systems, i.e. DAJ, provide no mechanisms to warn or even guard against modifications that will affect the meaning of a program. Programmers have to depend on thorough (or even exhaustive) testing in order to detect such modifications. In this paper we present Demeter Interfaces, through which a more thorough design method of adaptive programs allows for more resilient software. Demeter Interfaces specify the expected structural properties of the underlying data structure that must hold in order for adaptive code to function correctly. Through an example we illustrate the usage and implementation of Demeter Interfaces. We further show how Demeter Interfaces result in better designs of adaptive programs, ease of adaptive code reuse and how they promote parallel development. We also discuss the applicability of Demeter Interfaces to XML technologies making our results relevant to large communities, such as the XQuery, XLinq and XSLT communities.

    Contributions to teaching object-oriented design and programming

    No full text

    Aspect-oriented programming with adaptive methods

    No full text

    Compositional and Relational Reasoning During Class Abstraction

    No full text

    Pointcuts as Functional Queries

    No full text
    Abstract. Most aspect-oriented languages provide only a fixed, built-in set of pointcut designators whose denotation is only described informally. As a consequence, these lan-guages do not provide operations to manipulate or reason about pointcuts beyond weav-ing. In this paper, we investigate the usage of the functional query language XQuery for the specification of pointcuts. Due to its abstraction and module facilities, XQuery enables powerful composition and reusability mechanisms for pointcuts.

    Walk Your Tree Any Way You Want

    Get PDF
    Software transformations in the Nuthatch style are described as walks over trees (possibly graphs) that proceed in programmerdefined steps which may observe join points of the walk, may observe and affect state associated with the walk, may rewrite the walked tree, may contribute to a built tree, and must walk somewhere, typically along one branch or another. The approach blends well with OO programming. We have implemented the approach in the Nuthatch/J library for Java
    corecore