MCPcopy
hub / github.com/witheve/Eve / fixpoint

Method fixpoint

src/runtime/runtime.ts:222–250  ·  view source on GitHub ↗
(changes = new Changes(this.multiIndex), blocks = this.getAllBlocks())

Source from the content-addressed store, hash-verified

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 = {};

Callers 7

evaluateFunction · 0.95
evaluatesFunction · 0.95
queueMethod · 0.95
executeActionsMethod · 0.95
analyzeFunction · 0.45
loadFunction · 0.45
handleEventFunction · 0.45

Calls 8

getAllBlocksMethod · 0.95
blocksFromCommitMethod · 0.95
errorMethod · 0.95
nextRoundMethod · 0.80
executeMethod · 0.45
blockMethod · 0.45
commitMethod · 0.45
onFixpointMethod · 0.45

Tested by

no test coverage detected