Unfolding for CHR programs

نویسندگان

  • Maurizio Gabbrielli
  • Maria Chiara Meo
  • Paolo Tacchella
  • Herbert Wiklicky
چکیده

Program transformation is an appealing technique which allows to improve run-time efficiency, space-consumption, and more generally to optimize a given program. Essentially, it consists of a sequence of syntactic program manipulations which preserves some kind of semantic equivalence. Unfolding is one of the basic operations which is used by most program transformation systems and which consists in the replacement of a procedure call by its definition. While there is a large body of literature on transformation and unfolding of sequential programs, very few papers have addressed this issue for concurrent languages. This paper defines an unfolding system for CHR programs. We define an unfolding rule, show its correctness and discuss some conditions which can be used to delete an unfolded rule while preserving the program meaning. We also prove that, under some suitable conditions, confluence and termination are preserved by the above transformation. To appear in Theory and Practice of Logic Programming (TPLP).

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Termination Analysis of CHR Revisited

Today, there exist two distinct direct approaches to prove termination of CHR programs. Both are applicable on separate classes of CHR programs. One approach, by T. Frühwirth, proves termination of CHR programs without propagation rules. A second approach deals with CHR programs with propagation rules. Due to its extended scope to such programs, it fails to prove termination for a class of CHR ...

متن کامل

On Confluence of Non-terminating CHR Programs

Confluence is an important property for any kind of rewrite system including CHR, which is a general-purpose declarative committedchoice language consisting of multi-headed guarded rules. CHR can yield a confluence problem, because of non-determinism in the choice of rules using the abstract semantics. Confluence in CHR is an ongoing research topic, because it provides numerous benefits for imp...

متن کامل

Implementing and Analysing Union-Find in CHR

CHR is a committed-choice rule-based language that was originally intended for writing constraint solvers. In this paper we show that it is also possible to write the classic union-find algorithm and variants in CHR. The programs neither compromise in declarativeness nor efficiency. Using CHR analysis techniques we study logical correctness, confluence and time complexity of our programs. We ob...

متن کامل

Analysis and Optimization of CHR Programs

Introduction. Constraint Handling Rules (CHR) [2] is a high-level, powerful, yet relatively simple “no box” CLP language, embedded in a host language, commonly Prolog. It is based on multi-headed committed-choice rules. Recent implementations of CHR consist of a compiler which translates a CHR program to host language code, and a run-time system implementing the constraint store. Originally, CH...

متن کامل

Suspension Optimization and In-place Updates for Optimizing CHR Compilation

We introduce two CHR compiler optimizations aimed at reducing garbage creation by reusing suspension terms, used to represent the CHR constraints. We have implemented both optimizations in the K.U.Leuven CHR system. The optimizations dramatically improve the memory footprint and speed of CHR programs: in several benchmarks we have measured speedups of 40% and more, and a reduction of memory usa...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • TPLP

دوره 15  شماره 

صفحات  -

تاریخ انتشار 2015