foundation for automatic compilation