javascript, while already widely used in web applications, is also gaining popularity beyond the web, such as on the server as part of *** or on the desktop with the Electron framework (e.g., in the Slack application)...
详细信息
ISBN:
(纸本)9781665441735
javascript, while already widely used in web applications, is also gaining popularity beyond the web, such as on the server as part of *** or on the desktop with the Electron framework (e.g., in the Slack application). However, executing code written in this weakly and dynamically typed language efficiently, requires sophisticated Just-in-time (JIT) compilation. In this paper, we revisit the execution overheads of javascript. We perform a detailed analysis of the JetStream2 benchmark suite on Google's modern V8 javascript engine. We identify micro-architectural bottlenecks and runtime overheads that result from the speculations made by the JIT compiler when it generates machine code from javascript. We find that checks that verify assumptions made by the compiler have an average execution overhead of 8 %, 2-4x of what an earlier study reported on an older version of V8. For the check for Small Integers (SMI), we observe that the conditional branches are not the underlying cause but rather the computation of the condition itself. This indicates that these checks provide an attractive avenue for a HW/SW codesign solution. We present an extension for the ARMv8 instruction set that optimizes SMI load instructions and checks. We can improve execution time on SMI-heavy computations by up to 10 % ona prototype implementation of the new instructions in the gem5 simulator.
We present a generic framework, JSCloud, for the remote execution of javascript programs. Our work dynamically estimates whether a code partition should be executed remotely. The empirical result shows that JSCloud ca...
详细信息
ISBN:
(纸本)9780769548333
We present a generic framework, JSCloud, for the remote execution of javascript programs. Our work dynamically estimates whether a code partition should be executed remotely. The empirical result shows that JSCloud can be useful if the javascript engine on a handheld device is inefficient.
Dynamic taint analysis (DTA) is a popular approach to help protect javascript applications against injection vulnerabilities. In 2016, the ECMAScript 7 javascript language standard introduced many language features th...
详细信息
ISBN:
(纸本)9781450394758
Dynamic taint analysis (DTA) is a popular approach to help protect javascript applications against injection vulnerabilities. In 2016, the ECMAScript 7 javascript language standard introduced many language features that most existing DTA tools for javascript do not support, e.g., the async/await keywords for asynchronous programming. We present Augur, a high-performance dynamic taint analysis for ES7 javascript that leverages VM-supported instrumentation. Integrating directly with a public, stable instrumentation API gives Augur the ability to run with high performance inside the VM and remain resilient to language revisions. We extend the abstract-machine approach to DTA to handle asynchronous function calls. In addition to providing the classic DTA use case of injection vulnerability detection, Augur is highly configurable to support any type of taint analysis, making it useful outside of the security domain. We evaluated Augur on a set of 20 benchmarks, and observed a median runtime overhead of only 1.77x, a median performance improvement of 298% compared to the previous state-of-the-art.
Recent trends in IoT (Internet of Things) has seen increasing number of devices being shipped with full-fledged operating systems, allowing more complex and stateful applications written in high-level languages (e.g.,...
详细信息
ISBN:
(纸本)9781538694459
Recent trends in IoT (Internet of Things) has seen increasing number of devices being shipped with full-fledged operating systems, allowing more complex and stateful applications written in high-level languages (e.g., javascript) to be run on the edge. The benefits of pushing computations towards the edge is that one can reduce the network costs of data transmission. Just like any other distributed system, we need to guarantee in IoT the availability of running processes, and thus need a live-migration mechanism for such programs. However, well-studied VM migration techniques are costly and impractical in IoT, due to the resource constraints and diversity of devices. In this demo paper, we present a demo of ThingsMigrate [1], a javascript middleware for enabling live-migration of stateful javascript applications in a platform-independent manner, along with a web dashboard used to monitor and control the IoT devices.
javascript is currently a popular language mainly in the creation of client-side code for both web development and, more and more, for the mobile applications development. In this paper, we analyze learning for progra...
详细信息
ISBN:
(纸本)9789899843493
javascript is currently a popular language mainly in the creation of client-side code for both web development and, more and more, for the mobile applications development. In this paper, we analyze learning for programmers in frameworks for the development of mobile javascript applications, namely React Native, NativeScript and Ionic. This analysis was carried out based on a taxonomy adapted from Bloom, created in this work for the evaluation of programmers, with criteria initially selected for evaluation and with the application of questions based on the taxonomy in order to obtain the most relevant analysis criteria. The results show that NativeScript was the most difficult to learn framework with the most negative feedback, unlike Ionic and React Native, which presented identical global results, but with a slight upward trend in global mean results for React Native in relation to Ionic.
Promises and async/await have become popular mechanisms for implementing asynchronous computations in javascript, but despite their popularity, programmers have difficulty using them. This paper identifies 8 anti-patt...
详细信息
ISBN:
(纸本)9781450392211
Promises and async/await have become popular mechanisms for implementing asynchronous computations in javascript, but despite their popularity, programmers have difficulty using them. This paper identifies 8 anti-patterns in promise-based javascript code that are prevalent across popular javascript repositories. We present a light-weight static analysis for automatically detecting these anti-patterns. This analysis is embedded in an interactive visualization tool that additionally relies on dynamic analysis to visualize promise lifetimes and instances of anti-patterns executed at run time. By enabling the user to navigate between promises in the visualization and the source code fragments that they originate from, problems and optimization opportunities can be identified. We implement this approach in a tool called DrAsync, and found 2.6K static instances of anti-patterns in 20 popular javascript repositories. Upon examination of a subset of these, we found that the majority of problematic code reported by DrAsync could be eliminated through refactoring. Further investigation revealed that, in a few cases, the elimination of anti-patterns reduced the time needed to execute the refactored code fragments. Moreover, DrAsync's visualization of promise lifetimes and relationships provides additional insight into the execution behavior of asynchronous programs and helped identify further optimization opportunities.
Learn the key concepts of developing Windows Store apps using HTML5 and javascript Overview Learn about the powerful new features in HTML5 and CSS3 Quick start a javascript app from scratch Get your app into the store...
详细信息
ISBN:
(数字)9781849687119
ISBN:
(纸本)9781849687102
Learn the key concepts of developing Windows Store apps using HTML5 and javascript Overview Learn about the powerful new features in HTML5 and CSS3 Quick start a javascript app from scratch Get your app into the store and learn how to add authentication In Detail Windows 8 has already been launched and been installed on millions of devices while the store is getting populated with apps, and soon enough everyone will want a Windows Store app. So start now and learn how to develop apps for Windows 8 using HTML5, CSS3, and javascript and you will be killing two birds with one stone by getting introduced to important features in HTML5 and CSS3 at the same time. You will gain the advantage of utilizing your web development skills to transform your website into an app or the other way round. Developing Windows Store Apps with HTML5 and javascript is a practical, hands-on guide that covers the basic and important features of a Windows Store App along with code examples which will show you how to develop these features, all the while learning some of the new features in HTML5 and CSS3 which you can utilize in other areas of development. This book starts with the new features in HTML5 and CSS3 that are incorporated with Windows 8 development, and then moves on to creating a blank Windows Store app and add features to it as we move through the chapters till we package the app and make it ready for publishing. Finally, we will have a look at how similar it is to develop the same app with XAML. You will also learn how to add and use new controls dedicated for Windows 8 and then see how to fetch data for the app and bind it to the controls. We will also take a look at making the app adapt to change in screen sizes and rotation as well as how to make the app live with tiles and allow users to sign in using their email accounts. Also you will learn how to add an app bar, and lastly you learn how to finalize the app and publish it. If you want to leverage your web development skill
This paper proposes a concurrency model for javascript with thread-like abstractions and cooperative cancellation. javascript uses an event-driven model, where an active computation runs until it completes or blocks f...
详细信息
ISBN:
(纸本)9781450391115
This paper proposes a concurrency model for javascript with thread-like abstractions and cooperative cancellation. javascript uses an event-driven model, where an active computation runs until it completes or blocks for an event while concurrent computations wait for other events as callbacks. With the introduction of Promises, the control flow of callbacks can be written in a more direct style. However, the event-based model is still a source of confusion with regard to execution order, race conditions, and termination. The thread model is a familiar concept to programmers and can help reduce concurrency errors in javascript programs. This work is a library-based design, which uses an abstraction based on the reader monad to pass a thread ID through a thread's computation. A thread can be cancelled, paused, and resumed with its thread ID. This design allows hierarchical cancellation where a child thread is cancelled if its parent is cancelled. It also defines synchronization primitives to protect shared states. A formal semantics is included to give a precise definition of the proposed model.
This paper presents our recent work in progress aiming to design effective learning simulations of day/night and seasons and lunar phases using web technology for K-12 Earth and Environmental science curriculum. Two i...
详细信息
ISBN:
(纸本)9781728115023
This paper presents our recent work in progress aiming to design effective learning simulations of day/night and seasons and lunar phases using web technology for K-12 Earth and Environmental science curriculum. Two interactive simulations using HTML5, javascript and CSS are developed with steerable parameters for students to interact and manipulate. The design and development details are discussed in this paper. We are currently in the process of designing the lesson plans with various investigations to engage students with the seasons and lunar phases concepts as well as assessments to evaluate their learning outcomes.
Instrumentation platforms facilitate the development and deployment of dynamic analyses. The state-of-the-art instrumentation platforms for javascript rely on different weaving approaches for instrumentation, offering...
详细信息
ISBN:
(纸本)9798400706349
Instrumentation platforms facilitate the development and deployment of dynamic analyses. The state-of-the-art instrumentation platforms for javascript rely on different weaving approaches for instrumentation, offering different levels of analysis expressiveness. The main issue is that they are unable to observe and reason about abstract operations, i.e. operations that are not exposed as language constructs but are used within the runtime. However, abstract operations are pivotal to understanding javascript's program behaviour. This paper demonstrates the importance of exposing the ToPrimitive abstract operation, which lies at the core of javascript's type coercion. We introduce BoaSpect, an interpreter-based instrumentation platform for javascript, which provides increased expressiveness by exposing the ToPrimitive trap through the instrumentation interface. We demonstrate its potential by implementing a novel analysis in BoaSpect to identify a potential security exploit, and a taint analysis which can track information flows precisely in the presence of implicit type coercions.
暂无评论