Hello! While a relatively new user of GiNaC, I've been following the long-standing discussions regarding multithreading and the inherent difficulties of implementing thread-safety in a library designed around global state and shared memory. Pardon my ignorance, as I am not yet fully versed on the library's internal implementation. I would like to ask a few conditional questions regarding the possibility of personally implementing a multi-state/context architecture for GiNaC. 1. Is it correct to say that the library currently relies on a single, global "environment" that acts as the sole gatekeeper for all symbolic state? Does this design effectively prevent multiple independent processes from referencing the library's logic (not process objects at runtime in the global thread; the actual GiNaC library) at the same time? 2. Is it possible to decouple the library's core algebraic logic from this singular global state? Could the library be structured so that its functions serve a context provided by the user, rather than relying on a hardcoded global one? 3. If the library were modified to support independent contexts could multiple such worlds coexist within the same program without interfering with one another? 4. Could this be implemented in a way where the current global state simply becomes a default context? Specifically, is it possible to ensure that users who do not need multiple contexts see no change in behavior or performance? 5. In a world of isolated contexts, how might we facilitate the "translation" or "importing" of an expression from one independent world into another? This may merely have to be copies of expressions, but that can be handled at the use-case level. 6. Where are the primary "anchors" of this global state located within the codebase? If I were to personally take on the challenge of implementing such a context-based architecture, what areas of the library should I study first? Again, I am not asking the GiNaC community to implement these changes. I am asking for guidance on whether this is even possible and, if so, how to possibly implement this myself. I believe that by permitting multiple independent instances of a state to exist, the multithreading problem can be solved through isolation rather than the complexity of locks. I appreciate you taking the time to read this. Patrick S. Jacobs