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

convert_or_overapproximate broken #716

Closed
schillic opened this issue Jul 25, 2023 · 0 comments · Fixed by #717
Closed

convert_or_overapproximate broken #716

schillic opened this issue Jul 25, 2023 · 0 comments · Fixed by #717
Assignees
Labels
bug Something isn't working

Comments

@schillic
Copy link
Member

With the latest change in LazySets (JuliaReach/LazySets.jl#3335) there is a default fallback for overapproximate, so the following does not work anymore because the second condition is always true:

# fallback implementation for conversion (if applicable) or overapproximation
function _convert_or_overapproximate(T::Type{<:AbstractPolytope}, X::LazySet)
if applicable(convert, T, X)
return convert(T, X)
elseif applicable(overapproximate, X, T)
return overapproximate(X, T)
else
return convert(T, overapproximate(X, Hyperrectangle))
end
end

I see three options:

  • use try-catch (cheap because this is just a MethodError via two method lookups)
  • undo the change in LazySets
  • rewrite the code
@schillic schillic added the bug Something isn't working label Jul 25, 2023
@schillic schillic self-assigned this Jul 25, 2023
schillic added a commit that referenced this issue Jul 26, 2023
#716 #718 - Fix convert_or_overapproximate and concretize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant