ics-jku / wal

WAL enables programmable waveform analysis.
https://wal-lang.org
BSD 3-Clause "New" or "Revised" License
131 stars 18 forks source link

Where are `seta` and `geta` documented? #16

Closed shareefj closed 1 year ago

shareefj commented 1 year ago

You have an example Python script, examples/riscv-profile/profile.py that uses the seta and geta. Where are these documented? I couldn't find anything?

Also, in your profile.py script, you seem to have a bug where you don't initialise the dist dict. Adding the following prevents an early termination:

    # calculate the time spent in each function, does not take subcalls into account
    dist = { f:0 for f in functions }
LucasKl commented 1 year ago

This took a liiittle bit longer than I should but the seta and geta documentation can be found in the WAL documentation now.

The example in profile.py now uses the geta/default function which returns a default value when the key is not found in the array.