scholarly journals Enhanced type inference for binding-time analysis

2020 ◽  
Vol 12 (2) ◽  
pp. 232-250
Author(s):  
Mátyás Szokoli ◽  
Attila Kiss

Abstract In this paper we will be taking a look at type inference and its uses for binding-time analysis, dynamic typing and better error messages. We will propose a new binding-time analysis algorithm ℬ, which is a modification of an already existing algorithm by Gomard [4], and discuss the speed difference.

1992 ◽  
Vol 21 (393) ◽  
Author(s):  
Jens Palsberg ◽  
Michael I. Schwartzbach

Binding time analysis is important in partial evaluators. Its task is to determine which parts of a program can be specialized if some of the expected input is known. Two approaches to do this are abstract interpretation and type inference. We compare two specific such analyses to see which one determines most program parts to be eliminable. The first is the abstract interpretation approach of Bondorf, and the second is the type inference approach o£ Gomard. Both apply to the untyped lambda calculus. We prove that Bondorf's analysis is better than Gomard's.


1992 ◽  
Vol 21 (386) ◽  
Author(s):  
Jens Palsberg ◽  
Michael I. Schwartzbach

<p>We present a polyvariant closure, safety, and binding time analysis for the untyped lambda calculus. The innovation is to analyze each abstraction afresh at all syntactic application points. This is achieved by a semantics-preserving program transformation followed by a novel monovariant analysis, expressed using type constraints. The constraints are solved in cubic time by a single fixed-point computation.</p><p>Safety analysis is aimed at determining if a term will cause an error during evaluation. We have recently proved that the monovariant safety analysis accepts strictly more terms than simple type inference. This paper demonstrates that the polyvariant transformation makes even more terms acceptable, even some without higher-order polymorphic types. Furthermore, polyvariant binding time analysis can improve the partial evaluators that base a polyvariant specialization on only monovariant binding time analysis.</p>


2021 ◽  
Vol 12 (4) ◽  
pp. 3-32
Author(s):  
Игорь Алексеевич Адамович

Статья посвящена частичным вычислениям, использующим offline-стратегию. Мощность этого метода решения задачи специализации программ во многом зависит от анализа времен связывания, который размечает программные конструкции как выполнимые либо невыполнимые на этапе специализации. Анализ времен связывания может использовать несколько вариантов разметки полей класса, зависящих от их использования в программе. Увеличивая число потенциальных оптимизаций, такая поливариантность по классам позволяет эффективно специализировать большее число программ. Наибольший эффект достигается на объектно/̄ориентированных языках, предполагающих создание большого количества различающихся по  назначению экземпляров класса. Известные алгоритмы анализа времен связывания расширяются до поливариантности по классам и распространеняются их на объектно/̄ориентированный язык общего назначения. Новые методы реализованы в виде набора плагинов для Eclipse IDE, составляющих специализатор JaSpe для программ на Java.


2001 ◽  
Vol 8 (54) ◽  
Author(s):  
Daniel Damian ◽  
Olivier Danvy

We show that a non-duplicating transformation into continuation-passing style (CPS) has no effect on control-flow analysis, a positive effect on binding-time analysis for traditional partial evaluation, and no effect on binding-time analysis for continuation-based partial evaluation: a monovariant control-flow analysis yields equivalent results on a direct-style program and on its CPS counterpart, a monovariant binding-time analysis yields less precise results on a direct-style program than on its CPS counterpart, and an enhanced monovariant binding-time analysis yields equivalent results on a direct-style program and on its CPS counterpart. Our proof technique amounts to constructing the CPS counterpart of flow information and of binding times.<br /> <br />Our results formalize and confirm a folklore theorem about traditional binding-time analysis, namely that CPS has a positive effect on binding times. What may be more surprising is that the benefit does not arise from a standard refinement of program analysis, as, for instance, duplicating continuations.<br /> <br />The present study is symptomatic of an unsettling property of program analyses: their quality is unpredictably vulnerable to syntactic accidents in source programs, i.e., to the way these programs are written. More reliable program analyses require a better understanding of the effect of syntactic change.


Sign in / Sign up

Export Citation Format

Share Document