JET.jl
JET.jl copied to clipboard
JET not returning results on ARM64 Darwin
Using ARM64, nothing appears after analyzing:
julia> versioninfo()
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
OS: macOS (arm64-apple-darwin21.1.0)
CPU: Apple M1
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)
Environment:
JULIA_NUM_THREADS = 4
JULIA_EDITOR = code
julia> using LifeContingencies
julia> using JET
julia> report_package("LifeContingencies")
[toplevel-info] virtualized the context of Main (took 0.012 sec)
[toplevel-info] entered into /Users/alec/.julia/dev/LifeContingencies/src/LifeContingencies.jl
[toplevel-info] exited from /Users/alec/.julia/dev/LifeContingencies/src/LifeContingencies.jl (took 4.076 sec)
[toplevel-info] analyzing from top-level definitions ... 130/130
julia>
Using x86:
julia> versioninfo()
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin19.5.0)
CPU: Apple M1
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, westmere)
Environment:
JULIA_NUM_THREADS = 4
julia> using JET
julia> using LifeContingencies
[ Info: Precompiling LifeContingencies [c8f0d631-89cd-4a1f-93d0-7542c3692561]
julia> report_package("LifeContingencies")
[toplevel-info] virtualized the context of Main (took 0.017 sec)
[toplevel-info] entered into /Users/alec/.julia/dev/LifeContingencies/src/LifeContingencies.jl
[toplevel-info] exited from /Users/alec/.julia/dev/LifeContingencies/src/LifeContingencies.jl (took 5.961 sec)
[toplevel-info] analyzing from top-level definitions ... 130/130
═════ 4 possible errors found ═════
┌ @ /Users/alec/.julia/dev/LifeContingencies/src/LifeContingencies.jl:73 Core.throw(Core.UndefKeywordError(:mortality))
│ UndefKeywordError: keyword argument mortality not assigned
└────────────────────────────────────────────────────────────────────────
┌ @ util.jl:489 Core.throw(Core.UndefKeywordError(:lives))
│ UndefKeywordError: keyword argument lives not assigned
└───────────────
┌ @ util.jl:490 LifeContingencies.JointLife{C, J}() where {C<:LifeContingencies.Contingency, J<:LifeContingencies.JointAssumption}
│ may throw: Core.throw(%new(Core.UndefKeywordError, :lives)::UndefKeywordError)
└───────────────
┌ @ /Users/alec/.julia/dev/LifeContingencies/src/LifeContingencies.jl:621 pv = LifeContingencies.present_value(yield, cfs, times)
│┌ @ /Users/alec/.julia/packages/ActuaryUtilities/5XqQU/src/financial_math.jl:148 yc = Yields.Forward(i, times)
││┌ @ /Users/alec/.julia/dev/Yields/src/Yields.jl:438 Yields.Zero(z, maturities)
│││┌ @ /Users/alec/.julia/dev/Yields/src/Yields.jl:367 Yields.linear_interp(Base.vcat(0.0, maturities), Base.vcat(Yields.first(continuous_zeros), continuous_zeros))
││││┌ @ /Users/alec/.julia/dev/Yields/src/Yields.jl:884 Interpolations.interpolate(Core.tuple(xs), ys, Interpolations.Gridded(Interpolations.Linear()))
│││││┌ @ /Users/alec/.julia/packages/Interpolations/3gTQB/src/gridded/gridded.jl:152 Interpolations.interpolate(Interpolations.tweight(A), Interpolations.tcoef(A), knots, A, it)
││││││┌ @ /Users/alec/.julia/packages/Interpolations/3gTQB/src/gridded/gridded.jl:135 Interpolations.GriddedInterpolation(_, knots, A, it)
│││││││┌ @ /Users/alec/.julia/packages/Interpolations/3gTQB/src/gridded/gridded.jl:63 Interpolations.GriddedInterpolation(tw, Base.materialize(Base.broadcasted(Interpolations.collect, knots)), A, it)
││││││││┌ @ /Users/alec/.julia/packages/Interpolations/3gTQB/src/gridded/gridded.jl:40 Interpolations.check_gridded(it, knots, Interpolations.axes(A))
│││││││││┌ @ /Users/alec/.julia/packages/Interpolations/3gTQB/src/gridded/gridded.jl:83 Interpolations.check_gridded(Interpolations.getrest(itpflag), Base.tail(knots), Base.tail(axs))
││││││││││┌ @ /Users/alec/.julia/packages/Interpolations/3gTQB/src/gridded/gridded.jl:67 Base.getindex(knots, 1)
│││││││││││┌ @ tuple.jl:29 Base.getfield(t, i, $(Expr(:boundscheck)))
││││││││││││ invalid builtin function call: Base.getfield(t::Tuple{}, i::Int64, $(Expr(:boundscheck)))
│││││││││││└───────────────
When I first saw that there were no possible errors listed, I thought "there's no way I don't have any issues with my code" 😆
Well, human races have been unable to produce any sort of sound and complete static analysrs yet, and this kind of false positives are common :p
Having said that, I agree that JET shouldn't report those errors. For now report_call/report_opt would produce more precise results than toplevel analysis like report_package.
@aviatesk: OP seems to be more concerned about seeing no message on the ARM platform?
Ah, that's weird. Thanks.
With Julia 1.9.3 and LifeContingencies v2.5.0 I actually get "No errors detected" both on macOS with an M1 CPU (so ARM 64) and also on a Linux machine with an Intel CPU.
Yeah it seems like JET works on more recent versions of Julia on the M-series now