Lightweight Software Isolation via Flow-Sensitive Capabilities in Scala

Detta är en Master-uppsats från KTH/Skolan för datavetenskap och kommunikation (CSC)

Författare: Erik Reimers; [2017]

Nyckelord: Scala; LaCasa; flow-sensitive; aliasing;

Sammanfattning: Aliasing is a potential source of problems in software development and can, for example,lead to data races in concurrent programs. More recent programming languages includealiasing control in order to catch more errors at compile time. However, this does notexist for most widely-used languages.LaCasa introduces aliasing control to Scala. LaCasa is a type system and program-ming model that provides lightweight unique and affine (consumable) object referencesin Scala. The unique references provided by LaCasa enable messages to be passed effi-ciently by reference. They also guarantee a deep-copy semantic which makes it possible tomore easily port a concurrent program from running on a single machine to being dis-tributed and running on a large cluster of machines.One aspect that makes LaCasa inconvenient to use is the fact that code needs to bewritten in an explicit continuation-passing style (CPS), different to how code is usuallywritten, which makes programs harder to write, understand and maintain.This project presents a flow-sensitive version of LaCasa which avoids the use of con-tinuations. Flow-sensitivity is achieved by adding an extra compiler phase that performsa static analysis, enforcing LaCasa’s type-checking rules. The flow-sensitive version wasevaluated by measuring the code complexity compared to the original flow-insensitiveLaCasa. A few case studies were performed, as part of the evaluation, to show how flow-sensitive LaCasa can be used to extend LaCasa into other fields of application.The evaluation showed that a flow-sensitive LaCasa can reduce the complexity of ap-plications using LaCasa. It allows programmers to write code in a more usual way whichmakes LaCasa easier to use.

  HÄR KAN DU HÄMTA UPPSATSEN I FULLTEXT. (följ länken till nästa sida)