@inproceedings{ChisnallCPDP11,
author = {Chisnall, David and Rothwell, Colin and Davis, Brooks and Watson, Robert N.M. and Woodruff, Jonathan and Vadera, Munraj and Moore, Simon W. and Neumann, Peter G. and Roe, Michael},
title = {Beyond the {PDP-11}: Processor support for a memory-safe {C} abstract machine},
booktitle = {\textbf{ASPLOS 2015}: Proceedings of the Fifteenth Edition of ASPLOS on Architectural Support for Programming Languages and Operating Systems},
conf = {ASPLOS 2015},
series = {ASPLOS XX},
year = {2015},
month = mar,
location = {Istanbul, Turkey},
numpages = {15},
publisher = {ACM},
address = {New York, NY, USA},
optkeywords = {C, memory safety, memory models, code generation},
doi = {10.1145/2694344.2694367},
pdf = {papers/asplos15-memory-safe-c.pdf},
abstract = {We propose a new memory-safe interpretation of the C abstract machine that provides stronger protection to benefit
security and debugging. Despite ambiguities in the specification intended to provide implementation flexibility, contemporary implementations of C have converged on a memory model similar to the PDP-11, the original target for C.
This model lacks support for \emph{memory safety} despite well-documented impacts on security and reliability.

Attempts to change this model are often hampered by assumptions embedded in a large body of existing C code, dating back to the memory model exposed by the original C
compiler for the PDP-11. Our experience with attempting to
implement a memory-safe variant of C on the CHERI experimental microprocessor led us to identify a number of
problematic idioms. We describe these as well as their interaction with existing memory safety schemes and the assumptions that they make beyond the requirements of the C
specification. Finally, we refine the CHERI ISA and abstract
model for C, by combining elements of the CHERI capability model and fat pointers, and present a softcore CPU that
implements a C abstract machine that can run legacy C code
with strong memory protection guarantees.
}
}

