PhD Courses in Programming Languages

Introduction to Programming Language Research (5HP)

Course page for 2022

Sign-up for 2022

This course covers advanced topics in programming language design, implementation and theory. Topics include, but are not limited to, type systems, program logics, dataflow analysis, probabilistic programming, benchmarking and empiric studies.

The course will be based on introductory lectures and reading of recent and classic papers in the above topics. The recommended prerequisites include a course on basic logic and a basic compilers course. An understanding of structural operational semantics will also be helpful. Please let us know if you are interested in the course but do not fulfill the prerequisites.

The class will be run like a conference programming committee: Students will be required to read and review a number of papers, read the reviews other students have prepared, and discuss/debate the merits and contributions of the papers read.

Assessment: Reviews and in-class participation.

Software maintained by members of the group

Tools for Analysis, Testing and Verification of Erlang Programs

  • Concuerror: A stateless model checking tool for systematically exploring all process interleaving of an Erlang program.
  • Dialyzer: A static analysis tool that automatically detects discrepancies (many of which are bugs) in Erlang programs.

Locking Libraries

Concurrent Data Structures

Concuerror is a systematic testing (aka, stateless model checking) tool for finding and reproducing concurrency errors in Erlang programs.

You can more find information about Concuerror (its code, tutorials, relevant publications, etc.) on its dedicated website: http://parapluu.github.io/Concuerror

People maintaining Concuerror:

Since 2014, Concuerror's development has been partly supported by UPMARC and the EU project RELEASE.

This page contains information for Dialyzer, the DIscrepancy AnaLYZer for ERlang applications.

OVERVIEW

Dialyzer is a static analysis tool that identifies software discrepancies such as definite type errors, code which has become dead or unreachable due to some programming error, unnecessary tests, etc. in single Erlang modules or entire (sets of) applications. Dialyzer starts its analysis from either debug-compiled BEAM bytecode or from Erlang source code. The file and line number of a discrepancy is reported along with an indication of what the discrepancy is about. Dialyzer bases its analysis on the concept of success typings which allows for sound warnings (no false positives).

DOWNLOAD

Since 2007, Dialyzer is included in the official Erlang/OTP distribution.

RESOURCES

You can find more information on how to use Dialyzer here.

PEOPLE

The first versions of Dialyzer were created by Tobias Lindahl and Kostis Sagonas.

People actively working and maintaining Dialyzer are Stavros Aronis and Kostis Sagonas.

People who have also worked on improvements of Dialyzer in the past are Maria Christakis, Elli Fragkaki and Ypatia Tsavliri.

Queue Delegation (QD) Locking is an efficient delegation technique for synchronization in multi-threaded programs. QD locking significantly outperforms traditional locking libraries (e.g., pthreads locks) and performs better than delegation mechanisms that have been proposed in the literature. An advantage of all delegation algorithms is that the lock holding thread can execute many critical sections in sequence while it has the data protected by the critical section in its fast private cache. In most applications, QD locks can be used as a drop-in replacement of traditional locks, by delegating the critical operation and waiting for its result. However, QD locks also offer threads the possibility to do detached execution: i.e., for threads to delegate their critical sections to the current lock holder and continue their execution without waiting for the result of the delegated operation. Of course, to get the benefits of detached execution, our QD locking libraries also provide a lock interface which differs from that provided by traditional locks.

The idea, algorithms and properties of QD locking as well as extensive comparisons with similar algorithms can be found in an article in the IEEE Transactions on Parallel and Distributed Systems journal. An unedited pre-print version of that article can also found in the list of publications below. The main idea of QD locking has also been described in a SPAA'2014 brief announcement. The interface of the queue delegation libraries we provide as well as experiences from using them in code bases of significant size are described in a paper that has been published in the proceedings of EuroPar'2014. See the list of publications below for more information about the publications.

PUBLICATIONS

LIBRARIES FOR C AND C++

  • Library for C++ This github repository contains the header files needed for a C++ version of QD locking. It differs from the C version in its more accessible interface that makes it easier to use in C++ code, while also providing type safety.

AUTOMATIC CODE TRANSFORMATION

This tool can be used to automatically transform C source code that use pthread mutex locks to instead use QD locks from the C library above.

The tool is still a prototype, but can already be used for code bases of limited complexity. The tool has been developed by Robert Markovski as his bachelor thesis project.

BENCHMARKS

  • Benchmarking for Queue Delegation Locks This github repository contains benchmarking code that we used to evaluate QD locking. The necessary locking code is included in this repository, so neither of the libraries needs to be downloaded together with this.

A contention adapting search tree is a concurrent ordered set data structure that adapts its synchronization granularity according to the contention level. We have described two types of contention adapting search trees. One of them is lock-based and one is lock-free. This page contains links to contention adapting search tree related papers, implementations, benchmarks and performance graphs.

PUBLICATIONS

The lock-free contention adapting search tree (LFCA tree) is described in the following publications:

A comprehensive description of the lock-based contention adapting search tree (CA tree) with support for the operations insert, delete, lookup and range query is given in the journal publication below. This publication contains a detailed description of the data structure including pseudo-code and proofs for the correctness properties (linearizability, deadlock freedom and livelock freedom).

The journal publication above is built upon the following two conference publications. The first of those papers describes CA trees with support for single-element operations (insert, delete, and lookup). This paper contains two experimental evaluations of CA tree optimizations that are not included in the journal paper above. One of these optimzations is for use cases with very high contention. The other one combines a CA tree with hardware lock elision. The second paper evaluates and describes a CA tree extension to support linearizable range operations (range queries and range updates) and bulk operations. The technical report that is referred to in these two papers has been replaced by the journal publication above.

The publication below describes an optimization for CA trees that is enabled by using an immutable data structure internally. This optimization is especially beneficial for range queries when contention is high. The experimental results presented in the paper show that the optimized CA tree variant outperform many recently proposed data structures in many scenarios. The benchmark code and the code for the optimized CA tree variant is available here.

The publication below describes how CA trees can be used to improve the scalability of the Erlang Term Storage.

BENCHMARKS AND CODE

The code used to obtain the experimental results included in the CA tree papers can be found by following the links with the text "code" that can be found next to the citations above.

Efficient and scalable concurrent priority queues are crucial for the performance of many multicore applications, e.g. for task scheduling and the parallelization of various algorithms. Linearizable concurrent priority queues with traditional semantics suffer from an inherent sequential bottleneck in the head the queue. This bottleneck is the motivation for some recently proposed priority queues with more relaxed semantics. We present the contention avoiding concurrent priority queue (CA-PQ), a data structure that functions as a linearizable concurrent priority with traditional semantics under low contention, but activates contention avoiding techniques that give it more relaxed semantics when high contention is detected. CA-PQ avoids contention in the head of the queue by removing items in bulk from the global data structure, which also allows it to often serve DelMin operations without accessing memory that is modified by several threads. We show that CA-PQ scales well. Its cache friendly design achieves performance that is twice as fast compared to using state-of-the-art concurrent priority queues on several instances of a parallel shortest path benchmark.

PUBLICATIONS

An authors pre-print containing an additional appendix with more benchmark results is also available here:
The Contention Avoiding Concurrent Priority Queue.

CODE

FÖLJ UPPSALA UNIVERSITET PÅ

facebook
instagram
twitter
youtube
linkedin