scholarly journals Promises are made to be broken: migrating R to strict semantics

2021 ◽  
Vol 5 (OOPSLA) ◽  
pp. 1-20
Author(s):  
Aviral Goel ◽  
Jan Ječmen ◽  
Sebastián Krynski ◽  
Olivier Flückiger ◽  
Jan Vitek

Function calls in the R language do not evaluate their arguments, these are passed to the callee as suspended computations and evaluated if needed. After 25 years of experience with the language, there are very few cases where programmers leverage delayed evaluation intentionally and laziness comes at a price in performance and complexity. This paper explores how to evolve the semantics of a lazy language towards strictness-by-default and laziness-on-demand. To provide a migration path, it is necessary to provide tooling for developers to migrate libraries without introducing errors. This paper reports on a dynamic analysis that infers strictness signatures for functions to capture both intentional and accidental laziness. Over 99% of the inferred signatures were correct when tested against clients of the libraries.

2008 ◽  
Vol 8 (5-6) ◽  
pp. 581-609
Author(s):  
LUDOVIC LANGEVINE ◽  
MIREILLE DUCASSÉ

AbstractTracers provide users with useful information about program executions. In this article, we propose a “tracer driver”. From a single tracer, it provides a powerful front-end enabling multiple dynamic analysis tools to be easily implemented, while limiting the overhead of the trace generation. The relevant execution events are specified by flexible event patterns and a large variety of trace data can be given either systematically or “on demand”. The proposed tracer driver has been designed in the context of constraint logic programming (CLP); experiments have been made within GNU-Prolog. Execution views provided by existing tools have been easily emulated with a negligible overhead. Experimental measures show that the flexibility and power of the described architecture lead to good performance. The tracer driver overhead is inversely proportional to the average time between two traced events. Whereas the principles of the tracer driver are independent of the traced programming language, it is best suited for high-level languages, such as CLP, where each traced execution event encompasses numerous low-level execution steps. Furthermore, CLP is especially hard to debug. The current environments do not provide all the useful dynamic analysis tools. They can significantly benefit from our tracer driver which enables dynamic analyses to be integrated at a very low cost.


2008 ◽  
Author(s):  
Jamie Chamberlin
Keyword(s):  

Author(s):  
Georgios Zenonos ◽  
Kenan Alkhalili ◽  
Maria Koutourousiou ◽  
Nathan Zwagerman ◽  
David Panczykowski ◽  
...  

Sign in / Sign up

Export Citation Format

Share Document