Generic go to go: dictionary-passing, monomorphisation, and hybrid
نویسندگان
چکیده
Go is a popular statically-typed industrial programming language. To aid the type safe reuse of code, recent release (Go 1.18) published early 2022 includes bounded parametric polymorphism via generic types. 1.18 implements types using combination monomorphisation and call-graph based dictionary-passing called hybrid. This hybrid approach can be viewed as an optimised form that statically generates specialised methods on possible instantiations. A monolithic dictionary supplements information lost during monomorphisation, structured according to program’s call graph. Unfortunately, still suffers from code bloat, poor compilation speed, limited coverage. In this paper we propose formalise new non-specialising call-site translation. Our translation creates individual dictionaries for each parameter, with construction occurring in place instantiation, overcoming limitations We prove it correct novel general bisimulation up technique. better understand how different generics approaches work practice, benchmark five translators, 1.18, two existing our translator, erasure translator. findings reveal several suggestions improvements 1.18— specifically overcome expressiveness improve compile time compiled size performance 1.18.
منابع مشابه
Go hybrid: EM, crystallography, and beyond.
A mechanistic understanding of the molecular transactions that govern cellular function requires knowledge of the dynamic organization of the macromolecular machines involved in these processes. Structural biologists employ a variety of biophysical methods to study large macromolecular complexes, but no single technique is likely to provide a complete description of the structure-function relat...
متن کاملDesign, develop and simulation of Go-kart
Today, the expansion of the Federation of Automobile racing car increases the competition of Go-kart. Go-kart is one of the best and safest car racing competitions. A history of nearly a century in the world. Go-karts are tiny car that can be controlled with good stability on the road and curved path for drivers bring excitement and exhilaration. Stability and control when crossing the road ben...
متن کاملTrace-Based Run-Time Analysis of Message-Passing Go Programs
We consider the task of analyzing message-passing programs by observing their run-time behavior. We introduce a purely librarybased instrumentation method to trace communication events during execution. A model of the dependencies among events can be constructed to identify potential bugs. Compared to the vector clock method, our approach is much simpler and has in general a significant lower r...
متن کاملA Hybrid Genetic Alternative to Game Tree Search in Go
An alternative game tree search method is presented using a novel genetic algorithm. This is enhanced by the inclusion of Go specific knowledge learnt with neural network techniques developed from previous research. This hybrid algorithm is compared to a traditional alpha-beta search method, MTD(f), and a series of tests and results are presented.
متن کاملMonte Carlo Go Has a Way to Go
Monte Carlo Go is a promising method to improve the performance of computer Go programs. This approach determines the next move to play based on many Monte Carlo samples. This paper examines the relative advantages of additional samples and enhancements for Monte Carlo Go. By parallelizing Monte Carlo Go, we could increase sample sizes by two orders of magnitude. Experimental results obtained i...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Proceedings of the ACM on programming languages
سال: 2022
ISSN: ['2475-1421']
DOI: https://doi.org/10.1145/3563331