Builder API for constructing ProgramFacts.Model values.
The builder is useful for custom generators and tests that want to describe a
semantic program model first, then materialize source and facts through
ProgramFacts.Model.to_program/1.
Summary
Functions
Adds a branch fact.
Adds a directed function call edge.
Adds a declared call path.
Adds a data-flow fact.
Adds an effect fact.
Adds an effect fact.
Adds one feature atom.
Adds multiple feature atoms.
Adds a source file to the model.
Adds a function id and its module to the model.
Adds a module to the model.
Builds a ProgramFacts.Model.
Starts a model builder.
Replaces architecture facts.
Merges metadata into the model metadata.
Types
@type t() :: %ProgramFacts.Model.Builder{ architecture: map(), branches: [map()], call_edges: MapSet.t(ProgramFacts.Facts.call_edge()), call_paths: [[ProgramFacts.Facts.function_id()]], data_flows: [map()], effects: MapSet.t(ProgramFacts.Facts.effect()), features: MapSet.t(atom()), files: [ProgramFacts.File.t()], functions: MapSet.t(ProgramFacts.Facts.function_id()), id: String.t(), metadata: map(), modules: MapSet.t(module()), policy: atom(), seed: integer() }
Functions
Adds a branch fact.
Adds a directed function call edge.
Source and target functions are added automatically.
Adds a declared call path.
Functions and pairwise call edges in the path are added automatically.
Adds a data-flow fact.
Adds an effect fact.
Adds an effect fact.
Adds one feature atom.
Adds multiple feature atoms.
Adds a source file to the model.
Adds a function id and its module to the model.
Adds a module to the model.
Builds a ProgramFacts.Model.
Starts a model builder.
Requires :id, :seed, and :policy.
Replaces architecture facts.
Merges metadata into the model metadata.