void initializeDomains(Gdl gdl)
{
if(gdl instanceof GdlRelation)
{
GdlRelation relation = (GdlRelation) gdl;
String name = relation.getName().toString();
if(!name.equals("base"))
{
GdlTerm term = relation.toTerm();
GdlTerm generified = findGenericForm(term);
Assignment instantiation = getConstantList(term);
if(!domains.containsKey(generified))
domains.put(generified, new Domain(generified, term));
Domain dom = domains.get(generified);
dom.assignments.add(instantiation);
}
}
else if(gdl instanceof GdlRule)
{
GdlRule rule = (GdlRule)gdl;
GdlSentence head = rule.getHead();
if(head instanceof GdlRelation)
{
GdlRelation rel = (GdlRelation)head;
GdlTerm term = rel.toTerm();
GdlTerm generified = findGenericForm(term);
if(!domains.containsKey(generified))
domains.put(generified, new Domain(generified, term));
Domain dom = domains.get(generified);