WACC: Bug Hunters

Welcome to the WACC Bug Hunters page.

This page serves as a place to acknowledge and thank all of those students who have found and reported confirmed issues or bugs with the WACC Language Specification, the WACC Reference Compiler or the ARM Assembly Emulator. Keep up the good work!

Reference Compiler Version 2 (Scala/parsley):

Angus Leung (all22)

WACC reference compiler semantic analysis internal error when type checking incompatible assignments of array literals.
e.g.  bool x = [2,3]

31/01/2024         [RESOLVED]

Tianyi Guan (tg721)

WACC reference compiler not supporting literal char array allocation to string variable (allowed by type weakening).
e.g.  string a = ['a','b']


07/02/2023         [RESOLVED]

David Pan (dp1220)

WACC reference compiler reporting runtime error for illegal array access where semantic error is expected.
e.g.  int[] a = [1];
   println a[1][2]

07/02/2023         [RESOLVED]

Kristina Zimina (kz1021)

WACC reference compiler code generator internal error when allocating empty array literals when type is unknown.
e.g.  fst fst q = []


01/02/2023         [RESOLVED]

Alona Enraght-Moony (ne321)

WACC reference compiler code generator error on reading into unknown type.
e.g.  pair(char, pair) x = null;
   read snd snd x


24/01/2023         [RESOLVED]

Dami Elulade (dme21)

WACC reference compiler code generator bug when freeing arrays.
e.g.  int[] arr = [1, 2, 3];
   free arr


23/01/2023         [RESOLVED]

Hamzah Malik (ham20)

WACC reference compiler variable scoping error (assignment LHS added before checking RHS).
e.g.  int x = x;
   println x

14/01/2023         [RESOLVED]

Alona Enraght-Moony (ne321)

WACC reference compiler code generator missing sign extension on x86 _readi primitive function.



12/01/2023         [RESOLVED]

Alona Enraght-Moony (ne321)

WACC reference compiler MatchError in code genetation for 'len'.
e.g.  int[] arr = [];
   int[][] arrs = [arr];
   print len arrs[0]

11/01/2023         [RESOLVED]

Reference Compiler Web/Script Interface:

Yunkai Zhang (yz9522)

WACC refCompile script #! line should be changed from #!/usr/bin/ruby to more general #!/usr/bin/env ruby so that it looks for ruby command in user's $PATH.


23/01/2024         [RESOLVED]

Alona Enraght-Moony (ne321)

WACC refCompile script passes extra whitespace to server leading to unexpected output for some programs.
e.g.  readAtEof.wacc


02/02/2023         [RESOLVED]

Joey Teng (ht919)

Reference compiler website API cannot handle some special characters in stdin (issue now reduced to single quotes).



28/02/2021      [PART RESOLVED]

Kacper Kazaniecki (kk518)

Reference compiler website not accepting negative inputs (server-side arg passing issue).
e.g.  read x      (with stdin = "-1")


23/02/2020         [RESOLVED]

Shuhao Zhang (sz5915)

Suggested acknowledging the WACC Bug Finders publicly (leading to the creation of this page).



24/10/2016         [RESOLVED]

Lalit Maganti (lrm113)

Reference compiler website Internal Server Error when outputting non-ASCII characters (this is a server DB error).
e.g.  print chr 2000


30/10/2014         [RESOLVED]

WACC Lanuage Specification:

Riley Horrix (rh1122)

Typo in the semantics for fst and snd key words. The second bullet point repeats the description for fst, when the typing information is clearly referring to snd.


17/01/2024         [RESOLVED]

Stefan Neamtu (sn1319)

Suggested improvements to the discussion of 'read' in the WACC Language Specification (namely truncation of 'int' values and incompatible type behaviour).

25/01/2021         [RESOLVED]

Moritz Langenstein (ml5717)

WACC Language Specification did not mention that the 'null' pair literal can match the type of any pair.
e.g.  pair(pair, pair) p = null


17/01/2019         [RESOLVED]

George Ordish (gto17)

Suggested improvements to the discussion of strings in the WACC Language Specification (namely strings being pass-by-reference and the problems with treating strings as a char[]).

15/01/2019         [RESOLVED]

unknown (???)

