Skip to main content
main-content

Über dieses Buch

This book constitutes the thoroughly refereed post-conference proceedings of the 24th International Symposium on Logic-Based Program Synthesis and Transformation, LOPSTR 2014, held in Canterbury, UK, in September 2014. The 18 revised full papers presented together with 2 invited talks were carefully reviewed and selected from 34 submissions. The aim of the LOPSTR series is to stimulate and promote international research and collaboration on logic-based program development. The papers are organized along a set of thematic tracks: program analysis and transformation, constraint handling rules, termination analysis, security, program testing and verification, program synthesis, program derivation, semantic issues in logic programming and program transformation and optimization.

Inhaltsverzeichnis

Frontmatter

Program Analysis and Transformation

Frontmatter

Analyzing Array Manipulating Programs by Program Transformation

Abstract
We explore a transformational approach to the problem of verifying simple array-manipulating programs. Traditionally, verification of such programs requires intricate analysis machinery to reason with universally quantified statements about symbolic array segments, such as “every data item stored in the segment A[i] to A[j] is equal to the corresponding item stored in the segment B[i] to B[j].” We define a simple abstract machine which allows for set-valued variables and we show how to translate programs with array operations to array-free code for this machine. For the purpose of program analysis, the translated program remains faithful to the semantics of array manipulation. Based on our implementation in LLVM, we evaluate the approach with respect to its ability to extract useful invariants and the cost in terms of code size.
J. Robert M. Cornish, Graeme Gange, Jorge A. Navas, Peter Schachte, Harald Søndergaard, Peter J. Stuckey

Analysing and Compiling Coroutines with Abstract Conjunctive Partial Deduction

Abstract
We provide an approach to formally analyze the computational behavior of coroutines in Logic Programs and to compile these computations into new programs, not requiring any support for coroutines. The problem was already studied near to 30 years ago, in an analysis and transformation technique called Compiling Control. However, this technique had a strong ad hoc flavor: the completeness of the analysis was not well understood and its symbolic evaluation was also very ad hoc. We show how Abstract Conjunctive Partial Deduction, introduced by Leuschel in 2004, provides an appropriate setting to redefine Compiling Control. Leuschel’s framework is more general than the original formulation, it is provably correct, and it can easily be applied for simple examples. We also show that the Abstract Conjunctive Partial Deduction framework needs some further extension to be able to deal with more complex examples.
Danny De Schreye, Vincent Nys, Colin Nicholson

Constraint Handling Rules

Frontmatter

Confluence Modulo Equivalence in Constraint Handling Rules

Abstract
Previous results on confluence for Constraint Handling Rules, CHR, are generalized to take into account user-defined state equivalence relations. This allows a much larger class of programs to enjoy the advantages of confluence, which include various optimization techniques and simplified correctness proofs. A new operational semantics for CHR is introduced that significantly reduces notational overhead and allows to consider confluence for programs with extra-logical and incomplete built-in predicates. Proofs of confluence are demonstrated for programs with redundant data representation, e.g., sets-as-lists, for dynamic programming algorithms with pruning as well as a Union-Find program, which are not covered by previous confluence notions for CHR.
Henning Christiansen, Maja H. Kirkeby

Exhaustive Execution of CHR Through Source-to-Source Transformation

Abstract
Constraint Handling Rules (CHR) is a committed-choice rule-based programming language. Rules rewrite a global multi-set of constraints to another. Overlapping sets of constraints within the rules and the order of constraints within rules and queries entail different derivation paths. In this work, a novel operational strategy is proposed which enables a high-level form of execution control that empowers a comprehensive and customizable execution strategy. It allows full space exploration for any CHR program, thus finding all possible results to a query which is interesting for many non-confluent programs. The proposed transformation is performed as a source-to-source transformation from any CHR program to one utilizing disjunction to force an exhaustive explorative execution strategy. The work is complemented by formal arguments to prove the correctness and completeness of the transformation.
Ahmed Elsawy, Amira Zaki, Slim Abdennadher

A Formal Semantics for the Cognitive Architecture ACT-R

Abstract
The cognitive architecture ACT-R is very popular in cognitive sciences. It merges well-investigated results of psychology to a unified model of cognition. This enables researchers to implement and execute domain-specific cognitive models. ACT-R is implemented as a production rule system. Although its underlying psychological theory has been investigated in many psychological experiments, ACT-R lacks a formal definition from a mathematical-computational point of view.
In this paper, we present a formalization of ACT-R’s fundamental concepts including an operational semantics of the core features of its production rule system. The semantics abstracts from technical artifacts of the implementation. Due to its abstract formulation, the semantics is eligible for analysis. To the best of our knowledge, this operational semantics is the first of its kind.
Furthermore, we show a formal translation of ACT-R production rules to Constraint Handling Rules (CHR) and prove soundness and completeness of the translation mechanism according to our operational semantics.
Daniel Gall, Thom Frühwirth

CHRAnimation: An Animation Tool for Constraint Handling Rules

