Skip to content

Cleaning trace message option names #400

Open

Description

@leodemoura

We do not have a consistent naming convention for trace options.
Moreover, most trace messages are mainly for helping developers to debug Lean. We need new messages/options for helping users to diagnose problems by themselves.
Work items:

  • A naming convention for option names
  • Design new trace for helping users to diagnose problems.
  • An API for users traversing/filtering/inspecting trace objects.

Activity

  1. changed the title [-]Cleanning up[/-] [+]Cleaning trace message option names[/+] on Apr 13, 2021
  2. added
    help wanted
    on Apr 13, 2021
  3. dselsam commented on Apr 14, 2021

    @dselsam
    Contributor

    Recording some thoughts here while they are fresh. There are really two different hierarchies of trace messages:

    1. The (dynamic) contextual hierarchy (i.e. from traceCtx calls)
    2. The (static) naming hierarchy (i.e. from name-prefixes)

    Accordingly, I think there are two types of trace queries that would be good to support:

    • [contextual] show me everything that happens inside isDefEq calls, including in modules that isDefEq calls
    • [naming] show me everything prefixed with Meta.synthInstance

    Of course, they compose. One might want the Meta.synthInstance.newSubgoal calls that occur inside isDefEq calls.

    Here is a rough proposal sketch starting point:

    • distinguish trace classes from traceCtx classes (though the names may overlap)
    • for each trace class and each traceCtx class, have a 3-way option (neutral, enable, disable)
    • for a given trace { ctx = [ctx1, ..., ctxN], name = [name1, ..., nameM] }, show it if:
      • its nearest non-neutral name ancestor is enable
      • all its name ancestors are neutral and its nearest non-neutral contextual ancestor is enable

    Ideally all the trace data is emitted in a single run and the data can be browsed interactively.

  4. added
    P-low
    on Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-lowhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions