ModelChecker
The ModelChecker is a tool for rapidly prototyping semantic theories. Developing a semantics ordinarily means computing by hand whether particular inferences hold, which is slow and error prone precisely where the cases become interesting. The ModelChecker automates this work: given semantic clauses for the operators of a language, it compiles an inference into constraints for Z3, either establishing that the inference holds over all models up to a chosen level of complexity or printing a readable countermodel that shows exactly how it fails. Nothing in the program fixes a semantics in advance: users declare primitive operators, provide their semantic clauses, and set up batteries of test inferences, so that each change to a semantics can be evaluated against its logical consequences in seconds. A countermodel rules an inference out conclusively, while the absence of countermodels at increasing levels of complexity builds evidence that the inference holds in general and is worth the effort of proving.
The package may be installed with pip install model-checker. If you have any
trouble installing or using it, or find any surprising or unnatural results, feel free to
open an issue.