I’ve been building a system that verifies assembly programs via symbolic execution. I think the following are the most novel points of my approach:| Hey There Buddo!
I spent some time before making Datalogs that translated into SQL. https://www.philipzucker.com/tiny-sqlite-datalog/| Hey There Buddo!
A blog about life, programming, math, logic, and physics.| Hey There Buddo!
I got kind of discouraged maybe 6 months ago trying some real analysis stuff.| Hey There Buddo!
It has been a question from the beginning how to emulate dependent types in Knuckledragger.| Hey There Buddo!
I’ve been hitting a good stride moving forward on this, which is good because I’ve been pretty mentally constipated on doing anything that I can even pretend is useful.| Hey There Buddo!
Edit 2024: See my project knuckledragger for more systematic work in this vein https://github.com/philzook58/knuckledragger| Hey There Buddo!
Edit 2024: See my project knuckledragger for more systematic work in this vein https://github.com/philzook58/knuckledragger| Hey There Buddo!
It seems that the only thing I don’t want to use Lean for is it’s main purpose. That tracks.| Hey There Buddo!
I’ve worked on binary verification tooling for a while.| Hey There Buddo!
import Lean import Std.Data.HashMap import Std.Data.HashSet| Hey There Buddo!
Something I’ve been seeking for a while is a notion of a “refinement e-graph”.| Hey There Buddo!
Examining the categorical formulation of simple substitutions is useful to understand more complex topics.| Hey There Buddo!
It seems to me that telescopes https://ncatlab.org/nlab/show/type+telescope , the dependently typed notion of context, is more central to the topic of dependent types than the dependent types are.| Hey There Buddo!
It’s interesting, while I was writing https://www.philipzucker.com/brute_eggmt/ I was hating the post, but immediately after dumping it out I began to appreciate that I had achieved something quite useful.| Hey There Buddo!
E-graphs are a data structure for equational reasoning and optimization over ground terms. One of the benefits of e-graph rewriting is that it can declaratively handle useful but difficult to orient identities like associativity and commutativity (AC) in a generic way. However, using these generic mechanisms is more computationally expensive than using bespoke routines on terms containing sets, multi-sets, linear expressions, polynomials, and binders. A natural question arises: How can one co...| Hey There Buddo!
TLDR. Types are basically sets. Why not python sets?| Hey There Buddo!
That proofs are things (mathematical objects) is a cool meta awareness that is one of the payoffs of studying mathematical logic.| Hey There Buddo!
I’ve continued tinkering with Knuckledragger, my Z3 powered python proof assistant.| Hey There Buddo!
Resolution is an old technique in automated reasoning. Datalog is a family of languages capable of expressing recursive database queries. The ancestry of datalog can be traced back to resolution and it is interesting and fruitful to examine the capabilities of modern resolution style provers in light of the use cases and operational interpretability of datalog.| Hey There Buddo!
There are many interesting syntactic and semantic objects that hold a notion of symmetry that a simple syntax tree can’t quite capture.| Hey There Buddo!
As I was digging into computational group theory for string Knuth Bendix completion goodness I noted that coset enumeration aka Todd-Coxeter, one of the mainstay algorithms of computational group theory, mechanically looks quite a bit like equality saturation. This is interesting in its own right but also as a source of controlled benchmarks for equality saturation systems.| Hey There Buddo!
Unification is formal methods speak for solving equations.| Hey There Buddo!
Egraph rewriting is a methodology for optimizing expression. A known problem is that some of the rewrite rules explode the egraph in size for what feels like common administrative manipulations like a + b = b + a or a * (b * c) = (a * b) * c.| Hey There Buddo!
TLA+ and Alloy are lower barrier to entry software verification tools. They are typically used on systems or protocol level models rather than modelling the exact source. There are many bugs that can appear at this level and they are super useful for clarifying your thinking.| Hey There Buddo!
I’ve become entranced by all the varieties of the knuth bendix completion algorithm as of late.| Hey There Buddo!
Connecting E-Graphs and Term Completion| Hey There Buddo!
There are lots of interesting little subproblems in compilation like instruction selection, register allocation and instruction scheduling. These can be expressed in declarative interlinked way to constraint solvers.| Hey There Buddo!
You can make egraphs support stream like things / rational terms.| Hey There Buddo!
I’ve been working on Knuckledragger, my Z3 based semi-automated python proof assistant, on and off for 6 months (or arguably five years). I’ve realized I’ve done a bunch of stuff and despite writing often, not written the slightest bit about much of it.| Hey There Buddo!
Something that I’m tinkering with is making a proof assistant in python.| Hey There Buddo!
A kind of cute way of writing automata minimization and some philosophy around why. I learned it from this paper https://arxiv.org/abs/2204.12368 by Jules Jacobs and Thorsten Wißmann.| Hey There Buddo!
EMT ~ SMT - SAT| Hey There Buddo!
I’m back from Copenhagen! It was really fantastic time. Thanks everyone for the chats and saying you read my blog / enjoyed my talk! I really wish I had stayed for Thursday and Friday as I was still having great conversations. It wasn’t clear when I was booking if I would get any time from work, so I tried to hedge things a little. I looked into changing my flights around and it would’ve doubled the cost of my trip. Oh well, live and learn.| Hey There Buddo!
Z3 actually has a logic programming language inside it if you know how to look. This makes it one the easiest to pull off the shelf because Z3 has so much work put into it and excellent bindings. It also is perhaps one of the most declarative logic programming languages available with very cool strong theory support.| Hey There Buddo!
Z3 can be used for proofs. The input language isn’t anywhere near as powerful as interactive theorem provers like Coq, Isabelle, or Agda, but you can ask Z3 to prove pretty interesting things. Although the theorems that follow aren’t hard in interactive theorem provers, they would take beyond complete novice level skills to state or prove.| Hey There Buddo!
A natural and interesting topic is the idea of a Term ordering.| Hey There Buddo!
Some more interesting semi-automated proofs in python using smt solvers.| Hey There Buddo!
A classical theorem is that $\sqrt{2}$ is irrational. https://en.wikipedia.org/wiki/Square_root_of_2#Proofs_of_irrationality This means it cannot be written as $\frac{p}{q}$ for integers $p$ and $q$.| Hey There Buddo!
Knuckledragger is the moniker I’ve given to an approach and library I’m developing to do interactive theorem proving in python with the heavy lifting done by pre existing automated solvers.| Hey There Buddo!
I’ve been working on writing intra-function binary patches using high level C code for a few years. If it could be made easy and correct, it could unlock superpowers.| Hey There Buddo!
I’ve been reading about ACL2, a theorem prover designed for common lisp. It has good automation and has been quite successfully applied to significant software/hardware verification and mathematics.| Hey There Buddo!
Follow along on a google colab: https://colab.research.google.com/github/philzook58/philzook58.github.io/blob/master/pynb/cbmc_tut.ipynb| Hey There Buddo!