- 
                Notifications
    You must be signed in to change notification settings 
- Fork 43
Closed
Description
tested on julia 1.8.0-beta 3 and Cthulhu v2.5.4 (from github a few hours ago)
julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.0-beta3 (2022-03-29)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |
julia> include("cth.jl")
main() in Main at /home/eta/TT/cth.jl:8
Body::Core.Const(nothing)
   1 ─       nothing                                                                                                                                                       │  
   2 ─       nothing                                                                                                                                                       │  
   3 ─       nothing                                                                                                                                                       │  
10 4 ─ %4  = invoke Base.dec(0x0000000000000002::UInt64, 1::Int64, false::Bool)::String                                                                                    │╻╷ string
   └──       goto #5                                                                                                                                                       ││┃  #string#426
   5 ─       goto #6                                                                                                                                                       ││ 
   6 ─ %7  = Main.dir::Core.Const("ours/nyc")                                                                                                                              │  
   │   %8  = Core.tuple(%7, %4)::Core.PartialStruct(Tuple{String, String}, Any[Core.Const("ours/nyc"), String])                                                            │╻  joinpath
   │   %9  = invoke Base.Filesystem.joinpath(%8::Tuple{String, String})::String                                                                                            ││ 
11 │   %10 = Main.mkpath::Core.Const(mkpath)                                                                                                                               │  
   │         invoke Base.Filesystem.:(var"#mkpath#9")(0x01ff::UInt16, %10::typeof(mkpath), %9::String)                                                                     │╻  mkpath
12 │   %12 = TT.load_data::Core.Const(TT.load_data)                                                                                                                        │  
   │   %13 = invoke Main.homedir()::String                                                                                                                                 │  
   │   %14 = invoke Base.print_to_string(".julia/dev/TravelTime/data/nyc/"::String, 2::Vararg{Any})::String                                                                │╻  string
   │   %15 = Core.tuple(%13, %14)::Tuple{String, String}                                                                                                                   │╻  joinpath
   │   %16 = invoke Base.Filesystem.joinpath(%15::Tuple{String, String})::String                                                                                           ││ 
   │   %17 = invoke %12(%16::String)::Tuple{MetaDiGraph{Int64, Float64}, Tuple{TT.Group, Vector{Float64}}, Tuple{TT.Group, Vector{Float64}}, Tuple{TT.Group, Vector{Float64}}}
17 │   %18 = %new(NamedTuple{(:itermax, :retry0, :data, :min_speed, :show), Tuple{Int64, Int64, Tuple{MetaDiGraph{Int64, Float64}, Tuple{TT.Group, Vector{Float64}}, Tuple{TT.Group, Vector{Float64}}, Tuple{TT.Group, Vector{Float64}}}, Float64, Bool}}, 3, 5, %17, 1.0, true)::Core.PartialStruct(NamedTuple{(:itermax, :retry0, :data, :min_speed, :show), Tuple{Int64, Int64, Tuple{MetaDiGraph{Int64, Float64}, Tuple{TT.Group, Vector{Float64}}, Tuple{TT.Group, Vector{Float64}}, Tuple{TT.Group, Vector{Float64}}}, Float64, Bool}}, Any[Core.Const(3), Core.Const(5), Tuple{MetaDiGraph{Int64, Float64}, Tuple{TT.Group, Vector{Float64}}, Tuple{TT.Group, Vector{Float64}}, Tuple{TT.Group, Vector{Float64}}}, Core.Const(1.0), Core.Const(true)])
   │   %19 = π (0.0, Core.Const(0.0))                                                                                                                                      │  
   │   %20 = π (0.0, Core.Const(0.0))                                                                                                                                      │  
   └──       invoke var"#f##kw"()(%18::NamedTuple{(:itermax, :retry0, :data, :min_speed, :show), Tuple{Int64, Int64, Tuple{MetaDiGraph{Int64, Float64}, Tuple{TT.Group, Vector{Float64}}, Tuple{TT.Group, Vector{Float64}}, Tuple{TT.Group, Vector{Float64}}}, Float64, Bool}}, Main.f::typeof(f), %19::Float64, %20::Float64, -1.5::Float64)
