Transforming Coroutining Logic Programs into Equivalent CHR Programs
Vincent Nys (KU Leuven), Danny De Schreye (KU Leuven)

TL;DR
This paper presents a method to transform coroutining logic programs into equivalent CHR programs that maintain the same behavior under standard execution, improving readability and static analysis capabilities.
Contribution
It introduces a synthesis technique that converts coroutining logic programs into CHR programs with only simplification rules, enhancing portability and analysis.
Findings
Transformed CHR programs are more concise and readable.
The synthesis preserves the original program's computational behavior.
The approach facilitates static analysis of logic programs.
Abstract
We extend a technique called Compiling Control. The technique transforms coroutining logic programs into logic programs that, when executed under the standard left-to-right selection rule (and not using any delay features) have the same computational behavior as the coroutining program. In recent work, we revised Compiling Control and reformulated it as an instance of Abstract Conjunctive Partial Deduction. This work was mostly focused on the program analysis performed in Compiling Control. In the current paper, we focus on the synthesis of the transformed program. Instead of synthesizing a new logic program, we synthesize a CHR(Prolog) program which mimics the coroutining program. The synthesis to CHR yields programs containing only simplification rules, which are particularly amenable to certain static analysis techniques. The programs are also more concise and readable and can be…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
