<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Robigalia</title>
    <description>Updates from the Robigalia project. See &lt;a href=&quot;https://rbg.systems&quot;&gt;https://rbg.systems&lt;/a&gt; for more!</description>
    <link>https://rbg.systems/blog/</link>
    <atom:link href="https://rbg.systems/blog/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Fri, 17 Dec 2021 17:36:20 +0000</pubDate>
    <lastBuildDate>Fri, 17 Dec 2021 17:36:20 +0000</lastBuildDate>
    <generator>Jekyll v3.3.0</generator>
    
      <item>
        <title>Robigalia&amp;#8217;s Official Logo</title>
        <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Robigalia has been without a logo for over a year. It&amp;#8217;s been in the back of my
mind that any self-respecting open source project needs a logo. I took some
design classes in high school and don&amp;#8217;t have a budget, so I made one myself!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Here&amp;#8217;s the end result:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;imageblock&quot;&gt;
&lt;div class=&quot;content&quot;&gt;
&lt;img src=&quot;https://rbg.systems/logo.svg&quot; alt=&quot;Robigalia logo&quot; width=&quot;740&quot; height=&quot;740&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I had some requirements when designing the logo. First, it should be simple
enough that it looks good as a favicon (smaller than 64x64). It should also look
good in monochrome or in restricted color palettes. The simpler, the better.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;When I was brainstorming ideas for the logo, I got hung up trying to incorporate
the idea of wheat, crop disease, agriculture, or Roman themes, owing to the
project&amp;#8217;s name. Eventually I remembered about the
&lt;a href=&quot;http://www.ccelian.com/concepca.html&quot;&gt;Elian script&lt;/a&gt;. I started doodling various
words in Elian. A full word was too complicated. I focused on a particular
cluster of letters that fit together well: &quot;rbg&quot;. This is also a shorthand for
&quot;Robigalia&quot;, which works out well!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;What you see above is an SVG (created in Inkscape) inspired those three letters
in the Elian script. For symmetry, the actual letters are &quot;rbp&quot;, but it doesn&amp;#8217;t
bother me to not directly use the Elian script. The lines and the whitespace
between them are all the same width, which helps the SVG scale down to small
resolutions well. The cyan color on the dark background reminds me of Tron. I
also think it kinda looks like a sideways 8-bit jellyfish. eternaleye said it
looks like a push button schematic.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I think it&amp;#8217;s kinda neat, and look forward to seeing some awesome desktop themes
using it once we have a windowing system!&lt;/p&gt;
&lt;/div&gt;</description>
        <pubDate>Wed, 04 Jan 2017 00:00:00 +0000</pubDate>
        <link>https://rbg.systems/blog/2017/01/04/new-logo.html</link>
        <guid isPermaLink="true">https://rbg.systems/blog/2017/01/04/new-logo.html</guid>
        
        
      </item>
    
      <item>
        <title>This Year in Robigalia</title>
        <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Today marks the first anniversary since Robigalia
