コード例 #1
0
ファイル: Solver.java プロジェクト: krasa/intellij-community
 // substitute id -> value into pending
 IdResult substitute(IdPending pending, long id, Value value) {
   IntIdComponent[] sum = pending.delta;
   for (IntIdComponent intIdComponent : sum) {
     if (intIdComponent.remove(id)) {
       intIdComponent.value = lattice.meet(intIdComponent.value, value);
     }
   }
   return normalize(sum);
 }
コード例 #2
0
ファイル: Solver.java プロジェクト: krasa/intellij-community
 IdResult normalize(IntIdComponent[] sum) {
   Value acc = lattice.bot;
   boolean computableNow = true;
   for (IntIdComponent prod : sum) {
     if (prod.isEmpty() || prod.value == lattice.bot) {
       acc = lattice.join(acc, prod.value);
     } else {
       computableNow = false;
     }
   }
   return (acc == lattice.top || computableNow) ? new IdFinal(acc) : new IdPending(sum);
 }