Extending logic programming with labelled variables: Model and semantics