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
klp-ccp doesn't implement any policy in itself by design, but shells out to user-provided policy scripts to make decisions about
externizeability of symbol, symbol renaming, whether some header my be included and such.
The method of shelling out is a relict from the early days of prototyping allowing a great amount of flexibility when designing the interface between klp-ccp and the interface scripts.
However, it clearly has its limitations:
there are significant performance costs of forking + execveing for every single policy decision to be made (and there are typically a lot).
the policy scripts cannot carry state.
As an alternative, embed a python interpreter in klp-ccp, define an interface for policies written in Python and reimplement the policy scripts in python. This basically boils down to providing a replacement implementation of user_policy_command.cc.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
klp-ccp doesn't implement any policy in itself by design, but shells out to user-provided policy scripts to make decisions about
externizeability of symbol, symbol renaming, whether some header my be included and such.
The method of shelling out is a relict from the early days of prototyping allowing a great amount of flexibility when designing the interface between klp-ccp and the interface scripts.
However, it clearly has its limitations:
As an alternative, embed a python interpreter in klp-ccp, define an interface for policies written in Python and reimplement the policy scripts in python. This basically boils down to providing a replacement implementation of
user_policy_command.cc
.Resources:
and, as a prerequisite read,
It might or might not be worth to use Boost Python, for this, the license seems compatible with GPL.
Beta Was this translation helpful? Give feedback.
All reactions