Using higher-order contracts to model session types (Logical Methods in Computer Science, 2016)