Skip to content

v0.0.3

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 17 Sep 02:53

Z3Wrap v0.0.3

A complete, modern C# wrapper for Microsoft's Z3 theorem prover.

Installation

dotnet add package Spaceorc.Z3Wrap --version 0.0.3

Quick Start

using var context = new Z3Context();
using var scope = context.SetUp();

var x = context.IntConst("x");
var y = context.IntConst("y");

using var solver = context.CreateSolver();
solver.Assert(x + y == 10);
solver.Assert(x > y);

if (solver.Check() == Z3Status.Satisfiable) {
    var model = solver.GetModel();
    Console.WriteLine($"x = {model.GetIntValue(x)}");
    Console.WriteLine($"y = {model.GetIntValue(y)}");
}