&lt;a href=&quot;https://news.ycombinator.com/item?id=10848890&quot;&gt;made its public debut&lt;/a&gt;. This was
much to my dismay at the time. It&amp;#8217;s hard to express how much anxiety having
something posted to a large forum like HN can cause when the work isn&amp;#8217;t yet
ready for public consumption. Not a great way to spend your birthday! With that
in mind, the project has been relatively quiet until recently. I largely
suspended code work on Robigalia while I was interning at Data61 on the seL4
verification team. That didn&amp;#8217;t stop me thinking about it, though. A lot of the
conceptual design is basically done.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I&amp;#8217;ve been working on a &quot;book&quot;, &quot;Robigalia: An Operating System for the Modern
Era&quot; which documents the design and theory behind Robigalia. This has been
really helpful for teasing out design issues before spending a lot of time
implementing things. We&amp;#8217;ve also been (idly) looking at modeling various portions
of the system formally, for use with model checking tools to show that at least
the model is sound. As time goes on, portions of the book will be serialized and
posted on the blog. The book will become the core of my undergraduate thesis.
One such post on timekeeping will be coming out shortly, pending expert review.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Implementation progress hasn&amp;#8217;t completely stalled either. I&amp;#8217;ve been chipping
away at ACPI handling and device drivers. This is slowed massively by me
teaching and training other undergraduates at my university how operating
systems work, with the hope of getting them to be productive contributors to
Robigalia. While I was at Data61, a student there implemented NetBSD&amp;#8217;s rump
hypercall interface. This will allow us to use NetBSD&amp;#8217;s drivers in the
short run. This is a huge help, given the wide variety of hardware that a modern
OS needs to support!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In terms of inspiration, I&amp;#8217;ve been hugely inspired by
&lt;a href=&quot;https://ngnghm.github.io/&quot;&gt;the Houyhnhnm computing essays&lt;/a&gt;, as well as KeyKOS,
EROS, and Coyotos. As more of our design is made public, their influence will
become very apparent. Our goal of a POSIX userspace hasn&amp;#8217;t been forgotten. It&amp;#8217;s
still there. But making native application support as good as it can be is our
top priority. &lt;a href=&quot;http://joeduffyblog.com/2015/11/03/blogging-about-midori/&quot;&gt;Midori&lt;/a&gt;
has also been a huge inspiration here.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;seL4 has changed in the meantime too. The realtime kernel has been released, as
has multicore support and an x64 port. A RISC-V port is also soon to come. We
now target what will be known as the &quot;stage&quot; branch of seL4, which contains
features destined to be verified, but which haven&amp;#8217;t been yet.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The future is bright for Robigalia. While we work on the core, if you&amp;#8217;re
interested in helping the project, a good way to do that is to give feedback in
the IRC channel when we&amp;#8217;re brainstorming or analyzing designs. The absolute best
way, however, is to contribute to &lt;a href=&quot;https://github.com/faern/rips&quot;&gt;rips&lt;/a&gt;,
&lt;a href=&quot;https://github.com/libpnet/libpnet&quot;&gt;libpnet&lt;/a&gt;, &lt;a href=&quot;https://github.com/tokio-rs&quot;&gt;tokio&lt;/a&gt;,
&lt;a href=&quot;https://github.com/DaGenix/rust-crypto/&quot;&gt;rust-crypto&lt;/a&gt;,
&lt;a href=&quot;https://github.com/ctz/rustls&quot;&gt;rustls&lt;/a&gt;,
&lt;a href=&quot;https://github.com/nikomatsakis/rayon&quot;&gt;rayon&lt;/a&gt;, or even
&lt;a href=&quot;https://github.com/rust-lang/rust/&quot;&gt;Rust itself&lt;/a&gt;. Bettering the Rust ecosystem is
the best way to better Robigalia, in the short run. If you&amp;#8217;re interested in
devices, you might take a look at starting a
&lt;a href=&quot;https://gitlab.com/robigalia/meta/issues/32&quot;&gt;pure-Rust USB stack&lt;/a&gt; or Vulkan
drivers for some openly documented platform like AMD or Intel. This can largely
be done in userspace on Linux, for the first phases.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Our plan is to have an initial release of the book and a working Robigalia
system on April 25, 2017. See you then!&lt;/p&gt;
&lt;/div&gt;</description>
        <pubDate>Tue, 27 Dec 2016 00:00:00 +0000</pubDate>
        <link>https://rbg.systems/blog/2016/12/27/this-year-in-robigalia.html</link>
        <guid isPermaLink="true">https://rbg.systems/blog/2016/12/27/this-year-in-robigalia.html</guid>
        
        
      </item>
    
      <item>
        <title>Notes from the first seL4 workshop</title>
        <description>&lt;div id=&quot;preamble&quot;&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This past week I traveled to the first international seL4 workshop, thanks to
