{"title":"Compiling real time functional reactive programming","authors":"Dana N. Xu, Siau-Cheng Khoo","doi":"10.1145/568173.568183","DOIUrl":null,"url":null,"abstract":"Most of the past languages for reactive systems are based on synchronous dataflow. Recently, a new reactive language, called Real-Time Functional Reactive Programming (RT-FRP) [18] , has been proposed based on the functional paradigm. The unique feature of this language is the high-level abstraction provided in the form of behaviors for conti-nuous-time signals, and events for discrete-time signals. RT-FRP also features some performance guarantees in the form of bounded runtime and space usage for each reactive computation step.In this paper, we propose a new compilation scheme for RT-FRP. Our compilation scheme is based on two key stages. In the first stage, we translate RT-FRP program to an intermediate functional code. This code is deliberately kept at high level for two reasons. First, it is easier for us to validate its correctness. Second, it allows us to apply high-level source-to-source transformation to achieve further optimization. The second stage attempts to compile the intermediate code to a corresponding automata code. Our main novelty is the use of two high-level transformation techniques for this compilation. The first technique, partial evaluation, attempts to propagate constant values (wherever feasible) in order to perform more aggressive specialization. The second technique, tupling, combines mutually dependent automata together into a composite automaton whenever possible. Both techniques are needed for generating fast target code for RT-FRP.","PeriodicalId":187828,"journal":{"name":"ASIA-PEPM '02","volume":"9 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2002-09-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"7","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ASIA-PEPM '02","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/568173.568183","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 7
Abstract
Most of the past languages for reactive systems are based on synchronous dataflow. Recently, a new reactive language, called Real-Time Functional Reactive Programming (RT-FRP) [18] , has been proposed based on the functional paradigm. The unique feature of this language is the high-level abstraction provided in the form of behaviors for conti-nuous-time signals, and events for discrete-time signals. RT-FRP also features some performance guarantees in the form of bounded runtime and space usage for each reactive computation step.In this paper, we propose a new compilation scheme for RT-FRP. Our compilation scheme is based on two key stages. In the first stage, we translate RT-FRP program to an intermediate functional code. This code is deliberately kept at high level for two reasons. First, it is easier for us to validate its correctness. Second, it allows us to apply high-level source-to-source transformation to achieve further optimization. The second stage attempts to compile the intermediate code to a corresponding automata code. Our main novelty is the use of two high-level transformation techniques for this compilation. The first technique, partial evaluation, attempts to propagate constant values (wherever feasible) in order to perform more aggressive specialization. The second technique, tupling, combines mutually dependent automata together into a composite automaton whenever possible. Both techniques are needed for generating fast target code for RT-FRP.