Warning: session_start(): open(/var/lib/php/sessions/sess_d0t87urrppfk6q36odb6i5ht4t, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
static bool web_matchNodeLists_debug;
static int web_matchNodeLists(L l1, L l2) {
if (l(l1) != l(l2)) ret -1000;
int score = 0;
if (empty(l1)) ret score;
HashMap map = twoListsToHashMap(l1, l2);
Web web = first(l1).web, web2 = first(l2).web;
// Score nodes
for i over l1: {
WebNode a = l1.get(i), b = l2.get(i);
if (web_isAnythingVariable(a)) continue;
//if (neq(web_labels(a), web_labels(b))) --score;
if (!containsAll(web_labels(b), web_labels(a))) --score;
}
// Score relations
for (WebRelation rel : web_relationObjects(web)) {
WebNode aa = map.get(rel.a), bb = map.get(rel.b);
if (aa == null || bb == null) continue;
WebRelation rel2 = web2.getRelationOpt(aa, bb);
if (web_matchNodeLists_debug)
print("a=" + rel.a + ", b=" + rel.b + ", aa=" + aa + ", bb=" + bb + ", rel2 labels=" + (rel2 == null ? "-" : str(rel2.labels)) + ", labels=" + rel.labels);
if (rel2 == null || !containsAll(rel2.labels, rel.labels))
--score;
}
ret score;
}