funding provided by HRL. While there, I gave a presentation about some design
patterns used in Robigalia. While slides aren&amp;#8217;t currently available for most of
these, I did take some notes. As/if slides are released, I&amp;#8217;ll add links to this
post.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;high-assurance-software-for-autonomous-ground-systems&quot;&gt;High-assurance software for autonomous ground systems&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This was a presentation by Alexsey Nogin from HRL about the work they are doing
as part of the &quot;ground team&quot; of DARPA&amp;#8217;s
&lt;a href=&quot;http://www.darpa.mil/program/high-assurance-cyber-military-systems&quot;&gt;HACMS
program&lt;/a&gt;. This included some of the various components they are using and the
overall system structure.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;sel4-all-the-cool-new-things&quot;&gt;seL4: All the cool new things&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Gernot talked about the current roadmap for seL4 and what recent work has been
done. In particular he pointed out that the RT kernel is currently available and
that multicore and x64 is in master. He also announced that, in the near future,
there will be an explicit &quot;stage&quot; branch which will eventually be merged into
master, as verification is completed for new pieces. The first thing added will
be RT. The &lt;a href=&quot;https://sel4.systems/Info/Roadmap&quot;&gt;seL4 roadmap has been updated to reflect
current reality&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;robigalia&quot;&gt;Robigalia&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This was my talk. The slides &lt;a href=&quot;https://rbg.systems/sel4-ws-2016-12-15.pdf&quot;&gt;are
available&lt;/a&gt;. I talked about some design patterns that we&amp;#8217;ve come up with for
robust dynamic systems: space banks, bushels, extended virtual message
registers, and briefly mentioned persistence and drivers.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;There will be more available on this in the coming weeks.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;remote-attestation&quot;&gt;Remote Attestation&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Oak Rattanavipanon, from UC Irvine, talked about the work they have been doing
to get remote attestation on seL4. Their approach right now considers only
remote adversaries. They modify the kernel to work with the Sabre Lite&amp;#8217;s secure
boot. From this, they have some code which runs (currently) in the root thread
to provide a hybrid attestation scheme. Using the hardware root of trust
provided by the Sabre Lite&amp;#8217;s secure boot implementation, they use the guarantees
provided by seL4 to ensure confidentiality of the attestation key and integrity
of the attestation code.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;On top of this, they implement a simple network protocol wherein a remote
verifier can request a MAC of a region of memory on the verifier. If the MAC
matches what the verifier expects, then the verifier can trust that the software
on the remote device hasn&amp;#8217;t been subverted. There were a bunch of questions
about the actual network protocol they use. Currently, they use a nonce to
prevent replay, but the MAC is otherwise transported in cleartext with no other
authentication.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I recall that they plan on releasing their code open source, but don&amp;#8217;t have that
written in my notes so that memory may be faulty.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;data-distribution-for-sel4&quot;&gt;Data Distribution for seL4&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Andrea Sorbini, from Real Time Innovations, talked about work they have been
doing to bring one of their products, &quot;RTI Connext DDS Micro&quot;, a :dds:[data
distribution service] middleware, to seL4. They are doing this as part of a
DARPA SBIR project. The tagline used to introduce the project was &quot;What good is
formal verification if you don&amp;#8217;t have friends to talk to?&quot;. DDS is a pub/sub
based peer-to-peer communications system. It provides structured message
transport and has a variety of quality of service configuration such as
transport reliability, message history, delivery deadlines, durability,
liveliness, and resource limits. The seL4 implementation supports most of these
properties, and it was created from the DO178C certifiable subset of the product
which requires static configuration of resources and communication paths. They
are investigating using formal verification in cooperation with Galois to show
memory safety of their receive path.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The primary challenge they ran into was a lack of an OS personality to target.
They ended up building a &lt;code&gt;libsel4osapi&lt;/code&gt; which provides interfaces for a clock,
network, UDP, serial communication, timers, and a process abstraction. They did
not enjoy doing this, commenting that &quot;minimalism is no excuse for poor
developer experience&quot;. They had quite a few suggestions for what would make
their experience much more pleasant, many of which came up during the &quot;gaps&quot;
conversation.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;debugging-sel4-with-gdb&quot;&gt;Debugging seL4 with GDB&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Chris Guikema, from DornerWorks, talked about the work they have been doing to
enable more robust and advanced GDB debugging of especially CAmkES components.
They have taken the x86 GDB server that Data61 has developed and ported it to
ARM, adding some features along the way. Parts of their code are
&lt;a href=&quot;https://github.com/dornerworks/gdbstub-app&quot;&gt;available online&lt;/a&gt; to start using.
I recall seeing a link to their GDB server in the slides, but can&amp;#8217;t find it now.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;virtualization-on-sel4&quot;&gt;Virtualization on seL4&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Ihor Kuz, from Data61, gave an introduction to virtualization theory, including the basics of
Popek-Goldberg virtualizability and the distinction between privileged and
sensitive instructions. He gave an overview of virtualization in practice on x86
and ARM, as well as how some of the seL4 abstractions of these mechanisms work.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;sel4-gaps&quot;&gt;seL4 gaps&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;At the end of the day, we wrapped up with a discussion of gaps in seL4. Gernot
went over a document that they created listing what they perceive as the gaps.
There was general agreement among the audience with the analysis. I requested
access to x86 MSRs, but no one else had any additions. There was then a brief
conversation about one of the most pressing issues: drivers. The current idea is
to have tables on the wiki containing links to open source drivers and a basic
evaluation of them. Someone also floated the idea of a tool which boots Linux on
a board, scans what devices are available, and puts together a report indicating
which have drivers available for seL4 and where they can be found.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
        <pubDate>Sun, 18 Dec 2016 00:00:00 +0000</pubDate>
        <link>https://rbg.systems/blog/2016/12/18/sel4-ws.html</link>
        <guid isPermaLink="true">https://rbg.systems/blog/2016/12/18/sel4-ws.html</guid>
        
        
      </item>
    
      <item>
        <title>Putting the Rust in Trust</title>
        <description>&lt;div id=&quot;preamble&quot;&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;After working at Data61 with the verification team, and many conversations with
