implement krivine abstract machine