7 research outputs found
An Experiment Combining Specialization with Abstract Interpretation
It was previously shown that control-flow refinement can be achieved by a
program specializer incorporating property-based abstraction, to improve
termination and complexity analysis tools. We now show that this purpose-built
specializer can be reconstructed in a more modular way, and that the previous
results can be achieved using an off-the-shelf partial evaluation tool, applied
to an abstract interpreter. The key feature of the abstract interpreter is the
abstract domain, which is the product of the property-based abstract domain
with the concrete domain. This language-independent framework provides a
practical approach to implementing a variety of powerful specializers, and
contributes to a stream of research on using interpreters and specialization to
achieve program transformations.Comment: In Proceedings VPT/HCVS 2020, arXiv:2008.0248
Specializing Interpreters using Offline Partial Deduction
We present the latest version of the Logen partial evaluation system for logic programs. In particular we present new binding-types, and show how they can be used to effectively specialise a wide variety of interpreters.We show how to achieve Jones-optimality in a systematic way for several interpreters. Finally, we present and specialise a non-trivial interpreter for a small functional programming language. Experimental results are also presented, highlighting that the Logen system can be a good basis for generating compilers for high-level languages
Recommended from our members
Collapsing towers of interpreters
Given a tower of interpreters, i.e., a sequence of multiple interpreters interpreting one another as input programs, we aim to collapse this tower into a compiler that removes all interpretive overhead and runs in a single pass. In the real world, a use case might be Python code executed by an x86 runtime, on a CPU emulated in a JavaScript VM, running on an ARM CPU. Collapsing such a tower can not only exponentially improve runtime performance, but also enable the use of base-language tools for interpreted programs, e.g., for analysis and verification. In this paper, we lay the foundations in an idealized but realistic setting.
We present a multi-level lambda calculus that features staging constructs and stage polymorphism: based on runtime parameters, an evaluator either executes source code (thereby acting as an interpreter) or generates code (thereby acting as a compiler). We identify stage polymorphism, a programming model from the domain of high-performance program generators, as the key mechanism to make such interpreters compose in a collapsible way.
We present Pink, a meta-circular Lisp-like evaluator on top of this calculus, and demonstrate that we can collapse arbitrarily many levels of self-interpretation, including levels with semantic modifications. We discuss several examples: compiling regular expressions through an interpreter to base code, building program transformers from modi ed interpreters, and others. We develop these ideas further to include reflection and reification, culminating in Purple, a reflective language inspired by Brown, Blond, and Black, which realizes a conceptually infinite tower, where every aspect of the semantics can change dynamically. Addressing an open challenge, we show how user programs can be compiled and recompiled under user-modified semantics.Parts of this research were supported by ERC grant 321217, NSF awards 1553471 and 1564207, and DOE award DE-SC0018050
Tagging, encoding, and jones optimality
A partial evaluator is said to be Jones-optimal if the result of specializing a self-interpreter with respect to a source program is textually identical to the source program, modulo renaming. Jones optimality has already been obtained if the self-interpreter is untyped. If the selfinterpreter is typed, however, residual programs are cluttered with type tags. To obtain the original source program, these tags must be removed.; ; A number of sophisticated solutions have already been proposed. We observe, however, that with a simple representation shift, ordinary partial evaluation is already Jones-optimal, modulo an encoding. The representation shift amounts to reading the type tags as constructors for higherorder abstract syntax. We substantiate our observation by considering a typed self-interpreter whose input syntax is higher-order. Specializing this interpreter with respect to a source program yields a residual program that is textually identical to the source program, modulo renaming.Publicado en Basic Research in Computer Science, April, 2003.Laboratorio de Investigación y Formación en Informática Avanzad
Strategic management in indentifying and developing young talents in elite amateur golf in Malaysia
Malaysia has not produced many successful amateur golfers at the international level. At this point, there is no effective long-term strategy to develop talented young players capable of winning at the highest level. Therefore, there is a need to explore key success factors and best practices for a sustainable development policy of elite amateur golfers in Malaysia. The purpose of this study is to propose a comprehensive golf policy for developing young talents in elite amateur golf in Malaysia that can lead to the generation of successful players at the international level. In this study, qualitative methodology was used to gather the data. Eight participants who are golf experts were selected. Semi structured interview was employed. Then, thematic analysis was used for data analysis. The study revealed that there are three themes which include strong personality traits and psychological elements, high self-discipline behavior and a strong desire to succeed. In conclusion, the study suggests three key success factors and best practices in developing young talented elite amateur golfers. They will contribute to a new policy for golf development that can generate future young talents in golf at the international level
Jones Optimality, Binding-Time Improvements, and the Strength of Program Specializers
Jones optimality tells us that a program specializer is strong enough to remove an entire level of self-interpretation. We show that Jones optimality, which was originally aimed at the Futamura projections, plays an important role in binding-time improvements. The main results show that, regardless of the binding-time improvements which we apply to a source program, no matter how extensively, a specializer that is not Jones-optimal is strictly weaker than a specializer which is Jones optimal. By viewing a binding-time improver as a generating extension of a self-interpreter, we can connect our results with previous work on the interpretive approach