@inproceedings{BMNPS2015,
author = {Mark Batty and
Kayvan Memarian and
Kyndylan Nienhuis and
Jean Pichon{-}Pharabod and
Peter Sewell},
title = {The Problem of Programming Language Concurrency Semantics},
abstract = {Despite decades of research, we do not have a satisfactory concurrency semantics for any general-purpose programming language that aims to support concurrent systems code. The Java Memory Model has been shown to be unsound with respect to standard compiler optimisations, while the C/C++11 model is too weak, admitting undesirable thin-air executions. Our goal in this paper is to articulate this major open problem as clearly as is currently possible, showing how it arises from the combination of multiprocessor relaxed-memory behaviour and the desire to accommodate current compiler optimisations. We make several novel contributions that each shed some light on the problem, constraining the possible solutions and identifying new difficulties.},
booktitle = {\textbf{ESOP 2015}: Programming Languages and Systems - 24th European Symposium on Programming,
Held as Part of the European Joint Conferences on Theory
and Practice of Software, {ETAPS} 2015, London, UK, April 11-18, 2015.
},
conf = {ESOP 2015},
pages = {283--307},
year = {2015},
month = apr,
optcrossref = {DBLP:conf/esop/2015},
url = {http://dx.doi.org/10.1007/978-3-662-46669-8_12},
pdf = {http://www.cl.cam.ac.uk/~pes20/cpp/c_concurrency_challenges.pdf},
doi = {10.1007/978-3-662-46669-8_12},
timestamp = {Tue, 07 Apr 2015 15:19:02 +0200},
biburl = {http://dblp.uni-trier.de/rec/bib/conf/esop/BattyMNPS15},
bibsource = {dblp computer science bibliography, http://dblp.org}
}

@misc{EBC2014,
optkey = {},
author = {Reinoud Elhorst and Mark Batty and David Chisnall},
title = {Efficient code generation for weakly ordered architectures},
howpublished = {Presentation at the 4th European LLVM conference  (EuroLLVM)},
month = apr,
year = 2014,
note = {Slides and report available at \url{http://llvm.org/devmtg/2014-04/}},
optannote = {},
abstract = {This report explores the way LLVM generates the
memory barriers needed to support the C11/C++11 atomics
for ARM. I measure the influence of memory barriers on
performance, and I show that in some cases LLVM generates
too many barriers. By leaving these barriers out, performance
increases significantly. I introduce two LLVM passes, which will
remove these extra barriers, improving performance in my test
by 40\%. I believe one of these passes is ready to be upstreamed
to LLVM, while the other will need more testing.
}
}

@misc{Elhorst2014,
optkey = {},
author = {Reinoud Elhorst},
title = {Lowering {C11} Atomics for {ARM} in {LLVM}},
opthowpublished = {},
optmonth = {},
year = {2014},
month = mar,
optnote = {},
optannote = {},
url = {http://llvm.org/devmtg/2014-04/PDFs/Talks/Reinoud-report.pdf},
abstract = {This report explores the way LLVM generates the
memory barriers needed to support the C11/C++11 atomics
for ARM. I measure the influence of memory barriers on
performance, and I show that in some cases LLVM generates
too many barriers. By leaving these barriers out, performance
increases significantly. I introduce two LLVM passes, which will
remove these extra barriers, improving performance in my test
by 40\%. I believe one of these passes is ready to be upstreamed
to LLVM, while the other will need more testing.
}
}

@misc{HCSS2015-Memarian,
optkey = {},
author = {Kayvan Memarian and Kyndylan Nienhuis and Justus Matthiesen and James Lingard and Peter Sewell},
title = {Cerberus: towards an Executable Semantics for Sequential and Concurrent {C11}},
opthowpublished = {},
month = may,
year = 2015,
note = {Presentation at HCSS 2015: the Fifteenth Annual
High Confidence Software and Systems Conference},
optmonth = {},
optyear = {},
optannote = {},
abstract = {C remains central to our computing infrastructure but still lacks a
clear and complete semantics. Programmers lack tools to explore the
range of behaviours they should expect; compiler development lacks
test oracles; and formal verification and analysis must make
(explicitly or implicitly) many choices about the specific C they
target.

We describe Cerberus, a semantics for a substantial fragment of C11.
Its thread-local semantics is factored via an elaboration into a
simpler Core language, to make it conceptually and mathematically
tractable.  This is integrated with an operational model for C11
concurrency, with a mechanised proof of equivalence to the axiomatic
C11 model of Batty et al.  The front-end includes a parser that
closely follows the C11 standard grammar and a typechecker.  Cerberus
is executable, to explore all behaviours or single paths of test
programs, and it supports proof, as shown by a preliminary experiment
in translation validation for the front-end of Clang, for very simple
programs.  This is a step towards a clear, consistent, and unambiguous
semantics for C.
}
}

@inproceedings{Kell:2014:ST:2661136.2661154,
author = {Kell, Stephen},
title = {In Search of Types},
booktitle = {\textbf{Onward! 2014}: Proceedings of the 2014 ACM International Symposium on New
Ideas, New Paradigms, and Reflections on Programming \& Software},
conf = {Onward! 2014},
series = {Onward! 2014},
year = {2014},
month = oct,
isbn = {978-1-4503-3210-1},
location = {Portland, Oregon, USA},
pages = {227--241},
numpages = {15},
url = {http://doi.acm.org/10.1145/2661136.2661154},
doi = {10.1145/2661136.2661154},
acmid = {2661154},
publisher = {ACM},
address = {New York, NY, USA},
optkeywords = {abstraction, data types, information hiding, type
discipline, type system},
abstract = {The concept of "type" has been used without a consistent,
precise definition in discussions about programming languages for 60 years.
In this essay I explore various concepts lurking behind distinct uses of this word,
highlighting two traditions in which the word came into use largely independently:
engineering traditions on the one hand, and those of symbolic logic on the other.
These traditions are founded on differing attitudes to the nature and purpose of abstraction,
but their distinct uses of "type" have never been explicitly unified.
One result is that discourse across these traditions often finds itself at cross purposes,
such as overapplying one sense of "type" where another is appropriate, and occasionally
proceeding to draw wrong conclusions. I illustrate this with examples from well-known
and justly well-regarded literature, and argue that ongoing developments in both the
theory and practice of programming make now a good time to resolve these problems. }
}

@inproceedings{DBLP:conf/pepm/KerneisSH14,
author = {Gabriel Kerneis and
Charlie Shepherd and
Stefan Hajnoczi},
title = {{QEMU/CPC:} static analysis and {CPS} conversion for safe, portable,
and efficient coroutines},
booktitle = {\textbf{PEPM 2014}: Proceedings of the {ACM} {SIGPLAN} 2014 workshop on Partial evaluation
and program manipulation, San Diego,
California, {USA}},
conf = {PEPM 2014},
pages = {83--94},
year = {2014},
month = jan,
optcrossref = {DBLP:conf/pepm/2014},
url = {http://doi.acm.org/10.1145/2543728.2543733},
doi = {10.1145/2543728.2543733},
timestamp = {Thu, 09 Jan 2014 10:44:12 +0100},
biburl = {http://dblp.uni-trier.de/rec/bib/conf/pepm/KerneisSH14},
bibsource = {dblp computer science bibliography, http://dblp.org},
abstract = {

Coroutines and events are two common abstractions for writing concurrent programs. Because coroutines are often more convenient, but events more portable and efficient, it is natural to want to translate the former into the latter. CPC is such a source-to-source translator for C programs, based on a partial conversion into continuation-passing style (CPS conversion) of functions annotated as cooperative.

In this article, we study the application of the CPC translator to QEMU, an open-source machine emulator which also uses annotated coroutine functions for concurrency. We first propose a new type of annotations to identify functions which never cooperate, and we introduce CoroCheck, a tool for the static analysis and inference of cooperation annotations. Then, we improve the CPC translator, defining CPS conversion as a calling convention for the C language, with support for indirect calls to CPS-converted function through function pointers. Finally, we apply CoroCheck and CPC to QEMU (750 000 lines of C code), fixing hundreds of missing annotations and comparing performance of the translated code with existing implementations of coroutines in QEMU.

Our work shows the importance of static annotation checking to prevent actual concurrency bugs, and demonstrates that CPS conversion is a flexible, portable, and efficient compilation technique, even for very large programs written in an imperative language.
}
}

@inproceedings{DBLP:conf/popl/Pichon-Pharabod16,
author = {Jean Pichon{-}Pharabod and
Peter Sewell},
title = {A concurrency semantics for relaxed atomics that permits optimisation
and avoids thin-air executions},
abstract = {Despite much research on concurrent programming languages, especially for Java and C/C++, we still do not have a satisfactory definition of their semantics, one that admits all common optimisations without also admitting undesired behaviour. Especially problematic are the thin-air'' examples involving high-performance concurrent accesses, such as C/C++11 relaxed atomics.  The C/C++11 model is in a per-candidate-execution style, and previous work has identified a tension between that and the fact that compiler optimisations do not operate over single candidate executions in isolation; rather, they operate over syntactic representations that represent all executions.

In this paper we propose a novel approach that circumvents this difficulty.  We define a concurrency semantics for a core calculus, including relaxed-atomic and non-atomic accesses, and locks, that admits a wide range of optimisation while still forbidding the classic thin-air examples.  It also addresses other problems relating to undefined behaviour.

The basic idea is to use an event-structure representation of the current state of each thread, capturing all of its potential executions, and to permit interleaving of execution and transformation steps over that to reflect optimisation (possibly dynamic) of the code. These are combined with a non-multi-copy-atomic storage subsystem, to reflect common hardware behaviour.

The semantics is defined in a mechanised and executable form, and designed to be implementable above current relaxed hardware and strong enough to support the programming idioms that C/C++11 does for this fragment.  It offers a potential way forward for concurrent programming language semantics, beyond the current C/C++11 and Java models.
},
booktitle = {\textbf{POPL 2016}: Proceedings of the 43rd Annual {ACM} {SIGPLAN-SIGACT} Symposium on
Principles of Programming Languages,  St. Petersburg,
FL, USA, January 20 - 22, 2016},
conf = {POPL 2016},
pages = {622--633},
year = {2016},
month = jan,
optcrossref = {DBLP:conf/popl/2016},
url = {http://doi.acm.org/10.1145/2837614.2837616},
pdf = {http://www.cl.cam.ac.uk/~jp622/popl16-thinair/a_concurrency_semantics.pdf},
doi = {10.1145/2837614.2837616},
timestamp = {Fri, 08 Jan 2016 18:18:25 +0100},
biburl = {http://dblp.uni-trier.de/rec/bib/conf/popl/Pichon-Pharabod16},
bibsource = {dblp computer science bibliography, http://dblp.org}
}

@inproceedings{Cerberus-PLDI16,
author = {
Kayvan Memarian and
Justus Matthiesen and
James Lingard and
Kyndylan Nienhuis and
David Chisnall and
Robert N.M. Watson and
Peter Sewell
},
title = {Into the depths of {C}: elaborating the de facto standards},
abstract = {
C remains central to our computing infrastructure.  It is notionally defined by ISO standards, but in reality the properties of C assumed by systems code and those implemented by compilers have diverged, both from the ISO standards and from each other, and none of these are clearly understood.

We make two contributions to help improve this error-prone situation.  First, we describe an in-depth analysis of the design space for the semantics of pointers and memory in C as it is used in practice.  We articulate many specific questions, build a suite of semantic test cases, gather experimental data from multiple implementations, and survey what C experts believe about the de facto standards.  We identify questions where there is a consensus (either following ISO or differing) and where there are conflicts. We apply all this to an experimental C implemented above capability hardware.  Second, we describe a formal model, Cerberus, for large parts of C.  Cerberus is parameterised on its memory model; it is linkable either with a candidate de facto memory object model, under construction, or with an operational C11 concurrency model; it is defined by elaboration to a much simpler Core language for accessibility, and it is executable as a test oracle on small examples.

This should provide a solid basis for discussion of what mainstream C is now: what programmers and analysis tools can assume and what compilers aim to implement. Ultimately we hope it will be a step towards clear, consistent, and accepted semantics for the various use-cases of C.
},
optcrossref = {},
optkey = {},
booktitle = {\textbf{PLDI 2016}},
conf = {PLDI 2016},
optpages = {},
year = {2016},
opteditor = {},
optvolume = {},
optnumber = {},
optseries = {},
month = jun,
optorganization = {},
optpublisher = {},
note = {PLDI 2016 Distinguished Paper award},
pdf = {http://www.cl.cam.ac.uk/users/pes20/cerberus/pldi16.pdf},
optannote = {}
}

@inproceedings{gudka15:soaap,
author = {Khilan Gudka and Robert N. M. Watson and Jonathan Anderson and David Chisnall and Brooks Davis and Ben Laurie and Ilias Marinos and Peter G. Neumann and Alex Richardson},
title = {{Clean Application Compartmentalization with SOAAP}},
booktitle = {\textbf{CCS 2015}: {Proceedings of the 22nd ACM Conference on Computer and Communications Security}},
conf = {CCS 2015},
month = oct,
year = {2015},
pdf = {https://www.cl.cam.ac.uk/research/security/ctsrd/pdfs/2015ccs-soaap.pdf},
abstract = {Application compartmentalization, a vulnerability mitigation technique
employed in programs such as OpenSSH and the Chromium web browser,
decomposes software into isolated components to limit privileges leaked
or otherwise available to attackers.
However, compartmentalizing applications -- and maintaining that
compartmentalization -- is hindered by ad hoc
methodologies and significantly increased programming effort.
In practice, programmers stumble through (rather than overtly reason
about) compartmentalization spaces of possible decompositions,
unknowingly trading off correctness, security, complexity, and
performance.
We present a new conceptual framework embodied in an LLVM-based tool: the
Security-Oriented Analysis of Application Programs (SOAAP) that allows
programmers to reason about co mpartmentalization using source-code
annotations (compartmentalization hypotheses).
We demonstrate considerable benefit when creating new compartmentalizations
for complex applications, and analyze existing compartmentalized
applications to discover design faults and maintenance issues arising
from application evolution.}
}

@misc{N2012,
optkey = {},
author = {Kayvan Memarian and Peter Sewell},
title = {Clarifying the {C} memory object model},
howpublished = {ISO SC22 WG14 N2012, \url{http://www.cl.cam.ac.uk/~pes20/cerberus/notes64-wg14.html}},
month = mar,
year = 2016,
optnote = {},
optannote = {}
}

@misc{N2013,
optkey = {},
author = {David Chisnall and Justus Matthiesen and Kayvan Memarian and Kyndylan Nienhuis and Peter Sewell and Robert N. M. Watson},
title = {C memory object and value semantics: the space of de facto and {ISO} standards},
howpublished = {ISO SC22 WG14 N2013, \url{http://www.cl.cam.ac.uk/~pes20/cerberus/notes30.pdf}},
month = mar,
year = 2016,
optnote = {},
optannote = {}
}

@misc{N2014,
optkey = {},
author = {Kayvan Memarian and Peter Sewell},
title = {What is {C} in practice? ({Cerberus} survey v2): Analysis of Responses},
howpublished = {ISO SC22 WG14 N2014, \url{http://www.cl.cam.ac.uk/~pes20/cerberus/notes50-survey-discussion.html}},
month = mar,
year = 2016,
optnote = {},
optannote = {}
}

@misc{N2015,
optkey = {},
author = {Kayvan Memarian and Peter Sewell},
title = {What is {C} in practice? ({Cerberus} survey v2): Analysis of Responses -- with Comments},
howpublished = {ISO SC22 WG14 N2015, \url{http://www.cl.cam.ac.uk/~pes20/cerberus/analysis-2016-02-05-anon.txt}},
month = mar,
year = 2016,
optnote = {},
optannote = {}
}

@phdthesis{battyPhD,
author = {Mark John Batty},
title = {The C11 and C++11 Concurrency Model},
school = {University of Cambridge Computer Laboratory},
year = {2014},
month = nov,
optkey = {},
opttype = {},
optmonth = {},
note = {Winner of 2015 ACM SIGPLAN John C. Reynolds
Doctoral Dissertation Award and 2015 CPHC/BCS Distinguished
Dissertation competition},
optannote = {}
}

@inproceedings{kell_dynamically_2016,
author = {Kell, Stephen},
title = {Dynamically diagnosing type errors in unsafe code},
booktitle = {\textbf{OOPSLA 2016}: Proceedings of the ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications},
conf = {OOPSLA 2016},
series = {OOPSLA 2016},
year = {2016},
month = nov,
location = {Amsterdam, The Netherlands},
numpages = {20},
publisher = {ACM},
address = {New York, NY, USA},
keywords = {C, unsafe code, pointers, type information},
abstract = {Existing approaches for detecting type errors in unsafe languages are limited.
Static analysis methods are imprecise,
and often require source-level changes, while
most dynamic methods check only memory properties
(bounds, liveness, etc.), owing to a lack of run-time type information.
This paper describes \textsf{libcrunch},
a system for binary-compatible \emph{run-time} type checking of unmodified
unsafe code, currently focusing on C.
Practical experience shows that our prototype implementation
is easily applicable to many real codebases without source-level modification,
correctly flags programmer errors with a very low rate of false positives,
offers a very low run-time overhead,
and covers classes of error caught by no previously existing tool.},
pdf = {http://www.cl.cam.ac.uk/~pes20/rems/papers/typebugs.pdf}
}

@inproceedings{kell_missing_2016,
author = {Stephen Kell and Dominic P. Mulligan and Peter Sewell},
booktitle = {\textbf{OOPSLA 2016}: Proceedings of the ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications},
conf = {OOPSLA 2016},
series = {OOPSLA 2016},
year = {2016},
month = nov,
location = {Amsterdam, The Netherlands},
numpages = {17},
publisher = {ACM},
address = {New York, NY, USA},
abstract = {Beneath the surface, software usually depends on complex \emph{linker
behaviour} to work as intended.  Even linking
\texttt{hello\_world.c} is surprisingly involved, and systems software
such as \texttt{libc} and operating system kernels rely on a host of
programmers and has largely been neglected by language researchers.

In this paper we survey the many use-cases that linkers support and
the poorly specified \emph{linker speak} by which they are controlled:
language.  We provide the first validated formalisation of a realistic
executable and linkable format (ELF), and capture aspects of the
Application Binary Interfaces for four mainstream platforms (AArch64,
AMD64, Power64, and IA32).  Using these, we develop an executable
small C programs (we use the example of \textsf{bzip2}) into a correctly
running executable.  We
provide our specification in Lem and Isabelle/HOL forms.  This is the
first formal specification of mainstream linking.  We have used the
Isabelle/HOL version to prove a sample
correctness property for one case of AMD64 ABI relocation,
demonstrating that the specification supports formal proof, and as a
first step towards the much more ambitious goal of verified linking.
Our work should enable several novel strands of research, including
linker-aware verified compilation and program analysis, and better
},
}

@inproceedings{operational-semantics-c11-2016,
author = {Kyndylan Nienhuis and Kayvan Memarian and Peter Sewell},
title = {An operational semantics for {C/C++11} concurrency},
booktitle = {\textbf{OOPSLA 2016}: Proceedings of the ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications},
conf = {OOPSLA 2016},
location = {Amsterdam, The Netherlands},
numpages = {18},
publisher = {ACM},
address = {New York, NY, USA},
month = nov,
year = {2016},
abstract = {The C/C++11 concurrency model balances two goals: it is relaxed enough to be efficiently implementable and (leaving aside the thin-air'' problem) it is strong enough to give useful guarantees to programmers. It is mathematically precise and has been used in verification research and compiler testing. However, the model is expressed in an axiomatic style, as predicates on complete candidate executions. This suffices for computing the set of allowed executions of a small litmus test, but it does not directly support the incremental construction of executions of larger programs. It is also at odds with conventional operational semantics, as used implicitly in the rest of the C/C++ standards.

Our main contribution is the development of an operational model for C/C++11 concurrency. This covers all the features of the previous formalised axiomatic model, and we have a mechanised proof that the two are equivalent, in Isabelle/HOL. We also integrate this semantics with an operational semantics for sequential C (described elsewhere); the combined semantics can incrementally execute programs in a small fragment of C.

Doing this uncovered several new aspects of the C/C++11 model: we show that one cannot build an equivalent operational model that simply follows program order, sequential consistent order, or the synchronises-with order. The first negative result is forced by hardware-observable behaviour, but the latter two are not, and so might be ameliorated by changing C/C++11. More generally, we hope that this work, with its focus on incremental construction of executions, will inform the future design of new concurrency models.},
pdf = {http://www.cl.cam.ac.uk/~pes20/rems/papers/nienhuis-oopsla-2016.pdf}
}

@misc{N2089,
optkey = {},
author = {Kayvan Memarian and Peter Sewell},
title = {Clarifying Unspecified Values (Draft Defect Report or Proposal for C2x)},
howpublished = {ISO SC22 WG14 N2089, \url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2089.htm}},
month = sep,
year = 2016,
optnote = {},
optannote = {}
}

@misc{N2090,
optkey = {},
author = {Kayvan Memarian and Peter Sewell},
title = {Clarifying Pointer Provenance (Draft Defect Report or Proposal for C2x)},
howpublished = {ISO SC22 WG14 N2090, \url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2090.htm}},
month = sep,
year = 2016,
optnote = {},
optannote = {}
}

@misc{N2091,
optkey = {},
author = {Kayvan Memarian and Peter Sewell},
title = {Clarifying Trap Representations (Draft Defect Report or Proposal for C2x)},
howpublished = {ISO SC22 WG14 N2091, \url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2091.htm}},
month = sep,
year = 2016,
optnote = {},
optannote = {}
}

@inproceedings{Chisnall2017,
author = {Chisnall, David and Davis, Brooks and Gudka, Khilan and Brazdil, David and Joannou, Alexandre and Woodruff, Jonathan and Markettos, A. Theodore and Maste, J. Edward and Norton, Robert and Son, Stacey and Roe, Michael and Moore, Simon W. and Neumann, Peter G. and Laurie, Ben and Watson, Robert N.M.},
title = {{CHERI JNI: Sinking the Java Security Model into the C}},
booktitle = {\textbf{ASPLOS 2017}: Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating Systems},
series = {ASPLOS '17},
year = {2017},
month = apr,
isbn = {978-1-4503-4465-4},
location = {Xi'an, China},
pages = {569--583},
numpages = {15},
url = {http://doi.acm.org/10.1145/3037697.3037725},
doi = {10.1145/3037697.3037725},
acmid = {3037725},
publisher = {ACM},
address = {New York, NY, USA},
keywords = {architecture, capability systems, cheri, compartmentalization, compilers, hardware security, java, jni, language security, memory protection, sandboxing},
abstract = {Java provides security and robustness by building a high-level security model atop the foundation of memory protection. Unfortunately, any native code linked into a Java program -- including the million lines used to implement the standard library -- is able to bypass both the memory protection and the higher-level policies. We present a hardware-assisted implementation of the Java native code interface, which extends the guarantees required for Java's security model to native code.

Our design supports safe direct access to buffers owned by the JVM, including hardware-enforced read-only access where appropriate. We also present Java language syntax to declaratively describe isolated compartments for native code.

We show that it is possible to preserve the memory safety and isolation requirements of the Java security model in C code, allowing native code to run in the same process as Java code with the same impact on security as running equivalent Java code. Our approach has a negligible impact on performance, compared with the existing unsafe native code interface. We demonstrate a prototype implementation running on the CHERI microprocessor synthesized in FPGA.}
}

@inproceedings{DBLP:conf/popl/KumarMNO14,
author = {Ramana Kumar and
Magnus O. Myreen and
Michael Norrish and
Scott Owens},
title = {{CakeML}: a verified implementation of {ML}},
booktitle = {\textbf{POPL 2014}: The 41st Annual {ACM} {SIGPLAN-SIGACT} Symposium on Principles of
Programming Languages,  San Diego, CA, USA},
conf = {POPL 2014},
pages = {179--192},
year = {2014},
month = jan,
optcrossref = {DBLP:conf/popl/2014},
url = {http://doi.acm.org/10.1145/2535838.2535841},
doi = {10.1145/2535838.2535841},
timestamp = {Thu, 09 Jan 2014 08:32:32 +0100},
biburl = {http://dblp.uni-trier.de/rec/bib/conf/popl/KumarMNO14},
bibsource = {dblp computer science bibliography, http://dblp.org},
abstract = {
We have developed and mechanically verified an ML system called CakeML, which supports a substantial subset of Standard ML. CakeML is implemented as an interactive read-eval-print loop (REPL) in x86-64 machine code. Our correctness theorem ensures that this REPL implementation prints only those results permitted by the semantics of CakeML. Our verification effort touches on a breadth of topics including lexing, parsing, type checking, incremental and dynamic compilation, garbage collection, arbitrary-precision arithmetic, and compiler bootstrapping.

Our contributions are twofold. The first is simply in building a system that is end-to-end verified, demonstrating that each piece of such a verification effort can in practice be composed with the others, and ensuring that none of the pieces rely on any over-simplifying assumptions. The second is developing novel approaches to some of the more challenging aspects of the verification. In particular, our formally verified compiler can bootstrap itself: we apply the verified compiler to itself to produce a verified machine-code implementation of the compiler. Additionally, our compiler proof handles diverging input programs with a lightweight approach based on logical timeout exceptions. The entire development was carried out in the HOL4 theorem prover.}
}

@article{DBLP:journals/jfp/MyreenO14,
author = {Magnus O. Myreen and
Scott Owens},
title = {Proof-producing translation of higher-order logic into pure and stateful
{ML}},
journal = {\textbf{J. Funct. Program.}},
volume = {24},
number = {2-3},
pages = {284--315},
year = {2014},
month = jan,
url = {http://dx.doi.org/10.1017/S0956796813000282},
doi = {10.1017/S0956796813000282},
timestamp = {Mon, 26 May 2014 10:31:52 +0200},
biburl = {http://dblp.uni-trier.de/rec/bib/journals/jfp/MyreenO14},
bibsource = {dblp computer science bibliography, http://dblp.org},
abstract = {
The higher-order logic found in proof assistants such as Coq and various HOL systems provides a convenient setting for the development and verification of functional programs. However, to efficiently run these programs, they must be converted (or extracted') to functional programs in a programming language such as ML or Haskell. With current techniques, this step, which must be trusted, relates similar looking objects that have very different semantic definitions, such as the set-theoretic model of a logic and the operational semantics of a programming language. In this paper, we show how to increase the trustworthiness of this step with an automated technique. Given a functional program expressed in higher-order logic, our technique provides the corresponding program for a functional language defined with an operational semantics, and it provides a mechanically checked theorem relating the two. This theorem can then be used to transfer verified properties of the logical function to the program. We have implemented our technique in the HOL4 theorem prover, translating functions to a subset of Standard ML, and have applied the implementation to examples including functional data structures, a parser generator, cryptographic algorithms, a garbage collector and the 500-line kernel of the HOL light theorem prover. This paper extends our previous conference publication with new material that shows how functions defined in terms of a state-and-exception monad can be translated, with proofs, into stateful ML code. The HOL light example is also new.}
}

@inproceedings{YongKiamMKFON16,
author = {Tan, Yong Kiam and Magnus O. Myreen and Ramana Kumar and
Anthony Fox and Scott Owens and Michael Norrish},
title = {A New Verified Compiler Backend for {CakeML}},
booktitle = {Proc. \textbf{ICFP 2016}: International Conference on Functional Programming},
conf = {ICFP 2016},
year = 2016,
month = sep,
doi = {10.1145/2951913.2951924},
pdf = {https://cakeml.org/icfp16.pdf},
publisher = {ACM Press},
abstract = {
We have developed and mechanically verified a new compiler backend
for CakeML.  Our new compiler features a sequence of intermediate
languages that allows it to incrementally compile away high-level
features and enables verification at the right levels of semantic
detail.  In this way, it resembles mainstream (unverified)
compilers for strict functional languages.  The compiler supports
efficient curried multi-argument functions, configurable data
representations, exceptions that unwind the call stack, register
allocation, and more.  The compiler targets several architectures:
x86-64, ARMv6, ARMv8, MIPS-64, and RISC-V.

In this paper, we present the overall structure of the compiler,
including its 12 intermediate languages, and explain how
everything fits together.  We focus particularly on the
interaction between the verification of the register allocator and
the garbage collector, and memory representations.  The entire
development has been carried out within the HOL4 theorem prover.
}
}

@inproceedings{FoxMTK17,
author = {Anthony C. J. Fox and
Magnus O. Myreen and
Yong Kiam Tan and
Ramana Kumar},
title = {Verified compilation of {CakeML} to multiple
machine-code targets},
booktitle = {Proc. \textbf{CPP 2017}: Certified Programs and Proofs},
conf = {CPP 2017},
year = {2017},
month = jan,
doi = {10.1145/3018610.3018621},
editor = {Yves Bertot and Viktor Vafeiadis},
pdf = {https://cakeml.org/cpp17.pdf},
publisher = {{ACM}},
abstract = {
This paper describes how the latest CakeML compiler supports
verified compilation down to multiple realistically modelled
target architectures.  In particular, we describe how the compiler
definition, the various language semantics, and the correctness
proofs were organised to minimize target-specific overhead.  With
our setup we have incorporated compilation to four 64-bit
architectures, ARMv8, x86-64, MIPS-62, RISC-V, and one 32-bit
architecture, ARMv6.  Our correctness theorem allows interference
from the environment: the top-level correctness statement takes
into account execution of foreign code and per-instruction
interference from external processes, such as interrupt handlers
in operating systems.  The entire CakeML development is formalised
in the HOL4 theorem prover.

}
}

@inproceedings{kell_towards_20XX,
author = {Stephen Kell},
title = {Towards a dynamic object model within {Unix} processes},
booktitle = {\textbf{Onward! 2015}: 2015 {ACM} International Symposium on New Ideas, New Paradigms, and
Reflections on Programming and Software,  Pittsburgh,
PA, USA},
conf = {Onward! 2015},
pages = {224--239},
year = {2015},
month = oct,
xcrossref = {DBLP:conf/oopsla/2015onward},
url = {http://doi.acm.org/10.1145/2814228.2814238},
doi = {10.1145/2814228.2814238},
timestamp = {Wed, 28 Oct 2015 16:51:55 +0100},
biburl = {http://dblp.uni-trier.de/rec/bib/conf/oopsla/Kell15},
bibsource = {dblp computer science bibliography, http://dblp.org},
abstract = {Programmers face much complexity from the co-existence of
native'' (Unix-like) and virtual machine (VM) managed'' run-time environments.
Rather than having VMs replace Unix processes, we investigate whether it makes
sense for the latter to become VMs'', by evolving Unix's
user-level services to subsume those of VMs.
We survey the (little-understood) VM-like features in modern Unix, noting
common shortcomings: a lack of semantic metadata (type information'')
and the inability to bind from objects back'' to their metadata.
We describe the design and implementation of
a system, \textsf{liballocs}, which adds these capabilities in a highly compatible way,
and explore its consequences.},
pdf = {http://www.cl.cam.ac.uk/~srk31/research/papers/kell15towards-preprint.pdf}
}

@inproceedings{kell_some_2017,
author = {Kell, Stephen},
title = {Some were meant for {C}: the endurance of an unmanageable language},
booktitle = {\textbf{Onward! 2017}: Proceedings of the 2017 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming \& Software},
conf = {Onward! 2017},
series = {Onward! 2017},
year = {2017},
month = oct,
location = {Vancouver, British Columbia, Canada},
numpages = {18},
url = {http://www.cl.cam.ac.uk/~srk31/research/papers/kell17some-preprint.pdf},
doi = {10.1145/3133850.3133867},
publisher = {ACM},
address = {New York, NY, USA},
keywords = {systems programming, virtual machine, managed languages, safety, undefined behavior},
abstract = {The C language leads a double life: as an application
programming language of yesteryear, perpetuated by
circumstance, and as a systems programming language
which remains a weapon of choice decades after its cre-
ation. This essay is a C programmer's reaction to the call
to abandon ship. It questions several properties com-
monly held to define the experience of using C; these
include unsafety, undefined behaviour, and the moti-
vation of performance. It argues all these are in fact
inessential; rather, it traces C's ultimate strength to a
communicative design which does not fit easily within
the usual conception of a programming language'', but
can be seen as a counterpoint to so-called managed
languages''. This communicativity is what facilitates the
essential aspect of system-building: creating parts which
interact with other, remote parts---being alongside'' not
within''. }
}

@article{YALLOP2017,
title = {A modular foreign function interface},
journal = {\textbf{Science of Computer Programming}},
year = {2017},
month = apr,
issn = {0167-6423},
doi = {https://doi.org/10.1016/j.scico.2017.04.002},
url = {http://www.sciencedirect.com/science/article/pii/S0167642317300709},
pdf = {https://www.cl.cam.ac.uk/~jdy22/papers/a-modular-foreign-function-interface.pdf},
author = {Jeremy Yallop and David Sheets and Anil Madhavapeddy},
keywords = {Foreign functions},
keywords = {Functional programming},
keywords = {Modularity},
abstract = {Abstract foreign function interfaces are typically organised monolithically, tying together the specification of each foreign function with the mechanism used to make the function available in the host language. This leads to inflexible systems, where switching from one binding mechanism to another (say from dynamic binding to static code generation) often requires changing tools and rewriting large portions of code. We show that ML-style module systems support exactly the kind of abstraction needed to separate these two aspects of a foreign function binding, leading to declarative foreign function bindings that support switching between a wide variety of binding mechanisms — static and dynamic, synchronous and asynchronous, etc. — with no changes to the function specifications. Note. This is a revised and expanded version of an earlier paper, Declarative Foreign Function Binding Through Generic Programming. This paper brings a greater focus on modularity, and adds new sections on error handling, and on the practicality of the approach we describe.}
}

@inproceedings{Watt:2018:MVW:3176245.3167082,
title = {Mechanising and Verifying the WebAssembly Specification},
booktitle = {\textbf{CPP 2018}: Proceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and Proofs},
series = {CPP 2018},
year = {2018},
isbn = {978-1-4503-5586-5},
location = {Los Angeles, CA, USA},
pages = {53--65},
numpages = {13},
url = {http://doi.acm.org/10.1145/3167082},
doi = {10.1145/3167082},
acmid = {3167082},
publisher = {ACM},
address = {New York, NY, USA},
keywords = {bytecode, reduction, soundness, stack machine},
pdf = {http://www.cl.cam.ac.uk/users/pes20/mechanising-and-verifying-the-webassembly-specification.pdf},
conf = {CPP},
abstract = {WebAssembly is a new low-level language currently being implemented in all major web browsers. It is designed to become the universal compilation target for the web, obsoleting existing solutions in this area, such as asm.js and Native Client. The WebAssembly working group has incorporated formal techniques into the development of the language, but their efforts so far have focussed on pen and paper formal specification.

We present a mechanised Isabelle specification for the WebAssembly language, together with a verified executable interpreter and type checker. Moreover, we present a fully mechanised proof of the soundness of the WebAssembly type system, and detail how our work on this proof has exposed several issues with the official WebAssembly specification, influencing its development. Finally, we give a brief account of our efforts in performing differential fuzzing of our interpreter against industry implementations.}
}

@inproceedings{Chargueraud2018JSExplain,
author = {Chargu{\'e}raud, Arthur and Schmitt, Alan and Wood, Thomas},
title = {{JSExplain}: a Double Debugger for {JavaScript}},
booktitle = {\textbf{WWW '18 Companion}: The 2018 Web Conference Companion, April 23--27, 2018, Lyon, France},
conf = {WWW},
year = {2018},
month = apr,
publisher = {ACM},
abstract = {We present JSExplain, a reference interpreter for JavaScript that closely
follows the specification and that produces execution traces.
These traces may be interactively investigated in a browser, with an
interface that displays not only the code and the state of the interpreter,
but also the code and the state of the interpreted program.
Conditional breakpoints may be expressed with respect to both the interpreter
and the interpreted program. In that respect, JSExplain is a double-debugger
for the specification of JavaScript.},
doi = {10.1145/3184558.3185969},
pdf = {https://psvg.doc.ic.ac.uk/publications/Chargueraud2018JSExplain.pdf}
}

@article{FragosoSantos2018JaVerT,
author = {{Fragoso Santos}, Jos{\'{e}} and Maksimovi\'{c}, Petar and Naud\v{z}i\={u}nien\.{e}, Daiva and Wood, Thomas and Gardner, Philippa},
title = {{JaVerT: JavaScript verification toolchain}},
journal = {{PACMPL}},
volume = {2},
number = {\textbf{POPL}},
conf = {{POPL}},
pages = {50:1--50:33},
year = {2018},
abstract = {The dynamic nature of JavaScript and its complex semantics make it a difficult target for logic-based verification.
We introduce JaVerT, a semi-automatic JavaScript Verification Toolchain, based on separation logic and aimed at the specialist developer wanting rich,
mechanically verified specifications of critical JavaScript code. To specify JavaScript programs,
we design abstractions that capture its key heap structures (for example, prototype chains and function closures),
allowing the developer to write clear and succinct specifications with minimal knowledge of the JavaScript internals.
To verify JavaScript programs, we develop JaVerT, a verification pipeline consisting of: JS-2-JSIL,
a well-tested compiler from JavaScript to JSIL, an intermediate goto language capturing the fundamental dynamic features of JavaScript;
JSIL Verify, a semi-automatic verification tool based on a sound JSIL separation logic;
and verified axiomatic specifications of the JavaScript internal functions.
Using JaVerT, we verify functional correctness properties of:
data-structure libraries (key-value map, priority queue) written in an object-oriented style;
operations on data structures such as binary search trees (BSTs) and lists; examples illustrating function closures;
and test cases from the official ECMAScript test suite. The verification times suggest that reasoning about larger,
more complex code using JaVerT is feasible.
},
doi = {10.1145/3158138},
pdf = {https://psvg.doc.ic.ac.uk/publications/FragosoSantos2018JaVerT.pdf}
}
`

This file was generated by bibtex2html 1.96.