CFG here stands for context-free grammar. I understand that:
Deciding whether a CFG $G$ is ambiguous is undecidable.
Deciding whether a CFL $L$ is inherently ambiguous is undecidable.
My question is:
Is there an algorithm $A$ to remove ambiguity from an ambiguous grammar $G$ of a NOT inherently ambiguous language $L(G)$?
To specify the behavior of $A$ more precisely, $A$ operates on $G$ and:
If $L(G)$ is not inherently ambiguous, $A$ outputs a CFG $G'$ so that $G'$ is not ambiguous and $L(G') = L(G)$.
If $L(G)$ is inherently ambiguous, $A$ outputs something arbitrarily.
Is this problem known to be undecidable, or still open? Any comments and links are welcome. Thanks.