JET found some issues with the code: Need to address 6th, 10th, and 12th items in following list
[x] first set: Shouldn't be an issue because _cid isn't called on a ClockChannel ever because if there is a ClockChannel the c.id == 1. Instead, it is called on ActiveClock, which is defined. Same for _register.
┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\schedule.jl:129 event!(𝐶 , ex, t)
│┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\schedule.jl:68 DiscreteEvents.:(var"#event!#11")(clk.id, false, #self#, clk, ex, t)
││┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\schedule.jl:72 DiscreteEvents._cid(clk, cid, spawn)
│││┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\schedule.jl:230 DiscreteEvents._cid(c.ac[], cid, spawn)
││││ no matching method found `_cid(::DiscreteEvents.ClockChannel, ::Int64, ::Bool)`: DiscreteEvents._cid(((c::DiscreteEvents.Clock{Vector{DiscreteEvents.ClockChannel}}).ac::Vector{DiscreteEvents.ClockChannel})[]::DiscreteEvents.ClockChannel, cid::Int64, spawn::Bool)
│││└─────────────────────────────────────────────────────────────
││┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\schedule.jl:72 DiscreteEvents._assign(clk, DiscreteEvents.DiscreteEvent(ex, t, DiscreteEvents.nothing, 1), DiscreteEvents._cid(clk, cid, spawn))
│││┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\schedule.jl:285 DiscreteEvents._register!(c, ev)
││││┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\schedule.jl:294 goto %21 if not DiscreteEvents.any(#30, DiscreteEvents.values(c.sc.events))
│││││ non-boolean `Missing` found in boolean context (1/2 union split): goto %21 if not DiscreteEvents.any(#30::DiscreteEvents.var"#30#31", DiscreteEvents.values(((c::DiscreteEvents.Clock{Vector{DiscreteEvents.ClockChannel}}).sc::DiscreteEvents.Schedule).events::DataStructures.PriorityQueue{DiscreteEvents.DiscreteEvent, Float64})::Base.ValueIterator)::Union{Missing, Bool}
││││└─────────────────────────────────────────────────────────────
│││┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\schedule.jl:287 DiscreteEvents._register(c, ev, id)
││││┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\schedule.jl:326 DiscreteEvents._register(c.ac[], ev, id)
│││││ no matching method found `_register(::DiscreteEvents.ClockChannel, ::DiscreteEvents.DiscreteEvent{Expr, Nothing}, ::Int64)`: DiscreteEvents._register(((c::DiscreteEvents.Clock{Vector{DiscreteEvents.ClockChannel}}).ac::Vector{DiscreteEvents.ClockChannel})[]::DiscreteEvents.ClockChannel, ev::DiscreteEvents.DiscreteEvent{Expr, Nothing}, id::Int64)
││││└─────────────────────────────────────────────────────────────
[x] second set: same as first set, shouldn't be an issue.
[x] fourth set: shouldn't be an issue because values(c.sc.events) shouldn't return missing
┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\schedule.jl:294 goto %21 if not DiscreteEvents.any(#30, DiscreteEvents.values(c.sc.events))
│ non-boolean `Missing` found in boolean context (1/2 union split): goto %21 if not DiscreteEvents.any(#30::DiscreteEvents.var"#30#31", DiscreteEvents.values(((c::DiscreteEvents.Clock).sc::DiscreteEvents.Schedule).events::DataStructures.PriorityQueue{DiscreteEvents.DiscreteEvent, Float64})::Base.ValueIterator)::Union{Missing, Bool}
└─────────────────────────────────────────────────────────────
[x] fifth set: c.tn and c.tev shouldn't ever be missing
┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\clock.jl:294 goto %27 if not DiscreteEvents.any(#47, tuple(c.tn, c.tev))
│ non-boolean `Missing` found in boolean context (1/2 union split): goto %27 if not DiscreteEvents.any(#47::DiscreteEvents.var"#47#48", tuple((c::DiscreteEvents.Clock).tn::Float64, (c::DiscreteEvents.Clock).tev::Float64)::Tuple{Float64, Float64})::Union{Missing, Bool}
└──────────────────────────────────────────────────────────
[x] sixth set: assign function is not defined...
┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\clock.jl:330 DiscreteEvents.assign(getfield(#self#, :clk), token.ev, token.id)
│ `DiscreteEvents.assign` is not defined
└──────────────────────────────────────────────────────────
[x] seventh set: Prc.clk shouldn't be nothing here since it is set with _clock
┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\process.jl:33 DiscreteEvents._register!(p.clk, p)
│ no matching method found `_register!(::Nothing, ::DiscreteEvents.Prc)` (1/2 union split): DiscreteEvents._register!((p::DiscreteEvents.Prc).clk::Union{Nothing, DiscreteEvents.AbstractClock}, p::DiscreteEvents.Prc)
└───────────────────────────────────────────────────────────
[x] eighth set: same as seventh set
┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\process.jl:45 p.clk.processes
│┌ @ Base.jl:38 Base.getfield(x, f)
││ type Nothing has no field processes
│└──────────────
┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\process.jl:45 p.clk.processes = DiscreteEvents.delete!(p.clk.processes, p.id)
│┌ @ Base.jl:39 Base.fieldtype(Base.typeof(x), f)
││ type Nothing has no field processes
│└──────────────
[x] ninth set: I don't think this should be an issue either since p.task is set with p.task = @task _loop(p, cycles) in startit()
[x] eleventh set: I don't think there is any problem here....
┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\threads.jl:57 DiscreteEvents.error(string("transition q=", q, ", σ=", σ, " not implemented"))
│┌ @ error.jl:35 error(::String)
││ may throw: Base.throw(Base.ErrorException(s::String)::ErrorException)
│└───────────────
[x] twelfth set: Needs to be fixed. I think should be length(master.ac)
┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\threads.jl:133 DiscreteEvents.clk.ac
│ `DiscreteEvents.clk` is not defined
└────────────────────────────────────────────────────────────
[x] thirtheenth set: same as 4th set
┌ @ C:\Users\HD\.julia\dev\DiscreteEvents\src\threads.jl:162 goto %57 if not DiscreteEvents.any(#77, DiscreteEvents.values(master.sc.events))
│ non-boolean `Missing` found in boolean context (1/2 union split): goto %57 if not DiscreteEvents.any(#77::DiscreteEvents.var"#77#78", DiscreteEvents.values(((master::DiscreteEvents.Clock).sc::DiscreteEvents.Schedule).events::DataStructures.PriorityQueue{DiscreteEvents.DiscreteEvent, Float64})::Base.ValueIterator)::Union{Missing, Bool}
└────────────────────────────────────────────────────────────
JET found some issues with the code: Need to address 6th, 10th, and 12th items in following list
[x] first set: Shouldn't be an issue because
_cid
isn't called on aClockChannel
ever because if there is aClockChannel
thec.id == 1
. Instead, it is called onActiveClock
, which is defined. Same for_register
.[x] second set: same as first set, shouldn't be an issue.
[x] third set: same as first set, shouldn't be an issue.
[x] fourth set: shouldn't be an issue because
values(c.sc.events)
shouldn't returnmissing
[x] fifth set:
c.tn
andc.tev
shouldn't ever bemissing
[x] sixth set:
assign
function is not defined...[x] seventh set:
Prc.clk
shouldn't benothing
here since it is set with_clock
[x] eighth set: same as seventh set
[x] ninth set: I don't think this should be an issue either since
p.task
is set withp.task = @task _loop(p, cycles)
instartit()
[x] tenth set: not sure on this one, but has to do with
Base.schedule
...[x] eleventh set: I don't think there is any problem here....
[x] twelfth set: Needs to be fixed. I think should be
length(master.ac)
[x] thirtheenth set: same as 4th set