Annotations

An annotation provides additional information that may be helpful to the compiler in generating better executables. Annotations can be attached to nodes of the Clef AST or Scribble CFG. Removal of an annotation does not invalidate the program representation. Annotations may be provided by both the user and the Scale compiler. A confidence factor is provided for every annotation.

Example annotations

Annotation File

Annotations may also be supplied to the Scale compiler via text files. In the case of annotations for pure functions, files have been created for the C library and Fortran library. The format for an annotation is
  annotation-class-name class-name annotation-information;
where the
annotation-class-name
specifies the type of annotation,
class-name
specifies the class of the instance to be annotated, and, in this example,
annotation-information
species the particular class instance and other information specifiec to the annotation.
Java's reflection capability is used to apply annotations specified by a text file.
Return to Scale home page.
(Last changed: March 21, 2007.)