24 7 ─       return nothing                                                                                                                                                │  
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [o]ptimize, [w]arn, [h]ide type-stable statements, [d]ebuginfo, [r]emarks, [e]ffects, [i]nlining costs, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
Advanced: dump [P]arams cache.
 • %4  = < constprop > dec(::Core.Const(0x0000000000000002),::Core.Const(1),::Core.Const(false))::String
   %9  = invoke joinpath(::Tuple{String, String})::String
   %11  = invoke #mkpath#9(::UInt16,::typeof(mkpath),::String)::String
   %13  = invoke homedir()::String
   %14  = < constprop > print_to_string(::Core.Const((".julia/dev/TravelTime/data/nyc/", 2)))::String
   %16  = invoke joinpath(::Tuple{String, String})::String
   %17  = invoke load_data(::String)::Tuple{MetaDiGraph{Int64, Float64}, Tuple{TT.Group, Vector{Float64}}, Tuple{TT.Group, Vector{Float64}}, Tuple{TT.Group, Vector{Float64}}}
   %21  = < constprop > f##kw(::NamedTuple{…},::#f{…},::Float64{…},::Float64{…},::Float64{…})::Any
   ↩
main() in Main at /home/eta/TT/cth.jl:8
Body::Core.Const(nothing)
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [o]ptimize, [w]arn, [h]ide type-stable statements, [d]ebuginfo, [r]emarks, [e]ffects, [i]nlining costs, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
Advanced: dump [P]arams cache.
   %4  = < constprop > dec(::Core.Const(0x0000000000000002),::Core.Const(1),::Core.Const(false))::String
   %9  = invoke joinpath(::Tuple{String, String})::String
   %11  = invoke #mkpath#9(::UInt16,::typeof(mkpath),::String)::String
   %13  = invoke homedir()::String
   %14  = < constprop > print_to_string(::Core.Const((".julia/dev/TravelTime/data/nyc/", 2)))::String
   %16  = invoke joinpath(::Tuple{String, String})::String
   %17  = invoke load_data(::String)::Tuple{MetaDiGraph{Int64, Float64}, Tuple{TT.Group, Vector{Float64}}, Tuple{TT.Group, Vector{Float64}}, Tuple{TT.Group, Vector{Float64}}}
 • %21  = < constprop > f##kw(::NamedTuple{…},::#f{…},::Float64{…},::Float64{…},::Float64{…})::Any
   ↩
(::var"#f##kw")(::Any, ::typeof(f), λ, μ, lr) in Main at /home/eta/TT/runsome.jl:31
Body::TT.State
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [o]ptimize, [w]arn, [h]ide type-stable statements, [d]ebuginfo, [r]emarks, [e]ffects, [i]nlining costs, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
Advanced: dump [P]arams cache.
   %58  = invoke #ff#1(::Tuple{…},::Array{…},::Float64,::#ff,::Float64,::Float64)::TT.State
 • %61  = invoke #f#2(::Float64,::Int64,::Bool,::Int64,::Int64,::Tuple{…},::Array{…},::Bool,::Nothing,::Float64,::State,::#f,::Float64,::Float64,::Float64)::TT.State
   ↩
var"#f#2"(min_D, itermax, show, retry0, every_it, data, attr_sel, verbose, savedir, min_speed, state, ::typeof(f), λ, μ, lr) in Main at /home/eta/TT/runsome.jl:31
Body::TT.State
    │      %246  = invoke TT.:(var"#grad_sh#49")(50::Int64, %245::typeof(grad_sh), %185::TT.Group, %175::TT.State, %241::Vector{Float64}, %243::Float64, %244::SparseArrays.SparseMatrixCSC{Float64, Int64}, %176::Float64, %177::Float64, %184::Matrix{Float64})::Any
    │      %248  = ϒ (%246)::Any                                                                                                     ││                 
    │      %250  = ϒ (%246)::Any                                                                                                     ││                 
