We observe that the various formulations of the operational semantics of Constraint Handling Rules proposed over the years fall into a spectrum ranging from the analytical to the pragmatic. While existing analytical formulations facilitate program analysis and formal proofs of program properties, they cannot be implemented as is. We propose a novel operational semantics ω!, which has a strong analytical foundation, while featuring a terminating execution model. We prove its soundness and completeness with respect to existing analytical formulations and we provide an implementation in the form of a source-to-source transformation to CHR with rule priorities.
Linear logical algorithms @cite_21 (LLA) is a programming language based on bottom-up reasoning in linear logic, inspired by logical algorithms @cite_17 . The first implementation of logical algorithms was realized in CHR with rule priorities @cite_20 .
@cite_21 @cite_20 @cite_17
1502855507 2532954835 1492862327 2118962824
Bottom-up logic programming can be used to declaratively specify many algorithms in a succinct and natural way, and McAllester and Ganzinger have shown that it is possible to define a cost semantics that enables reasoning about the running time of algorithms written as inference rules. Previous work with the programming language Lollimon demonstrates the expressive power of logic programming with linear logic in describing algorithms that have imperative elements or that must repeatedly make mutually exclusive choices. In this paper, we identify a bottom-up logic programming language based on linear logic that is amenable to efficient execution and describe a novel cost semantics that can be used for complexity analysis of algorithms expressed in linear logic. The Lov ' a sz Local Lemma (LLL) is a cornerstone principle in the probabilistic method of combinatorics, and a seminal algorithm of Moser & Tardos (2010) provides an efficient randomized algorithm to implement it. This can be parallelized to give an algorithm that uses polynomially many processors and runs in @math time on an EREW PRAM, stemming from @math adaptive computations of a maximal independent set (MIS). (2014) developed faster local and parallel algorithms, potentially running in time @math , but these algorithms require more stringent conditions than the LLL. We give a new parallel algorithm that works under essentially the same conditions as the original algorithm of Moser & Tardos but uses only a single MIS computation, thus running in @math time on an EREW PRAM. This can be derandomized to give an NC algorithm running in time @math as well, speeding up a previous NC LLL algorithm of (2013). We also provide improved and tighter bounds on the run-times of the sequential and parallel resampling-based algorithms originally developed by Moser & Tardos. These apply to any problem instance in which the tighter Shearer LLL criterion is satisfied. For many given systems of logic, it is possible to identify, via systematic proof-theoretic analyses, a fragment which can be used as a basis for a logic programming language. Such analyses have been applied to linear logic, a logic of resource-consumption, leading to the definition of the linear logic programming language Lygon. It appears that (the basis of) Lygon can be considered to be the largest possible first-order linear logic programming language derivable in this way. In this paper, we describe the design and application of Lygon. We give examples which illustrate the advantages of resource-oriented logic programming languages. The problem of testing whether a finite execution trace of events generated by an executing program violates a linear temporal logic (LTL) formula occurs naturally in runtime analysis of software. Two efficient algorithms for this problem are presented in this paper, both for checking safety formulae of the form “always P”, where P is a past-time LTL formula. The first algorithm is implemented by rewriting, and the second synthesizes efficient code from formulae. Further optimizations of the second algorithm are suggested, reducing space and time consumption. Special operators suitable for writing succinct specifications are discussed and shown to be equivalent to the standard past-time operators. This work is part of NASA’s PathExplorer project, the objective of which is to construct a flexible framework for efficient monitoring and analysis of program executions.