45,763 research outputs found
Relating Weight Constraint and Aggregate Programs: Semantics and Representation
Weight constraint and aggregate programs are among the most widely used logic
programs with constraints. In this paper, we relate the semantics of these two
classes of programs, namely the stable model semantics for weight constraint
programs and the answer set semantics based on conditional satisfaction for
aggregate programs. Both classes of programs are instances of logic programs
with constraints, and in particular, the answer set semantics for aggregate
programs can be applied to weight constraint programs. We show that the two
semantics are closely related. First, we show that for a broad class of weight
constraint programs, called strongly satisfiable programs, the two semantics
coincide. When they disagree, a stable model admitted by the stable model
semantics may be circularly justified. We show that the gap between the two
semantics can be closed by transforming a weight constraint program to a
strongly satisfiable one, so that no circular models may be generated under the
current implementation of the stable model semantics. We further demonstrate
the close relationship between the two semantics by formulating a
transformation from weight constraint programs to logic programs with nested
expressions which preserves the answer set semantics. Our study on the
semantics leads to an investigation of a methodological issue, namely the
possibility of compact representation of aggregate programs by weight
constraint programs. We show that almost all standard aggregates can be encoded
by weight constraints compactly. This makes it possible to compute the answer
sets of aggregate programs using the ASP solvers for weight constraint
programs. This approach is compared experimentally with the ones where
aggregates are handled more explicitly, which show that the weight constraint
encoding of aggregates enables a competitive approach to answer set computation
for aggregate programs.Comment: To appear in Theory and Practice of Logic Programming (TPLP), 2011.
30 page
Decidable Models of Recursive Asynchronous Concurrency
Asynchronously communicating pushdown systems (ACPS) that satisfy the
empty-stack constraint (a pushdown process may receive only when its stack is
empty) are a popular decidable model for recursive programs with asynchronous
atomic procedure calls. We study a relaxation of the empty-stack constraint for
ACPS that permits concurrency and communication actions at any stack height,
called the shaped stack constraint, thus enabling a larger class of concurrent
programs to be modelled. We establish a close connection between ACPS with
shaped stacks and a novel extension of Petri nets: Nets with Nested Coloured
Tokens (NNCTs). Tokens in NNCTs are of two types: simple and complex. Complex
tokens carry an arbitrary number of coloured tokens. The rules of NNCT can
synchronise complex and simple tokens, inject coloured tokens into a complex
token, and eject all tokens of a specified set of colours to predefined places.
We show that the coverability problem for NNCTs is Tower-complete. To our
knowledge, NNCT is the first extension of Petri nets, in the class of nets with
an infinite set of token types, that has primitive recursive coverability. This
result implies Tower-completeness of coverability for ACPS with shaped stacks
Verifying Monadic Second-Order Properties of Graph Programs
The core challenge in a Hoare- or Dijkstra-style proof system for graph
programs is in defining a weakest liberal precondition construction with
respect to a rule and a postcondition. Previous work addressing this has
focused on assertion languages for first-order properties, which are unable to
express important global properties of graphs such as acyclicity,
connectedness, or existence of paths. In this paper, we extend the nested graph
conditions of Habel, Pennemann, and Rensink to make them equivalently
expressive to monadic second-order logic on graphs. We present a weakest
liberal precondition construction for these assertions, and demonstrate its use
in verifying non-local correctness specifications of graph programs in the
sense of Habel et al.Comment: Extended version of a paper to appear at ICGT 201
Polynomial-Time Fence Insertion for Structured Programs
To enhance performance, common processors feature relaxed memory models that reorder instructions. However, the correctness of concurrent programs is often dependent on the preservation of the program order of certain instructions. Thus, the instruction set architectures offer memory fences. Using fences is a subtle task with performance and correctness implications: using too few can compromise correctness and using too many can hinder performance. Thus, fence insertion algorithms that given the required program orders can automatically find the optimum fencing can enhance the ease of programming, reliability, and performance of concurrent programs. In this paper, we consider the class of programs with structured branch and loop statements and present a greedy and polynomial-time optimum fence insertion algorithm. The algorithm incrementally reduces fence insertion for a control-flow graph to fence insertion for a set of paths. In addition, we show that the minimum fence insertion problem with multiple types of fence instructions is NP-hard even for straight-line programs
Finding polynomial loop invariants for probabilistic programs
Quantitative loop invariants are an essential element in the verification of
probabilistic programs. Recently, multivariate Lagrange interpolation has been
applied to synthesizing polynomial invariants. In this paper, we propose an
alternative approach. First, we fix a polynomial template as a candidate of a
loop invariant. Using Stengle's Positivstellensatz and a transformation to a
sum-of-squares problem, we find sufficient conditions on the coefficients.
Then, we solve a semidefinite programming feasibility problem to synthesize the
loop invariants. If the semidefinite program is unfeasible, we backtrack after
increasing the degree of the template. Our approach is semi-complete in the
sense that it will always lead us to a feasible solution if one exists and
numerical errors are small. Experimental results show the efficiency of our
approach.Comment: accompanies an ATVA 2017 submissio
On Multiphase-Linear Ranking Functions
Multiphase ranking functions () were proposed as a means
to prove the termination of a loop in which the computation progresses through
a number of "phases", and the progress of each phase is described by a
different linear ranking function. Our work provides new insights regarding
such functions for loops described by a conjunction of linear constraints
(single-path loops). We provide a complete polynomial-time solution to the
problem of existence and of synthesis of of bounded depth
(number of phases), when variables range over rational or real numbers; a
complete solution for the (harder) case that variables are integer, with a
matching lower-bound proof, showing that the problem is coNP-complete; and a
new theorem which bounds the number of iterations for loops with
. Surprisingly, the bound is linear, even when the
variables involved change in non-linear way. We also consider a type of
lexicographic ranking functions, , more expressive than types
of lexicographic functions for which complete solutions have been given so far.
We prove that for the above type of loops, lexicographic functions can be
reduced to , and thus the questions of complexity of
detection and synthesis, and of resulting iteration bounds, are also answered
for this class.Comment: typos correcte
Quasiconvex Programming
We define quasiconvex programming, a form of generalized linear programming
in which one seeks the point minimizing the pointwise maximum of a collection
of quasiconvex functions. We survey algorithms for solving quasiconvex programs
either numerically or via generalizations of the dual simplex method from
linear programming, and describe varied applications of this geometric
optimization technique in meshing, scientific computation, information
visualization, automated algorithm analysis, and robust statistics.Comment: 33 pages, 14 figure
- …