
SASyLF language
An LF-based proof assistant whose surface syntax stays close to the paper it checks; derivations are written line by line and justified explicitly, and built-in variable binding supplies substitution for free.
Overview
An LF-based proof assistant for programming-language theory, belonging to the logic and specification traditions: syntax is written as BNF, semantics as inference rules, and proofs as named derivations. Its design goal is paper fidelity, so a student's lecture notes transpose nearly line for line into a file the checker verifies.
Code
terminals z s
syntax
n ::= z
| s n
judgment sum: n + n = n
--------- sum-z
z + n = n
n1 + n2 = n3
-------------------- sum-s
(s n1) + n2 = (s n3)
syntax
Gamma ::= *
| Gamma, x : tau
judgment has-type: Gamma |- e : tau
assumes Gamma
------------------------- t-var
Gamma, x:tau |- x : tau
theorem n_plus_1_equals_s_n : forall n exists (s (z)) + n = (s n).
d1: (z) + n = n by rule sum-z
d2: (s (z)) + n = (s n) by rule sum-s on d1
end theorem
theorem one_plus_1_equals_s_n : exists (s (z)) + (s (z)) = (s s z).
d1: (s (z)) + (s (z)) = (s s z) by theorem n_plus_1_equals_s_n on (s z)
end theorem
theorem sum-z-rh: forall n exists n + (z) = n.
d1: n + (z) = n by induction on n:
case z is
d2: (z) + (z) = (z) by rule sum-z
end case
case s n' is
d3: n' + (z) = n' by induction hypothesis on n'
d4: (s n') + (z) = (s n') by rule sum-s on d3
end case
end induction
end theorem
Distinctive traits
- Syntax is BNF and semantics is rules stacked over a bar, matching type-theory lecture notes; formalising becomes transcription, not translation.
- Built-in variable binding supplies substitution, weakening, exchange and contraction, so metatheory needs no de Bruijn encodings.
- No tactics: each step names a derivation and a justification, and errors point at the offending line, not at a proof state.
- Case analysis is coverage-checked: omit a grammar production or a judgment's rule and the proof is rejected.
- Rules are matched by higher-order pattern unification; it is undecidable in general, so "unification incomplete" is a real error.
- Modules since 1.5.0 import syntax, judgments and theorems by qualified name, letting a course layer chapters instead of one huge file.
Status
Active. Shipped as a Java JAR for the command line, Eclipse and VS Code under the Eclipse Public License 1.0; 1.5.2 and a 1.6.0 pre-release both landed in January 2026.
History
Aldrich, Simmons and Shin presented SASyLF at FDPE 2008 with preliminary results
from graduate type-theory courses; numbering started in 0.x, with 0.7 the first
stable public release. John Boyland made the later major updates — IDE plugins,
where clauses (1.4.0) and modules (1.5.0) — on top of the
Twelf-derived checker.
Sources & references
- Official sitecs.cmu.edu
- SASyLF: An Educational Proof Assistant for Language Theory — Aldrich, Simmons and Shin, FDPE 2008cs.cmu.edu
- SASyLF source, releases and examples (boyland/sasylf) — Eclipse Public License 1.0github.com
- SASyLF manual: file structure, syntax, judgments and theoremsgithub.com
- Writing proofs in SASyLF — justifications, cases and inductiongithub.com
- SASyLF release history (ChangeLog)github.com