Abstract
A continuation represents the dynamic effect of the remainder of a program. We present a mechanism to save a Prolog program continuation as a label and the continuation can be invoked at a later point. The Vienna Definition Method (VDM) is used as the underlying mechanism to construct the operational semantics of Prolog language with labels. Besides the database predicates and the I/O predicates, our semantic also deals with continuation predicates which allow labels to be created and jumps to be made in the users program. Since most of the Prolog programs can be run as interactive processes, we also consider the user's input as it changes the variable binding. Based on the semantic functions, a metalevel interpreter is constructed showing the result of our work.
Original language | English |
---|---|
Pages (from-to) | 15-36 |
Number of pages | 22 |
Journal | Information Sciences |
Volume | 107 |
Issue number | 1-4 |
DOIs | |
State | Published - Jun 1998 |
Keywords
- Continuations
- Logic programming
- Prolog
- VDM