Skip to content

DFA improvements #1807

@fm-117

Description

@fm-117

Following #1783, this issue regroups all identified improvements for DFA.

  • The WithDfa mode for CFG building is the same as the Extended mode, the only difference is on the generic arguments for the block type. We could decouple CFG building from DFA by removing the need for typing the block data (i.e. stored as object, DFA builder would have to cast when reading)
  • The current implementation does not handle child variable writes correctly. In Cobol writing into a child variable means that all parent variables are modified. This is partially handled in ZCallPgmReport for levels 88 in CALLs but it should be generalized.
    • The class DefaultDataFlowGraphBuilder is responsible for implementing DFA building specialized for TypeCobol/Cobol language so this should be handled there.
  • Extend ValueOrigin class to handle more instructions.
  • general remarks
    • restrict visibilities where possible to avoid misuses
    • remove unused code, factorize where possible
  • Some reports collect results during the Node phase, others may work on a CompilationUnit after parsing has completed so it is confusing on how to use the IReport interface. Maybe create 2 sorts of reports (one is tied to the parsing process, the other directly uses the results) ?
    • In fact this is related to the concept of analyzer, we need to have at least 2 kinds of analyzer : one for the node building phase, one other after the CrossCheck. Each report would have to choose which kind of analyzer it uses.
  • Improve DFA results with correct CSV-compliant escaping for instruction text

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIDataFlowrfcSpecifications are not complete. Comment are welcomed.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions