EvalProgramWithStats evaluates a given program on the given facts, modifying the fact store in the process. Deprecated: use EvalStratifiedProgramWithStats instead.
(programInfo *analysis.ProgramInfo, store factstore.FactStore, options ...EvalOption)
| 156 | // EvalProgramWithStats evaluates a given program on the given facts, modifying the fact store in the process. |
| 157 | // Deprecated: use EvalStratifiedProgramWithStats instead. |
| 158 | func EvalProgramWithStats(programInfo *analysis.ProgramInfo, store factstore.FactStore, options ...EvalOption) (Stats, error) { |
| 159 | strata, predToStratum, err := analysis.Stratify(analysis.Program{ |
| 160 | EdbPredicates: programInfo.EdbPredicates, |
| 161 | IdbPredicates: programInfo.IdbPredicates, |
| 162 | Rules: programInfo.Rules, |
| 163 | }) |
| 164 | if err != nil { |
| 165 | return Stats{}, fmt.Errorf("stratification: %w", err) |
| 166 | } |
| 167 | return EvalStratifiedProgramWithStats(programInfo, strata, predToStratum, store, options...) |
| 168 | } |
| 169 | |
| 170 | // EvalStratifiedProgramWithStats evaluates a given stratified program on the given facts, |
| 171 | // modifying the fact store in the process. |
no test coverage detected