General algorithm to find a minimal branching program

Given a general branching program, is there an algorithm which can find an equivalent branching program $$P$$ of minimal length. That is $$|P| \leq |P'|$$ for all equivalent branching program $$P'$$.

If not, are their some specific cases where this algorithm exists?

Hence, we can define an algorithm in $$\Sigma^P_2$$ (see here) for finding if there exists a smaller equivalent branching program by letting it first guess a smaller solution, and then verify it to be correct using the co-NP equivalence checking oracle.