protected void BLNprintAttributePredicateDeclaration( DDAttribute attr, String objectOfAttribute, IdentifierNamer idNamer, PrintStream out) { if (attr.isDiscarded()) return; out.print("random "); if (attr.isBoolean()) out.print("boolean"); else out.print( idNamer.getLongIdentifier("domain", Database.stdDomainName(attr.getDomain().getName()))); out.println(" " + Database.stdPredicateName(attr.getName()) + "(" + objectOfAttribute + ");"); }
protected void MLNprintAttributePredicateDeclaration( DDAttribute attr, String objectOfAttribute, IdentifierNamer idNamer, PrintStream out) { if (attr.isDiscarded()) return; out.print(Database.stdPredicateName(attr.getName()) + "(" + objectOfAttribute); if (attr.isBoolean()) { out.println(")"); return; } out.print(", "); out.print( idNamer.getLongIdentifier("domain", Database.stdDomainName(attr.getDomain().getName()))); out.println("!)"); }
protected void outputAttributeList(PrintStream out) { Collection<DDAttribute> attributes = getAttributes().values(); if (attributes.isEmpty()) return; out.print(getName() + "_attr_names = ["); int i = 0; for (DDAttribute attrib : attributes) { if (attrib.isDiscarded()) continue; if (i++ > 0) out.print(", "); out.print("'" + Database.stdAttribName(attrib.getName()) + "'"); } out.println("]"); }
public void MLNprintUnitClauses(IdentifierNamer idNamer, PrintStream out) { for (DDAttribute attr : attributes.values()) { if (attr.isDiscarded() || attr.isBoolean()) continue; String idCategory = attr.getName(); idNamer.resetCounts(); out.print( Database.stdPredicateName(attr.getName()) + "(" + idNamer.getCountedShortIdentifier(idCategory, this.getName())); out.print(", +"); out.println( idNamer.getCountedShortIdentifier(attr.getName(), attr.getDomain().getName()) + ")"); } }