Skip to content

Commit

Permalink
Merge pull request #28 from elsoroka/dev
Browse files Browse the repository at this point in the history
fix all the docs build issues?
  • Loading branch information
elsoroka committed Dec 13, 2023
2 parents ad4f1c3 + 1ec1319 commit 7e4f9da
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ using Satisfiability
fmt = Documenter.Writers.HTMLWriter.HTML(edit_link="main")

makedocs(sitename="Satisfiability.jl",
repo = "https://github.com/elsoroka/Satisfiability.jl/blob/{commit}{path}#L{line}",
#repo = Documenter.Remotes.GitHub("elsoroka", "Satisfiability.jl"),
clean=true,
draft=false,
root="docs",
checkdocs=:none,
source = "src",
workdir=pwd(),
modules = [Satisfiability],
Expand Down
17 changes: 13 additions & 4 deletions docs/src/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ Use the `@satvariable` macro to define a variable.
```@docs
@satvariable
```
Satisfiability.jl currently supports propositional logic, integer and real-valued arithmetic, and bitvectors. Support for additional SMT-LIB theories is planned in future versions.
```@docs
BoolExpr(name::String)
IntExpr(name::String)
RealExpr(name::String)
BitVectorExpr(name::String, length::Int)
```

An **uninterpreted function** is a function where the mapping between input and output is not known. The task of the SMT solver is then to determine a mapping such that some SMT expression holds true.
```@docs
@uninterpreted
Expand Down Expand Up @@ -41,8 +49,8 @@ Base.abs(a::IntExpr)
Base.:+(a::IntExpr, b::IntExpr)
Base.:-(a::IntExpr, b::IntExpr)
Base.:*(a::RealExpr, b::RealExpr)
div(a::IntExpr, b::IntExpr)
mod(a::IntExpr, b::IntExpr)
Base.div(a::IntExpr, b::IntExpr)
Base.mod(a::IntExpr, b::IntExpr)
Base.:/(a::RealExpr, b::RealExpr)
```

Expand Down Expand Up @@ -79,7 +87,7 @@ The SMT-LIB standard BitVector is often used to represent operations on fixed-si
In addition to supporting the comparison operators above and arithmetic operators `+`, `-`, and `*`, the following BitVector-specific operators are available.
Note that unsigned integer division is available using `div`. Signed division is `sdiv`.
```@docs
Base.div(a::BitVectorExpr{UInt8}, b::BitVectorExpr{UInt8})
div(a::AbstractBitVectorExpr, b::AbstractBitVectorExpr)
sdiv(a::BitVectorExpr{UInt8}, b::BitVectorExpr{UInt8})
```

Expand Down Expand Up @@ -137,7 +145,8 @@ save(prob::BoolExpr)
## Solving a SAT problem

```@docs
sat!(prob::BoolExpr)
sat!(prob::Array{T}) where T <: BoolExpr
sat!(solver::InteractiveSolver)
value(zs::Array{T}) where T <: AbstractExpr
```

Expand Down
2 changes: 1 addition & 1 deletion src/BitVectorExpr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ div(e1::AbstractBitVectorExpr, e2::AbstractBitVectorExpr) = __bvnop(div, :bvudiv
Signed integer division of two BitVectors.
"""
sdiv(e1::AbstractBitVectorExpr, e2::AbstractBitVectorExpr) = __bvnop(div, :bvsdiv, BitVectorExpr, [e1, e2])
sdiv(e1::AbstractBitVectorExpr, e2::AbstractBitVectorExpr) = __bvnop(__signfix(div), :bvsdiv, BitVectorExpr, [e1, e2])

# unary minus, this is an arithmetic minus not a bit flip.
-(e::BitVectorExpr) = __bv1op(e, -, :bvneg)
Expand Down

0 comments on commit 7e4f9da

Please sign in to comment.