giovinazzo-kevin / Fiero

1 stars 0 forks source link

New Script Architecture #19

Closed giovinazzo-kevin closed 8 months ago

giovinazzo-kevin commented 9 months ago

Since Ergo has moved to a VM-based architecture, Fiero scripts must be refactored to exploit it efficiently.

Besides, there was already some spaghetti going on with ScriptEffectLib. I need to come up with an architecture where scripts and effects are managed correctly.

giovinazzo-kevin commented 9 months ago

See also #14.

The current architecture essentially works like this:

Now, since the addition of a compiler, the dynamic loading of ScriptEffectLib has become problematic. Ideally, all predicates that a script needs should be made available by FieroLib and ScriptEffectLib should be removed entirely.

These predicates should act on the script's state which is asserted in its knowledge base when it starts.

Resolving this issue requires devising a mechanism to link knowledge bases (and their dependency graphs) together, so that each link can be managed independently. This way, each instance of a script can link to the same underlying knowledge base, without asserting its own state there.