Independent software engineering consultant with over a decade of professional experience. Previously worked at Acceleware, Microsoft Azure Compute, Microsoft Azure Networking, and Microsoft Quantum. BSc in Computer Science from the University of Calgary. From Canada, currently based out of Atlanta, GA, USA. TLA⁺ enthusiast!

Interested in hiring me for a contract? Contact me on LinkedIn or email consulting@disjunctive.llc. Work playing to my skills includes:

  • Formally specifying & model-checking your system with TLA⁺ [1] [2]
  • Formally proving the correctness of your system [1] [2]
  • Assisting in the design of your distributed system or protocol [1]
  • Analyzing your probabilistic system or protocol with PRISM [1]
  • Writing tricky distributed systems code for your system’s backend [1]
  • Validating your system’s implementation with model-based testing
  • Analyzing your access control system with the Z3 theorem prover [1] [2]
  • Writing a tree-sitter grammar for your domain-specific language [1]
  • Education in technical quantum computing concepts [1] [2] [3] [4]
  • General development work on formal methods tools themselves [1]

I have experience with C++, Java, C#, Rust, Golang, Python, and Kubernetes. See my full résumé here.

Email ahelwer@protonmail.com for personal correspondence. I’m always happy to answer questions about my interests, especially quantum computing!

Outside of work I’m an avid climber; find tales & photos of my adventures at outdoors.ahelwer.ca.

All content on this website is licensed under CC-BY-SA 4.0.

Two C++ bugs I wrote

Two C++ bugs I wrote

Here’s a short post about two bugs I wrote while writing C++ code for the external scanner of my TLA⁺ tree-sitter grammar. External scanners use handwritten C or C++ code to parse the non-context-free parts of your language. I’ll try not to dump on C++ too hard but both of the bugs are highly ridiculous and exemplify why I hope to write as little of the language as possible for the rest of my career. These aren’t bugs with C or C++ themselves (although honestly this point could be argued) but I share them in the hopes someone finds entertainment in my misery.

[Read More]

Writing a TLA⁺ tree-sitter grammar

My foray into free software

Writing a TLA⁺ tree-sitter grammar

2021 saw the completion of my first substantial free software project: a TLA⁺ grammar for tree-sitter, the error-tolerant incremental parser generator. The project stabilized & found users over the course of 2022, then over the holidays I used it to build the TLA⁺ Unicode Converter. The new year is a time to reflect on the past and look to the future, so here in early 2023 seems ideal to publish my experience.

Both TLA⁺ and tree-sitter itself ensured the project was fascinating on a technical level; even more interesting were the social and psychological aspects of my first real involvement with the free software community! I’ll go over why I wanted to create this project and the main technical challenges I faced doing so, then discuss the conditions that enabled me to create it and how free software development changed the way I think. If you’d rather get the technical part in video form (with demos!), you can watch the presentation I gave at TLA⁺ Conf 2021 (slides: pdf, odp):

[Read More]

What's the difference between a computer and a rock?

What's the difference between a computer and a rock?

Author’s note: I wrote this in 2017 and it languished in the drafts since then because I couldn’t think of a good conclusion. Really this is typical of the subject matter and all this piece offers is something to chew on, if you have the interest in it or have never before considered the question. At the time I was helping tutor a TLA⁺ seminar and had the opportunity to ask Leslie Lamport (who has thought about computation quite a bit!) what he thought of the question with all his accumulated wisdom, and he replied “it’s one of those meaningless distinctions, like the difference between alive and not-alive.” So there you have it. Hopefully there are enough decent jokes in this post to make it worthwhile.

[Read More]

The Missing Prelude to The Little Typer's Trickiest Chapter

Yes, it's the replace function in chapter 9

The Missing Prelude to The Little Typer's Trickiest Chapter

It’s hard to find a textbook series garnering more effusive praise than The Little Schemer, The Little Prover, The Little Typer & co. The Little Typer introduces dependent type theory and is the first of the series I’ve read. I quickly grew to appreciate & enjoy its dialogue-based presentation - I’m a real convert! I might release future didactic blog posts as a dialogue rather than straight recitation of material in block paragraphs. Humans seem to naturally find conversations more interesting than the traditional lecture format of a single voice droning on, which might explain why comment sections often get more traction than the actual article being commented upon! Or the popularity of topic podcasts versus lecture series.

