generator top-level framework