Skip to main content

Terminology

This page lists some of Dbux's own terminology. More relevant background information can be found in the Background and Related Work chapter.

Trace

We use (i) the name staticTrace to represent a piece of code (e.g. f(x)), and (ii) the name trace to represent a recorded execution of that code; meaning that one staticTrace (piece of code) has 0 or more traces (executions).

info

In dynamic analysis research, the term trace usually refers to the entire runtime log and event refers to an individual "trace log entry". But since the term event is commonly used by JavaScript developers to refer to something else instead, we decided to, use trace to refer to "trace log entry" instead. This choice, despite being more confusing to researchers, likely alleviates confusion for most JavaScript developers.

Context

  • A static context can be a function declaration or a Program (Program is Babel's word for "JavaScript file").
  • A context (sometimes also called executionContext) is any execution of such function or Program.
  • In many ways, a context can also be considered a "stack frame", but it is not quite the same.
  • On file contexts:
    • While functions can be executed many times, JavaScript files usually only execute once, that is the first time they are require'd or import'ed.
    • After that first time, their exports are cached, and returned to any following caller of require or import.
    • That is why you will only see a single trace in the file scope, even if you require them many times.
  • TODO: explain virtual and async contexts