# Weird ASTInterpreter output

**URL:** <https://discourse.julialang.org/t/weird-astinterpreter-output/2074>\
**Category:** General Usage\
**Created:** [February 13, 2017, 11:25am UTC](https://discourse.julialang.org/t/weird-astinterpreter-output/2074 "2017-02-13T11:25:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![chobbes](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@chobbes](https://discourse.julialang.org/u/chobbes)\
**Post date:** [February 13, 2017, 11:25am UTC](https://discourse.julialang.org/t/weird-astinterpreter-output/2074/1 "2017-02-13T11:25:10Z")

</div>

I went over a massive package using ASTInterpreter (basically using commands `n` and `s`) and came across the following output. Why was such a long diagram printed and regular output omitted? Quite puzzled.

```julia
1|debug > s
Body`
├─ :(_6 = (Array{Any,1})(0))
│ ├─ _6
│ └─ Call
│ ├─ Array{Any,1}
│ └─ 0
├─ :(SSAValue(0) = (af.colon)(1,(Base.length)(_2) >> 1))
│ ├─ SSAValue(0)
│ └─ Call
│ ├─ af.colon
│ ├─ 1
│ └─ Call
│ ├─ Base.>>
│ ├─ Call
│ │ ├─ Base.length
│ │ └─ _2
│ └─ 1
├─ :(_7 = (Base.start)(SSAValue(0)))
│ ├─ _7
│ └─ Call
│ ├─ Base.start
│ └─ SSAValue(0)
├─ 4: 
├─ :(unless !((Base.done)(SSAValue(0),_7)) goto 14)
│ ├─ Call
│ │ ├─ Base.!
│ │ └─ Call
│ │ ├─ Base.done
│ │ ├─ SSAValue(0)
│ │ └─ _7
│ └─ 14
├─ :(SSAValue(1) = (Base.next)(SSAValue(0),_7))
│ ├─ SSAValue(1)
│ └─ Call
│ ├─ Base.next
│ ├─ SSAValue(0)
│ └─ _7
├─ :(_8 = (Core.getfield)(SSAValue(1),1))
│ ├─ _8
│ └─ Call
│ ├─ Core.getfield
│ ├─ SSAValue(1)
│ └─ 1
├─ :(_7 = (Core.getfield)(SSAValue(1),2))
│ ├─ _7
│ └─ Call
│ ├─ Core.getfield
│ ├─ SSAValue(1)
│ └─ 2
├─ :(_9 = _8 * 2 - 1)
│ ├─ _9
│ └─ Call
│ ├─ Base.-
│ ├─ Call
│ │ ├─ Base.*
│ │ ├─ _8
│ │ └─ 2
│ └─ 1
├─ :(_10 = (Core.arrayref)(_2,_9))
│ ├─ _10
│ └─ Call
│ ├─ Core.arrayref
│ ├─ _2
│ └─ _9
├─ Call
│ ├─ Core.ccall
│ ├─ :jl_array_ptr_1d_push
│ ├─ af.Void
│ ├─ Call
│ │ ├─ Core.svec
│ │ ├─ af.Any
│ │ └─ af.Any
│ ├─ _6
│ ├─ 0
│ ├─ Call
│ │ ├─ Core.tuple
│ │ ├─ _10
│ │ └─ Call
│ │ ├─ Core.arrayref
│ │ ├─ _2
│ │ └─ Call
│ │ ├─ Base.+
│ │ ├─ _9
│ │ └─ 1
│ └─ 0
├─ 12: 
├─ goto 4
├─ 14: 
└─ Return
   └─ Call
      ├─ af.#\#284
      ├─ _6
      ├─ _3
      ├─ _4
      └─ _5

```

---

<div class="post-metadata">

**Author:** ![quinnj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quinnj/32/11_2.png) [@quinnj](https://discourse.julialang.org/u/quinnj)\
**Post date:** [February 13, 2017, 2:13pm UTC](https://discourse.julialang.org/t/weird-astinterpreter-output/2074/2 "2017-02-13T14:13:22Z")

</div>

I’ve seen this as well and my gut says it has something to do w/ keyword arguments. Definitely worth [filing an issue](https://github.com/Keno/ASTInterpreter.jl/issues) with the steps to reproduce so it can be figured out.

---

<div class="post-metadata">

**Author:** ![chobbes](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@chobbes](https://discourse.julialang.org/u/chobbes)\
**Post date:** [February 13, 2017, 2:18pm UTC](https://discourse.julialang.org/t/weird-astinterpreter-output/2074/3 "2017-02-13T14:18:20Z")

</div>

Thanks for the comments! I’ll take some time to figure out an MWE and file a ticket. In the meanwhile, further comments are welcome.

---

<div class="post-metadata">

**Author:** ![chobbes](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@chobbes](https://discourse.julialang.org/u/chobbes)\
**Post date:** [February 13, 2017, 2:42pm UTC](https://discourse.julialang.org/t/weird-astinterpreter-output/2074/4 "2017-02-13T14:42:02Z")

</div>

It seems that Gallium and ASTInterpreter are not under active maintenance - there are a large number of issues unresolved and the last commit was pushed 3 months ago. 😕

---

<div class="post-metadata">

**Author:** ![Keno](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/keno/32/285_2.png) [@Keno](https://discourse.julialang.org/u/Keno)\
**Post date:** [February 14, 2017, 8:14pm UTC](https://discourse.julialang.org/t/weird-astinterpreter-output/2074/5 "2017-02-14T20:14:19Z")

</div>

There’s only so much time in the day ;). 0.6 and other projects have taken a lot of my time lately, but worry not, there’ll be new and improved versions of both of these packages for 0.6.

Regarding the output above, that’s what ASTInterpreter does when it doesn’t have any source information. This can happen for functions generated by the front end, or for generated functions. For the keyword argument case, it generally tries to hide those from you, but it doesn’t always succeed.

---

<div class="post-metadata">

**Author:** ![chobbes](https://avatars.discourse-cdn.com/v4/letter/c/848f3c/32.png) [@chobbes](https://discourse.julialang.org/u/chobbes)\
**Post date:** [February 14, 2017, 10:14pm UTC](https://discourse.julialang.org/t/weird-astinterpreter-output/2074/6 "2017-02-14T22:14:13Z")

</div>

Thanks so much for the comments. I realize that you created the Julia debugger single-handedly. Thanks for the hard work, without which I would probably have to print the value of every single variable for debugging. Really appreciate.

I’ll wait until the release of 0.6. For the time-being, the most urgent concern is another [question](https://discourse.julialang.org/t/how-to-show-the-interpolated-expression-in-metaprogramming/2060/3) I raised. If you can leave me a hint briefly, I’ll be most grateful.

Again, thanks!!
