Definition of swap with a functionnal specification