You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not really a bug but an issue i've found while using the implementation in my fork of the 2p-kt repo.
the issue i am going to present can be found in the implementation of gui/src/commonMain/kotlin/it/unibo/tuprolog/ui/gui/impl/PageImpl.kt of branch feature/web-gui.
Background:
Basically, inside of the PageImpl implementation, the theory field getter contains a side effect that allows for theory parsing optimizations. To my understanding, if no updates have been made to the user defined theory, we do not need to parse it again but instead can use the previously parsed one.
Issue:
My point is that this getter may no be the best point where to implement such a logic since outside users may tamper with the optimization logic by simply reading the theory field.
Fixes(?):
I'd like to suggest a different approach:
explicitly split the optimization flag by effectively calling a separate method
make the theory field private and force the end users to access the updated theory by using the already implemented observable Page
events (onTheoryChange)
The text was updated successfully, but these errors were encountered:
fmuratori
changed the title
theory read issue
Theory read issue in in :gui module, branch feature/web-gui
May 29, 2023
This is not really a bug but an issue i've found while using the implementation in my fork of the 2p-kt repo.
the issue i am going to present can be found in the implementation of
gui/src/commonMain/kotlin/it/unibo/tuprolog/ui/gui/impl/PageImpl.kt
of branchfeature/web-gui
.Background:
Basically, inside of the PageImpl implementation, the
theory
field getter contains a side effect that allows for theory parsing optimizations. To my understanding, if no updates have been made to the user defined theory, we do not need to parse it again but instead can use the previously parsed one.Issue:
My point is that this getter may no be the best point where to implement such a logic since outside users may tamper with the optimization logic by simply reading the theory field.
Fixes(?):
I'd like to suggest a different approach:
events (onTheoryChange)
The text was updated successfully, but these errors were encountered: