Compilation functions