Gerwin Klein, I have a good plan on how I think I want to achieve the goal of
&lt;strong&gt;Trustworthy Rust&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;introduction-to-formal-verification&quot;&gt;Introduction to formal verification&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Formal verification is using mathematical techniques to analyze software. In
general, one wants to show that a particular program implements some
specification (&quot;functional correctness&quot;). But there are other things you can
show too! For example, seL4 shows high-level security properties like integrity
and confidentiality. Actually doing this is quite hard, but relatively well
understood these days. You need to model the program, then show that the model
satisfies the spec. Hopefully, the model corresponds to reality. In practice,
many verification techniques have serious problems with reality-correspondence.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;As one semi-famous example, &lt;a href=&quot;https://en.wikipedia.org/wiki/Binary_search_algorithm&quot;&gt;binary search&lt;/a&gt; was &quot;proven correct&quot; many times,
but &lt;a href=&quot;https://research.googleblog.com/2006/06/extra-extra-read-all-about-it-nearly.html&quot;&gt;still had buggy implementations&lt;/a&gt;. What was the failure here? The
model used mathematical integers, but the reality is finite, wrapping words.
This is a complete embarrassment that any principled use of formal methods
should avoid. If your model doesn&amp;#8217;t correspond to reality, you need a tedious,
manual, error-prone validation of the implementation. We can do better!&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;phase-1-a-semantics-for-rust&quot;&gt;Phase 1: A semantics for Rust&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;The first phase is modeling the semantics of Rust programs. There are
&lt;a href=&quot;ftp://ftp.cs.washington.edu/tr/2015/03/UW-CSE-15-03-02.pdf&quot;&gt;quite&lt;/a&gt; &lt;a href=&quot;https://open.library.ubc.ca/media/download/pdf/24/1.0220521/4&quot;&gt;a&lt;/a&gt; &lt;a href=&quot;https://ticki.github.io/blog/a-hoare-logic-for-rust/&quot;&gt;few&lt;/a&gt; &lt;a href=&quot;https://github.com/Rust-Proof/rustproof&quot;&gt;partial&lt;/a&gt; approaches to this
so far. This is not to disparage their efforts - I hope they continue and
succeed, because more work in this space can only be good!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;On the one hand, you want a semantics so you can prove things like soundness of
the language&amp;#8217;s type system, or &lt;strong&gt;memory safety&lt;/strong&gt; of fragments of the language. On
the other hand, sometimes you want to actually prove properties about specific
programs in the language. The former can sometimes use a simplified model,
depending on the type system and guarantees it wants to make. The latter needs
to capture all details of the language that are relevant to the program under
consideration, and is generally much more formalization-intensive.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;I have my own in-progress semantics for &lt;a href=&quot;https://blog.rust-lang.org/2016/04/19/MIR.html&quot;&gt;MIR&lt;/a&gt;, that I&amp;#8217;m working on between
Robigalia sprints. In general, I think MIR is the best short-term approach for
initial verification of Rust programs. In the long term, someone will need to
write a full semantics for actual-Rust, and write either a verified compiler or
a proof-producing translator from that into MIR. This will be very challenging,
as Rust&amp;#8217;s type system is rather complex. I suspect the &lt;a href=&quot;http://plv.mpi-sws.org/rustbelt/&quot;&gt;RustBelt&lt;/a&gt; folks will
have the best start of this.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;At this point, implementations of Rust (eg, rustc) could use the semantics to
resolve confusions and as a ultimate arbiter of deciding correctness of some
program transformation (eg, an optimization). In the long run, the semantics
could serve as the normative specification of the whole language.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;phase-2-program-logics&quot;&gt;Phase 2: program logics&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Given a semantics for MIR, one can define things like &lt;a href=&quot;https://en.wikipedia.org/wiki/Hoare_logic&quot;&gt;Hoare logics&lt;/a&gt; over
MIR programs. The benefit of having a semantics at this point is that the
program logics can be shown &lt;em&gt;sound&lt;/em&gt;, which is rather important. Soundness of a
program logic means that properties proved in the logic are also true of the
program. Ticki&amp;#8217;s and RustProof&amp;#8217;s works, mentioned above, can not be shown sound
without a semantics for MIR.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;You really want properties in the program logic to be nicely composable, so that
proving results about, for example, portions of &lt;a href=&quot;https://doc.rust-lang.org/core/&quot;&gt;libcore&lt;/a&gt; can be slotted
easily into proofs about larger programs. At this point, one could start writing
specifications and proving functional correctness of small programs or library
functions.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My plan for this right now is to use a separation logic and a
&lt;a href=&quot;https://www.isa-afp.org/entries/Abstract-Hoare-Logics.shtml&quot;&gt;semantic Hoare logic&lt;/a&gt; combined with something like &lt;a href=&quot;http://ts.data61.csiro.au/projects/TS/autocorres/&quot;&gt;AutoCorres&lt;/a&gt;
to make verification easier. I hope to lean very heavily on the extensive
libraries and infrastructure that the Data61&amp;#8217;s TS group has created. It will be
a lot of work getting this working, but the down-the-line productivity benefits
could be huge.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;sect1&quot;&gt;
&lt;h2 id=&quot;phase-3-verified-compilation&quot;&gt;Phase 3: verified compilation&lt;/h2&gt;
&lt;div class=&quot;sectionbody&quot;&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Given a proven-correct MIR program, we need some way to actually &lt;em&gt;execute&lt;/em&gt; that
program, in a way that the correctness proofs still apply. And ideally, we would
like to retain most of the efficiency of writing in Rust instead of some higher
level language like Haskell.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;My plan for this right now is to write a MIR-to-&quot;&lt;a href=&quot;http://cakeml.org/&quot;&gt;CakeML&lt;/a&gt;&quot; translator,
and use CakeML&amp;#8217;s verified compiler to do all the heavy lifting of compiling to
machine code. At first it would use their garbage collector for memory
allocation. But with a verified allocator, &lt;a href=&quot;https://github.com/redox-os/ralloc&quot;&gt;potentially written in
Rust&lt;/a&gt;, the GC should be avoidable.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;In the very long run, it&amp;#8217;d be good to connect to something like &lt;a href=&quot;http://compcert.inria.fr/doc/&quot;&gt;CompCert&lt;/a&gt;
or even &lt;a href=&quot;http://www.cis.upenn.edu/~stevez/vellvm/&quot;&gt;VeLLVM&lt;/a&gt;. These have their own unique challenges. For particular
high-value programs, it might even be worthwhile to do something like seL4 and
prove correspondence of compiler output and source program. I don&amp;#8217;t know how
feasible this will be, but it&amp;#8217;s worth investigating.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;Once we&amp;#8217;ve written our program, shown that it satisfies the desired
specification, and have an implementation that formally corresponds to that
program, and have proved that the specification has the properties we depend on,
we can start relying on these programs for the most critical of software. At
this point, our software is truly &lt;em&gt;trustworthy&lt;/em&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;This is my long-term vision, and a lot of sweat and elbow grease needs to go
into making it a reality. But my hope is that the inherent strengths of Rust
will make it easier and cheaper to build trustworthy software, compared to
traditional methods used in C.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;&lt;em&gt;Thanks Alex Elsayed, James McGlashan, Gerwin Klein, and ticki, for early feedback on this post!&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</description>
        <pubDate>Tue, 15 Nov 2016 00:00:00 +0000</pubDate>
        <link>https://rbg.systems/blog/2016/11/15/verfication.html</link>
        <guid isPermaLink="true">https://rbg.systems/blog/2016/11/15/verfication.html</guid>
        
        
      </item>
    
      <item>
        <title>New build infrastructure</title>
        <description>&lt;div class=&quot;paragraph&quot;&gt;
&lt;p&gt;As of today, we&amp;#8217;re now using docker images and xargo instead of running our own
GitLab runners on cmr&amp;#8217;s desktop.  There&amp;#8217;s actually still a custom GitLab runner,
but it&amp;#8217;s purely an optimization (my machine is faster and has good network).
When it&amp;#8217;s not available, GitLab shared runners will still be used.
Additionally, CI will check that all commits are signed, using some custom
scripts.  The scripts can ignore certain commits (we have a fair amount of
unsigned history), and handles revoked keys specially.  All of this amounts to a
more robust, easier to maintain system, with quick feedback on merge requests
and less configuration needed for people to get up and running with hacking on
Robigalia.&lt;/p&gt;
&lt;/div&gt;</description>
        <pubDate>Sat, 22 Oct 2016 00:00:00 +0000</pubDate>
        <link>https://rbg.systems/blog/2016/10/22/new-build-infrastructure.html</link>
        <guid isPermaLink="true">https://rbg.systems/blog/2016/10/22/new-build-infrastructure.html</guid>
        
        
      </item>
    
  </channel>
</rss>
