Machine-translated by Google. Questions are authored in English.
Top

Discussion

A normalised heterogeneous abstract syntax tree must :

(i) Trees with magnitude of node type are called heterogeneous tree
(ii) Normalised heterogeneous tree use a normalised list of children like homogeneous tree
(iii) Nodes have irregular children
(iv) Use more than a single node data type but with normalised child list representation.

  • A.(i), (ii) and (iv)
  • B.(i) and (ii)
  • C.(ii) and (iv)
  • D.(iv) only

Answer: A

The correct statements are (i), (ii) and (iv).

In the catalogue of AST patterns, trees with a multitude of node types (the paper's 'magnitude') are called heterogeneous trees (i). A normalised heterogeneous tree uses several node classes, but keeps the children in one normalised list, just as a homogeneous tree does (ii and iv).

Statement (iii), nodes with irregular children (each node class holding its children in its own named fields), describes the other variant, the irregular heterogeneous tree. So it does not belong to the normalised kind, and every option containing (iii) or missing (i), (ii) or (iv) is wrong.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.