Skip to content

symflower/smtfmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages