Formalizing the Reusability of Software Agents