Skip to content

Commit

Permalink
rename pirating (and unused) method
Browse files Browse the repository at this point in the history
  • Loading branch information
schillic committed Jul 24, 2024
1 parent 9d429a9 commit 03c5793
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/Initialization/init_SymEngine.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ julia> free_symbols(:(x1 + x2 <= 2*x4 + 6), HalfSpace)
"""
function free_symbols(::Expr, ::Type{<:LazySet}) end # COV_EXCL_LINE

function free_symbols(expr::Expr)
# Note: this convenience function is not used anywhere
function _free_symbols(expr::Expr)
if _is_hyperplane(expr)
return free_symbols(expr, Hyperplane)
elseif _is_halfspace(expr)
Expand Down
8 changes: 4 additions & 4 deletions test/Interfaces/SymEngine.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@test !LazySets._is_linearcombination(:(2*x1^2))
@test !LazySets._is_linearcombination(:(x1^2 - 4*x2 + x3 + 2))

# free_symbols
@test LazySets.free_symbols(:(x1 = 1)) == [SymEngine.Basic(:(x1))]
@test LazySets.free_symbols(:(2*x2 <= 4)) == [SymEngine.Basic(:(x2))]
@test_throws ErrorException LazySets.free_symbols(:(x3 != 4))
# _free_symbols
@test LazySets._free_symbols(:(x1 = 1)) == [SymEngine.Basic(:(x1))]
@test LazySets._free_symbols(:(2*x2 <= 4)) == [SymEngine.Basic(:(x2))]
@test_throws ErrorException LazySets._free_symbols(:(x3 != 4))

0 comments on commit 03c5793

Please sign in to comment.