Logic and Functional Programming by Retraction: Operational Semantics