Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 697 Bytes

README.md

File metadata and controls

34 lines (24 loc) · 697 Bytes

smtfmt

This is a fun little program that formats SMT-LIB programs.

Installation

$ git clone https://github.com/symflower/smtfmt && cd smtfmt
$ ln -s $PWD/smtfmt ~/bin

Usage

$ input='(:not (:forall (?x Real) (:forall (?y Real) (impl (< ?x ?y) ( :exists (?z Real) (:and (< ?x ?z) (< ?z ?y)))))))'
$ echo "$input" | smtfmt
(:not
  (:forall
    (?x Real)
    (:forall
      (?y Real)
      (impl (< ?x ?y) (:exists (?z Real) (:and (< ?x ?z) (< ?z ?y)))))))

Small expressions are printed inline. Longer expressions are broken up and aligned.

Tests

Run pytest smtfmt.py.

Style

Format with black --pyi smtfmt.py.