We present Refined typescript (RSC), a lightweight refinement type system for typescript, that enables static verification of higher-order, imperative programs. We develop a formal system for RSC that delineates the i...
详细信息
We present Refined typescript (RSC), a lightweight refinement type system for typescript, that enables static verification of higher-order, imperative programs. We develop a formal system for RSC that delineates the interaction between refinement types and mutability, and enables flow-sensitive reasoning by translating input programs to an equivalent intermediate SSA form. By establishing type safety for the intermediate form, we prove safety for the input programs. Next, we extend the core to account for imperative and dynamic features of typescript, including overloading, type reflection, ad hoc type hierarchies and object initialization. Finally, we evaluate RSC on a set of real-world benchmarks, including parts of the Octane benchmarks, D3, Transducers, and the typescript compiler. We show how RSC successfully establishes a number of value dependent properties, such as the safety of array accesses and downcasts, while incurring a modest overhead in type annotations and code restructuring.
typescript is a dynamically typed language widely used to develop large-scale applications nowadays. These applications are usually designed with complex class or interface hierarchies and have highly polymorphic beha...
详细信息
typescript is a dynamically typed language widely used to develop large-scale applications nowadays. These applications are usually designed with complex class or interface hierarchies and have highly polymorphic behaviors. These object-oriented (OO) features will lead to inefficient inline caches (ICs) or trigger deoptimizations, which impact the performance of typescript applications. To address this problem, we introduce an inline caching design called hidden inheritance (HI). The basic idea of HI is to cache the static information of class or interface hierarchies into hidden classes, which are leveraged to generate efficient inline caches for improving the performance of OO-style typescript programs. The HI design is implemented in a typescript engine STSC (Static typescript Compiler) including a static compiler and a runtime system. STSC statically generates hidden classes and enhanced inline caches, which are applied to generate specialized machine code via ahead-of-time compilation (AOTC) or just-in-time compilation (JITC). To evaluate the efficiency of this technique, we implement STSC on a state-of-the-art JavaScript virtual machine V8 and demonstrate its performance improvements on industrial benchmarks and applications.
typescript is a quickly evolving superset of JavaScript with active development of new features. Our paper seeks to understand how quickly these features are adopted by the developer community. Existing work in JavaSc...
详细信息
ISBN:
(纸本)9798350311846
typescript is a quickly evolving superset of JavaScript with active development of new features. Our paper seeks to understand how quickly these features are adopted by the developer community. Existing work in JavaScript shows the adoption of dynamic language features can be a major hindrance to static analysis. As typescript evolves the addition of features makes the underlying standard more and more difficult to keep up with. In our work we present an analysis of 454 open source typescript repositories and study the adoption of 13 language features over the past three years. We show that while new versions of the typescript compiler are aggressively adopted by the community, the same cannot be said for language features. While some experience strong growth others are rarely adopted by projects. Our work serves as a starting point for future study of the adoption of features in typescript. We also release our analysis and data gathering software as open source in the hope it helps the programming languages community.
The genotypic functions from apriori aesthetically evolved images are mutated progressively and their phenotypes sequenced temporally to produce animated versions. The animated versions are mapped onto typeface and co...
详细信息
ISBN:
(数字)9783319310084
ISBN:
(纸本)9783319310077;9783319310084
The genotypic functions from apriori aesthetically evolved images are mutated progressively and their phenotypes sequenced temporally to produce animated versions. The animated versions are mapped onto typeface and combined spatially to produce animated typescript. The output is then discussed with reference to computer aided design and machine learning.
Developers are starting to write large and complex applications in typescript, a typed dialect of JavaScript. typescript applications integrate JavaScript libraries via typed descriptions of their APIs called declarat...
详细信息
ISBN:
(纸本)9781450386753
Developers are starting to write large and complex applications in typescript, a typed dialect of JavaScript. typescript applications integrate JavaScript libraries via typed descriptions of their APIs called declaration files. DefinitelyTyped is the standard public repository for these files. The repository is populated and maintained manually by volunteers, which is error-prone and time consuming. Discrepancies between a declaration file and the JavaScript implementation lead to incorrect feedback from the typescript IDE and, thus, to incorrect uses of the underlying JavaScript library. This work presents dts-generate, a tool that generates typescript declaration files for JavaScript libraries uploaded to the NPM registry. It extracts code examples from the documentation written by the developer, executes the library driven by the examples, gathers run-time information, and generates a declaration file based on this information. To evaluate the tool, 249 declaration files were generated directly from an NPM module and 111 of these were compared with the corresponding declaration file provided on DefinitelyTyped. All these files either exhibited no differences at all or differences that can be resolved by extending the developer-provided examples.
Many RDF devtools exist for JavaScript that let developers read and modify RDF data, but they often opt to use proprietary interfaces and don't fully leverage themethods of reading and writing datawith which JavaS...
详细信息
ISBN:
(数字)9783031472435
ISBN:
(纸本)9783031472428;9783031472435
Many RDF devtools exist for JavaScript that let developers read and modify RDF data, but they often opt to use proprietary interfaces and don't fully leverage themethods of reading and writing datawith which JavaScript developers are familiar. This paper introduces Linked Data Objects (LDO), a JavaScript-based devtool designed tomake reading and writing RDF as similar to programming traditional typescript applications as possible. LDO generates typescript typings and a JSON-LD context from an RDF Shape like ShEx. A JavaScript Proxy uses the generated code to serve as an abstracted interface for an underlying RDF/JS dataset, allowing the developer to manipulate RDF as a typescript object literal. LDO is currently in use in a small number of RDF-based projects and our user studies indicate that LDO's interface-parity with typescript object literals is preferable to proprietary interfaces in other JavaScript RDF devtools. Finally, this paper proposes future work to make LDO even more approachable for JavaScript developers.
While the programming of microcontroller-based embeddable devices typically is the realm of the C language, such devices are now finding their way into the classroom for CS education, even at the level of middle schoo...
详细信息
ISBN:
(纸本)9781450369770
While the programming of microcontroller-based embeddable devices typically is the realm of the C language, such devices are now finding their way into the classroom for CS education, even at the level of middle school. As a result, the use of scripting languages (such as JavaScript and Python) for microcontrollers is on the rise. We present Static typescript (STS), a subset of typescript (itself, a gradually typed superset of JavaScript), and its compiler/linker toolchain, which is implemented fully in typescript and runs in the web browser. STS is designed to be useful in practice (especially in education), while being amenable to static compilation targeting small devices. A user's STS program is compiled to machine code in the browser and linked against a precompiled C++ runtime, producing an executable that is more efficient than the prevalent embedded interpreter approach, extending battery life and making it possible to run on devices with as little as 16 kB of RAM (such as the BBC micro:bit). This paper is primarily a description of the STS system and the technical challenges of implementing embedded programming platforms in the classroom.
We discuss two adaptations of the implementation of type guards and narrowing in the typescript compiler. The first is an improvement on the original syntax-directed implementation, and has now replaced the original o...
详细信息
ISBN:
(纸本)9781450347211
We discuss two adaptations of the implementation of type guards and narrowing in the typescript compiler. The first is an improvement on the original syntax-directed implementation, and has now replaced the original one in the typescript compiler. It is specifically suited for the scenario in which an IDE requests the type of a particular variable in the program. The second implementation is defined as a whole program analysis, and is therefore able to compute more precise narrowed types, but at the price of a higher run-time cost.
Microsoft MakeCode (https://***) is a platform and accompanying web app for simplifying the programming of microcontroller-based devices in the classroom. For each device, MakeCode provides a customized end-to-end exp...
详细信息
ISBN:
(纸本)9781450369893
Microsoft MakeCode (https://***) is a platform and accompanying web app for simplifying the programming of microcontroller-based devices in the classroom. For each device, MakeCode provides a customized end-to-end experience in the web browser consisting of code editors, device simulator, debugger, compiler to machine code, and linker to a pre-compiled C++ runtime, as well as a documentation and tutorial system. We present an overview of MakeCode and detail the major design decisions behind the platform.
暂无评论