From 4293febb03541e13866906b729c8db5b634f9962 Mon Sep 17 00:00:00 2001 From: Mahmoud Bentriou <mahmoud.bentriou@centralesupelec.fr> Date: Thu, 25 Feb 2021 00:20:19 +0100 Subject: [PATCH] small change in flow automata --- automata/automaton_F.jl | 4 ++-- automata/automaton_G.jl | 6 +++--- automata/euclidean_distance_automaton.jl | 4 ++-- automata/euclidean_distance_automaton_2.jl | 2 +- automata/period_automaton.jl | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/automata/automaton_F.jl b/automata/automaton_F.jl index 5fa594b..c1d57ef 100644 --- a/automata/automaton_F.jl +++ b/automata/automaton_F.jl @@ -26,8 +26,8 @@ function create_automaton_F(m::ContinuousTimeModel, x1::Float64, x2::Float64, t1 ## Invariant predicates @everywhere true_inv_predicate(x::Vector{Int}) = true - Λ_F = Dict(:l0 => getfield(Main, :true_inv_predicate), :l1 => getfield(Main, :true_inv_predicate), - :l2 => getfield(Main, :true_inv_predicate), :l3 => getfield(Main, :true_inv_predicate)) + Λ_F = Dict{Location,InvariantPredicateFunction}(:l0 => getfield(Main, :true_inv_predicate), :l1 => getfield(Main, :true_inv_predicate), + :l2 => getfield(Main, :true_inv_predicate), :l3 => getfield(Main, :true_inv_predicate)) ## Init and final loc locations_init = [:l0] diff --git a/automata/automaton_G.jl b/automata/automaton_G.jl index 35ae182..a73f996 100644 --- a/automata/automaton_G.jl +++ b/automata/automaton_G.jl @@ -26,9 +26,9 @@ function create_automaton_G(m::ContinuousTimeModel, x1::Float64, x2::Float64, t1 # Invariant predicates @everywhere true_inv_predicate(x::Vector{Int}) = true - Λ_F = Dict(:l0 => getfield(Main, :true_inv_predicate), :l1 => getfield(Main, :true_inv_predicate), - :l2 => getfield(Main, :true_inv_predicate), :l3 => getfield(Main, :true_inv_predicate), - :l4 => getfield(Main, :true_inv_predicate)) + Λ_F = Dict{Location,InvariantPredicateFunction}(:l0 => getfield(Main, :true_inv_predicate), :l1 => getfield(Main, :true_inv_predicate), + :l2 => getfield(Main, :true_inv_predicate), :l3 => getfield(Main, :true_inv_predicate), + :l4 => getfield(Main, :true_inv_predicate)) ## Init and final loc locations_init = [:l0] diff --git a/automata/euclidean_distance_automaton.jl b/automata/euclidean_distance_automaton.jl index be7b1c0..bf1fc71 100644 --- a/automata/euclidean_distance_automaton.jl +++ b/automata/euclidean_distance_automaton.jl @@ -26,8 +26,8 @@ function create_euclidean_distance_automaton(m::ContinuousTimeModel, timeline::A ## Invariant predicates @everywhere true_inv_predicate(x::Vector{Int}) = true - Λ_F = Dict{Symbol,Function}(:l0 => getfield(Main, :true_inv_predicate), :l1 => getfield(Main, :true_inv_predicate), - :l2 => getfield(Main, :true_inv_predicate)) + Λ_F = Dict{Location,InvariantPredicateFunction}(:l0 => getfield(Main, :true_inv_predicate), :l1 => getfield(Main, :true_inv_predicate), + :l2 => getfield(Main, :true_inv_predicate)) ## Init and final loc locations_init = [:l0] diff --git a/automata/euclidean_distance_automaton_2.jl b/automata/euclidean_distance_automaton_2.jl index c3dfaa4..a02ca94 100644 --- a/automata/euclidean_distance_automaton_2.jl +++ b/automata/euclidean_distance_automaton_2.jl @@ -29,7 +29,7 @@ function create_euclidean_distance_automaton_2(m::ContinuousTimeModel, timeline: ## Invariant predicates @everywhere true_inv_predicate(x::Vector{Int}) = true - Λ_F = Dict{Location, Function}() + Λ_F = Dict{Location,InvariantPredicateFunction}() for loc in locations Λ_F[loc] = getfield(Main, :true_inv_predicate) end diff --git a/automata/period_automaton.jl b/automata/period_automaton.jl index 5c84347..b563261 100644 --- a/automata/period_automaton.jl +++ b/automata/period_automaton.jl @@ -48,9 +48,9 @@ function create_period_automaton(m::ContinuousTimeModel, L::Float64, H::Float64, @everywhere mid_predicate(x::Vector{Int}) = $L < x[$(Meta.quot(idx_sym_obs))] < $H @everywhere high_predicate(x::Vector{Int}) = x[$(Meta.quot(idx_sym_obs))] >= $H - Λ_F = Dict(:l0 => getfield(Main, :true_predicate), :l0prime => getfield(Main, :not_low_predicate), - :low => getfield(Main, :low_predicate), :mid => getfield(Main, :mid_predicate), - :high => getfield(Main, :high_predicate), :final => getfield(Main, :true_predicate)) + Λ_F = Dict{Location,InvariantPredicateFunction}(:l0 => getfield(Main, :true_predicate), :l0prime => getfield(Main, :not_low_predicate), + :low => getfield(Main, :low_predicate), :mid => getfield(Main, :mid_predicate), + :high => getfield(Main, :high_predicate), :final => getfield(Main, :true_predicate)) ## Init and final loc locations_init = [:l0] -- GitLab