(changes = new Changes(this.multiIndex), blocks = this.getAllBlocks())
| 220 | } |
| 221 | |
| 222 | fixpoint(changes = new Changes(this.multiIndex), blocks = this.getAllBlocks()) { |
| 223 | let perf = this.perf; |
| 224 | let start = perf.time(); |
| 225 | let commit; |
| 226 | changes.changed = true; |
| 227 | while(changes.changed && changes.round < MAX_ROUNDS) { |
| 228 | changes.nextRound(); |
| 229 | // console.groupCollapsed("Round" + changes.round); |
| 230 | for(let block of blocks) { |
| 231 | let start = perf.time(); |
| 232 | block.execute(this.multiIndex, changes); |
| 233 | perf.block(block.id, start); |
| 234 | } |
| 235 | // console.log(changes); |
| 236 | commit = changes.commit(); |
| 237 | blocks = this.blocksFromCommit(commit); |
| 238 | // console.groupEnd(); |
| 239 | } |
| 240 | if(changes.round >= MAX_ROUNDS) { |
| 241 | this.error("Fixpoint Error", "Evaluation failed to fixpoint"); |
| 242 | } |
| 243 | perf.fixpoint(start); |
| 244 | // console.log("TOTAL ROUNDS", changes.round, perf.time(start)); |
| 245 | // console.log(changes); |
| 246 | for(let database of this.databases) { |
| 247 | database.onFixpoint(this, changes); |
| 248 | } |
| 249 | return changes; |
| 250 | } |
| 251 | |
| 252 | save() { |
| 253 | let results = {}; |
no test coverage detected