453 research outputs found
On the Floyd–Warshall algorithm for logic programs
AbstractWe explore the possibility of evaluating single-rule Datalog programs efficiently and with logarithmic work space by a natural extension of the Floyd–Warshall algorithm for transitive closure. We characterize exactly the single rule chain programs that can be so evaluated – they are rather modest generalizations of the transitive closure. The proof relies on an interesting language-theoretic concept, total ambiguity. Extensions to more general classes of programs, and more general algorithms, are discussed
An Improved Tight Closure Algorithm for Integer Octagonal Constraints
Integer octagonal constraints (a.k.a. ``Unit Two Variables Per Inequality''
or ``UTVPI integer constraints'') constitute an interesting class of
constraints for the representation and solution of integer problems in the
fields of constraint programming and formal analysis and verification of
software and hardware systems, since they couple algorithms having polynomial
complexity with a relatively good expressive power. The main algorithms
required for the manipulation of such constraints are the satisfiability check
and the computation of the inferential closure of a set of constraints. The
latter is called `tight' closure to mark the difference with the (incomplete)
closure algorithm that does not exploit the integrality of the variables. In
this paper we present and fully justify an O(n^3) algorithm to compute the
tight closure of a set of UTVPI integer constraints.Comment: 15 pages, 2 figure
Energy-Efficient Algorithms
We initiate the systematic study of the energy complexity of algorithms (in
addition to time and space complexity) based on Landauer's Principle in
physics, which gives a lower bound on the amount of energy a system must
dissipate if it destroys information. We propose energy-aware variations of
three standard models of computation: circuit RAM, word RAM, and
transdichotomous RAM. On top of these models, we build familiar high-level
primitives such as control logic, memory allocation, and garbage collection
with zero energy complexity and only constant-factor overheads in space and
time complexity, enabling simple expression of energy-efficient algorithms. We
analyze several classic algorithms in our models and develop low-energy
variations: comparison sort, insertion sort, counting sort, breadth-first
search, Bellman-Ford, Floyd-Warshall, matrix all-pairs shortest paths, AVL
trees, binary heaps, and dynamic arrays. We explore the time/space/energy
trade-off and develop several general techniques for analyzing algorithms and
reducing their energy complexity. These results lay a theoretical foundation
for a new field of semi-reversible computing and provide a new framework for
the investigation of algorithms.Comment: 40 pages, 8 pdf figures, full version of work published in ITCS 201
Speeding up the constraint-based method in difference logic
"The final publication is available at http://link.springer.com/chapter/10.1007%2F978-3-319-40970-2_18"Over the years the constraint-based method has been successfully applied to a wide range of problems in program analysis, from invariant generation to termination and non-termination proving. Quite often the semantics of the program under study as well as the properties to be generated belong to difference logic, i.e., the fragment of linear arithmetic where atoms are inequalities of the form u v = k. However, so far constraint-based techniques have not exploited this fact: in general, Farkas’ Lemma is used to produce the constraints over template unknowns, which leads to non-linear SMT problems. Based on classical results of graph theory, in this paper we propose new encodings for generating these constraints when program semantics and templates belong to difference logic. Thanks to this approach, instead of a heavyweight non-linear arithmetic solver, a much cheaper SMT solver for difference logic or linear integer arithmetic can be employed for solving the resulting constraints. We present encouraging experimental results that show the high impact of the proposed techniques on the performance of the VeryMax verification systemPeer ReviewedPostprint (author's final draft
Recommended from our members
Theory Learning with Symmetry Breaking
This paper investigates the use of a Prolog coded SMT solver in tackling a well known constraints problem, namely packing a given set of consecutive squares into a given rectangle, and details the developments in the solver that this motivates. The packing problem has a natural model in the theory of quantifier-free integer difference logic, a theory supported by many SMT solvers. The solver used in this work exploits a data structure consisting of an incremental Floyd-Warshall matrix paired with a watch matrix that monitors the entailment status of integer difference constraints. It is shown how this structure can be used to build unsatisfiable theory cores on the fly, which in turn allows theory learning to be incorporated into the solver. Further, it is shown that a problem-specific and non-standard approach to learning can be taken where symmetry breaking is incorporated into the learning stage, magnifying the effect of learning. It is argued that the declarative framework allows the solver to be used in this white box manner and is a strength of the solver. The approach is experimentally evaluated
- …