laying out generic compilation framework