151,808 research outputs found
What is decidable about string constraints with the ReplaceAll function
The theory of strings with concatenation has been widely argued as the basis of constraint solving for verifying string-manipulating programs. However, this theory is far from adequate for expressing many string constraints that are also needed in practice; for example, the use of regular constraints (pattern matching against a regular expression), and the string-replace function (replacing either the first occurrence or all occurrences of a ``pattern'' string constant/variable/regular expression by a ``replacement'' string constant/variable), among many others. Both regular constraints and the string-replace function are crucial for such applications as analysis of JavaScript (or more generally HTML5 applications) against cross-site scripting (XSS) vulnerabilities, which motivates us to consider a richer class of string constraints. The importance of the string-replace function (especially the replace-all facility) is increasingly recognised, which can be witnessed by the incorporation of the function in the input languages of several string constraint solvers.
Recently, it was shown that any theory of strings containing the string-replace function (even the most restricted version where pattern/replacement strings are both constant strings) becomes undecidable if we do not impose some kind of straight-line (aka acyclicity) restriction on the formulas. Despite this, the straight-line restriction is still practically sensible since this condition is typically met by string constraints that are generated by symbolic execution. In this paper, we provide the first systematic study of straight-line string constraints with the string-replace function and the regular constraints as the basic operations. We show that a large class of such constraints (i.e. when only a constant string or a regular expression is permitted in the pattern) is decidable. We note that the string-replace function, even under this restriction, is sufficiently powerful for expressing the concatenation operator and much more (e.g. extensions of regular expressions with string variables). This gives us the most expressive decidable logic containing concatenation, replace, and regular constraints under the same umbrella. Our decision procedure for the straight-line fragment follows an automata-theoretic approach, and is modular in the sense that the string-replace terms are removed one by one to generate more and more regular constraints, which can then be discharged by the state-of-the-art string constraint solvers. We also show that this fragment is, in a way, a maximal decidable subclass of the straight-line fragment with string-replace and regular constraints. To this end, we show undecidability results for the following two extensions: (1) variables are permitted in the pattern parameter of the replace function, (2) length constraints are permitted
Polar Varieties, Real Equation Solving and Data-Structures: The hypersurface case
In this paper we apply for the first time a new method for multivariate
equation solving which was developed in \cite{gh1}, \cite{gh2}, \cite{gh3} for
complex root determination to the {\em real} case. Our main result concerns the
problem of finding at least one representative point for each connected
component of a real compact and smooth hypersurface. The basic algorithm of
\cite{gh1}, \cite{gh2}, \cite{gh3} yields a new method for symbolically solving
zero-dimensional polynomial equation systems over the complex numbers. One
feature of central importance of this algorithm is the use of a
problem--adapted data type represented by the data structures arithmetic
network and straight-line program (arithmetic circuit). The algorithm finds the
complex solutions of any affine zero-dimensional equation system in non-uniform
sequential time that is {\em polynomial} in the length of the input (given in
straight--line program representation) and an adequately defined {\em geometric
degree of the equation system}. Replacing the notion of geometric degree of the
given polynomial equation system by a suitably defined {\em real (or complex)
degree} of certain polar varieties associated to the input equation of the real
hypersurface under consideration, we are able to find for each connected
component of the hypersurface a representative point (this point will be given
in a suitable encoding). The input equation is supposed to be given by a
straight-line program and the (sequential time) complexity of the algorithm is
polynomial in the input length and the degree of the polar varieties mentioned
above.Comment: Late
Polynomial Bounds for Invariant Functions Separating Orbits
Consider the representations of an algebraic group G. In general, polynomial
invariant functions may fail to separate orbits. The invariant subring may not
be finitely generated, or the number and complexity of the generators may grow
rapidly with the size of the representation. We instead study "constructible"
functions defined by straight line programs in the polynomial ring, with a new
"quasi-inverse" that computes the inverse of a function where defined. We write
straight line programs defining constructible functions that separate the
orbits of G. The number of these programs and their length have polynomial
bounds in the parameters of the representation.Comment: Clarified proofs, algorithms, and notation. Corrected typo
How to Integrate a Polynomial over a Simplex
This paper settles the computational complexity of the problem of integrating
a polynomial function f over a rational simplex. We prove that the problem is
NP-hard for arbitrary polynomials via a generalization of a theorem of Motzkin
and Straus. On the other hand, if the polynomial depends only on a fixed number
of variables, while its degree and the dimension of the simplex are allowed to
vary, we prove that integration can be done in polynomial time. As a
consequence, for polynomials of fixed total degree, there is a polynomial time
algorithm as well. We conclude the article with extensions to other polytopes,
discussion of other available methods and experimental results.Comment: Tables added with new experimental results. References adde
Straight-line instruction sequence completeness for total calculation on cancellation meadows
A combination of program algebra with the theory of meadows is designed
leading to a theory of computation in algebraic structures which use in
addition to a zero test and copying instructions the instruction set . It is proven that total functions on cancellation
meadows can be computed by straight-line programs using at most 5 auxiliary
variables. A similar result is obtained for signed meadows.Comment: 24 page
- …