A formal implementation of Behavior Trees to act in robotics