All Projects → salmans → rusty-razor

salmans / rusty-razor

Licence: MIT license
Razor is a tool for constructing finite models for first-order theories

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to rusty-razor

pyprover
Resolution theorem proving for predicate logic in pure Python.
Stars: ✭ 71 (+31.48%)
Mutual labels:  theorem-proving
Fstar
A Proof-oriented Programming Language
Stars: ✭ 2,171 (+3920.37%)
Mutual labels:  theorem-proving
Lean
Homepage Theorem Proving in Lean FAQ
Stars: ✭ 2,006 (+3614.81%)
Mutual labels:  theorem-proving
Coq
Coq is a formal proof management system. It provides a formal language to write mathematical definitions, executable algorithms and theorems together with an environment for semi-interactive development of machine-checked proofs.
Stars: ✭ 3,566 (+6503.7%)
Mutual labels:  theorem-proving
Set-Theory
Coq encoding of ZFC and formalization of the textbook Elements of Set Theory
Stars: ✭ 55 (+1.85%)
Mutual labels:  theorem-proving
LinearOne
LinearOne is a prototype theorem prover for first-order (multiplicative, intuitionistic) linear logic.
Stars: ✭ 16 (-70.37%)
Mutual labels:  theorem-proving
first order logic prover
No description or website provided.
Stars: ✭ 52 (-3.7%)
Mutual labels:  theorem-proving
archsat
A proof-producing SMT/McSat solver, handling polymorphic first-order logic, and using an SMT/McSat core extended using Tableaux, Superposition and Rewriting.
Stars: ✭ 20 (-62.96%)
Mutual labels:  theorem-proving
coq jupyter
Jupyter kernel for Coq
Stars: ✭ 70 (+29.63%)
Mutual labels:  theorem-proving
informatica-public
Public code developed during my MSc study at University of Bologna
Stars: ✭ 79 (+46.3%)
Mutual labels:  theorem-proving
gapt
GAPT: General Architecture for Proof Theory
Stars: ✭ 83 (+53.7%)
Mutual labels:  theorem-proving
fm-notes
Unassorted scribbles on formal methods, type theory, category theory, and so on, and so on
Stars: ✭ 19 (-64.81%)
Mutual labels:  theorem-proving
ostrich
An SMT Solver for string constraints
Stars: ✭ 18 (-66.67%)
Mutual labels:  theorem-proving
Leo-III
An Automated Theorem Prover for Classical Higher-Order Logic with Henkin Semantics
Stars: ✭ 29 (-46.3%)
Mutual labels:  theorem-proving
awesome-rust-formalized-reasoning
An exhaustive list of all Rust resources regarding automated or semi-automated formalization efforts in any area, constructive mathematics, formal algorithms, and program verification.
Stars: ✭ 185 (+242.59%)
Mutual labels:  theorem-proving
pomagma
An inference engine for extensional untyped λ-calculus
Stars: ✭ 15 (-72.22%)
Mutual labels:  theorem-proving
gidti
Book: Gentle Introduction to Dependent Types with Idris
Stars: ✭ 70 (+29.63%)
Mutual labels:  theorem-proving
multi-h
The C++ implementation of Multi-H algorithm, which is a multi-plane fitting technique. If you use this work for Academic purposes, please cite Barath, D. and Matas, J. and Hajder, L., Multi-H: Efficient Recovery of Tangent Planes in Stereo Images. 27th British Machine Vision Conference, 2016
Stars: ✭ 29 (-46.3%)
Mutual labels:  model-finding
nunchaku
Model finder for higher-order logic
Stars: ✭ 40 (-25.93%)
Mutual labels:  model-finding

rusty-razor

Rusty Razor is a tool for constructing finite models for first-order theories. The model-finding algorithm is inspired by the chase for database systems. Given a first-order theory, Razor constructs a set of homomorphically minimal models for the theory.

Check out Razor's documentation for more information about the project and introductory examples.

Build

rusty-razor is written in Rust, so you will need Rust 1.48.0 or newer to compile it. To build rusty-razor:

git clone https://github.com/salmans/rusty-razor.git
cd rusty-razor
cargo build --release

This puts rusty-razor's executable in /target/release.

Run

solve

Use the solve command to find models for a theory written in an <input> file:

razor solve -i <input>

The --count parameter limits the number of models to construct:

razor solve -i <input> --count <number>

Bounded Model-Finding

Unlike conventional model-finders such as Alloy, Razor doesn't require the user to provide a bound on the size of the models that it constructs. However, Razor may never terminate when running on theories with non-finite models -- it can be shown that a run of Razor on an unsatisfiable theory (i.e., a theory with no models) is guaranteed to terminate (although it might take a very very long time).This is a direct consequence of semi-decidability of first-order logic.

To guarantee termination, limit the size of the resulting models by the number of their elements using the --bound option with a value for the domain parameter:

razor solve -i <input> --bound domain=<number>

Model-Finding Scheduler

Use the --scheduler option to choose how Razor processes search branches. The fifo scheduler (the default scheduler) schedules new branches last and is a more suitable option for processing theories with few small satisfying models. The lifo scheduler schedules new branches first, and is more suitable for processing theories with many large models.

razor solve -i <input> --scheduler <fifo/lifo>

Toy Example

Consider the following example:

// All cats love all toys:
forall c, t . (Cat(c) and Toy(t) implies Loves(c, t));

// All squishies are toys:
forall s . (Squishy(s) implies Toy(s));

Cat('duchess);   // Duchess is a cat
Squishy('ducky); // Ducky is a squishy

You can download the example file here and run the razor command-line tool on it:

razor solve -i theories/examples/toy.raz

Razor returns only one model with e#0 and e#1 as elements that denote 'duchess and 'ducky respectively. The facts Cat(e#0), Squishy(e#1), and Toy(e#1) in the model are directly forced by the last two formula in the input theory. The fact Loves(e#0, e#1) is deduced by Razor:

Domain: e#0, e#1

Elements: 'duchess -> e#0, 'ducky -> e#1

Facts: Cat(e#0), Loves(e#0, e#1), Squishy(e#1), Toy(e#1)

Razor's documentation describes the syntax of Razor's input and contains more examples.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].