80  78 ─── %349  = Base.indexed_iterate(%301, 1)::Any                                                                                │                  
    │      %350  = Core.getfield(%349, 1)::Any                                                                                       │                  
    │      %351  = Core.getfield(%349, 2)::Any                                                                                       │                  
    │      %352  = Base.indexed_iterate(%301, 2, %351)::Any                                                                          │                  
    │      %353  = Core.getfield(%352, 1)::Any                                                                                       │                  
    │      %354  = Core.getfield(%352, 2)::Any                                                                                       │                  
    │      %355  = Base.indexed_iterate(%301, 3, %354)::Any                                                                          │                  
    │      %356  = Core.getfield(%355, 1)::Any                                                                                       │                  
    │      %357  = Core.getfield(%355, 2)::Any                                                                                       │                  
    │      %358  = Base.indexed_iterate(%301, 4, %357)::Any                                                                          │                  
    │      %359  = Core.getfield(%358, 1)::Any                                                                                       │                  
    │      %362  = Core.tuple(%361, %359)::Tuple{Float64, Any}                                                                       ││                 
    │      %367  = Base.getproperty(%353, :nzval)::Any                                                                               ││                 
    │      %368  = Main.norm(%367)::Any                                                                                              ││                 
    │      %369  = Main.norm(%356)::Any                                                                                              ││                 
    │      %371  = Core.tuple(%295, %350, %366, %368, %369, %370)::Tuple{Int64, Any, Float64, Any, Any, Float64}                     ││                 
85  80 ┄── %374  = Main.stdout::Any                                                                                                  │                  
    │      %533  = Base.getproperty(%353, :nzval)::Any                                                                               │                  
    │      %842  = Base.vect(%359)::Vector                                                                                           │                  
    738 ── %1731 = Base.AssertionError("GC.enable(true)")::Any                                                                       │                  
    740 ── %1755 = $(Expr(:the_exception))::Any                                                                                      │                  
    │      %1948 = Main.best_state::Any                                                                                              │                  
    │      %1949 = Base.getproperty(%1948, :b)::Any                                                                                  │                  
    │      %1950 = Base.broadcasted(Base.identity, %1949)::Any                                                                       │                  
    │      %1953 = Main.best_state::Any                                                                                              │                  
    │      %1954 = Base.getproperty(%1953, :s)::Any                                                                                  │                  
    │      %1955 = Base.broadcasted(Base.identity, %1954)::Any                                                                       │                  
64  1163 ─ %2535 = Base.AssertionError("GC.enable(true)")::Any                                                                       │                  
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [o]ptimize, [w]arn, [h]ide type-stable statements, [d]ebuginfo, [r]emarks, [e]ffects, [i]nlining costs, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
Advanced: dump [P]arams cache.
   %91  = invoke _mean(::typeof(identity),::Vector{Float64},::Colon)::Float64
   %129  = invoke #sprint#451(::Nothing,::Int64,::typeof(sprint),::typeof(show),::NADAM)::String
   %133  = invoke println(::String,::String)::Any
   %134  = < constprop > ^(::Core.Const(10.0),::Float64)::Float64
   %145  = invoke show_iter(::Tuple{…},::State,::Float64,::Float64,::Array{…},::Bool)::Float64
 • %246  = invoke #grad_sh#49(::Int64,::#grad_sh,::Group,::State,::Array{…},::Float64,::SparseMatrixCSC{…},::Float64,::Float64,::Array{…})::Any
   %310  = invoke rethrow()::Union{}
   %346  = invoke time_print(::UInt64,::Int64,::Int64,::Int64,::UInt64,::Bool,::Bool)::Any
   %363  = call repr(::Tuple{Float64, Any})::String
