Attribute Grammars Metrics

List of the used metrics for assessing the quality of Attribute Grammars


Size Metrics

  1. Attribute Grammar Size

  2. Parameter Description
    #A number of attributes
    #IA number of inherited attributes
    #SA number of synthesized attributes
    #CR number of calculation rules
    #CC number of context conditions
    #TR number of translation rules
  3. Semantic Complexity

  4. Parameter Description
    FanIn average number of branches of the input attributes of the productions LDGs
    FanOut average number of branches of the output attributes of the productions LDGs

Style Metrics

  • Attributes Complexity

  • Parameter Description
    #AAtom number of attributes of type atomic
    #AComplex number of attributes of type structured (with/without pointers, or hashing)
  • Complexity of the attributive operations

  • Parameter Description
    #OSimple number of CR, CC or TR formed only by 1 instruction
    #OComplex number of CR, CC or TR formed only by 1 block of instructions
  • Calculation Scheme

  • Parameter Description
    CRAggreg the attribute calculation follow the values aggregation pattern
    CRNAggreg the attribute calculation follow the values non-aggregation pattern
    Parameter Description
    CRpureS the calculation of the accumulation attributes follow the purely synthesized pattern
    CRpureI the calculation of the accumulation attributes follow the purely inherited pattern
    CRmixIS the calculation of the accumulation attributes follow the mixed i/s pattern
    CRvar the attributes calculation does not follow a typical pattern
  • Semantic Restriction Scheme

  • Parameter Description
    CCTop the CCs collocation follow mostly the synthesized pattern
    CCCentered the CCs collocation follow mostly the right point pattern
    CCBottom the CCs collocation follow mostly the inherited pattern
    CCvar the CCs collocation does not follow a typical pattern
  • Translation Scheme

  • Parameter Description
    TRTop the TRs collocation follow mostly the synthesized pattern
    TRInterm the TRs collocation follow mostly the right point pattern
    TRBottom the TRs collocation follow mostly the inherited pattern
    TRvar the TRs collocation does not follow a typical pattern
  • Style of the Language

  • Style of the language to the writting of the attributive operations, if it is a declarative language, or not(if it is imperative).

  • Language Specificity

  • Language specificity to the writting of the attributive operations, if it is a standard programming language or not.


Lexicographic Metrics

  • Clear Identifiers for Attributes

  • Number of attributes in which de identifier derives from the concept name.

  • Clear Identifiers for Attributive Operator

  • Number of operator(function names, predicatesand called procedures in the CR, CC and TR) in which the identifier derives from the concept name.