← Home

Formal Methods & Research

An introductory series on formal methods, from set theory and logic to SAT and SMT solvers, alongside research projects in model checking, control systems, and robotics.

  • Formal Methods 101: Induction
    Article

    Formal Methods 101: Induction

    Part 11 of Formal Methods 101: weak, strong and k-induction, a worked sum proof, and proving an inductive invariant of an extended-state machine.

  • Formal Methods 101: Formal Systems
    Article

    Formal Methods 101: Formal Systems

    Part 10 of Formal Methods 101: axioms and models, syntactic (⊢) versus semantic (⊨) entailment, and soundness and completeness.

  • Formal Methods 101: Decidability
    Article

    Formal Methods 101: Decidability

    Part 9 of Formal Methods 101: decidable and undecidable problems, the halting problem and its diagonal contradiction, and why propositional logic is decidable.

  • Formal Methods 101: Complexity Theory
    Article

    Formal Methods 101: Complexity Theory

    Complexity theory: Big-O growth rates, then the classes P, NP, NP-complete, coNP and NP-hard, and what the open question P = NP would change.

  • Formal Methods 101: Second-Order (and Higher-Order) Logic
    Article

    Formal Methods 101: Second-Order (and Higher-Order) Logic

    Second-order logic extends first-order logic by quantifying over sets, and higher-order logics go further, much like types of types in type theory.

  • Formal Methods 101: Boolean Satisfiability (SAT)
    Article

    Formal Methods 101: Boolean Satisfiability (SAT)

    Boolean satisfiability (SAT): truth tables, CNF and DNF, and the solver algorithms DFS, BFS, bounded model checking, ROBDDs and DPLL, with animated search tree…

  • Formal Methods 101: Satisfiability Modulo Theories (SMT)
    Article

    Formal Methods 101: Satisfiability Modulo Theories (SMT)

    Satisfiability modulo theories (SMT) extends SAT to numbers and other types, using bit vectoring or DPLL(T) with a domain theory such as linear integer arithme…

  • Formal Methods 101: Binary Relations
    Article

    Formal Methods 101: Binary Relations

    Binary relations and functions, their properties (reflexive, symmetric, transitive and more), and the order and equivalence relations they define.

  • Formal Methods 101: Zero-Order (Propositional) Logic
    Article

    Formal Methods 101: Zero-Order (Propositional) Logic

    Propositional logic: propositions, the five operators with truth tables, order of operations, and how to write an argument formally.

  • Formal Methods 101: First-Order Logic (FOL)
    Article

    Formal Methods 101: First-Order Logic (FOL)

    First-order logic: predicates, functions, quantifiers and the connectives, with an example formula and a worked quantifier figure.

  • Formal Methods 101: Set Theory
    Article

    Formal Methods 101: Set Theory

    Set notation and membership, the set operators (union, intersection, difference, complement, Cartesian product, power set), and the common number sets.

  • Model-Based Design of a Closed-Loop Speed Controller for a Hybrid System
    Article

    Model-Based Design of a Closed-Loop Speed Controller for a Hybrid System

    A PID speed controller for an RC car settles at 0.2 m/s in simulation, but on a Raspberry Pi 3B Simulink's generated code overloads the CPU and the closed loop…

  • Particle Filter Speed Controller for a Closed-Loop Vehicle System
    Article

    Particle Filter Speed Controller for a Closed-Loop Vehicle System

    A particle filter estimates a vehicle's mass and damping, and Ackermann's formula turns them into a speed control law. Six simulated trials estimate mass to at…

  • Analysis of N-Queens Stochastic Algorithms Using Probabilistic Model Checking
    Article

    Analysis of N-Queens Stochastic Algorithms Using Probabilistic Model Checking

    We model three stochastic N-Queens solvers in PRISM. Swap-based solvers reach a 99% chance of a solution in about 45 to 50 iterations, against 400 to 450 for r…

  • WebGME: Railway Network Design Studio
    Article

    WebGME: Railway Network Design Studio

    This is a railway-networks-plugin for WebGME that traverses through the tree structures and saves various information in a .zip artifact.

  • WebGME: Colored Petri Net Design Studio
    Article

    WebGME: Colored Petri Net Design Studio

    A WebGME design studio for colored Petri nets, with a meta-model and Python plugins to simulate nets and check for deadlocks and race conditions in a two-proce…

  • E-Puck Robot Control And A* Navigation
    Article

    E-Puck Robot Control And A* Navigation

    A C controller that drives an E-Puck robot around a 12 by 12 line grid using Braitenberg line following, node detection and A* route planning, with simulation…

  • Computer Vision Security System
    Article

    Computer Vision Security System

    A Raspberry Pi security camera that runs a pretrained deep network to spot people, emails a clip, and is switched from a touchscreen or Android app, with the t…

  • Aircraft Automated Collision Avoidance
    Article

    Aircraft Automated Collision Avoidance

    A Simulink and Stateflow controller that keeps two aircraft apart in 2-D, checked against safety and liveness monitors in a head-on test, plus a forced failure…