Skip to content

Remove VERBOSE global variable in RuleBasedMethod #19

Open

Description

@Bumblebee00

Right now integrating with RuleBasedMethod(verbose=true) sets a global variable to true. this is not thread-safe. But carrying the setting as a parameter through the call chain and using it locally is not so simple.

the reason i made it global is that some rules if applied call the utlity function int_and_subst, that is like a change of variable: first integrate an expression and then substitute in the result another expression. To make the printing of rules behave correctly, the int_and_subst function prints the rule that called it, and then silences it using the SILENCE global variable so that it is not printed twice when the result is returned.

All this to say that i need to know in the int_and_subst function if verbose is true, and i cannot do this without a global variable. Whitout a global variable I would need somehow to pass the verbose parameter to the rule that calls int_and_subst, but rules have only one parameter and no keyword arguments

I tought about this for a bit but I cant come up with a way to communicate to int_and_subst function the verbose flag without a global variable

Activity

  1. Bumblebee00 commented on Sep 9, 2025

    @Bumblebee00
    CollaboratorAuthor

    same for the USE_GAMMA global variable, that is called right inside rules conditions

  2. gdalle commented on Dec 29, 2025

    @gdalle

    Maybe Preferences.jl would be slightly nicer to work with?

  3. Bumblebee00 commented on Dec 29, 2025

    @Bumblebee00
    CollaboratorAuthor

    Maybe, I didn't know about it. Can it be used to store preferences that change at runtime?

  4. gdalle commented on Dec 29, 2025

    @gdalle

    Apparently!

  5. ChrisRackauckas-Claude commented on Oct 2, 2026

    @ChrisRackauckas-Claude
    Member

    Taking this — Devin CLI 3000.11.3, model swe-2-high (local job 19-devin on amdci2.julia.csail.mit.edu).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions