In this section we discuss the setting of the algorithm, the ideas behind Angluin-style learning algorithms, and the issues with using current algorithms to learn PCFGs.
As in \({\textbf {G}^*}\) (the algorithm for CFGs [1]}), we assume an oracle that can answer two types of queries: structured membership queries (smq) and structured equivalence queries (seq) regarding the unknown regular tree series \(\mathcal {T}\)  (over a given ranked alphabet \(\Sigma \) ). Given a structured string \(s\) , the query \(\textsc {smq}(s)\)  is answered with the value \(\mathcal {T}(s)\) . Given an automaton \(\mathcal {A}\)  the query \(\textsc {seq}(\mathcal {A})\)  is answered “yes” if \(\mathcal {A}\)  implements the skeletal tree series \(\mathcal {T}\)  and otherwise the answer is a pair \((s,\mathcal {T}(s))\)  where \(s\)  is a structured string for which \(\mathcal {T}(s)\ne \mathcal {A}(s)\)  (up to a predefined error).
