An Operational Semantics Approach to Disciplined Exceptions in Logic Programming

Authors

  • T. Shih
  • F. Lin

Abstract

This paper presents a disciplined exception mechanism based on continuations. Continuations provide mechanisms for labels and jumps. We present a mechanism to preserve a Prolog program continuation to be invoked at a later point. This mechanism is used in the design of exception signals, handlers, and  exception continuations for logic programs. An exception continuation specifies how a computation should continue (e.g. resume, undo, alternate, or terminate) after an exception is raised. Short examples illustrate the difficulty of recovering from error conditions in logic programs using traditional control constructs, and show how easily they can be handled using our approach. The Z notation is used to specify the continuation semantics of logic programs with exceptions. Based on the semantic functions, an interpreter written  in Prolog is derived to justify our approach.

Downloads

Download data is not yet available.

Published

2012-01-26

How to Cite

Shih, T., & Lin, F. (2012). An Operational Semantics Approach to Disciplined Exceptions in Logic Programming. COMPUTING AND INFORMATICS, 14(1), 1–33. Retrieved from https://www.cai.sk/ojs/index.php/cai/article/view/219