P's and Q's to pseudo-coder