* Fixes locations cyclic to its predicate.
* PRE: {@link PBInstance#sortArgs()} is called.
*/
private void fixCyclicLocs(PBInstance instance)
{
CTTree tree = instance.getTree();
int predId = instance.predId;
boolean isCyc = false;
CTNode node, tmp;
StringBuilder build = new StringBuilder();
build.append(ERR_CYCLIC);
for (PBArg arg : instance.getArgs())
{
if (arg.isLabel(PBLib.PB_REL)) continue;
for (PBLoc loc : arg.getLocs())
{
if ((node = tree.getNode(loc)).getSubTerminalIdSet().contains(predId))
{
if (arg.isLabel(PBLib.PB_ARGM_MOD))
loc.height = 0;
else if (arg.isLabel(PBLib.PB_LINK_SLC) && node.isPTag(CTLibEn.PTAG_SBAR) && (tmp = node.getFirstChild("+WH.*")) != null)
loc.set(tmp.getPBLoc(), loc.type);