6 research outputs found
Model-View-Update-Communicate: Session Types Meet the Elm Architecture
Session types are a type discipline for communication channel endpoints which
allow conformance to protocols to be checked statically. Safely implementing
session types requires linearity, usually in the form of a linear type system.
Unfortunately, linear typing is difficult to integrate with graphical user
interfaces (GUIs), and to date most programs using session types are command
line applications.
In this paper, we propose the first principled integration of session typing
and GUI development by building upon the Model-View-Update (MVU) architecture,
pioneered by the Elm programming language. We introduce
, the first formal model of the MVU architecture, and
prove it sound. By extending with \emph{commands} as
found in Elm, along with \emph{linearity} and \emph{model transitions}, we show
the first formal integration of session typing and GUI programming. We
implement our approach in the Links web programming language, and show examples
including a two-factor authentication workflow and multi-room chat server.Comment: Extended version of paper to appear at ECOOP 202
From JSON to JSEN through Virtual Languages
In this paper we describe a data format suitable for storing and manipulating executable language statements that can be used for exchanging/storing programs, executing them concurrently and extending homoiconicity of the hosting language. We call it JSEN, JavaScript Executable Notation, which represents the counterpart of JSON, JavaScript Object Notation. JSON and JSEN complement each other. The former is a data format for storing and representing objects and data, while the latter has been created for exchanging/storing/executing and manipulating statements of programs. The two formats, JSON and JSEN, share some common properties, reviewed in this paper with a more extensive analysis on what the JSEN data format can provide. JSEN extends homoiconicity of the hosting language (in our case JavaScript), giving the possibility to manipulate programs in a finer grain manner than what is currently possible. This property makes definition of virtual languages (or DSL) simple and straightforward. Moreover, JSEN provides a base for implementing a type of concurrent multitasking for a single-threaded language like JavaScript
Recommended from our members
Intelligent Client Workflow System for the Modern Web
The modern web browser is becoming ever increasingly more powerful in many ways; this work will look at it very specifically in terms of computing resource potential, as a general computation workflow system, with a server side coordination component hosted in the cloud. The unique contribution of this work is its utilization of client computing resources via the web browser, with minimal cloud based coordination, wherein the end results are an extremely capable and intelligent client side system. Its reliance on the web browser also means it relies heavily on current and forthcoming web standards. Web standards continue to evolve and include both specific and general features with an eye toward computation, not just simply rendering web content any longer. This paper and its associated project work seek to approach those problems from a specific angle, namely, a web based client workflow system, wherein the user interface, execution engine, and advanced capabilities all combine and maximize the client side potential. The unique combination of visualization, creation and computation in the web browser client, with coordination through the cloud, yields a new and different workflow and computation system that is well suited as an exploratory scientific analysis platform, called FlowCloud
A Message-Passing, Thread-Migrating Operating System for a Non-Cache-Coherent Many-Core Architecture
The difference between emerging many-core architectures and their multi-core predecessors goes beyond just the number of cores incorporated on a chip. Current technologies for maintaining cache coherency are not scalable beyond a few dozen cores, and a lack of coherency presents a new paradigm for software developers to work with. While shared memory multithreading has been a viable and popular programming technique for multi-cores, the distributed nature of many-cores is more amenable to a model of share-nothing, message-passing threads. This model places different demands on a many-core operating system, and this thesis aims to understand and accommodate those demands. We introduce Xipx, a port of the lightweight Embedded Xinu operating system to the many-core Intel Single-chip Cloud Computer (SCC). The SCC is a 48-core x86 architecture that lacks cache coherency. It features a fast mesh network-on-chip (NoC) and on-die message passing buffers to facilitate message-passing communications between cores. Running as a separate instance per core, Xipx takes advantage of this hardware in its implementation of a message-passing device. The device multiplexes the message passing hardware, thereby allowing multiple concurrent threads to share the hardware without interfering with each other. Xipx also features a limited framework for transparent thread migration. This achievement required fundamental modifications to the kernel, including incorporation of a new type of thread. Additionally, a minimalistic framework for bare-metal development on the SCC has been produced as a pragmatic offshoot of the work on Xipx. This thesis discusses the design and implementation of the many-core extensions described above. While Xipx serves as a foundation for continued research on many-core operating systems, test results show good performance from both message passing and thread migration suggesting that, as it stands, Xipx is an effective platform for exploration of many-core development at the application level as well
A trusted infrastructure for symbolic analysis of event-based web APIs
JavaScript has been widely adopted for the development of Web applications, being used for both client and server-side code. Client-side JavaScript programs commonly interact with Web APIs, for instance, to capture the user interaction with the Web page via events. The use of such APIs increases the complexity of JavaScript programs. In fact, most errors in these programs are caused by the misuse of Web APIs. There are several approaches for detecting errors in client-side JavaScript programs, but they either assume the use of a single API or do not model APIs faithfully, giving rise to inconsistent behaviour and lack of trust.
We address the problem by developing a trustworthy infrastructure for the static analysis of Web APIs. We focus on two aspects of JavaScript programs: event-driven and message-passing programming, as these paradigms are common sources of confusion among developers. We choose to target the DOM event model and the JavaScript Promises and JavaScript async/await, which facilitate event-driven
programming. Additionally, we target the message-passing model of the WebMessaging and
WebWorkers APIs.
We design formal semantics for events and message-passing to capture fundamental operations required by those APIs, and API reference implementations which are trustworthy in that they follow the respective standards and have been thoroughly tested against their official test suites. Using our formal semantics and reference implementations, we develop JaVerT.Click, the first static symbolic execution tool for JavaScript supporting both event-based and message-passing APIs.
We evaluated both the reference implementations and the symbolic execution engine of JaVerT.Click.
By testing the reference implementations against their official test suites, we found coverage gaps and issues in the test suites, most of which have been since fixed. By testing the symbolic execution engine against three open-source libraries, we established the bounded correctness of functional properties and found real bugs.Open Acces