sybila / biodivine-sketchbook

Biodivine SketchBook is a multi-platform application for designing and analysing large-scale logical models.
MIT License
0 stars 1 forks source link

Robust ID generating #40

Closed ondrej33 closed 3 months ago

ondrej33 commented 6 months ago

When a user creates a new element (variable, function symbol, observation), its new "default" ID is currently generated on the frontend side and then sent to the backend. This might cause issues occasionally; for example, duplicate IDs can arise in some special cases. Instead, we should fully generate the IDs on the backend to avoid any such issues.

The Rust side already supports ID generation (each manager class can safely generate unique IDs for all kinds of objects it manages). We just need to start using it in events. That will require:

An experimental version of this has already been implemented for property IDs. We can use a modified version of it as a baseline.

These new add_default events should also internally assign other default values, like variable names (same as IDs) or function arity (default zero).

ondrej33 commented 3 months ago

Resolved by #43.