MCPcopy
hub / github.com/google/mangle / pushSourceFragment

Method pushSourceFragment

interpreter/interpreter.go:410–419  ·  view source on GitHub ↗
(pathset string, units []parse.SourceUnit, programInfo *analysis.ProgramInfo)

Source from the content-addressed store, hash-verified

408}
409
410func (i *Interpreter) pushSourceFragment(pathset string, units []parse.SourceUnit, programInfo *analysis.ProgramInfo) {
411 i.src = append(i.src, pathset)
412 i.sourceFragments[pathset] = &sourceFragment{units, programInfo, i.simpleStore, i.temporalStore}
413 for _, decl := range programInfo.Decls {
414 i.knownPredicates[decl.DeclaredAtom.Predicate] = *decl
415 }
416 i.simpleStore = factstore.NewTeeingStore(i.simpleStore)
417 i.temporalStore = factstore.NewTeeingTemporalStore(i.temporalStore)
418 i.updateCombinedStore()
419}
420
421func (i *Interpreter) evalProgram(programInfo *analysis.ProgramInfo) error {
422 stats, err := engine.EvalProgramWithStats(programInfo, i.store, engine.WithTemporalStore(i.temporalStore))

Callers 2

pushLoadedFragmentMethod · 0.95
DefineMethod · 0.95

Calls 3

updateCombinedStoreMethod · 0.95
NewTeeingStoreFunction · 0.92
NewTeeingTemporalStoreFunction · 0.92

Tested by

no test coverage detected