Loading…

A lightweight push-pull mechanism for implicitly using signals in imperative programming

While signals can express time-varying values well, they heavily rely on the semantics of dataflow programming and functional programming. Several research have developed mechanisms for using signals with imperative object-oriented design and shown the benefits of its usage. However, they tend to in...

Full description

Saved in:
Bibliographic Details
Published in:Journal of computer languages (Online) 2019-10, Vol.54, p.100903, Article 100903
Main Author: Zhuang, YungYu
Format: Article
Language:English
Subjects:
Citations: Items that this one cites
Items that cite this one
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:While signals can express time-varying values well, they heavily rely on the semantics of dataflow programming and functional programming. Several research have developed mechanisms for using signals with imperative object-oriented design and shown the benefits of its usage. However, they tend to introduce a class for signals, which thus results in the necessity of lifting up/down between variables and signals. We have already proposed an automation mechanism to expand event systems to support signals without introducing a class, and in this paper, we further extend it to a lightweight push-pull model by considering the direction of trigger. The push-pull automation mechanism allows programmers to choose between push and pull to declaratively express their intention and to reduce the overheads due to unnecessary propagation of value changes. To show the feasibility of our proposal, we implemented PuPPy as an extension to Python for helping programmers in declaring fields as signals. With PuPPy, programmers can use signals in Python without any event system and do not have to worry about the type of events and handlers. We evaluated PuPPy by running preliminary microbenchmarks and comparing with signal class libraries, pure event systems, and the implementation in our previous research.
ISSN:2590-1184
2590-1184
DOI:10.1016/j.cola.2019.100903