{"@attributes":{"version":"2.0"},"channel":{"title":"shaie.ar","link":"https:\/\/shaie.ar\/","description":"Recent content on shaie.ar","generator":"Hugo -- 0.146.6","language":"en-us","lastBuildDate":"Thu, 09 Apr 2026 17:15:42 -0400","item":[{"title":"Projects","link":"https:\/\/shaie.ar\/projects\/","pubDate":"Thu, 09 Apr 2026 17:15:42 -0400","guid":"https:\/\/shaie.ar\/projects\/","description":"<p>This is an ongoing list of some projects I&rsquo;ve made. Many of them have in-browser versions to play with.<\/p>\n<ul>\n<li><strong><a href=\"https:\/\/github.com\/nschaievitch\/fol-verifier\">First Order Logic proof verifier<\/a><\/strong>: A formal sentential logic and first order logic proof verifier. More information can be found in the <a href=\"https:\/\/github.com\/nschaievitch\/fol-verifier\/blob\/main\/write-ups\/Slides.pdf\">slides<\/a> and technical <a href=\"https:\/\/github.com\/nschaievitch\/fol-verifier\/blob\/main\/write-ups\/Writeup.pdf\">write-up<\/a>. In-browser demos are available for both the <a href=\"https:\/\/sl.shaie.ar\">sentential logic<\/a> and <a href=\"https:\/\/fol.shaie.ar\/\">first order logic<\/a> verifiers.<\/li>\n<li><strong><a href=\"https:\/\/github.com\/nschaievitch\/scheme-compiler\">Scheme Compiler<\/a><\/strong>: Bytecode compiler for a subset of Scheme, for the <a href=\"https:\/\/bernsteinbear.com\/dartmouth-compilers\/\">Compilers for Functional Languages<\/a> class, taught by Max Bernstein. It handles closures, tail-recursion, alpha-conversion, and basic quote constant comparison, among others.<\/li>\n<li><strong><a href=\"https:\/\/github.com\/nschaievitch\/cartesi-private-chat\">Descentralized private network implementation<\/a><\/strong>: This is based on the <a href=\"https:\/\/www.cartesi.io\/\">Cartesi<\/a> network, and done for a Cartesi Hackathon. This project provides an implementation of the Burmester-Desmedt multi-party key agreement protocol, and uses it to create private encrypted state machines. The project has a demo of a chat room implemented in this manner.<\/li>\n<li><strong><a href=\"https:\/\/github.com\/nschaievitch\/eigen-games-25\">FHE-based image editing<\/a><\/strong>: This project was made by Kishan Sreenivasan and myself for the 2025 Eigen-Games Hackathon. It uses Full Homomorphic Encryption with the TFHE-rs framework to allow for fully private (convolutional) image editing.<\/li>\n<li><strong><a href=\"https:\/\/github.com\/nschaievitch\/sdf-editor\">SDF editor<\/a><\/strong>: A visual node-based editor for ray-marched Signed Distance Field scenes. An in-browser demo is available <a href=\"https:\/\/sdf.shaie.ar\/\">here<\/a>.<\/li>\n<li><strong><a href=\"https:\/\/github.com\/anthias-labs\/flare\">Flare<\/a><\/strong>: Made in collaboration with <a href=\"https:\/\/anthias.xyz\/\">Anthias Labs<\/a>. Flare is a CLI tool for interacting with Solana, which allows (among other things) to directly call on-chain program methods from the terminal, based only on the IDL.<\/li>\n<li><strong><a href=\"https:\/\/github.com\/anthias-labs\/optimism-interop-monitor\">Optimism Interop Monitor<\/a><\/strong>: Made in collaboration with <a href=\"https:\/\/anthias.xyz\/\">Anthias Labs<\/a>. This tool allows Superchain developers to track and monitor the state of interoperability between a sender-receiver pair. Given RPCs for both, it tracks message passing between them, aggregates different metrics, and provides an alert system for pathological states (e.g. increased message relaying latency). It also provides an API for querying statistics about interop.<\/li>\n<\/ul>"},{"title":"A hands-on Introduction to Program Verification in Lean 4","link":"https:\/\/shaie.ar\/posts\/verification-in-lean\/","pubDate":"Mon, 01 Sep 2025 00:00:00 +0000","guid":"https:\/\/shaie.ar\/posts\/verification-in-lean\/","description":"<h2 id=\"introduction\">Introduction<\/h2>\n<p>This tutorial is meant to introduce you to using Lean 4 for verifying short programs. It is assumed you have a basic knowledge of functional programming and algebraic types. It will also be useful to have seen some basic Lean 4 proofs before reading this, although not necessary. Consider going through chapters 1 and 2 of <a href=\"https:\/\/leanprover-community.github.io\/mathematics_in_lean\/\">Mathematics in Lean<\/a> [3]. Some simplifications might be made to appeal to intuition, further reading is recommended at the end.<\/p>"},{"title":"The eBPF Verifier: How it Works, How it Does Not Work, and How it Might Work","link":"https:\/\/shaie.ar\/posts\/ebpf\/","pubDate":"Sat, 30 Nov 2024 00:00:00 +0000","guid":"https:\/\/shaie.ar\/posts\/ebpf\/","description":"<blockquote>\n<p>This was written in November 2024, as a final project for Dartmouth&rsquo;s class COSC059 - Principles of Programming Languages, with small modifications for this blog. I want to thank Professor Sergey Bratus for his guidance, and a big part of the credit of this piece goes to him and his class.<\/p><\/blockquote>\n<h2 id=\"introduction\">Introduction<\/h2>\n<p>As the Linux kernel and ecosystem grew, user mode applications began to develop a growing need for adding and running safe kernel extensions. Consequently, the Berkeley Packet Filter (which, as its name indicates, was originally created for packet filtering in the kernel) was extended into eBPF, which allows safe execution of untrusted user-defined extensions in the kernel. These eBPF programs can be used for a wide variety of applications, including packet capturing and filtering, as well as tracing, instrumentation, and debugging, among others. They are typically written in high level programming languages, such as some subsets of C, Python, or Lua [7], and then compiled into a circa-x86 bytecode for the eBPF VM. This VM has eleven 64-bit registers (plus a special auxiliary register for ALU sanitation), a program counter, and a 512 byte fixed-size stack. This code is then loaded into the kernel with the <code>bpf()<\/code> syscall, and depending on the configuration, is either JIT-compiled into native instructions or ran in the eBPF interpreter [9]. In order to allow more flexibility and for optimization reasons, the eBPF programs also interact with the system using <em>helper functions<\/em>, which hook to other parts of the kernel.<\/p>"}]}}