Abstract
Visualization tools of different languages offer its users with a needed set of features allowing them to animate how programs of such languages work. Constraint Handling Rules (CHR) is currently used as a general purpose language. This results in having complex programs with CHR. Nevertheless, CHR is still lacking on visualization tools. With Constraint Handling Rules (CHR) being a high-level rule-based language, animating CHR programs through animation tools demonstrates the power of the language. Such tools are useful for beginners to the language as well as programmers of sophisticated algorithms. This paper continues upon the efforts made to have a generic visualization platform for CHR using source-to-source transformation. It also provides a new visualization feature that enables viewing all the possible solutions of a CHR program instead of the don’t care nondeterminism used in most CHR implementations.
Nada Sharaf, Slim Abdennadher, Thom Frühwirth

Termination Analysis

Frontmatter

Extending the 2D Dependency Pair Framework for Conditional Term Rewriting Systems

Abstract
Recently, a new dependency pair framework for proving operational termination of Conditional Term Rewriting Systems (CTRSs) has been introduced. We call it 2D Dependency Pair (DP) Framework for CTRSs because it makes explicit and exploits the bidimensional nature of the termination behavior of conditional rewriting, where rewriting steps \(s\rightarrow t\) and rewritings \(s\rightarrow ^*t\) (in zero or more steps) are defined for specific terms \(s\) and \(t\) by using an inference system where appropriate proof trees should be exhibited for such particular goals. In this setting, the horizontal component of the termination behavior concerns the existence of infinite sequences of rewriting steps, and the vertical component captures infinitely many climbs during the development of a proof tree for a single rewriting step. In this paper we extend the 2D DP Framework for CTRSs with several powerful processors for proving and disproving operational termination that specifically exploit the structure of conditional rules. We provide the first implementation of the 2D DP Framework as part of the termination tool mu-term. Our benchmarks suggest that, with our new processors, the 2D DP Framework is currently the most powerful technique for proving operational termination of CTRSs.
Salvador Lucas, José Meseguer, Raúl Gutiérrez

Security

Frontmatter

Partial Evaluation for Java Malware Detection

Abstract
The fact that Java is platform independent gives hackers the opportunity to write exploits that can target users on any platform, which has a JVM implementation. To circumvent detection by anti-virus (AV) software, obfuscation techniques are routinely applied to make an exploit more difficult to recognise. Popular obfuscation techniques for Java include string obfuscation and applying reflection to hide method calls; two techniques that can either be used together or independently. This paper shows how to apply partial evaluation to remove these obfuscations and thereby improve AV matching. The paper presents a partial evaluator for Jimple, which is a typed three-address code suitable for optimisation and program analysis, and also demonstrates how the residual Jimple code, when transformed back into Java, improves the detection rates of a number of commercial AV products.
Ranjeet Singh, Andy King

Access Control and Obligations in the Category-Based Metamodel: A Rewrite-Based Semantics

Abstract
We define an extension of the category-based access control (CBAC) metamodel to accommodate a general notion of obligation. Since most of the well-known access control models are instances of the CBAC metamodel, we obtain a framework for the study of the interaction between authorisation and obligation, such that properties may be proven of the metamodel that apply to all instances of it. In particular, the extended CBAC metamodel allows security administrators to check whether a policy combining authorisations and obligations is consistent.
Sandra Alves, Anatoli Degtyarev, Maribel Fernández

Program Testing and Verification

Frontmatter

Concolic Execution and Test Case Generation in Prolog

Abstract
Symbolic execution extends concrete execution by allowing symbolic input data and then exploring all feasible execution paths. It has been defined and used in the context of many different programming languages and paradigms. A symbolic execution engine is at the heart of many program analysis and transformation techniques, like partial evaluation, test case generation or model checking, to name a few. Despite its relevance, traditional symbolic execution also suffers from several drawbacks. For instance, the search space is usually huge (often infinite) even for the simplest programs. Also, symbolic execution generally computes an overapproximation of the concrete execution space, so that false positives may occur. In this paper, we propose the use of a variant of symbolic execution, called concolic execution, for test case generation in Prolog. Our technique aims at full statement coverage. We argue that this technique computes an underapproximation of the concrete execution space (thus avoiding false positives) and scales up better to medium and large Prolog applications.
Germán Vidal

Liveness Properties in CafeOBJ – A Case Study for Meta-Level Specifications

Abstract
We provide an innovative development of algebraic specifications and proof scores in CafeOBJ by extending a base specification to the meta-level that includes infinite transition sequences. The infinite transition sequences are modeled using behavioral specifications with hidden sort, and make it possible to prove safety and liveness properties in a uniform way.
As an example of the development, we present a specification of Dijkstra’s binary semaphore, a protocol to guarantee exclusive access to a resource. For this protocol we will give three different properties, one being the mutual exclusion (or safety) property, and two more regarding different forms of liveness, which we call progress property and entrance property. These three properties are verified in a computationally uniform way (by term rewriting) based on the new development.
Besides being a case study of modeling meta-properties in CafeOBJ, we provide an initial characterization of strength of various properties. Furthermore, this method can serve as a blue-print for other specifications, in particular those based on Abstract State System (ASSs).
Norbert Preining, Kazuhiro Ogata, Kokichi Futatsugi

Program Synthesis

Frontmatter