[Read More]

Regexes in the Z3 Theorem Prover

Analyzing Teleport RBAC

Regexes in the Z3 Theorem Prover

Republished from Teleport’s official blog (link). I received compensation from Teleport for writing this post.

Z3 is a satisfiability modulo theories (SMT) solver developed by Microsoft Research. With a description like that you’d expect it to be restricted to esoteric corners of the computerized mathematics world, but it’s made impressive inroads addressing conventional software engineering needs: analyzing network ACLs and firewalls in Microsoft Azure, for example. Z3 is used to answer otherwise-unanswerable questions like “are these two firewalls equivalent?” or “does this set of network ACLs violate any security rules?”

[Read More]

Two pictures of quantum computation

Quantum interference in the sum-over-paths formalism

Two pictures of quantum computation

Interpretations of quantum mechanics are boring. Boring! Maybe the universe has a strict partition between quantum and non-quantum. Maybe there are a bunch of parallel universes with limited crosstalk. Or maybe it’s whatever the Bohmian mechanics people are talking about. Shut up and calculate, I think. I don’t say this out of some disdain for idle philosophizing or to put on airs of a salt-of-the-earth laborer in the equation mines. It’s just there are so, so many interesting things you can learn about in quantum theory without ever going near the interpretation question. Yet it’s many peoples’ first & last stop. Rise above!

[Read More]

How do you reason about a probabilistic distributed system?

How do you reason about a probabilistic distributed system?

In which I am stunted upon by coin flips

Wasn’t too long ago that I felt pretty good about my knowledge of distributed systems. All someone really needed in order to understand them, I thought, was a thorough understanding of the paxos protocol and a willingness to reshape your brain in the image of TLA⁺. Maybe add a dash of conflict-free replicated datatypes, just so you know what “eventual consistency” means. Past that it’s just some optimizations and mashups which come easily to your TLA⁺-addled brain.

[Read More]

Meditation

Sadly my only weapon against the attention economy

Meditation

This isn’t going to be a post about how adopting a several-thousand-year-old practice can make you a better servant of capital. Instead, let’s talk about when I feel the lowest of the low. It comes after spending any number of hours on my computer, maybe even a full day, endlessly circling around different websites in search of stimulation, the quick jolt that comes with learning an interesting fact or watching a funny short video or seeing someone get dunked on for having a bad political opinion. I’ll eventually wake into a state that could be identified as conscious thought, look back on the many (genuinely exciting!) things I wanted to learn or do that day, and contrast it with what I actually did. What did I actually do? I honestly don’t even know. I doubt I could list even three things I’d read or experienced the entire preceding eight hours. At this moment I feel very bad. I know one of the ~30,000 days in my life is gone. And I didn’t get anything out of it. Actually, I’m worse off, because spending your time in this way just begets even more time spent in this way.

[Read More]

Taking my home work setup seriously

Ergonomics & settling in for the long haul

Taking my home work setup seriously

The headlines don’t lie. Microsoft, Google, Amazon, Facebook, and a whole host of other tech companies have announced employees will be working from home until early-mid 2021. There are reasons to believe this will be pushed back; even if the staggeringly ambitious timelines for vaccine development are met, a vaccine might not be a silver bullet and the pandemic could require management for the next 2-3 years. As a software engineer in big tech’s orbit, this means it’s time to settle in for the long haul and take my home work setup seriously.

[Read More]

Doing a math assignment with the Lean theorem prover

Doing a math assignment with the Lean theorem prover

Note: this post was written for Lean 3; the latest version, Lean 4, is a very different language.

Turn back the clock to 2009: a confused physics major newly infatuated with math and computer science, I enrolled in MATH 273: Numbers and Proofs at the University of Calgary. This wasn’t my first encounter with mathematical proof; in first-year calculus I’d mastered rote regurgitation of delta-epsilon proofs. Despite writing out several dozen, their meaning never progressed beyond a sort of incantation I can summon to this day (for every \( \epsilon > 0 \) there exists a \( \delta > 0 \) such that…). We were told on the first day of MATH 273 that the purpose of proof is to compel belief. This was a bright start but sadly marked the beginning of a deeply embarrassing semester reaching its nadir when I asked the professor “how do we prove a definition” fully two-thirds of the way through the course. I got a B-.

[Read More]