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

Function AnalyzeOneUnit

analysis/validation.go:98–100  ·  view source on GitHub ↗

AnalyzeOneUnit is a convenience method to analyze a program consisting of a single source unit.

(unit parse.SourceUnit, extraPredicates map[ast.PredicateSym]ast.Decl)

Source from the content-addressed store, hash-verified

96
97// AnalyzeOneUnit is a convenience method to analyze a program consisting of a single source unit.
98func AnalyzeOneUnit(unit parse.SourceUnit, extraPredicates map[ast.PredicateSym]ast.Decl) (*ProgramInfo, error) {
99 return Analyze([]parse.SourceUnit{unit}, extraPredicates)
100}
101
102// Analyze identifies the extensional and intensional predicates of a program and checks every rule.
103func Analyze(program []parse.SourceUnit, extraPredicates map[ast.PredicateSym]ast.Decl) (*ProgramInfo, error) {

Callers 15

DefineMethod · 0.92
TestRewriteIdempotencyFunction · 0.92
TestEvalExternalFunction · 0.92
BenchmarkJoinFunction · 0.92
EvalProgramNaiveFunction · 0.92
runEvaluateFunction · 0.92
TestAnalyzePositiveFunction · 0.85
TestAnalyzeNegativeFunction · 0.85
TestDeferredFunction · 0.85
TestAnalyzeTemporalFunction · 0.85

Calls 1

AnalyzeFunction · 0.85

Tested by 13

TestRewriteIdempotencyFunction · 0.74
TestEvalExternalFunction · 0.74
BenchmarkJoinFunction · 0.74
runEvaluateFunction · 0.74
TestAnalyzePositiveFunction · 0.68
TestAnalyzeNegativeFunction · 0.68
TestDeferredFunction · 0.68
TestAnalyzeTemporalFunction · 0.68
TestTemporalValidationFunction · 0.68
analyzeFunction · 0.68