Clarifications

These clarifications are meant to add more information to the specification without cluttering it.

  1. empty-input:

    Empty input should result in empty output. This is in keeping with all of the output rules defined. There are no print statements so there would be no numbers, newlines or output of any kind. All that you are left with is a single empty line, which matches “should be an empty line at the end of your output”.

  2. no-decl-cond:

    Declarations in conditionals can lead to undefined values due to global scoping. Because of the potentially conditional nature of the execution, it is possible to violate the property of variables stating that variables must be defined before being used (not just declared) by never executing the definition. For example, the following test would break this property and is therefore invalid:

    if (1 < 0)
      int i = 0;
    fi
    int j = i;
    
  3. no-decl-loop:

    Declarations in loops can lead to undefined or repeatedly defined values due to global scoping. Because of the potentially conditional nature of the execution, it is possible to violate the property of variables stating that variables must be defined before being used (not just declared) by never executing the definition. For example, the following test would break this property and is therefore invalid:

    loop (1 < 0)
      int i = 0;
    pool
    int j = i;
    

    As well, because of the potentially repeated nature of the execution, it is possible to violate the property of variables stating that variables can only be defined once by repeating the declaration. For example, the following test would break this property and is therefore invalid:

    int i = 0;
    loop (i < 2)
      int j = 0;
      i = i + 1;
    pool;
    
  4. empty-vector:

    Empty vectors print only brackets. This is in keeping with all of the output rules defined. There are no integers to print between the brackets, so there is no values nor spaces to print. For example:

    []
    
  5. single-value-vector:

    A vector with one value is only the brackets and the value. This is in keeping with all of the output rules defined. There is only one integer. There is no space between the first bracket and the integer and no space between the integer and the second bracket. For example:

    [1]