scholarly journals Implementing a stepper using delimited continuations

10.29007/l2wb ◽  
2018 ◽  
Author(s):  
Youyou Cong ◽  
Kenichi Asai

A stepper is a tool that displays all the steps of a program's execution. To implement a stepper, we need to reconstruct each intermediate program from the current redex and the evaluation context. We regard evaluation contexts as delimited continuations and capture them using the control operators shift and reset. This enables us to implement a stepper concisely by writing an evaluator that is close to the standard big-step interpreter. Our implementation is a non-trivial application of shift and reset.

2003 ◽  
Vol 10 (25) ◽  
Author(s):  
Dariusz Biernacki ◽  
Olivier Danvy

Starting from a continuation-based interpreter for a simple logic programming language, propositional Prolog with cut, we derive the corresponding logic engine in the form of an abstract machine. The derivation originates in previous work (our article at PPDP 2003) where it was applied to the lambda-calculus. The key transformation here is Reynolds's defunctionalization that transforms a tail-recursive, continuation-passing interpreter into a transition system, i.e., an abstract machine. Similar denotational and operational semantics were studied by de Bruin and de Vink in previous work (their article at TAPSOFT 1989), and we compare their study with our derivation. Additionally, we present a direct-style interpreter of propositional Prolog expressed with control operators for delimited continuations.<br /><br />Superseded by BRICS-RS-04-5.


2007 ◽  
Vol 17 (6) ◽  
pp. 687-730 ◽  
Author(s):  
R. KENT Dyvbig ◽  
SIMON PEYTON JONES ◽  
AMR SABRY

AbstractDelimited continuations are more expressive than traditional abortive continuations and they apparently require a framework beyond traditional continuation-passing style (CPS). We show that this is not the case: standard CPS is sufficient to explain the common control operators for delimited continuations. We demonstrate this fact and present an implementation as a Scheme library. We then investigate a typed account of delimited continuations that makes explicit where control effects can occur. This results in a monadic framework for typed and encapsulated delimited continuations, which we design and implement as a Haskell library.


2004 ◽  
Vol 11 (29) ◽  
Author(s):  
Malgorzata Biernacka ◽  
Dariusz Biernacki ◽  
Olivier Danvy

We present an abstract machine and a reduction semantics for the lambda-calculus extended with control operators that give access to delimited continuations in the CPS hierarchy. The abstract machine is derived from an evaluator in continuation-passing style (CPS); the reduction semantics (i.e., a small-step operational semantics with an explicit representation of evaluation contexts) is constructed from the abstract machine; and the control operators are the shift and reset family. At level n of the CPS hierarchy, programs can use the control operators shift_i and reset_i for 1 <= i <= n, the evaluator has n + 1 layers of continuations, the abstract machine has n + 1 layers of control stacks, and the reduction semantics has n + 1 layers of evaluation contexts.<br /> <br /> We also present new applications of delimited continuations in the CPS hierarchy: finding list prefixes and normalization by evaluation for a hierarchical language of units and products.


2004 ◽  
Vol 11 (5) ◽  
Author(s):  
Dariusz Biernacki ◽  
Olivier Danvy

Starting from a continuation-based interpreter for a simple logic programming language, propositional Prolog with cut, we derive the corresponding logic engine in the form of an abstract machine. The derivation originates in previous work (our article at PPDP 2003) where it was applied to the lambda-calculus. The key transformation here is Reynolds's defunctionalization that transforms a tail-recursive, continuation-passing interpreter into a transition system, i.e., an abstract machine. Similar denotational and operational semantics were studied by de Bruin and de Vink (their article at TAPSOFT 1989), and we compare their study with our derivation. Additionally, we present a direct-style interpreter of propositional Prolog expressed with control operators for delimited continuations.


2003 ◽  
Vol 10 (41) ◽  
Author(s):  
Malgorzata Biernacka ◽  
Dariusz Biernacki ◽  
Olivier Danvy

