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

Abstract

One of the long-standing problems on logic programming is to express 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 G0 * G1 where G0, G1 are goals. These goals have the following intended semantics: sequentially choose the first true goal Gi and execute Gi where i (= 0\ or\ 1). These goals thus allow us to specify a task G0 with the failure-handling (exception handling) routine G1. This new goal can also be seen as a logic-equivalent of the if-then-else statement in imperative language. We also discuss sequential-conjunction clauses which are dual of sequential-disjunctive goals.

0

Turn this paper into a lesson

ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…