Add a rank function synthesis test