Computer assisted generation of the matrix elements between contracted wavefunctions in a Complete Active Space scheme