Analyzer: Add get_export_structure method

The method shall return a structure which describes each BasicBlock, their content (Instructions), and relations between one another.

The output structure should rely only on Python's built-in types such as str or int.

This is meant to ease the portability of the output data between the Analyzer and any external software using OCGraph's API.

The output structure is described as follow:

export: dict[str, any] = {
  "blocks": dict[int, block], # The key is the address of the first instruction of the block
  "jumps": dict[int, list[tuple[int,bool]]
  # The key is the address of the origin block
  # The value of each key is a tuple defined as follow:
  #    0.  key of the destination block
  #    1.  Wether or not the jump was taken. True if taken.
  
  # The first element of the list is the key of the "no jump" destination block
  # The second element of the list is is the key of the "jump" destination block
  # The remaining elements of the list are the keys of potential additional destination blocks (e.g., switch/case statement)
}

block: dict[str,any] = { 
  "instructions": list[instruction],
  "returns": list[int], # absolute return addresses
} # The use of a dictionnary gives space for updates / new features

instruction: dict[str,any] = {
  "abs_address": int, # absolute address
  "coverage": str # ("missed", "taken", "skipped", "jumped", or "both taken")
}
Edited by Baptiste Maheut