v  %364  = invoke println(::String,::String)::Any
ERROR: LoadError: type ConstResult has no field effects
Stacktrace:
  [1] getproperty
    @ ./Base.jl:38 [inlined]
  [2] get_effects(result::Core.Compiler.ConstResult)
    @ Cthulhu ~/.julia/dev/Cthulhu/src/Cthulhu.jl:250
  [3] #14
    @ ~/.julia/dev/Cthulhu/src/reflection.jl:155 [inlined]
  [4] mapany(f::Cthulhu.var"#14#18"{Vector{Any}, Core.TypeofBottom, Bool, Vector{Any}, Cthulhu.var"#is_cached#15"{Cthulhu.CthulhuInterpreter, Bool}}, itr::Base.Iterators.Enumerate{Vector{Union{Nothing, Core.Compiler.ConstResult, Core.Compiler.InferenceResult}}})
    @ Base ./abstractarray.jl:2931
  [5] process_info(interp::Cthulhu.CthulhuInterpreter, info::Any, argtypes::Vector{Any}, rt::Any, optimize::Bool)
    @ Cthulhu ~/.julia/dev/Cthulhu/src/reflection.jl:140
  [6] find_callsites(interp::Cthulhu.CthulhuInterpreter, CI::Core.Compiler.IRCode, stmt_info::Vector{Any}, mi::Core.MethodInstance, slottypes::Vector{Any}, optimize::Bool)
    @ Cthulhu ~/.julia/dev/Cthulhu/src/reflection.jl:57
  [7] _descend(term::REPL.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, mi::Core.MethodInstance; override::Nothing, debuginfo::Cthulhu.DInfo.DebugInfo, optimize::Bool, interruptexc::Bool, iswarn::Bool, hide_type_stable::Bool, verbose::Nothing, remarks::Bool, with_effects::Bool, inline_cost::Bool, type_annotations::Bool)
    @ Cthulhu ~/.julia/dev/Cthulhu/src/Cthulhu.jl:380
  [8] _descend(term::REPL.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, mi::Core.MethodInstance; override::Nothing, debuginfo::Cthulhu.DInfo.DebugInfo, optimize::Bool, interruptexc::Bool, iswarn::Bool, hide_type_stable::Bool, verbose::Nothing, remarks::Bool, with_effects::Bool, inline_cost::Bool, type_annotations::Bool) (repeats 3 times)
    @ Cthulhu ~/.julia/dev/Cthulhu/src/Cthulhu.jl:480
  [9] _descend(term::REPL.Terminals.TTYTerminal, args::Any; interp::Core.Compiler.NativeInterpreter, kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:iswarn,), Tuple{Bool}}})
    @ Cthulhu ~/.julia/dev/Cthulhu/src/Cthulhu.jl:604
 [10] __descend_with_error_handling(args::Any; terminal::Any, kwargs::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}})
    @ Cthulhu ~/.julia/dev/Cthulhu/src/Cthulhu.jl:188
 [11] _descend_with_error_handling(f::Any, argtypes::Any; kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:iswarn,), Tuple{Bool}}})
    @ Cthulhu ~/.julia/dev/Cthulhu/src/Cthulhu.jl:179
 [12] descend_code_warntype(::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Cthulhu ~/.julia/dev/Cthulhu/src/Cthulhu.jl:168
 [13] descend_code_warntype(::Any, ::Any)
    @ Cthulhu ~/.julia/dev/Cthulhu/src/Cthulhu.jl:168
 [14] top-level scope
    @ ~/TT/cth.jl:26
 [15] include(fname::String)
    @ Base.MainInclude ./client.jl:476
 [16] top-level scope
    @ REPL[1]:1
in expression starting at /home/eta/TT/cth.jl:26
julia> 
Metadata
Metadata
Assignees
Labels
No labels