TY - GEN
T1 - A productivity checker for logic programming
AU - Komendantskaya, Ekaterina
AU - Johann, Patricia
AU - Schmidt, Martin
PY - 2017/7/25
Y1 - 2017/7/25
N2 - Automated analysis of recursive derivations in logic programming is known to be a hard problem. Both termination and nontermination are undecidable problems in Turing-complete languages. However, some declarative languages offer a practical work-around for this problem, by making a clear distinction between whether a program is meant to be understood inductively or coinductively. For programs meant to be understood inductively, termination must be guaranteed, whereas for programs meant to be understood coinductively, productive non-termination (or “productivity”) must be ensured. In practice, such classification helps to better understand and implement some nonterminating computations. Logic programming was one of the first declarative languages to make this distinction: in the 1980’s, Lloyd and van Emden’s “computations at infinity” captured the big-step operational semantics of derivations that produce infinite terms as answers. In modern terms, computations at infinity describe “global productivity” of computations in logic programming. Most programming languages featuring coinduction also provide an observational, or small-step, notion of productivity as a computational counterpart to global productivity. This kind of productivity is ensured by checking that finite initial fragments of infinite computations can always be observed to produce finite portions of their infinite answer terms. In this paper we introduce a notion of observational productivity for logic programming as an algorithmic approximation of global productivity, give an effective procedure for semi-deciding observational productivity, and offer an implemented automated observational productivity checker for logic programs.
AB - Automated analysis of recursive derivations in logic programming is known to be a hard problem. Both termination and nontermination are undecidable problems in Turing-complete languages. However, some declarative languages offer a practical work-around for this problem, by making a clear distinction between whether a program is meant to be understood inductively or coinductively. For programs meant to be understood inductively, termination must be guaranteed, whereas for programs meant to be understood coinductively, productive non-termination (or “productivity”) must be ensured. In practice, such classification helps to better understand and implement some nonterminating computations. Logic programming was one of the first declarative languages to make this distinction: in the 1980’s, Lloyd and van Emden’s “computations at infinity” captured the big-step operational semantics of derivations that produce infinite terms as answers. In modern terms, computations at infinity describe “global productivity” of computations in logic programming. Most programming languages featuring coinduction also provide an observational, or small-step, notion of productivity as a computational counterpart to global productivity. This kind of productivity is ensured by checking that finite initial fragments of infinite computations can always be observed to produce finite portions of their infinite answer terms. In this paper we introduce a notion of observational productivity for logic programming as an algorithmic approximation of global productivity, give an effective procedure for semi-deciding observational productivity, and offer an implemented automated observational productivity checker for logic programs.
KW - Coinduction
KW - Corecursion
KW - Logic programming
KW - Productivity
KW - Termination
UR - http://www.scopus.com/inward/record.url?scp=85028363031&partnerID=8YFLogxK
U2 - 10.1007/978-3-319-63139-4_10
DO - 10.1007/978-3-319-63139-4_10
M3 - Conference contribution
AN - SCOPUS:85028363031
SN - 9783319631387
T3 - Lecture Notes in Computer Science
SP - 168
EP - 186
BT - Logic-Based Program Synthesis and Transformation. LOPSTR 2016
PB - Springer
T2 - 26th International Symposium on Logic-Based Program Synthesis and Transformation 2016
Y2 - 6 September 2016 through 8 September 2016
ER -