* @param ac
* A structure that contains all the nessecary data to contruct the associated term.
* @return The constructed aterm.
*/
private ATerm buildTerm(ATermConstruct ac){
ATerm constructedTerm;
ATerm[] subTerms = ac.subTerms;
int type = ac.type;
if(type == ATerm.APPL){
AFun fun = (AFun) ac.tempTerm;
constructedTerm = factory.makeAppl(fun, subTerms, ac.annos);
}else if(type == ATerm.LIST){
ATermList list = factory.makeList();
for(int i = subTerms.length - 1; i >= 0; i--){
list = factory.makeList(subTerms[i], list);
}
if(ac.hasAnnos) list = (ATermList) list.setAnnotations(ac.annos);
constructedTerm = list;
}else if(type == ATerm.PLACEHOLDER){
ATerm placeholder = factory.makePlaceholder(subTerms[0]);
constructedTerm = placeholder;
}else if(ac.hasAnnos){
constructedTerm = ac.tempTerm.setAnnotations(ac.annos);
}else{