English

Priority, Cut, If-Then-Else and Exception Handling in Logic Programming

Logic in Computer Science 2019-10-24 v4

Abstract

One of the long-standing problems on logic programming is to express {\it priority}-related operations -- default reasoning, if-then-else, cut, exception handling, etc -- in a high-level way. We argue that this problem can be solved by adopting computability logic and prioritized sequential-disjunctive goal formulas of the form G0G1G_0 \bigtriangledown^* G_1 where G0,G1G_0, G_1 are goals. These goals have the following intended semantics: sequentially choosechoose the first true goal GiG_i and execute GiG_i where i(=0 or 1)i (= 0\ {\rm or}\ 1). These goals thus allow us to specify a task G0G_0 with the failure-handling (exception handling) routine G1G_1. This new goal can also be seen as a logic-equivalent of the ifif-thenthen-elseelse statement in imperative language. We also discuss sequential-conjunction clauses which are {\it dual} of sequential-disjunctive goals.

Keywords

Cite

@article{arxiv.1607.00633,
  title  = {Priority, Cut, If-Then-Else and Exception Handling in Logic Programming},
  author = {Keehang Kwon},
  journal= {arXiv preprint arXiv:1607.00633},
  year   = {2019}
}

Comments

3 pages. a unified solution to priority, default reasoning, mutual exclusion, If-then-else, cut, exception handling is discussed. We modify the previous version to use prioritized version instead of original sequential disjunctive operators

R2 v1 2026-06-22T14:41:52.610Z