Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't error on missing Z3 methods #1

Open
shashi opened this issue May 8, 2020 · 0 comments
Open

Don't error on missing Z3 methods #1

shashi opened this issue May 8, 2020 · 0 comments

Comments

@shashi
Copy link
Member

shashi commented May 8, 2020

Can imagine that this method doesn't exist for correctness reasons, but better to leave term unsimplified than to do this:

@syms a::Real
julia> simplify(a > 1.0, Constraints([]))
ERROR: Failed to apply rule ~(x::isbool) => if isprovable(~x, #= /home/shashi/.julia/dev/SymbolicSAT/src/SymbolicSAT.jl:84 =# @ctx()) === true
        true
    else
        ~x
    end on expression a > 1.0
Stacktrace:
 [1] (::RuleSet)(::SymbolicUtils.Term{Bool}, ::Constraints; depth::Int64, applyall::Bool, recurse::Bool) at /home/shashi/.julia/dev/SymbolicUtils/src/rule_dsl.jl:269
 [2] fixpoint(::RuleSet, ::SymbolicUtils.Term{Bool}, ::Constraints; kwargs::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol,Symbol},NamedTuple{(:recurse, :applyall),Tuple{Bool,Bool}}}) at /home/shashi/.julia/dev/SymbolicUtils/src/rule_dsl.jl:288
 [3] #simplify#37 at /home/shashi/.julia/dev/SymbolicUtils/src/simplify.jl:38 [inlined]
 [4] simplify(::SymbolicUtils.Term{Bool}, ::Constraints) at /home/shashi/.julia/dev/SymbolicUtils/src/simplify.jl:37
 [5] top-level scope at REPL[4]:1
 [6] run_backend(::REPL.REPLBackend) at /home/shashi/.julia/packages/Revise/MgvIv/src/Revise.jl:1023
 [7] top-level scope at none:0
caused by [exception 1]
MethodError: no method matching isless(::Float64, ::Z3.ExprAllocated)
Closest candidates are:
  isless(::Float64, ::Float64) at float.jl:465
  isless(::Missing, ::Any) at missing.jl:87
  isless(::AbstractFloat, ::AbstractFloat) at operators.jl:156
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant