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

#554 - Drop Compat dependency #666

Merged
merged 1 commit into from
Aug 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ uuid = "774a0091-654f-5c65-bbdc-ad5b67b45832"
version = "0.2.0"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Expokit = "a1e7a1ef-7a5d-5822-a38c-be74e1bb89f4"
HybridSystems = "2207ec0c-686c-5054-b4d2-543502888820"
IntervalArithmetic = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
LazySets = "b4f0291d-fe17-52bc-9479-3d1a343d9043"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MathematicalSystems = "d14a8603-c872-5ed3-9ece-53e0e82e39da"
Memento = "f28f55f0-a522-5efc-85c2-fe41dfb9b2d9"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
Expand All @@ -23,7 +23,6 @@ TaylorSeries = "6aa5eb33-94cf-58f4-a9d0-e4b2c4fc25ea"

[compat]
julia = "≥ 1.0.0"
Compat = "≥ 2.1.0"
Expokit = "≥ 0.2.0"
HybridSystems = "≥ 0.3.0"
IntervalArithmetic = "≥ 0.15.2"
Expand Down
4 changes: 2 additions & 2 deletions src/ReachSets/ContinuousPost/BFFPS19/reach_blocks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ function reach_blocks!(ϕ::AbstractMatrix{NUM},
end
end

_A_mul_B!(ϕpowerk_cache, ϕpowerk, ϕ)
mul!(ϕpowerk_cache, ϕpowerk, ϕ)
copyto!(ϕpowerk, ϕpowerk_cache)

k += 1
k += 1
end

return k, skip
Expand Down
2 changes: 1 addition & 1 deletion src/ReachSets/ContinuousPost/BFFPSV18/check_blocks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function check_blocks(ϕ::AbstractMatrix{NUM},
end
end

_A_mul_B!(ϕpowerk_cache, ϕpowerk, ϕ)
mul!(ϕpowerk_cache, ϕpowerk, ϕ)
copyto!(ϕpowerk, ϕpowerk_cache)
k += 1
end
Expand Down
2 changes: 1 addition & 1 deletion src/ReachSets/ContinuousPost/BFFPSV18/reach_blocks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function reach_blocks!(ϕ::AbstractMatrix{NUM},
end
end

_A_mul_B!(ϕpowerk_cache, ϕpowerk, ϕ)
mul!(ϕpowerk_cache, ϕpowerk, ϕ)
copyto!(ϕpowerk, ϕpowerk_cache)

k += 1
Expand Down
2 changes: 1 addition & 1 deletion src/ReachSets/ContinuousPost/GLGM06/reach.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function reach_inhomog!(X::Vector{ReachSet{Zonotope{Float64}}},

Wk₊ = reduce_order(Wk₊, max_order)

_A_mul_B!(Φ_power_k_cache, Φ_power_k, Φ)
mul!(Φ_power_k_cache, Φ_power_k, Φ)
copyto!(Φ_power_k, Φ_power_k_cache)
k += 1
end
Expand Down
13 changes: 3 additions & 10 deletions src/ReachSets/ReachSets.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,13 @@ module ReachSets

using ..Utils, ..Properties
using LazySets, MathematicalSystems, HybridSystems, Expokit, Optim,
ProgressMeter
LinearAlgebra, SparseArrays, ProgressMeter

# fix namespace conflicts with MathematicalSystems
using LazySets: LinearMap
using LazySets: LinearMap, AffineMap, ResetMap
using Reachability: info, warn

include("../compat.jl")

using LazySets.Approximations: symmetric_interval_hull,
decompose,
overapproximate,
box_approximation,
AbstractDirections

using LazySets.Approximations: AbstractDirections
import LazySets.Approximations: project

using Reachability: @timing,
Expand Down
6 changes: 3 additions & 3 deletions src/ReachSets/discretize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ A matrix.
"""
function exp_Aδ(A::AbstractMatrix{Float64}, δ::Float64; exp_method="base")
if exp_method == "base"
return expmat(Matrix(A*δ))
return exp(Matrix(A*δ))
elseif exp_method == "lazy"
return SparseMatrixExp(A*δ)
elseif exp_method == "pade"
Expand Down Expand Up @@ -210,7 +210,7 @@ Heidelberg, 2011.
function Φ₁(A, δ; exp_method="base")
n = size(A, 1)
if exp_method == "base"
P = expmat(Matrix(Pmatrix(A, δ, n)))
P = exp(Matrix(Pmatrix(A, δ, n)))
Φ₁_Aδ = P[1:n, (n+1):2*n]

elseif exp_method == "lazy"
Expand Down Expand Up @@ -285,7 +285,7 @@ Heidelberg, 2011.
function Φ₂(A, δ; exp_method="base")
n = size(A, 1)
if exp_method == "base"
P = expmat(Matrix(Pmatrix(A, δ, n)))
P = exp(Matrix(Pmatrix(A, δ, n)))
Φ₂_Aδ = P[1:n, (2*n+1):3*n]

elseif exp_method == "lazy"
Expand Down
9 changes: 4 additions & 5 deletions src/Reachability.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ This is the main module and provides interfaces for specifying and solving reach
module Reachability

using Reexport, RecipesBase, Memento, MathematicalSystems, HybridSystems,
Compat, Suppressor
LinearAlgebra, Suppressor, SparseArrays, Printf

@reexport using LazySets
using LazySets.Approximations: overapproximate
import LazySets: use_precise_ρ
using LazySets: LinearMap, AffineMap, ResetMap

import LazySets.use_precise_ρ
import LazySets: LinearMap, AffineMap, ResetMap

include("logging.jl")
include("Options/dictionary.jl")
include("Options/validation.jl")
Expand Down
7 changes: 5 additions & 2 deletions src/Utils/Utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ decompositions and visualization.
"""
module Utils

using LazySets, MathematicalSystems, HybridSystems
using LazySets, MathematicalSystems, HybridSystems, Printf

include("../compat.jl")
# fix namespace conflicts with MathematicalSystems
using LazySets: LinearMap, AffineMap, ResetMap

import LinearAlgebra: normalize

using Reachability: Options

Expand Down
19 changes: 0 additions & 19 deletions src/compat.jl

This file was deleted.

20 changes: 3 additions & 17 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
#!/usr/bin/env julia
using LazySets, Reachability, MathematicalSystems,
LinearAlgebra, SparseArrays
using Test, LazySets, Reachability, MathematicalSystems, LinearAlgebra,
SparseArrays

# fix namespace conflicts with MathematicalSystems
using LazySets: LinearMap

# common aliases
const CLCCS = ConstrainedLinearControlContinuousSystem
const CLCDS = ConstrainedLinearControlDiscreteSystem
const LCS = LinearContinuousSystem
const LDS = LinearDiscreteSystem

# compatibility between Julia versions
include("../src/compat.jl")
using Compat.Test

# Note: CDDLib is only required for v0.6; for v0.7 or later the default Polyhedra
# library is used and CDDLib can be removed from REQUIRE
using LazySets: LinearMap, AffineMap, ResetMap

include("Systems/alltests.jl")
include("ReachSets/alltests.jl")
Expand Down