Main Search Sop Compilation