What Are Annotations?

What Are Annotations?

Annotations provide information about what a program is supposed to do. They are readable by the computer, and can be either embedded in or attached to the source code.

Annotations are useful because they help programmers and tools spot problems in source code — if we know what code is supposed to do, it’s much easier to spot cases where it is doing something wrong.

What types of annotations are useful for Annotations for All?

For this project, we are focusing on annotations that can be checked by automated tools, to ensure that the program’s behavior (defined by the source or machine code) matches the programmer’s intent (expressed in the annotations).

Natural language documentation, for example, is a type of annotation, but it generally is not checkable by a computer, so it’s outside the scope of this project. We are primarily interested in annotations that can be checked (automatically) by tools that compare the annotations with the code, without an investment in extensive expert labor.