architecture_analysis.py
ofrak.core.architecture_analysis
MemoryRegionProgramAttributesAnalyzer (Analyzer)
Analyze a MemoryRegion to extract its ProgramAttributes.
analyze(self, resource, config=None)
async
Analyze a resource for to extract specific ResourceAttributes.
Users should not call this method directly; rather, they should run Resource.run or Resource.analyze.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
resource |
Resource |
The resource that is being analyzed |
required |
config |
Optional[ofrak.model.component_model.ComponentConfig] |
Optional config for analyzing. If an implementation provides a default, this default will always be used when config would otherwise be None. Note that a copy of the default config will be passed, so the default config values cannot be modified persistently by a component run. |
None |
Returns:
Type | Description |
---|---|
Tuple[ofrak.core.architecture.ProgramAttributes] |
The analysis results |
Source code in ofrak/core/architecture_analysis.py
async def analyze(
self, resource: Resource, config: Optional[ComponentConfig] = None
) -> Tuple[ProgramAttributes]:
program_r = await resource.get_only_ancestor(ResourceFilter.with_tags(Program))
program_attrs = await program_r.analyze(ProgramAttributes)
return (program_attrs,)