Specifying, Verifying, and Translating Between Memory Consistency Models