WACC is not entirely strongly typed due to the loss of type information when declaring nested pairs. Implicit type conversions can be coerced through the contents of nested pairs.

??/??/20??         [RESOLVED]

Reference Compiler Version 1 (Java/ANTLR):

Alan Liang (al2520)

WACC Reference compiler produces invalid register offset in stack-implementation when compiling programs with large number of variables.
e.g. int x0 = 0; int x1 = 0; ... int x4000 = 0;

10/03/2022   [RESOLVED by Version 2]

Mulang Su (ms4620)

WACC Reference compiler inconsistent short-circuiting of stack-implementation vs. non-stack-implementation.
e.g.  if 1 == 1 || 1 / 0 == 1 then
   println "Short-circuits" else skip fi

04/03/2022   [RESOLVED by Version 2]

Ollie Madine (ojm20)

WACC Reference compiler incorrect identifier type on nested scopes.
e.g.  int x = 5; begin
       begin free x end;
       int[] x = [1] end

01/03/2022   [RESOLVED by Version 2]

Mulang Su (ms4620)

WACC Reference compiler literal pool falls out of range if there is a long sequence of instructions without any unconditional branches.
e.g. manyVariables.wacc with "foo" string

09/02/2022   [RESOLVED by Version 2]

Sipan Petrosyan (sdp120)

WACC reference compiler not handling backslash characters correctly (escape character confusion).
e.g.  print '\\';
   println ord '\\'

18/01/2022   [RESOLVED by Version 2]

Jordan Hall (jh4020)

WACC reference compiler function call error if matching variable.
e.g.  int inc = 0;
   int tmp = call inc()


12/01/2022   [RESOLVED by Version 2]

Hongyu Teng (ht919)

AssertionError in getStackOffset in Semantic checking stage.
e.g. define function with repeated access of int array.


15/03/2021   [RESOLVED by Version 2]

James Shipley (jds119)

WACC reference compiler runs out of registers during code generation on deeply nested array dereferences.
e.g.  int[] a = [0];
   println a[a[a[a[a[a[0]]]]]]

13/03/2021   [RESOLVED by Version 2]

Akshat Tripathi (at619)

WACC reference compiler generates code with infinite read loop when reading a char, but expecting an int.
e.g.  int i = 0;
   read i      (with stdin = "a")

13/03/2021   [RESOLVED by Version 2]

Andrei-Florin Sburlan (as8319)

WACC Reference compiler internal AssertionError on long expressions.
e.g. int x = (((((1 + 2) + ... + (31 + 32)))))
     i.e. full binary expr of depth 5


08/03/2021   [RESOLVED by Version 2]

Luke Texon (ljt18)

WACC Reference compiler AssertionError in getStackOffset during code generation for large expressions with lots of array indexing.
e.g.  int k = a4[0][0][0][0] + ...long expr...

28/02/2020   [RESOLVED by Version 2]

Sophie Thompson (st1118)

WACC Reference compiler incorrect semantic error on nested scopes.
e.g.  int x = 1; begin
       begin x = 3 end;
       bool x = true end

25/02/2020   [RESOLVED by Version 2]

Luke Thorpe (ljt4418)

WACC reference compiler reporting incorrect exit code 0 when input program only produces lexing errors.
e.g.  char c = '\Ha' ;


26/01/2020         [RESOLVED]

Zac Cutner (zlc17)

WACC reference compiler not correctly tracking local mutable strings during loop iteration (string mutation since removed from the language specification).
e.g. while B do string y = "foo"; y[0] = '*' ...

10/03/2019         [RESOLVED]

Moritz Langenstein (ml5717)

WACC reference compiler AST printer did not output the type information for pair types correctly.
e.g.  pair(int, int) p = newpair(10, 3)


10/01/2019         [RESOLVED]

Thomas Wood (tw1509)

WACC reference compiler calls "POP {pc}" twice on function return (this is redundant, but not harmful, code).
e.g.  int f() is return 0 end


27/11/2014         [RESOLVED]

Panayiotis Panayiotou (pp3414)

WACC reference compiler allows arbitrary code after a function return (this is now a syntax error following the language spec).
e.g.  return 1;
   println "Oops!"

30/10/2014         [RESOLVED]

Get back to the:

WACC Reference Compiler