Implementing Contexts in Logic Programming