
SAT is the problem of determining whether there exists an assignment of true/false values to variables that makes a logical formula true.
Formula: (A OR B) AND (NOT A OR C)
Question: Can we find values for A, B, C that satisfy this?
Answer: Yes → A=true, B=anything, C=true ✓
Real World Use:
┌─────────────────────────────────────┐
│ Security Check Example │
│ │
│ "Can a user access resource X │
│ given these permission rules?" │
│ │
│ → Encode rules as SAT formula │
│ → If satisfiable = access possible │
│ → If unsatisfiable = access blocked │
└─────────────────────────────────────┘
SAT solvers answer YES/NO questions about logical conditions, making them powerful for finding security vulnerabilities
SMT is SAT's more powerful cousin. It extends SAT by adding theories (mathematical domains) beyond just true/false.
┌─────────────────┬──────────────────────────────┐
│ SAT │ SMT │
├─────────────────┼──────────────────────────────┤
│ Only booleans │ Integers, strings, arrays │
│ A=true/false │ x > 5, name="admin" │
│ Simpler │ More expressive │
│ Faster │ Handles real-world data │
└─────────────────┴──────────────────────────────┘
# SMT can reason about:
# "Is there a user age where this policy applies?"
age > 18 AND age < 65 AND role == "employee"
# SMT solver finds: age=30, role="employee" → SATISFIABLE
AWS Policy: "Allow access if user is in region us-east-1
AND request time < 6pm"
SMT encodes this mathematically and checks:
→ Are there conditions that bypass this policy?
→ Do two policies conflict with each other?
A data structure that efficiently represents and manipulates boolean functions as a directed graph.
Formula: (A AND B) OR (NOT A AND C)
[A]
/ \
[B] [C]
/ \ / \
TRUE FALSE TRUE FALSE
Reading paths:
→ A=true, B=true → TRUE
→ A=true, B=false → FALSE
→ A=false, C=true → TRUE
→ A=false, C=false→ FALSE
┌──────────────────────────────────────┐
│ BDD Advantages │
│ │
│ ✓ Compact representation of │
│ complex boolean functions │
│ │
│ ✓ Fast equivalence checking │
│ (Are two policies the same?) │
│ │
│ ✓ Efficient for hardware/software │
│ verification │
└──────────────────────────────────────┘
Using mathematical proof to guarantee that a system behaves correctly — not just testing, but proving correctness.
┌─────────────────────────────────────────────┐
│ TESTING │
│ "I tried 1000 inputs, it worked" │
│ → Cannot guarantee ALL cases work │
│ → Bugs can hide in untested paths │
└─────────────────────────────────────────────┘
vs
┌─────────────────────────────────────────────┐
│ FORMAL VERIFICATION │
│ "I mathematically proved it works for │
│ ALL possible inputs" │
│ → Absolute guarantee │
│ → No hidden bugs in logic │
└─────────────────────────────────────────────┘
AWS IAM Policy:
{
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::my-bucket/*"
}
Formal Verification asks:
→ "Is this policy equivalent to another policy?"
→ "Does this policy allow unintended access?"
→ PROVEN mathematically, not just tested
Automatically or interactively constructing mathematical proofs that a program or system satisfies its specification.
Step 1: Write SPECIFICATION (what should happen)
"The sort function always returns
elements in ascending order"
Step 2: Write IMPLEMENTATION (the actual code)
def sort(arr): ...
Step 3: Theorem Prover PROVES specification
matches implementation
Step 4: Result = Mathematical Guarantee ✓
┌──────────────────┬───────────────────────────┐
│ Automated │ Interactive │
│ Theorem Proving │ Theorem Proving │
├──────────────────┼───────────────────────────┤
│ Computer does │ Human guides the │
│ everything │ computer │
│ │ │
│ Faster but │ Slower but handles │
│ limited scope │ complex proofs │
│ │ │
│ Example: Z3 │ Example: Coq, Isabelle │
└──────────────────┴───────────────────────────┘
Finding values for variables that satisfy a set of constraints (rules/conditions).
Constraints:
x + y = 10
x > 3
y > 3
x and y are integers
Constraint Solver finds:
x = 5, y = 5 ✓
x = 4, y = 6 ✓
x = 6, y = 4 ✓
┌─────────────────────────────────────────┐
│ "Find a set of permissions that: │
│ │
│ ✓ Allows developers to deploy code │
│ ✓ Prevents access to production DB │
│ ✓ Satisfies compliance requirement X │
│ ✓ Doesn't conflict with policy Y" │
│ │
│ Constraint solver finds the answer! │
└─────────────────────────────────────────┘
The umbrella concept combining all above techniques — using computers to reason logically about systems automatically.
┌─────────────────────────────────────────────┐
│ AUTOMATED REASONING │
│ │
│ ┌─────────┐ ┌─────────┐ ┌────────┐ │
│ │ SAT │ │ SMT │ │ BDDs │ │
│ └────┬────┘ └────┬────┘ └───┬────┘ │
│ │ │ │ │
│ └──────────────┴─────────────┘ │
│ │ │
│ ┌───────┴────────┐ │
│ │ Formal │ │
│ │ Verification │ │
│ └───────┬────────┘ │
│ │ │
│ ┌───────┴────────┐ │
│ │ Theorem │ │
│ │ Proving │ │
│ └───────┬────────┘ │
│ │ │
│ ┌───────┴────────┐ │
│ │ Constraint │ │
│ │ Solving │ │
│ └────────────────┘ │
└─────────────────────────────────────────────┘
AWS Access Analyzer (uses Automated Reasoning):
User writes IAM policy
↓
Automated Reasoning analyzes it
↓
Checks: "Does this expose resources publicly?"
↓
Mathematical proof generated
↓
User gets GUARANTEED answer, not just a guess
┌──────────────────┬─────────────────────┬──────────────────────┐
│ Concept │ Core Question │ AWS Use Case │
├──────────────────┼─────────────────────┼──────────────────────┤
│ SAT │ True/False possible?│ Policy reachability │
│ SMT │ Math conditions met?│ Complex policy checks│
│ BDDs │ Efficient storage │ Policy comparison │
│ Formal │ Proven correct? │ Zelkova project │
│ Verification │ │ │
│ Theorem Proving │ Can we prove it? │ Security guarantees │
│ Constraint │ Find valid values? │ Permission synthesis │
│ Solving │ │ │
│ Automated │ All of the above │ Access Analyzer │
│ Reasoning │ automatically │ │
└──────────────────┴─────────────────────┴──────────────────────┘
These techniques move security from "we think it's secure" to "we have mathematically proven it's secure" — which is the fundamental value proposition of AWS's Automated Reasoning teams like Zelkova and Access Analyzer.