33 research outputs found
A New Lower Bound on the Maximum Number of Satisfied Clauses in Max-SAT and its Algorithmic Applications
A pair of unit clauses is called conflicting if it is of the form ,
. 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 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 with
clauses we can find, in polynomial time, a subformula with clauses
such that we can simultaneously satisfy at least \pp m+(1-\pp)m'+(2-3\pp)n"/2
clauses (in ), where is the number of variables in which are not in
.
We consider two parameterized versions of MAX-SAT, where the parameter is the
number of satisfied clauses above the bounds and . 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 variables and clauses. We improve
this to variables and 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 variables. Our results are obtained using our improvement
of the Lieberherr-Specker bound above
On automatic class insertion with overloading
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
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.
Pointcuts as Functional Queries
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
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