Article ID Journal Published Year Pages File Type
6870945 Computer Languages, Systems & Structures 2018 19 Pages PDF
Abstract
Observing intermediate values helps to understand what is going on when your program runs. For lazy functional languages Gill presented an observation method that preserves the program's semantics. However, users need to define for each type how its values are observed: a laborious task and a mistake can yield misleading observations and even cause non-termination. Here we define how any value can be observed based on the structure of its type by applying generic programming. Furthermore, we present an extension to specify per observation point how much to observe of a value. We discuss how to obtain behaviour dependent on class membership with type-generic programming and with meta programming.
Related Topics
Physical Sciences and Engineering Computer Science Computational Theory and Mathematics
Authors
, ,