A Hybrid Method for the Verification and Synthesis of Parameterized Self-Stabilizing Protocols

Abstract
This paper presents a hybrid method for verification and synthesis of parameterized self-stabilizing protocols where algorithmic design and mechanical verification techniques/tools are used hand-in-hand. The core idea behind the proposed method includes the automated synthesis of self-stabilizing protocols in a limited scope (i.e., fixed number of processes) and the use of theorem proving methods for the generalization of the solutions produced by the synthesizer. Specifically, we use the Prototype Verification System (PVS) to mechanically verify an algorithm for the synthesis of weakly self-stabilizing protocols. Then, we reuse the proof of correctness of the synthesis algorithm to establish the correctness of the generalized versions of synthesized protocols for an arbitrary number of processes. We demonstrate the proposed approach in the context of an agreement and a coloring protocol on the ring topology.
Amer Tahat, Ali Ebnenasir

Drill and Join: A Method for Exact Inductive Program Synthesis

Abstract
In this paper we propose a novel semi-supervised active machine-learning method, based on two recursive higher-order functions that can inductively synthesize a functional computer program. Based on properties formulated using abstract algebra terms, the method uses two combined strategies: to reduce the dimensionality of the Boolean algebra where a target function lies and to combine known operations belonging to the algebra, using them as a basis to build a program that emulates the target function. The method queries for data on specific points of the problem input space and build a program that exactly fits the data. Applications of this method include all sorts of systems based on bitwise operations. Any functional computer program can be emulated using this approach. Combinatorial circuit design, model acquisition from sensor data, reverse engineering of existing computer programs are all fields where the proposed method can be useful.
Remis Balaniuk

Program Derivation

Frontmatter

Functional Kleene Closures

Abstract
We present a derivation of a purely functional version of Kleene’s closure algorithm for Kleene algebras (with tests) that contain a subset where the closure is already known. In particular, our result is applicable to the Kleene algebra of square matrices over a given Kleene algebra. Our approach is based solely on laws imposed on Kleene algebras and Boolean algebras. We implement our results in the functional programming language Haskell for the case of square matrices and discuss a general implementation. In this process we incorporate purely algebraic improvements like the use of commutativity to obtain a concise and optimised functional program. Our overall focus is on a functional program and the computational structures from which it is composed. Finally, we discuss our result particularly in light of alternative approaches.
Nikita Danilenko

Semantic Issues in Logic Programming

Frontmatter

On Completeness of Logic Programs

Abstract
Program correctness (in imperative and functional programming) splits in logic programming into correctness and completeness. Completeness means that a program produces all the answers required by its specification. Little work has been devoted to reasoning about completeness. This paper presents a few sufficient conditions for completeness of definite programs. We also study preserving completeness under some cases of pruning of SLD-trees (e.g. due to using the cut).
We treat logic programming as a declarative paradigm, abstracting from any operational semantics as far as possible. We argue that the proposed methods are simple enough to be applied, possibly at an informal level, in practical Prolog programming. We point out importance of approximate specifications.
Włodzimierz Drabent

Polynomial Approximation to Well-Founded Semantics for Logic Programs with Generalized Atoms: Case Studies

Abstract
The well-founded semantics of normal logic programs has two main utilities, one being an efficiently computable semantics with a unique intended model, and the other serving as polynomial time constraint propagation for the computation of answer sets of the same program. When logic programs are generalized to support constraints of various kinds, the semantics is no longer tractable, which makes the second utility doubtful. This paper considers the possibility of tractable but incomplete methods, which in general may miss information in the computed result, but never generates wrong conclusions. For this goal, we first formulate a well-founded semantics for logic programs with generalized atoms, which generalizes logic programs with arbitrary aggregates/constraints/dl-atoms. As a case study, we show that the method of removing non-monotone dl-atoms for the well-founded semantics by Eiter et al. actually falls into this category. We also present a case study for logic programs with standard aggregates.
Md. Solimul Chowdhury, Fangfang Liu, Wu Chen, Arash Karimi, Jia-Huai You

Program Transformation and Optimization

Frontmatter

Declarative Compilation for Constraint Logic Programming

Abstract
We present a new declarative compilation of logic programs with constraints into variable-free relational theories which are then executed by rewriting. This translation provides an algebraic formulation of the abstract syntax of logic programs. Management of logic variables, unification, and renaming apart is completely elided in favor of algebraic manipulation of variable-free relation expressions. We prove the translation is sound, and the rewriting system complete with respect to traditional SLD semantics.
Emilio Jesús Gallego Arias, James Lipton, Julio Mariño

Pre-indexed Terms for Prolog

Abstract
Indexing of terms and clauses is a well-known technique used in Prolog implementations (as well as automated theorem provers) to speed up search. In this paper we show how the same mechanism can be used to implement efficient reversible mappings between different term representations, which we call pre-indexings. Based on user-provided term descriptions, these mappings allow us to use more efficient data encodings internally, such as prefix trees. We show that for some classes of programs, we can drastically improve the efficiency by applying such mappings at selected program points.
J. F. Morales, M. Hermenegildo

Backmatter

Weitere Informationen

Premium Partner

    Bildnachweise