MCPcopy Index your code
hub / github.com/google/mangle / ListPredicates

Method ListPredicates

factstore/factstore.go:351–364  ·  view source on GitHub ↗

ListPredicates returns a list of predicates.

()

Source from the content-addressed store, hash-verified

349
350// ListPredicates returns a list of predicates.
351func (s TeeingStore) ListPredicates() []ast.PredicateSym {
352 m := make(map[string]ast.PredicateSym)
353 for _, pred := range s.base.ListPredicates() {
354 m[pred.Symbol] = pred
355 }
356 for _, pred := range s.Out.ListPredicates() {
357 m[pred.Symbol] = pred
358 }
359 res := make([]ast.PredicateSym, 0, len(m))
360 for _, pred := range m {
361 res = append(res, pred)
362 }
363 return res
364}
365
366// EstimateFactCount returns the number of facts. The real number can be lower in case of duplicates.
367func (s TeeingStore) EstimateFactCount() int {

Callers

nothing calls this directly

Calls 1

ListPredicatesMethod · 0.65

Tested by

no test coverage detected