We derive an abstract machine that corresponds to a definitional interpreter for the control operators shift and reset. Based on this abstract machine, we construct a syntactic theory of delimited continuations.<br /> <br />Both the derivation and the construction scale to the family of control operators shift_n and reset_n. The definitional interpreter for shift_n and reset_n has n + 1 layers of continuations, the corresponding abstract machine has n + 1 layers of control stacks, and the corresponding syntactic theory has n + 1 layers of evaluation contexts.<br /><br />See also BRICS-RS-05-24.


2005 ◽  
Vol 12 (24) ◽  
Author(s):  
Malgorzata Biernacka ◽  
Dariusz Biernacki ◽  
Olivier Danvy

We present an abstract machine and a reduction semantics for the lambda-calculus extended with control operators that give access to delimited continuations in the CPS hierarchy. The abstract machine is derived from an evaluator in continuation-passing style (CPS); the reduction semantics (i.e., a small-step operational semantics with an explicit representation of evaluation contexts) is constructed from the abstract machine; and the control operators are the shift and reset family. At level n of the CPS hierarchy, programs can use the control operators shift_i and reset_i for 1 <= i <= n, the evaluator has n + 1 layers of continuations, the abstract machine has n + 1 layers of control stacks, and the reduction semantics has n + 1 layers of evaluation contexts.<br /> <br /> We also present new applications of delimited continuations in the CPS hierarchy: finding list prefixes and normalization by evaluation for a hierarchical language of units and products.


2005 ◽  
Vol 12 (11) ◽  
Author(s):  
Malgorzata Biernacka ◽  
Dariusz Biernacki ◽  
Olivier Danvy

We present an abstract machine and a reduction semantics for the lambda-calculus extended with control operators that give access to delimited continuations in the CPS hierarchy. The abstract machine is derived from an evaluator in continuation-passing style (CPS); the reduction semantics (i.e., a small-step operational semantics with an explicit representation of evaluation contexts) is constructed from the abstract machine; and the control operators are the shift and reset family. At level n of the CPS hierarchy, programs can use the control operators shift_i and reset_i for 1 <= i <= n , the evaluator has n + 1 layers of continuations, the abstract machine has n + 1 layers of control stacks, and the reduction semantics has n + 1 layers of evaluation contexts.<br /> <br /> We also present new applications of delimited continuations in the CPS hierarchy: finding list prefixes and normalization by evaluation for a hierarchical language of units and products.


Author(s):  
K. I. Zasjad’ko ◽  
A. V. Bogomolov ◽  
S. K. Soldatov ◽  
A. P. Vonarshenko ◽  
A. F. Borejchuk ◽  
...  

Introduction.The study is aimed to determine possible use of vocal signal analysis for diagnosis of functional states in air traffic control operators, with justifying selection of informative parameters of intonation structure of speech.Materials and methods.Experiments on semi-natural simulator complex with participation of 16 air traffic male dispatchers modelled occupational activity of air traffic dispatcher with moderate (6 aircrafts controlled) and intense (7–12 aircrafts controlled) work load. Duration of simulated working shiftwas 6 hours. Registration covered characteristics of main vocal tone of the examinees, with calculation of 8 jitter-factors that portrayed mirco-changes of main vocal tone curve and 2 tremor indices disclosing periodic waves of 4–16 Hz in main vocal tone curve. Functional state of the dispatchers was assessed via cardiac rhythm parameters. Reliability and work capacity of the dispatchers corresponded to correct radio traffi c, changes in threshold of reception and transfer of aircrafts in number of allowable dangerous approach of aircrafts, time to detection of input aircraft’s deviation from preset flight line.Results and discussion.According to analysis of the experiments results, some parameters of the main vocal tone carried significant changes both in first (simulated moderate work load) and second (simulated intense work load) experimental series.The data obtained prove lower level of psychic regulation of the dispatchers’ occupational activity during 3rd to 5thhours of “working shift” in the first experimental series and from 2nd to 4thhours of the second experimental series, due to decreased psychophysiologic resources and developing fatigue.Conclusion.Studies of changes in indicators of intonation structure of speech in occupational activity of air traffic dispatchers demonstrated that using such indicators provides adequate diagnosis of the functional state. The most informative indicators are average value, histogram asymmetry and excessive frequency of main vocal tone, duration of pauses between words of the dispatchers’ commands and fi ft h jitter-factor.


Sign in / Sign up

Export Citation Format

Share Document