a dynamic patching and mixing framework