Dynamic Choreographies: Theory And Implementation (Logical Methods in Computer Science, 2017)