From ca5b4caf4c8065720de65f257b721e464ed89a13 Mon Sep 17 00:00:00 2001
From: Sven Robertz <sven@cs.lth.se>
Date: Tue, 8 Nov 2011 09:28:47 +0100
Subject: [PATCH] added C encoder

---
 examples/simple_java/compile.sh               |    5 +-
 examples/simple_java/example_encoder.c        |   27 +
 test/gen/c/nested.c                           | 1213 -----------------
 test/gen/c/nested.h                           |  350 -----
 test/gen/c/simple.c                           |  913 -------------
 test/gen/c/simple.h                           |  233 ----
 test/gen/csharp/nested.cs                     | 1045 --------------
 test/gen/csharp/simple.cs                     |  701 ----------
 test/gen/csharp/test_nested.cs                |  121 --
 test/gen/csharp/test_simple.cs                |  105 --
 test/gen/java/nested/int_array_s.java         |  122 --
 test/gen/java/nested/int_array_t_s.java       |  112 --
 test/gen/java/nested/int_s.java               |   62 -
 test/gen/java/nested/int_t_s.java             |   62 -
 test/gen/java/nested/struct_array_s.java      |   88 --
 test/gen/java/nested/struct_array_ss.java     |  194 ---
 test/gen/java/nested/struct_array_t.java      |   35 -
 test/gen/java/nested/struct_array_t_s.java    |   74 -
 test/gen/java/nested/struct_s.java            |   82 --
 test/gen/java/nested/struct_struct_s.java     |   88 --
 test/gen/java/nested/struct_struct_t.java     |   33 -
 test/gen/java/nested/struct_struct_t_s.java   |   76 --
 test/gen/java/nested/struct_t.java            |   26 -
 test/gen/java/nested/struct_t_s.java          |   69 -
 test/gen/java/simple/a_fixed_int_array.java   |   76 --
 .../simple/a_fixed_int_array_array_array.java |  104 --
 .../java/simple/a_fixed_int_multi_array.java  |   92 --
 .../gen/java/simple/a_variable_int_array.java |   77 --
 .../a_variable_int_array_array_array.java     |  107 --
 .../simple/a_variable_int_multi_array.java    |   95 --
 test/gen/java/simple/a_void.java              |   61 -
 test/gen/java/simple/an_int.java              |   62 -
 test/gen/java/simple/an_int_struct.java       |   82 --
 test/gen/nested.typeinfo                      |   51 -
 test/gen/nested.vec                           |  Bin 114897 -> 0 bytes
 test/gen/python/nested.py                     |  110 --
 test/gen/python/simple.py                     |   54 -
 test/gen/simple.typeinfo                      |   27 -
 test/gen/simple.vec                           |  Bin 3494 -> 0 bytes
 test/run                                      |    3 +-
 test/run.py                                   |    3 +-
 41 files changed, 35 insertions(+), 6805 deletions(-)
 create mode 100644 examples/simple_java/example_encoder.c
 delete mode 100644 test/gen/c/nested.c
 delete mode 100644 test/gen/c/nested.h
 delete mode 100644 test/gen/c/simple.c
 delete mode 100644 test/gen/c/simple.h
 delete mode 100644 test/gen/csharp/nested.cs
 delete mode 100644 test/gen/csharp/simple.cs
 delete mode 100644 test/gen/csharp/test_nested.cs
 delete mode 100644 test/gen/csharp/test_simple.cs
 delete mode 100644 test/gen/java/nested/int_array_s.java
 delete mode 100644 test/gen/java/nested/int_array_t_s.java
 delete mode 100644 test/gen/java/nested/int_s.java
 delete mode 100644 test/gen/java/nested/int_t_s.java
 delete mode 100644 test/gen/java/nested/struct_array_s.java
 delete mode 100644 test/gen/java/nested/struct_array_ss.java
 delete mode 100644 test/gen/java/nested/struct_array_t.java
 delete mode 100644 test/gen/java/nested/struct_array_t_s.java
 delete mode 100644 test/gen/java/nested/struct_s.java
 delete mode 100644 test/gen/java/nested/struct_struct_s.java
 delete mode 100644 test/gen/java/nested/struct_struct_t.java
 delete mode 100644 test/gen/java/nested/struct_struct_t_s.java
 delete mode 100644 test/gen/java/nested/struct_t.java
 delete mode 100644 test/gen/java/nested/struct_t_s.java
 delete mode 100644 test/gen/java/simple/a_fixed_int_array.java
 delete mode 100644 test/gen/java/simple/a_fixed_int_array_array_array.java
 delete mode 100644 test/gen/java/simple/a_fixed_int_multi_array.java
 delete mode 100644 test/gen/java/simple/a_variable_int_array.java
 delete mode 100644 test/gen/java/simple/a_variable_int_array_array_array.java
 delete mode 100644 test/gen/java/simple/a_variable_int_multi_array.java
 delete mode 100644 test/gen/java/simple/a_void.java
 delete mode 100644 test/gen/java/simple/an_int.java
 delete mode 100644 test/gen/java/simple/an_int_struct.java
 delete mode 100644 test/gen/nested.typeinfo
 delete mode 100644 test/gen/nested.vec
 delete mode 100644 test/gen/python/nested.py
 delete mode 100644 test/gen/python/simple.py
 delete mode 100644 test/gen/simple.typeinfo
 delete mode 100644 test/gen/simple.vec

diff --git a/examples/simple_java/compile.sh b/examples/simple_java/compile.sh
index 7d455a2..84a0e83 100644
--- a/examples/simple_java/compile.sh
+++ b/examples/simple_java/compile.sh
@@ -1,3 +1,6 @@
-java -jar ../../labComm.jar --java=gen simple.lc
+java -jar ../../labComm.jar --java=gen --c=gen/simple.c --h=gen/simple.h  simple.lc 
 
 javac -cp ../../lib/java:. gen/*.java Encoder.java Decoder.java
+
+gcc -o encoder -I . -I ../../lib/c example_encoder.c gen/simple.c ../../lib/c/labcomm.c ../../lib/c/labcomm_fd_reader_writer.c
+
diff --git a/examples/simple_java/example_encoder.c b/examples/simple_java/example_encoder.c
new file mode 100644
index 0000000..079ca17
--- /dev/null
+++ b/examples/simple_java/example_encoder.c
@@ -0,0 +1,27 @@
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <labcomm_fd_reader_writer.h>
+#include "gen/simple.h"
+
+int main(int argc, char *argv[]) {
+  int fd;
+  struct labcomm_encoder *encoder;
+  int i, j;
+
+  char *filename = argv[1];
+  printf("C encoder writing to %s\n", filename);
+  fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0644);
+  encoder = labcomm_encoder_new(labcomm_fd_writer, &fd);
+  labcomm_encoder_register_simple_TwoInts(encoder);
+  labcomm_encoder_register_simple_IntString(encoder);
+  simple_IntString is;
+  is.x = 24;
+  is.s = "Hello, LabComm!";
+  labcomm_encode_simple_IntString(encoder, &is);
+
+  simple_TwoInts ti;
+  ti.a = 13;
+  ti.b = 37;
+  labcomm_encode_simple_TwoInts(encoder, &ti);
+}
diff --git a/test/gen/c/nested.c b/test/gen/c/nested.c
deleted file mode 100644
index 097d54c..0000000
--- a/test/gen/c/nested.c
+++ /dev/null
@@ -1,1213 +0,0 @@
-#include "labcomm.h"
-#include "labcomm_private.h"
-#include "gen/c/nested.h"
-
-static unsigned char signature_bytes_struct_array_ss[] = {
-// array [1]
-0, 0, 0, 16, 
-  0, 0, 0, 1, 
-  0, 0, 0, 1, 
-  // array [_]
-  0, 0, 0, 16, 
-    0, 0, 0, 1, 
-    0, 0, 0, 0, 
-    // array [_]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 0, 
-      // struct { 3 fields
-      0, 0, 0, 17, 
-        0, 0, 0, 3, 
-        // int 'aa'
-        0, 0, 0, 2, 
-        97, 97, 
-        0, 0, 0, 35, 
-        // boolean 'bb'
-        0, 0, 0, 2, 
-        98, 98, 
-        0, 0, 0, 32, 
-        // int_array_ss 'ias'
-        0, 0, 0, 3, 
-        105, 97, 115, 
-        // array [1]
-        0, 0, 0, 16, 
-          0, 0, 0, 1, 
-          0, 0, 0, 1, 
-          // array [_, 3, _]
-          0, 0, 0, 16, 
-            0, 0, 0, 3, 
-            0, 0, 0, 0, 
-            0, 0, 0, 3, 
-            0, 0, 0, 0, 
-            // array [5]
-            0, 0, 0, 16, 
-              0, 0, 0, 1, 
-              0, 0, 0, 5, 
-              0, 0, 0, 35, 
-            // }
-          // }
-        // }
-      // }
-    // }
-  // }
-// }
-};
-labcomm_signature_t labcomm_signature_nested_struct_array_ss = {
-  LABCOMM_SAMPLE, "struct_array_ss",
-  (int (*)(void *))labcomm_sizeof_nested_struct_array_ss,
-  sizeof(signature_bytes_struct_array_ss),
-  signature_bytes_struct_array_ss
- };
-static unsigned char signature_bytes_int_s[] = {
-0, 0, 0, 35, 
-};
-labcomm_signature_t labcomm_signature_nested_int_s = {
-  LABCOMM_SAMPLE, "int_s",
-  (int (*)(void *))labcomm_sizeof_nested_int_s,
-  sizeof(signature_bytes_int_s),
-  signature_bytes_int_s
- };
-static unsigned char signature_bytes_int_array_s[] = {
-// array [1]
-0, 0, 0, 16, 
-  0, 0, 0, 1, 
-  0, 0, 0, 1, 
-  // array [_, 3, _]
-  0, 0, 0, 16, 
-    0, 0, 0, 3, 
-    0, 0, 0, 0, 
-    0, 0, 0, 3, 
-    0, 0, 0, 0, 
-    // array [5]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 5, 
-      0, 0, 0, 35, 
-    // }
-  // }
-// }
-};
-labcomm_signature_t labcomm_signature_nested_int_array_s = {
-  LABCOMM_SAMPLE, "int_array_s",
-  (int (*)(void *))labcomm_sizeof_nested_int_array_s,
-  sizeof(signature_bytes_int_array_s),
-  signature_bytes_int_array_s
- };
-static unsigned char signature_bytes_struct_s[] = {
-// struct { 2 fields
-0, 0, 0, 17, 
-  0, 0, 0, 2, 
-  // int 'a'
-  0, 0, 0, 1, 
-  97, 
-  0, 0, 0, 35, 
-  // double 'bcd'
-  0, 0, 0, 3, 
-  98, 99, 100, 
-  0, 0, 0, 38, 
-// }
-};
-labcomm_signature_t labcomm_signature_nested_struct_s = {
-  LABCOMM_SAMPLE, "struct_s",
-  (int (*)(void *))labcomm_sizeof_nested_struct_s,
-  sizeof(signature_bytes_struct_s),
-  signature_bytes_struct_s
- };
-static unsigned char signature_bytes_struct_array_s[] = {
-// array [2]
-0, 0, 0, 16, 
-  0, 0, 0, 1, 
-  0, 0, 0, 2, 
-  // struct { 1 fields
-  0, 0, 0, 17, 
-    0, 0, 0, 1, 
-    // int 'a'
-    0, 0, 0, 1, 
-    97, 
-    0, 0, 0, 35, 
-  // }
-// }
-};
-labcomm_signature_t labcomm_signature_nested_struct_array_s = {
-  LABCOMM_SAMPLE, "struct_array_s",
-  (int (*)(void *))labcomm_sizeof_nested_struct_array_s,
-  sizeof(signature_bytes_struct_array_s),
-  signature_bytes_struct_array_s
- };
-static unsigned char signature_bytes_struct_struct_s[] = {
-// struct { 1 fields
-0, 0, 0, 17, 
-  0, 0, 0, 1, 
-  // struct 'a'
-  0, 0, 0, 1, 
-  97, 
-  // struct { 1 fields
-  0, 0, 0, 17, 
-    0, 0, 0, 1, 
-    // int 'a'
-    0, 0, 0, 1, 
-    97, 
-    0, 0, 0, 35, 
-  // }
-// }
-};
-labcomm_signature_t labcomm_signature_nested_struct_struct_s = {
-  LABCOMM_SAMPLE, "struct_struct_s",
-  (int (*)(void *))labcomm_sizeof_nested_struct_struct_s,
-  sizeof(signature_bytes_struct_struct_s),
-  signature_bytes_struct_struct_s
- };
-static unsigned char signature_bytes_int_t_s[] = {
-0, 0, 0, 35, 
-};
-labcomm_signature_t labcomm_signature_nested_int_t_s = {
-  LABCOMM_SAMPLE, "int_t_s",
-  (int (*)(void *))labcomm_sizeof_nested_int_t_s,
-  sizeof(signature_bytes_int_t_s),
-  signature_bytes_int_t_s
- };
-static unsigned char signature_bytes_int_array_t_s[] = {
-// array [1]
-0, 0, 0, 16, 
-  0, 0, 0, 1, 
-  0, 0, 0, 1, 
-  // array [2]
-  0, 0, 0, 16, 
-    0, 0, 0, 1, 
-    0, 0, 0, 2, 
-    // array [3, 4]
-    0, 0, 0, 16, 
-      0, 0, 0, 2, 
-      0, 0, 0, 3, 
-      0, 0, 0, 4, 
-      0, 0, 0, 35, 
-    // }
-  // }
-// }
-};
-labcomm_signature_t labcomm_signature_nested_int_array_t_s = {
-  LABCOMM_SAMPLE, "int_array_t_s",
-  (int (*)(void *))labcomm_sizeof_nested_int_array_t_s,
-  sizeof(signature_bytes_int_array_t_s),
-  signature_bytes_int_array_t_s
- };
-static unsigned char signature_bytes_struct_t_s[] = {
-// struct { 1 fields
-0, 0, 0, 17, 
-  0, 0, 0, 1, 
-  // int 'a'
-  0, 0, 0, 1, 
-  97, 
-  0, 0, 0, 35, 
-// }
-};
-labcomm_signature_t labcomm_signature_nested_struct_t_s = {
-  LABCOMM_SAMPLE, "struct_t_s",
-  (int (*)(void *))labcomm_sizeof_nested_struct_t_s,
-  sizeof(signature_bytes_struct_t_s),
-  signature_bytes_struct_t_s
- };
-static unsigned char signature_bytes_struct_array_t_s[] = {
-// array [2]
-0, 0, 0, 16, 
-  0, 0, 0, 1, 
-  0, 0, 0, 2, 
-  // struct { 1 fields
-  0, 0, 0, 17, 
-    0, 0, 0, 1, 
-    // int 'a'
-    0, 0, 0, 1, 
-    97, 
-    0, 0, 0, 35, 
-  // }
-// }
-};
-labcomm_signature_t labcomm_signature_nested_struct_array_t_s = {
-  LABCOMM_SAMPLE, "struct_array_t_s",
-  (int (*)(void *))labcomm_sizeof_nested_struct_array_t_s,
-  sizeof(signature_bytes_struct_array_t_s),
-  signature_bytes_struct_array_t_s
- };
-static unsigned char signature_bytes_struct_struct_t_s[] = {
-// struct { 1 fields
-0, 0, 0, 17, 
-  0, 0, 0, 1, 
-  // struct 'a'
-  0, 0, 0, 1, 
-  97, 
-  // struct { 1 fields
-  0, 0, 0, 17, 
-    0, 0, 0, 1, 
-    // int 'a'
-    0, 0, 0, 1, 
-    97, 
-    0, 0, 0, 35, 
-  // }
-// }
-};
-labcomm_signature_t labcomm_signature_nested_struct_struct_t_s = {
-  LABCOMM_SAMPLE, "struct_struct_t_s",
-  (int (*)(void *))labcomm_sizeof_nested_struct_struct_t_s,
-  sizeof(signature_bytes_struct_struct_t_s),
-  signature_bytes_struct_struct_t_s
- };
-static void decode_struct_array_ss(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    nested_struct_array_ss *v,
-    void *context
-  ),
-  void *context
-)
-{
-  nested_struct_array_ss v;
-  {
-    int i_0_0;
-    for (i_0_0 = 0 ; i_0_0 < 1 ; i_0_0++) {
-      v.a[i_0_0].n_0 = labcomm_decode_int(d);
-      v.a[i_0_0].a = malloc(sizeof(v.a[i_0_0].a[0]) * v.a[i_0_0].n_0);
-      {
-        int i_1_0;
-        for (i_1_0 = 0 ; i_1_0 < v.a[i_0_0].n_0 ; i_1_0++) {
-          int i_1 = i_1_0;
-          v.a[i_0_0].a[i_1].n_0 = labcomm_decode_int(d);
-          v.a[i_0_0].a[i_1].a = malloc(sizeof(v.a[i_0_0].a[i_1].a[0]) * v.a[i_0_0].a[i_1].n_0);
-          {
-            int i_2_0;
-            for (i_2_0 = 0 ; i_2_0 < v.a[i_0_0].a[i_1].n_0 ; i_2_0++) {
-              int i_2 = i_2_0;
-              v.a[i_0_0].a[i_1].a[i_2].aa = labcomm_decode_int(d);
-              v.a[i_0_0].a[i_1].a[i_2].bb = labcomm_decode_boolean(d);
-              {
-                int i_3_0;
-                for (i_3_0 = 0 ; i_3_0 < 1 ; i_3_0++) {
-                  v.a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].n_0 = labcomm_decode_int(d);
-                  v.a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].n_2 = labcomm_decode_int(d);
-                  v.a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].a = malloc(sizeof(v.a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].a[0]) * v.a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].n_0 * 3 * v.a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].n_2);
-                  {
-                    int i_4_0;
-                    int i_4_1;
-                    int i_4_2;
-                    for (i_4_0 = 0 ; i_4_0 < v.a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].n_0 ; i_4_0++) {
-                      for (i_4_1 = 0 ; i_4_1 < 3 ; i_4_1++) {
-                        for (i_4_2 = 0 ; i_4_2 < v.a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].n_2 ; i_4_2++) {
-                          int i_4 = ((i_4_0) * 3 + i_4_1) * v.a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].n_2 + i_4_2;
-                          {
-                            int i_5_0;
-                            for (i_5_0 = 0 ; i_5_0 < 5 ; i_5_0++) {
-                              v.a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].a[i_4].a[i_5_0] = labcomm_decode_int(d);
-                            }
-                          }
-                        }
-                      }
-                    }
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-  handle(&v, context);
-  {
-    {
-      int i_0_0;
-      for (i_0_0 = 0 ; i_0_0 < 1 ; i_0_0++) {
-        {
-          int i_1_0;
-          for (i_1_0 = 0 ; i_1_0 < v.a[i_0_0].n_0 ; i_1_0++) {
-            int i_1 = i_1_0;
-            {
-              int i_2_0;
-              for (i_2_0 = 0 ; i_2_0 < v.a[i_0_0].a[i_1].n_0 ; i_2_0++) {
-                int i_2 = i_2_0;
-                {
-                  int i_3_0;
-                  for (i_3_0 = 0 ; i_3_0 < 1 ; i_3_0++) {
-                    free(v.a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].a);
-                  }
-                }
-              }
-            }
-            free(v.a[i_0_0].a[i_1].a);
-          }
-        }
-        free(v.a[i_0_0].a);
-      }
-    }
-  }
-}
-void labcomm_decoder_register_nested_struct_array_ss(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_struct_array_ss *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_nested_struct_array_ss,
-    (labcomm_decoder_typecast_t)decode_struct_array_ss,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_struct_array_ss(
-  labcomm_encoder_t *e,
-  nested_struct_array_ss *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_nested_struct_array_ss);
-  {
-    {
-      int i_0_0;
-      for (i_0_0 = 0 ; i_0_0 < 1 ; i_0_0++) {
-        labcomm_encode_int(e, (*v).a[i_0_0].n_0);
-        {
-          int i_1_0;
-          for (i_1_0 = 0 ; i_1_0 < (*v).a[i_0_0].n_0 ; i_1_0++) {
-            int i_1 = i_1_0;
-            labcomm_encode_int(e, (*v).a[i_0_0].a[i_1].n_0);
-            {
-              int i_2_0;
-              for (i_2_0 = 0 ; i_2_0 < (*v).a[i_0_0].a[i_1].n_0 ; i_2_0++) {
-                int i_2 = i_2_0;
-                labcomm_encode_int(e, (*v).a[i_0_0].a[i_1].a[i_2].aa);
-                labcomm_encode_boolean(e, (*v).a[i_0_0].a[i_1].a[i_2].bb);
-                {
-                  int i_3_0;
-                  for (i_3_0 = 0 ; i_3_0 < 1 ; i_3_0++) {
-                    labcomm_encode_int(e, (*v).a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].n_0);
-                    labcomm_encode_int(e, (*v).a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].n_2);
-                    {
-                      int i_4_0;
-                      int i_4_1;
-                      int i_4_2;
-                      for (i_4_0 = 0 ; i_4_0 < (*v).a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].n_0 ; i_4_0++) {
-                        for (i_4_1 = 0 ; i_4_1 < 3 ; i_4_1++) {
-                          for (i_4_2 = 0 ; i_4_2 < (*v).a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].n_2 ; i_4_2++) {
-                            int i_4 = ((i_4_0) * 3 + i_4_1) * (*v).a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].n_2 + i_4_2;
-                            {
-                              int i_5_0;
-                              for (i_5_0 = 0 ; i_5_0 < 5 ; i_5_0++) {
-                                labcomm_encode_int(e, (*v).a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].a[i_4].a[i_5_0]);
-                              }
-                            }
-                          }
-                        }
-                      }
-                    }
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_nested_struct_array_ss(
-labcomm_encoder_t *e,
-nested_struct_array_ss *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_nested_struct_array_ss, v);
-}
-void labcomm_encoder_register_nested_struct_array_ss(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_nested_struct_array_ss,
-    (labcomm_encode_typecast_t)encode_struct_array_ss
-  );
-}
-int labcomm_sizeof_nested_struct_array_ss(nested_struct_array_ss *v)
-{
-  int result = 4;
-  {
-    int i_0_0;
-    for (i_0_0 = 0 ; i_0_0 < 1 ; i_0_0++) {
-      {
-        int i_1_0;
-        for (i_1_0 = 0 ; i_1_0 < (*v).a[i_0_0].n_0 ; i_1_0++) {
-          int i_1 = i_1_0;
-          {
-            int i_2_0;
-            for (i_2_0 = 0 ; i_2_0 < (*v).a[i_0_0].a[i_1].n_0 ; i_2_0++) {
-              int i_2 = i_2_0;
-              {
-                int i_3_0;
-                for (i_3_0 = 0 ; i_3_0 < 1 ; i_3_0++) {
-                  result += 20 * (*v).a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].n_0 * 3 * (*v).a[i_0_0].a[i_1].a[i_2].ias.a[i_3_0].n_2;
-                }
-              }
-              result += 5;
-            }
-          }
-        }
-      }
-    }
-  }
-  return result;
-}
-static void decode_int_s(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    nested_int_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  nested_int_s v;
-  v = labcomm_decode_int(d);
-  handle(&v, context);
-}
-void labcomm_decoder_register_nested_int_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_int_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_nested_int_s,
-    (labcomm_decoder_typecast_t)decode_int_s,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_int_s(
-  labcomm_encoder_t *e,
-  nested_int_s *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_nested_int_s);
-  {
-    labcomm_encode_int(e, (*v));
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_nested_int_s(
-labcomm_encoder_t *e,
-nested_int_s *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_nested_int_s, v);
-}
-void labcomm_encoder_register_nested_int_s(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_nested_int_s,
-    (labcomm_encode_typecast_t)encode_int_s
-  );
-}
-int labcomm_sizeof_nested_int_s(nested_int_s *v)
-{
-  return 8;
-}
-static void decode_int_array_s(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    nested_int_array_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  nested_int_array_s v;
-  {
-    int i_0_0;
-    for (i_0_0 = 0 ; i_0_0 < 1 ; i_0_0++) {
-      v.a[i_0_0].n_0 = labcomm_decode_int(d);
-      v.a[i_0_0].n_2 = labcomm_decode_int(d);
-      v.a[i_0_0].a = malloc(sizeof(v.a[i_0_0].a[0]) * v.a[i_0_0].n_0 * 3 * v.a[i_0_0].n_2);
-      {
-        int i_1_0;
-        int i_1_1;
-        int i_1_2;
-        for (i_1_0 = 0 ; i_1_0 < v.a[i_0_0].n_0 ; i_1_0++) {
-          for (i_1_1 = 0 ; i_1_1 < 3 ; i_1_1++) {
-            for (i_1_2 = 0 ; i_1_2 < v.a[i_0_0].n_2 ; i_1_2++) {
-              int i_1 = ((i_1_0) * 3 + i_1_1) * v.a[i_0_0].n_2 + i_1_2;
-              {
-                int i_2_0;
-                for (i_2_0 = 0 ; i_2_0 < 5 ; i_2_0++) {
-                  v.a[i_0_0].a[i_1].a[i_2_0] = labcomm_decode_int(d);
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-  handle(&v, context);
-  {
-    {
-      int i_0_0;
-      for (i_0_0 = 0 ; i_0_0 < 1 ; i_0_0++) {
-        free(v.a[i_0_0].a);
-      }
-    }
-  }
-}
-void labcomm_decoder_register_nested_int_array_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_int_array_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_nested_int_array_s,
-    (labcomm_decoder_typecast_t)decode_int_array_s,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_int_array_s(
-  labcomm_encoder_t *e,
-  nested_int_array_s *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_nested_int_array_s);
-  {
-    {
-      int i_0_0;
-      for (i_0_0 = 0 ; i_0_0 < 1 ; i_0_0++) {
-        labcomm_encode_int(e, (*v).a[i_0_0].n_0);
-        labcomm_encode_int(e, (*v).a[i_0_0].n_2);
-        {
-          int i_1_0;
-          int i_1_1;
-          int i_1_2;
-          for (i_1_0 = 0 ; i_1_0 < (*v).a[i_0_0].n_0 ; i_1_0++) {
-            for (i_1_1 = 0 ; i_1_1 < 3 ; i_1_1++) {
-              for (i_1_2 = 0 ; i_1_2 < (*v).a[i_0_0].n_2 ; i_1_2++) {
-                int i_1 = ((i_1_0) * 3 + i_1_1) * (*v).a[i_0_0].n_2 + i_1_2;
-                {
-                  int i_2_0;
-                  for (i_2_0 = 0 ; i_2_0 < 5 ; i_2_0++) {
-                    labcomm_encode_int(e, (*v).a[i_0_0].a[i_1].a[i_2_0]);
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_nested_int_array_s(
-labcomm_encoder_t *e,
-nested_int_array_s *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_nested_int_array_s, v);
-}
-void labcomm_encoder_register_nested_int_array_s(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_nested_int_array_s,
-    (labcomm_encode_typecast_t)encode_int_array_s
-  );
-}
-int labcomm_sizeof_nested_int_array_s(nested_int_array_s *v)
-{
-  int result = 4;
-  {
-    int i_0_0;
-    for (i_0_0 = 0 ; i_0_0 < 1 ; i_0_0++) {
-      result += 20 * (*v).a[i_0_0].n_0 * 3 * (*v).a[i_0_0].n_2;
-    }
-  }
-  return result;
-}
-static void decode_struct_s(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    nested_struct_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  nested_struct_s v;
-  v.a = labcomm_decode_int(d);
-  v.bcd = labcomm_decode_double(d);
-  handle(&v, context);
-}
-void labcomm_decoder_register_nested_struct_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_struct_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_nested_struct_s,
-    (labcomm_decoder_typecast_t)decode_struct_s,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_struct_s(
-  labcomm_encoder_t *e,
-  nested_struct_s *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_nested_struct_s);
-  {
-    labcomm_encode_int(e, (*v).a);
-    labcomm_encode_double(e, (*v).bcd);
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_nested_struct_s(
-labcomm_encoder_t *e,
-nested_struct_s *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_nested_struct_s, v);
-}
-void labcomm_encoder_register_nested_struct_s(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_nested_struct_s,
-    (labcomm_encode_typecast_t)encode_struct_s
-  );
-}
-int labcomm_sizeof_nested_struct_s(nested_struct_s *v)
-{
-  return 16;
-}
-static void decode_struct_array_s(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    nested_struct_array_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  nested_struct_array_s v;
-  {
-    int i_0_0;
-    for (i_0_0 = 0 ; i_0_0 < 2 ; i_0_0++) {
-      v.a[i_0_0].a = labcomm_decode_int(d);
-    }
-  }
-  handle(&v, context);
-}
-void labcomm_decoder_register_nested_struct_array_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_struct_array_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_nested_struct_array_s,
-    (labcomm_decoder_typecast_t)decode_struct_array_s,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_struct_array_s(
-  labcomm_encoder_t *e,
-  nested_struct_array_s *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_nested_struct_array_s);
-  {
-    {
-      int i_0_0;
-      for (i_0_0 = 0 ; i_0_0 < 2 ; i_0_0++) {
-        labcomm_encode_int(e, (*v).a[i_0_0].a);
-      }
-    }
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_nested_struct_array_s(
-labcomm_encoder_t *e,
-nested_struct_array_s *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_nested_struct_array_s, v);
-}
-void labcomm_encoder_register_nested_struct_array_s(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_nested_struct_array_s,
-    (labcomm_encode_typecast_t)encode_struct_array_s
-  );
-}
-int labcomm_sizeof_nested_struct_array_s(nested_struct_array_s *v)
-{
-  return 12;
-}
-static void decode_struct_struct_s(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    nested_struct_struct_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  nested_struct_struct_s v;
-  v.a.a = labcomm_decode_int(d);
-  handle(&v, context);
-}
-void labcomm_decoder_register_nested_struct_struct_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_struct_struct_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_nested_struct_struct_s,
-    (labcomm_decoder_typecast_t)decode_struct_struct_s,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_struct_struct_s(
-  labcomm_encoder_t *e,
-  nested_struct_struct_s *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_nested_struct_struct_s);
-  {
-    labcomm_encode_int(e, (*v).a.a);
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_nested_struct_struct_s(
-labcomm_encoder_t *e,
-nested_struct_struct_s *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_nested_struct_struct_s, v);
-}
-void labcomm_encoder_register_nested_struct_struct_s(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_nested_struct_struct_s,
-    (labcomm_encode_typecast_t)encode_struct_struct_s
-  );
-}
-int labcomm_sizeof_nested_struct_struct_s(nested_struct_struct_s *v)
-{
-  return 8;
-}
-static void decode_int_t_s(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    nested_int_t_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  nested_int_t_s v;
-  v = labcomm_decode_int(d);
-  handle(&v, context);
-}
-void labcomm_decoder_register_nested_int_t_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_int_t_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_nested_int_t_s,
-    (labcomm_decoder_typecast_t)decode_int_t_s,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_int_t_s(
-  labcomm_encoder_t *e,
-  nested_int_t_s *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_nested_int_t_s);
-  {
-    labcomm_encode_int(e, (*v));
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_nested_int_t_s(
-labcomm_encoder_t *e,
-nested_int_t_s *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_nested_int_t_s, v);
-}
-void labcomm_encoder_register_nested_int_t_s(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_nested_int_t_s,
-    (labcomm_encode_typecast_t)encode_int_t_s
-  );
-}
-int labcomm_sizeof_nested_int_t_s(nested_int_t_s *v)
-{
-  return 8;
-}
-static void decode_int_array_t_s(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    nested_int_array_t_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  nested_int_array_t_s v;
-  {
-    int i_0_0;
-    for (i_0_0 = 0 ; i_0_0 < 1 ; i_0_0++) {
-      {
-        int i_1_0;
-        for (i_1_0 = 0 ; i_1_0 < 2 ; i_1_0++) {
-          {
-            int i_2_0;
-            int i_2_1;
-            for (i_2_0 = 0 ; i_2_0 < 3 ; i_2_0++) {
-              for (i_2_1 = 0 ; i_2_1 < 4 ; i_2_1++) {
-                v.a[i_0_0].a[i_1_0].a[i_2_0][i_2_1] = labcomm_decode_int(d);
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-  handle(&v, context);
-}
-void labcomm_decoder_register_nested_int_array_t_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_int_array_t_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_nested_int_array_t_s,
-    (labcomm_decoder_typecast_t)decode_int_array_t_s,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_int_array_t_s(
-  labcomm_encoder_t *e,
-  nested_int_array_t_s *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_nested_int_array_t_s);
-  {
-    {
-      int i_0_0;
-      for (i_0_0 = 0 ; i_0_0 < 1 ; i_0_0++) {
-        {
-          int i_1_0;
-          for (i_1_0 = 0 ; i_1_0 < 2 ; i_1_0++) {
-            {
-              int i_2_0;
-              int i_2_1;
-              for (i_2_0 = 0 ; i_2_0 < 3 ; i_2_0++) {
-                for (i_2_1 = 0 ; i_2_1 < 4 ; i_2_1++) {
-                  labcomm_encode_int(e, (*v).a[i_0_0].a[i_1_0].a[i_2_0][i_2_1]);
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_nested_int_array_t_s(
-labcomm_encoder_t *e,
-nested_int_array_t_s *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_nested_int_array_t_s, v);
-}
-void labcomm_encoder_register_nested_int_array_t_s(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_nested_int_array_t_s,
-    (labcomm_encode_typecast_t)encode_int_array_t_s
-  );
-}
-int labcomm_sizeof_nested_int_array_t_s(nested_int_array_t_s *v)
-{
-  return 100;
-}
-static void decode_struct_t_s(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    nested_struct_t_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  nested_struct_t_s v;
-  v.a = labcomm_decode_int(d);
-  handle(&v, context);
-}
-void labcomm_decoder_register_nested_struct_t_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_struct_t_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_nested_struct_t_s,
-    (labcomm_decoder_typecast_t)decode_struct_t_s,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_struct_t_s(
-  labcomm_encoder_t *e,
-  nested_struct_t_s *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_nested_struct_t_s);
-  {
-    labcomm_encode_int(e, (*v).a);
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_nested_struct_t_s(
-labcomm_encoder_t *e,
-nested_struct_t_s *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_nested_struct_t_s, v);
-}
-void labcomm_encoder_register_nested_struct_t_s(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_nested_struct_t_s,
-    (labcomm_encode_typecast_t)encode_struct_t_s
-  );
-}
-int labcomm_sizeof_nested_struct_t_s(nested_struct_t_s *v)
-{
-  return 8;
-}
-static void decode_struct_array_t_s(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    nested_struct_array_t_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  nested_struct_array_t_s v;
-  {
-    int i_0_0;
-    for (i_0_0 = 0 ; i_0_0 < 2 ; i_0_0++) {
-      v.a[i_0_0].a = labcomm_decode_int(d);
-    }
-  }
-  handle(&v, context);
-}
-void labcomm_decoder_register_nested_struct_array_t_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_struct_array_t_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_nested_struct_array_t_s,
-    (labcomm_decoder_typecast_t)decode_struct_array_t_s,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_struct_array_t_s(
-  labcomm_encoder_t *e,
-  nested_struct_array_t_s *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_nested_struct_array_t_s);
-  {
-    {
-      int i_0_0;
-      for (i_0_0 = 0 ; i_0_0 < 2 ; i_0_0++) {
-        labcomm_encode_int(e, (*v).a[i_0_0].a);
-      }
-    }
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_nested_struct_array_t_s(
-labcomm_encoder_t *e,
-nested_struct_array_t_s *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_nested_struct_array_t_s, v);
-}
-void labcomm_encoder_register_nested_struct_array_t_s(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_nested_struct_array_t_s,
-    (labcomm_encode_typecast_t)encode_struct_array_t_s
-  );
-}
-int labcomm_sizeof_nested_struct_array_t_s(nested_struct_array_t_s *v)
-{
-  return 12;
-}
-static void decode_struct_struct_t_s(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    nested_struct_struct_t_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  nested_struct_struct_t_s v;
-  v.a.a = labcomm_decode_int(d);
-  handle(&v, context);
-}
-void labcomm_decoder_register_nested_struct_struct_t_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_struct_struct_t_s *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_nested_struct_struct_t_s,
-    (labcomm_decoder_typecast_t)decode_struct_struct_t_s,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_struct_struct_t_s(
-  labcomm_encoder_t *e,
-  nested_struct_struct_t_s *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_nested_struct_struct_t_s);
-  {
-    labcomm_encode_int(e, (*v).a.a);
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_nested_struct_struct_t_s(
-labcomm_encoder_t *e,
-nested_struct_struct_t_s *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_nested_struct_struct_t_s, v);
-}
-void labcomm_encoder_register_nested_struct_struct_t_s(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_nested_struct_struct_t_s,
-    (labcomm_encode_typecast_t)encode_struct_struct_t_s
-  );
-}
-int labcomm_sizeof_nested_struct_struct_t_s(nested_struct_struct_t_s *v)
-{
-  return 8;
-}
diff --git a/test/gen/c/nested.h b/test/gen/c/nested.h
deleted file mode 100644
index 3e38445..0000000
--- a/test/gen/c/nested.h
+++ /dev/null
@@ -1,350 +0,0 @@
-/* LabComm declarations:
-typedef int int_array_ss[1][_, 3, _][5];
-sample struct {
-  int aa;
-  boolean bb;
-  int_array_ss ias;
-} struct_array_ss[1][_][_];
-typedef int int_t;
-typedef int int_array_t[1][2][3, 4];
-typedef struct {
-  int a;
-} struct_t;
-typedef struct {
-  int a;
-} struct_array_t[2];
-typedef struct {
-  struct {
-    int a;
-  } a;
-} struct_struct_t;
-sample int int_s;
-sample int int_array_s[1][_, 3, _][5];
-sample struct {
-  int a;
-  double bcd;
-} struct_s;
-sample struct {
-  int a;
-} struct_array_s[2];
-sample struct {
-  struct {
-    int a;
-  } a;
-} struct_struct_s;
-sample int_t int_t_s;
-sample int_array_t int_array_t_s;
-sample struct_t struct_t_s;
-sample struct_array_t struct_array_t_s;
-sample struct_struct_t struct_struct_t_s;
-*/
-
-
-#ifndef __LABCOMM_nested_H__
-#define __LABCOMM_nested_H__
-
-#include "labcomm.h"
-
-#ifndef PREDEFINED_nested_int_array_ss
-typedef struct {
-  struct {
-    int n_0;
-    // n_1=3
-    int n_2;
-    struct {
-      int a[5];
-    } *a;
-  } a[1];
-} nested_int_array_ss;
-#endif
-
-#ifndef PREDEFINED_nested_struct_array_ss
-typedef struct {
-  struct {
-    int n_0;
-    struct {
-      int n_0;
-      struct {
-        int aa;
-        unsigned char bb;
-        nested_int_array_ss ias;
-      } *a;
-    } *a;
-  } a[1];
-} nested_struct_array_ss;
-#endif
-void labcomm_decoder_register_nested_struct_array_ss(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_struct_array_ss *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_nested_struct_array_ss(
-  struct labcomm_encoder *e);
-void labcomm_encode_nested_struct_array_ss(
-  struct labcomm_encoder *e,
-  nested_struct_array_ss *v
-);
-extern int labcomm_sizeof_nested_struct_array_ss(nested_struct_array_ss *v);
-
-#ifndef PREDEFINED_nested_int_t
-typedef int nested_int_t;
-#endif
-
-#ifndef PREDEFINED_nested_int_array_t
-typedef struct {
-  struct {
-    struct {
-      int a[3][4];
-    } a[2];
-  } a[1];
-} nested_int_array_t;
-#endif
-
-#ifndef PREDEFINED_nested_struct_t
-typedef struct {
-  int a;
-} nested_struct_t;
-#endif
-
-#ifndef PREDEFINED_nested_struct_array_t
-typedef struct {
-  struct {
-    int a;
-  } a[2];
-} nested_struct_array_t;
-#endif
-
-#ifndef PREDEFINED_nested_struct_struct_t
-typedef struct {
-  struct {
-    int a;
-  } a;
-} nested_struct_struct_t;
-#endif
-
-#ifndef PREDEFINED_nested_int_s
-typedef int nested_int_s;
-#endif
-void labcomm_decoder_register_nested_int_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_int_s *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_nested_int_s(
-  struct labcomm_encoder *e);
-void labcomm_encode_nested_int_s(
-  struct labcomm_encoder *e,
-  nested_int_s *v
-);
-extern int labcomm_sizeof_nested_int_s(nested_int_s *v);
-
-#ifndef PREDEFINED_nested_int_array_s
-typedef struct {
-  struct {
-    int n_0;
-    // n_1=3
-    int n_2;
-    struct {
-      int a[5];
-    } *a;
-  } a[1];
-} nested_int_array_s;
-#endif
-void labcomm_decoder_register_nested_int_array_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_int_array_s *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_nested_int_array_s(
-  struct labcomm_encoder *e);
-void labcomm_encode_nested_int_array_s(
-  struct labcomm_encoder *e,
-  nested_int_array_s *v
-);
-extern int labcomm_sizeof_nested_int_array_s(nested_int_array_s *v);
-
-#ifndef PREDEFINED_nested_struct_s
-typedef struct {
-  int a;
-  double bcd;
-} nested_struct_s;
-#endif
-void labcomm_decoder_register_nested_struct_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_struct_s *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_nested_struct_s(
-  struct labcomm_encoder *e);
-void labcomm_encode_nested_struct_s(
-  struct labcomm_encoder *e,
-  nested_struct_s *v
-);
-extern int labcomm_sizeof_nested_struct_s(nested_struct_s *v);
-
-#ifndef PREDEFINED_nested_struct_array_s
-typedef struct {
-  struct {
-    int a;
-  } a[2];
-} nested_struct_array_s;
-#endif
-void labcomm_decoder_register_nested_struct_array_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_struct_array_s *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_nested_struct_array_s(
-  struct labcomm_encoder *e);
-void labcomm_encode_nested_struct_array_s(
-  struct labcomm_encoder *e,
-  nested_struct_array_s *v
-);
-extern int labcomm_sizeof_nested_struct_array_s(nested_struct_array_s *v);
-
-#ifndef PREDEFINED_nested_struct_struct_s
-typedef struct {
-  struct {
-    int a;
-  } a;
-} nested_struct_struct_s;
-#endif
-void labcomm_decoder_register_nested_struct_struct_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_struct_struct_s *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_nested_struct_struct_s(
-  struct labcomm_encoder *e);
-void labcomm_encode_nested_struct_struct_s(
-  struct labcomm_encoder *e,
-  nested_struct_struct_s *v
-);
-extern int labcomm_sizeof_nested_struct_struct_s(nested_struct_struct_s *v);
-
-#ifndef PREDEFINED_nested_int_t_s
-typedef nested_int_t nested_int_t_s;
-#endif
-void labcomm_decoder_register_nested_int_t_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_int_t_s *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_nested_int_t_s(
-  struct labcomm_encoder *e);
-void labcomm_encode_nested_int_t_s(
-  struct labcomm_encoder *e,
-  nested_int_t_s *v
-);
-extern int labcomm_sizeof_nested_int_t_s(nested_int_t_s *v);
-
-#ifndef PREDEFINED_nested_int_array_t_s
-typedef nested_int_array_t nested_int_array_t_s;
-#endif
-void labcomm_decoder_register_nested_int_array_t_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_int_array_t_s *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_nested_int_array_t_s(
-  struct labcomm_encoder *e);
-void labcomm_encode_nested_int_array_t_s(
-  struct labcomm_encoder *e,
-  nested_int_array_t_s *v
-);
-extern int labcomm_sizeof_nested_int_array_t_s(nested_int_array_t_s *v);
-
-#ifndef PREDEFINED_nested_struct_t_s
-typedef nested_struct_t nested_struct_t_s;
-#endif
-void labcomm_decoder_register_nested_struct_t_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_struct_t_s *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_nested_struct_t_s(
-  struct labcomm_encoder *e);
-void labcomm_encode_nested_struct_t_s(
-  struct labcomm_encoder *e,
-  nested_struct_t_s *v
-);
-extern int labcomm_sizeof_nested_struct_t_s(nested_struct_t_s *v);
-
-#ifndef PREDEFINED_nested_struct_array_t_s
-typedef nested_struct_array_t nested_struct_array_t_s;
-#endif
-void labcomm_decoder_register_nested_struct_array_t_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_struct_array_t_s *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_nested_struct_array_t_s(
-  struct labcomm_encoder *e);
-void labcomm_encode_nested_struct_array_t_s(
-  struct labcomm_encoder *e,
-  nested_struct_array_t_s *v
-);
-extern int labcomm_sizeof_nested_struct_array_t_s(nested_struct_array_t_s *v);
-
-#ifndef PREDEFINED_nested_struct_struct_t_s
-typedef nested_struct_struct_t nested_struct_struct_t_s;
-#endif
-void labcomm_decoder_register_nested_struct_struct_t_s(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    nested_struct_struct_t_s *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_nested_struct_struct_t_s(
-  struct labcomm_encoder *e);
-void labcomm_encode_nested_struct_struct_t_s(
-  struct labcomm_encoder *e,
-  nested_struct_struct_t_s *v
-);
-extern int labcomm_sizeof_nested_struct_struct_t_s(nested_struct_struct_t_s *v);
-
-#define LABCOMM_FORALL_SAMPLES_nested(func, sep) \
-  func(struct_array_ss, nested_struct_array_ss) sep \
-  func(int_s, nested_int_s) sep \
-  func(int_array_s, nested_int_array_s) sep \
-  func(struct_s, nested_struct_s) sep \
-  func(struct_array_s, nested_struct_array_s) sep \
-  func(struct_struct_s, nested_struct_struct_s) sep \
-  func(int_t_s, nested_int_t_s) sep \
-  func(int_array_t_s, nested_int_array_t_s) sep \
-  func(struct_t_s, nested_struct_t_s) sep \
-  func(struct_array_t_s, nested_struct_array_t_s) sep \
-  func(struct_struct_t_s, nested_struct_struct_t_s)
-#endif
diff --git a/test/gen/c/simple.c b/test/gen/c/simple.c
deleted file mode 100644
index 89f4e1d..0000000
--- a/test/gen/c/simple.c
+++ /dev/null
@@ -1,913 +0,0 @@
-#include "labcomm.h"
-#include "labcomm_private.h"
-#include "gen/c/simple.h"
-
-static unsigned char signature_bytes_an_int[] = {
-0, 0, 0, 35, 
-};
-labcomm_signature_t labcomm_signature_simple_an_int = {
-  LABCOMM_SAMPLE, "an_int",
-  (int (*)(void *))labcomm_sizeof_simple_an_int,
-  sizeof(signature_bytes_an_int),
-  signature_bytes_an_int
- };
-static unsigned char signature_bytes_a_fixed_int_array[] = {
-// array [2]
-0, 0, 0, 16, 
-  0, 0, 0, 1, 
-  0, 0, 0, 2, 
-  0, 0, 0, 35, 
-// }
-};
-labcomm_signature_t labcomm_signature_simple_a_fixed_int_array = {
-  LABCOMM_SAMPLE, "a_fixed_int_array",
-  (int (*)(void *))labcomm_sizeof_simple_a_fixed_int_array,
-  sizeof(signature_bytes_a_fixed_int_array),
-  signature_bytes_a_fixed_int_array
- };
-static unsigned char signature_bytes_a_fixed_int_multi_array[] = {
-// array [2, 2, 2]
-0, 0, 0, 16, 
-  0, 0, 0, 3, 
-  0, 0, 0, 2, 
-  0, 0, 0, 2, 
-  0, 0, 0, 2, 
-  0, 0, 0, 35, 
-// }
-};
-labcomm_signature_t labcomm_signature_simple_a_fixed_int_multi_array = {
-  LABCOMM_SAMPLE, "a_fixed_int_multi_array",
-  (int (*)(void *))labcomm_sizeof_simple_a_fixed_int_multi_array,
-  sizeof(signature_bytes_a_fixed_int_multi_array),
-  signature_bytes_a_fixed_int_multi_array
- };
-static unsigned char signature_bytes_a_fixed_int_array_array_array[] = {
-// array [2]
-0, 0, 0, 16, 
-  0, 0, 0, 1, 
-  0, 0, 0, 2, 
-  // array [2]
-  0, 0, 0, 16, 
-    0, 0, 0, 1, 
-    0, 0, 0, 2, 
-    // array [2]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 2, 
-      0, 0, 0, 35, 
-    // }
-  // }
-// }
-};
-labcomm_signature_t labcomm_signature_simple_a_fixed_int_array_array_array = {
-  LABCOMM_SAMPLE, "a_fixed_int_array_array_array",
-  (int (*)(void *))labcomm_sizeof_simple_a_fixed_int_array_array_array,
-  sizeof(signature_bytes_a_fixed_int_array_array_array),
-  signature_bytes_a_fixed_int_array_array_array
- };
-static unsigned char signature_bytes_a_variable_int_array[] = {
-// array [_]
-0, 0, 0, 16, 
-  0, 0, 0, 1, 
-  0, 0, 0, 0, 
-  0, 0, 0, 35, 
-// }
-};
-labcomm_signature_t labcomm_signature_simple_a_variable_int_array = {
-  LABCOMM_SAMPLE, "a_variable_int_array",
-  (int (*)(void *))labcomm_sizeof_simple_a_variable_int_array,
-  sizeof(signature_bytes_a_variable_int_array),
-  signature_bytes_a_variable_int_array
- };
-static unsigned char signature_bytes_a_variable_int_multi_array[] = {
-// array [_, _, _]
-0, 0, 0, 16, 
-  0, 0, 0, 3, 
-  0, 0, 0, 0, 
-  0, 0, 0, 0, 
-  0, 0, 0, 0, 
-  0, 0, 0, 35, 
-// }
-};
-labcomm_signature_t labcomm_signature_simple_a_variable_int_multi_array = {
-  LABCOMM_SAMPLE, "a_variable_int_multi_array",
-  (int (*)(void *))labcomm_sizeof_simple_a_variable_int_multi_array,
-  sizeof(signature_bytes_a_variable_int_multi_array),
-  signature_bytes_a_variable_int_multi_array
- };
-static unsigned char signature_bytes_a_variable_int_array_array_array[] = {
-// array [_]
-0, 0, 0, 16, 
-  0, 0, 0, 1, 
-  0, 0, 0, 0, 
-  // array [_]
-  0, 0, 0, 16, 
-    0, 0, 0, 1, 
-    0, 0, 0, 0, 
-    // array [_]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 0, 
-      0, 0, 0, 35, 
-    // }
-  // }
-// }
-};
-labcomm_signature_t labcomm_signature_simple_a_variable_int_array_array_array = {
-  LABCOMM_SAMPLE, "a_variable_int_array_array_array",
-  (int (*)(void *))labcomm_sizeof_simple_a_variable_int_array_array_array,
-  sizeof(signature_bytes_a_variable_int_array_array_array),
-  signature_bytes_a_variable_int_array_array_array
- };
-static unsigned char signature_bytes_an_int_struct[] = {
-// struct { 2 fields
-0, 0, 0, 17, 
-  0, 0, 0, 2, 
-  // int 'a'
-  0, 0, 0, 1, 
-  97, 
-  0, 0, 0, 35, 
-  // int 'b'
-  0, 0, 0, 1, 
-  98, 
-  0, 0, 0, 35, 
-// }
-};
-labcomm_signature_t labcomm_signature_simple_an_int_struct = {
-  LABCOMM_SAMPLE, "an_int_struct",
-  (int (*)(void *))labcomm_sizeof_simple_an_int_struct,
-  sizeof(signature_bytes_an_int_struct),
-  signature_bytes_an_int_struct
- };
-static unsigned char signature_bytes_a_void[] = {
-// void
-0, 0, 0, 17, 
-0, 0, 0, 0, 
-};
-labcomm_signature_t labcomm_signature_simple_a_void = {
-  LABCOMM_SAMPLE, "a_void",
-  (int (*)(void *))labcomm_sizeof_simple_a_void,
-  sizeof(signature_bytes_a_void),
-  signature_bytes_a_void
- };
-static void decode_an_int(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    simple_an_int *v,
-    void *context
-  ),
-  void *context
-)
-{
-  simple_an_int v;
-  v = labcomm_decode_int(d);
-  handle(&v, context);
-}
-void labcomm_decoder_register_simple_an_int(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_an_int *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_simple_an_int,
-    (labcomm_decoder_typecast_t)decode_an_int,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_an_int(
-  labcomm_encoder_t *e,
-  simple_an_int *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_simple_an_int);
-  {
-    labcomm_encode_int(e, (*v));
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_simple_an_int(
-labcomm_encoder_t *e,
-simple_an_int *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_simple_an_int, v);
-}
-void labcomm_encoder_register_simple_an_int(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_simple_an_int,
-    (labcomm_encode_typecast_t)encode_an_int
-  );
-}
-int labcomm_sizeof_simple_an_int(simple_an_int *v)
-{
-  return 8;
-}
-static void decode_a_fixed_int_array(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    simple_a_fixed_int_array *v,
-    void *context
-  ),
-  void *context
-)
-{
-  simple_a_fixed_int_array v;
-  {
-    int i_0_0;
-    for (i_0_0 = 0 ; i_0_0 < 2 ; i_0_0++) {
-      v.a[i_0_0] = labcomm_decode_int(d);
-    }
-  }
-  handle(&v, context);
-}
-void labcomm_decoder_register_simple_a_fixed_int_array(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_a_fixed_int_array *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_simple_a_fixed_int_array,
-    (labcomm_decoder_typecast_t)decode_a_fixed_int_array,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_a_fixed_int_array(
-  labcomm_encoder_t *e,
-  simple_a_fixed_int_array *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_simple_a_fixed_int_array);
-  {
-    {
-      int i_0_0;
-      for (i_0_0 = 0 ; i_0_0 < 2 ; i_0_0++) {
-        labcomm_encode_int(e, (*v).a[i_0_0]);
-      }
-    }
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_simple_a_fixed_int_array(
-labcomm_encoder_t *e,
-simple_a_fixed_int_array *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_simple_a_fixed_int_array, v);
-}
-void labcomm_encoder_register_simple_a_fixed_int_array(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_simple_a_fixed_int_array,
-    (labcomm_encode_typecast_t)encode_a_fixed_int_array
-  );
-}
-int labcomm_sizeof_simple_a_fixed_int_array(simple_a_fixed_int_array *v)
-{
-  return 12;
-}
-static void decode_a_fixed_int_multi_array(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    simple_a_fixed_int_multi_array *v,
-    void *context
-  ),
-  void *context
-)
-{
-  simple_a_fixed_int_multi_array v;
-  {
-    int i_0_0;
-    int i_0_1;
-    int i_0_2;
-    for (i_0_0 = 0 ; i_0_0 < 2 ; i_0_0++) {
-      for (i_0_1 = 0 ; i_0_1 < 2 ; i_0_1++) {
-        for (i_0_2 = 0 ; i_0_2 < 2 ; i_0_2++) {
-          v.a[i_0_0][i_0_1][i_0_2] = labcomm_decode_int(d);
-        }
-      }
-    }
-  }
-  handle(&v, context);
-}
-void labcomm_decoder_register_simple_a_fixed_int_multi_array(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_a_fixed_int_multi_array *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_simple_a_fixed_int_multi_array,
-    (labcomm_decoder_typecast_t)decode_a_fixed_int_multi_array,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_a_fixed_int_multi_array(
-  labcomm_encoder_t *e,
-  simple_a_fixed_int_multi_array *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_simple_a_fixed_int_multi_array);
-  {
-    {
-      int i_0_0;
-      int i_0_1;
-      int i_0_2;
-      for (i_0_0 = 0 ; i_0_0 < 2 ; i_0_0++) {
-        for (i_0_1 = 0 ; i_0_1 < 2 ; i_0_1++) {
-          for (i_0_2 = 0 ; i_0_2 < 2 ; i_0_2++) {
-            labcomm_encode_int(e, (*v).a[i_0_0][i_0_1][i_0_2]);
-          }
-        }
-      }
-    }
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_simple_a_fixed_int_multi_array(
-labcomm_encoder_t *e,
-simple_a_fixed_int_multi_array *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_simple_a_fixed_int_multi_array, v);
-}
-void labcomm_encoder_register_simple_a_fixed_int_multi_array(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_simple_a_fixed_int_multi_array,
-    (labcomm_encode_typecast_t)encode_a_fixed_int_multi_array
-  );
-}
-int labcomm_sizeof_simple_a_fixed_int_multi_array(simple_a_fixed_int_multi_array *v)
-{
-  return 36;
-}
-static void decode_a_fixed_int_array_array_array(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    simple_a_fixed_int_array_array_array *v,
-    void *context
-  ),
-  void *context
-)
-{
-  simple_a_fixed_int_array_array_array v;
-  {
-    int i_0_0;
-    for (i_0_0 = 0 ; i_0_0 < 2 ; i_0_0++) {
-      {
-        int i_1_0;
-        for (i_1_0 = 0 ; i_1_0 < 2 ; i_1_0++) {
-          {
-            int i_2_0;
-            for (i_2_0 = 0 ; i_2_0 < 2 ; i_2_0++) {
-              v.a[i_0_0].a[i_1_0].a[i_2_0] = labcomm_decode_int(d);
-            }
-          }
-        }
-      }
-    }
-  }
-  handle(&v, context);
-}
-void labcomm_decoder_register_simple_a_fixed_int_array_array_array(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_a_fixed_int_array_array_array *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_simple_a_fixed_int_array_array_array,
-    (labcomm_decoder_typecast_t)decode_a_fixed_int_array_array_array,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_a_fixed_int_array_array_array(
-  labcomm_encoder_t *e,
-  simple_a_fixed_int_array_array_array *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_simple_a_fixed_int_array_array_array);
-  {
-    {
-      int i_0_0;
-      for (i_0_0 = 0 ; i_0_0 < 2 ; i_0_0++) {
-        {
-          int i_1_0;
-          for (i_1_0 = 0 ; i_1_0 < 2 ; i_1_0++) {
-            {
-              int i_2_0;
-              for (i_2_0 = 0 ; i_2_0 < 2 ; i_2_0++) {
-                labcomm_encode_int(e, (*v).a[i_0_0].a[i_1_0].a[i_2_0]);
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_simple_a_fixed_int_array_array_array(
-labcomm_encoder_t *e,
-simple_a_fixed_int_array_array_array *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_simple_a_fixed_int_array_array_array, v);
-}
-void labcomm_encoder_register_simple_a_fixed_int_array_array_array(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_simple_a_fixed_int_array_array_array,
-    (labcomm_encode_typecast_t)encode_a_fixed_int_array_array_array
-  );
-}
-int labcomm_sizeof_simple_a_fixed_int_array_array_array(simple_a_fixed_int_array_array_array *v)
-{
-  return 36;
-}
-static void decode_a_variable_int_array(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    simple_a_variable_int_array *v,
-    void *context
-  ),
-  void *context
-)
-{
-  simple_a_variable_int_array v;
-  v.n_0 = labcomm_decode_int(d);
-  v.a = malloc(sizeof(v.a[0]) * v.n_0);
-  {
-    int i_0_0;
-    for (i_0_0 = 0 ; i_0_0 < v.n_0 ; i_0_0++) {
-      int i_0 = i_0_0;
-      v.a[i_0] = labcomm_decode_int(d);
-    }
-  }
-  handle(&v, context);
-  {
-    free(v.a);
-  }
-}
-void labcomm_decoder_register_simple_a_variable_int_array(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_a_variable_int_array *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_simple_a_variable_int_array,
-    (labcomm_decoder_typecast_t)decode_a_variable_int_array,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_a_variable_int_array(
-  labcomm_encoder_t *e,
-  simple_a_variable_int_array *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_simple_a_variable_int_array);
-  {
-    labcomm_encode_int(e, (*v).n_0);
-    {
-      int i_0_0;
-      for (i_0_0 = 0 ; i_0_0 < (*v).n_0 ; i_0_0++) {
-        int i_0 = i_0_0;
-        labcomm_encode_int(e, (*v).a[i_0]);
-      }
-    }
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_simple_a_variable_int_array(
-labcomm_encoder_t *e,
-simple_a_variable_int_array *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_simple_a_variable_int_array, v);
-}
-void labcomm_encoder_register_simple_a_variable_int_array(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_simple_a_variable_int_array,
-    (labcomm_encode_typecast_t)encode_a_variable_int_array
-  );
-}
-int labcomm_sizeof_simple_a_variable_int_array(simple_a_variable_int_array *v)
-{
-  int result = 4;
-  result += 4 * (*v).n_0;
-  return result;
-}
-static void decode_a_variable_int_multi_array(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    simple_a_variable_int_multi_array *v,
-    void *context
-  ),
-  void *context
-)
-{
-  simple_a_variable_int_multi_array v;
-  v.n_0 = labcomm_decode_int(d);
-  v.n_1 = labcomm_decode_int(d);
-  v.n_2 = labcomm_decode_int(d);
-  v.a = malloc(sizeof(v.a[0]) * v.n_0 * v.n_1 * v.n_2);
-  {
-    int i_0_0;
-    int i_0_1;
-    int i_0_2;
-    for (i_0_0 = 0 ; i_0_0 < v.n_0 ; i_0_0++) {
-      for (i_0_1 = 0 ; i_0_1 < v.n_1 ; i_0_1++) {
-        for (i_0_2 = 0 ; i_0_2 < v.n_2 ; i_0_2++) {
-          int i_0 = ((i_0_0) * v.n_1 + i_0_1) * v.n_2 + i_0_2;
-          v.a[i_0] = labcomm_decode_int(d);
-        }
-      }
-    }
-  }
-  handle(&v, context);
-  {
-    free(v.a);
-  }
-}
-void labcomm_decoder_register_simple_a_variable_int_multi_array(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_a_variable_int_multi_array *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_simple_a_variable_int_multi_array,
-    (labcomm_decoder_typecast_t)decode_a_variable_int_multi_array,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_a_variable_int_multi_array(
-  labcomm_encoder_t *e,
-  simple_a_variable_int_multi_array *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_simple_a_variable_int_multi_array);
-  {
-    labcomm_encode_int(e, (*v).n_0);
-    labcomm_encode_int(e, (*v).n_1);
-    labcomm_encode_int(e, (*v).n_2);
-    {
-      int i_0_0;
-      int i_0_1;
-      int i_0_2;
-      for (i_0_0 = 0 ; i_0_0 < (*v).n_0 ; i_0_0++) {
-        for (i_0_1 = 0 ; i_0_1 < (*v).n_1 ; i_0_1++) {
-          for (i_0_2 = 0 ; i_0_2 < (*v).n_2 ; i_0_2++) {
-            int i_0 = ((i_0_0) * (*v).n_1 + i_0_1) * (*v).n_2 + i_0_2;
-            labcomm_encode_int(e, (*v).a[i_0]);
-          }
-        }
-      }
-    }
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_simple_a_variable_int_multi_array(
-labcomm_encoder_t *e,
-simple_a_variable_int_multi_array *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_simple_a_variable_int_multi_array, v);
-}
-void labcomm_encoder_register_simple_a_variable_int_multi_array(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_simple_a_variable_int_multi_array,
-    (labcomm_encode_typecast_t)encode_a_variable_int_multi_array
-  );
-}
-int labcomm_sizeof_simple_a_variable_int_multi_array(simple_a_variable_int_multi_array *v)
-{
-  int result = 4;
-  result += 4 * (*v).n_0 * (*v).n_1 * (*v).n_2;
-  return result;
-}
-static void decode_a_variable_int_array_array_array(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    simple_a_variable_int_array_array_array *v,
-    void *context
-  ),
-  void *context
-)
-{
-  simple_a_variable_int_array_array_array v;
-  v.n_0 = labcomm_decode_int(d);
-  v.a = malloc(sizeof(v.a[0]) * v.n_0);
-  {
-    int i_0_0;
-    for (i_0_0 = 0 ; i_0_0 < v.n_0 ; i_0_0++) {
-      int i_0 = i_0_0;
-      v.a[i_0].n_0 = labcomm_decode_int(d);
-      v.a[i_0].a = malloc(sizeof(v.a[i_0].a[0]) * v.a[i_0].n_0);
-      {
-        int i_1_0;
-        for (i_1_0 = 0 ; i_1_0 < v.a[i_0].n_0 ; i_1_0++) {
-          int i_1 = i_1_0;
-          v.a[i_0].a[i_1].n_0 = labcomm_decode_int(d);
-          v.a[i_0].a[i_1].a = malloc(sizeof(v.a[i_0].a[i_1].a[0]) * v.a[i_0].a[i_1].n_0);
-          {
-            int i_2_0;
-            for (i_2_0 = 0 ; i_2_0 < v.a[i_0].a[i_1].n_0 ; i_2_0++) {
-              int i_2 = i_2_0;
-              v.a[i_0].a[i_1].a[i_2] = labcomm_decode_int(d);
-            }
-          }
-        }
-      }
-    }
-  }
-  handle(&v, context);
-  {
-    {
-      int i_0_0;
-      for (i_0_0 = 0 ; i_0_0 < v.n_0 ; i_0_0++) {
-        int i_0 = i_0_0;
-        {
-          int i_1_0;
-          for (i_1_0 = 0 ; i_1_0 < v.a[i_0].n_0 ; i_1_0++) {
-            int i_1 = i_1_0;
-            free(v.a[i_0].a[i_1].a);
-          }
-        }
-        free(v.a[i_0].a);
-      }
-    }
-    free(v.a);
-  }
-}
-void labcomm_decoder_register_simple_a_variable_int_array_array_array(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_a_variable_int_array_array_array *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_simple_a_variable_int_array_array_array,
-    (labcomm_decoder_typecast_t)decode_a_variable_int_array_array_array,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_a_variable_int_array_array_array(
-  labcomm_encoder_t *e,
-  simple_a_variable_int_array_array_array *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_simple_a_variable_int_array_array_array);
-  {
-    labcomm_encode_int(e, (*v).n_0);
-    {
-      int i_0_0;
-      for (i_0_0 = 0 ; i_0_0 < (*v).n_0 ; i_0_0++) {
-        int i_0 = i_0_0;
-        labcomm_encode_int(e, (*v).a[i_0].n_0);
-        {
-          int i_1_0;
-          for (i_1_0 = 0 ; i_1_0 < (*v).a[i_0].n_0 ; i_1_0++) {
-            int i_1 = i_1_0;
-            labcomm_encode_int(e, (*v).a[i_0].a[i_1].n_0);
-            {
-              int i_2_0;
-              for (i_2_0 = 0 ; i_2_0 < (*v).a[i_0].a[i_1].n_0 ; i_2_0++) {
-                int i_2 = i_2_0;
-                labcomm_encode_int(e, (*v).a[i_0].a[i_1].a[i_2]);
-              }
-            }
-          }
-        }
-      }
-    }
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_simple_a_variable_int_array_array_array(
-labcomm_encoder_t *e,
-simple_a_variable_int_array_array_array *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_simple_a_variable_int_array_array_array, v);
-}
-void labcomm_encoder_register_simple_a_variable_int_array_array_array(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_simple_a_variable_int_array_array_array,
-    (labcomm_encode_typecast_t)encode_a_variable_int_array_array_array
-  );
-}
-int labcomm_sizeof_simple_a_variable_int_array_array_array(simple_a_variable_int_array_array_array *v)
-{
-  int result = 4;
-  {
-    int i_0_0;
-    for (i_0_0 = 0 ; i_0_0 < (*v).n_0 ; i_0_0++) {
-      int i_0 = i_0_0;
-      {
-        int i_1_0;
-        for (i_1_0 = 0 ; i_1_0 < (*v).a[i_0].n_0 ; i_1_0++) {
-          int i_1 = i_1_0;
-          result += 4 * (*v).a[i_0].a[i_1].n_0;
-        }
-      }
-    }
-  }
-  return result;
-}
-static void decode_an_int_struct(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    simple_an_int_struct *v,
-    void *context
-  ),
-  void *context
-)
-{
-  simple_an_int_struct v;
-  v.a = labcomm_decode_int(d);
-  v.b = labcomm_decode_int(d);
-  handle(&v, context);
-}
-void labcomm_decoder_register_simple_an_int_struct(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_an_int_struct *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_simple_an_int_struct,
-    (labcomm_decoder_typecast_t)decode_an_int_struct,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_an_int_struct(
-  labcomm_encoder_t *e,
-  simple_an_int_struct *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_simple_an_int_struct);
-  {
-    labcomm_encode_int(e, (*v).a);
-    labcomm_encode_int(e, (*v).b);
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_simple_an_int_struct(
-labcomm_encoder_t *e,
-simple_an_int_struct *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_simple_an_int_struct, v);
-}
-void labcomm_encoder_register_simple_an_int_struct(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_simple_an_int_struct,
-    (labcomm_encode_typecast_t)encode_an_int_struct
-  );
-}
-int labcomm_sizeof_simple_an_int_struct(simple_an_int_struct *v)
-{
-  return 12;
-}
-static void decode_a_void(
-  labcomm_decoder_t *d,
-  void (*handle)(
-    simple_a_void *v,
-    void *context
-  ),
-  void *context
-)
-{
-  simple_a_void v;
-  handle(&v, context);
-}
-void labcomm_decoder_register_simple_a_void(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_a_void *v,
-    void *context
-  ),
-  void *context
-)
-{
-  labcomm_internal_decoder_register(
-    d,
-    &labcomm_signature_simple_a_void,
-    (labcomm_decoder_typecast_t)decode_a_void,
-    (labcomm_handler_typecast_t)handler,
-    context
-  );
-}
-static void encode_a_void(
-  labcomm_encoder_t *e,
-  simple_a_void *v
-)
-{
-  e->writer.write(&e->writer, labcomm_writer_start);
-  labcomm_encode_type_index(e, &labcomm_signature_simple_a_void);
-  {
-  }
-  e->writer.write(&e->writer, labcomm_writer_end);
-}
-void labcomm_encode_simple_a_void(
-labcomm_encoder_t *e,
-simple_a_void *v
-)
-{
-labcomm_internal_encode(e, &labcomm_signature_simple_a_void, v);
-}
-void labcomm_encoder_register_simple_a_void(
-  struct labcomm_encoder *e
-)
-{
-  labcomm_internal_encoder_register(
-    e,
-    &labcomm_signature_simple_a_void,
-    (labcomm_encode_typecast_t)encode_a_void
-  );
-}
-int labcomm_sizeof_simple_a_void(simple_a_void *v)
-{
-  return 4;
-}
diff --git a/test/gen/c/simple.h b/test/gen/c/simple.h
deleted file mode 100644
index 24b4480..0000000
--- a/test/gen/c/simple.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/* LabComm declarations:
-sample int an_int;
-sample int a_fixed_int_array[2];
-sample int a_fixed_int_multi_array[2, 2, 2];
-sample int a_fixed_int_array_array_array[2][2][2];
-sample int a_variable_int_array[_];
-sample int a_variable_int_multi_array[_, _, _];
-sample int a_variable_int_array_array_array[_][_][_];
-sample struct {
-  int a;
-  int b;
-} an_int_struct;
-sample void a_void;
-*/
-
-
-#ifndef __LABCOMM_simple_H__
-#define __LABCOMM_simple_H__
-
-#include "labcomm.h"
-
-#ifndef PREDEFINED_simple_an_int
-typedef int simple_an_int;
-#endif
-void labcomm_decoder_register_simple_an_int(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_an_int *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_simple_an_int(
-  struct labcomm_encoder *e);
-void labcomm_encode_simple_an_int(
-  struct labcomm_encoder *e,
-  simple_an_int *v
-);
-extern int labcomm_sizeof_simple_an_int(simple_an_int *v);
-
-#ifndef PREDEFINED_simple_a_fixed_int_array
-typedef struct {
-  int a[2];
-} simple_a_fixed_int_array;
-#endif
-void labcomm_decoder_register_simple_a_fixed_int_array(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_a_fixed_int_array *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_simple_a_fixed_int_array(
-  struct labcomm_encoder *e);
-void labcomm_encode_simple_a_fixed_int_array(
-  struct labcomm_encoder *e,
-  simple_a_fixed_int_array *v
-);
-extern int labcomm_sizeof_simple_a_fixed_int_array(simple_a_fixed_int_array *v);
-
-#ifndef PREDEFINED_simple_a_fixed_int_multi_array
-typedef struct {
-  int a[2][2][2];
-} simple_a_fixed_int_multi_array;
-#endif
-void labcomm_decoder_register_simple_a_fixed_int_multi_array(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_a_fixed_int_multi_array *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_simple_a_fixed_int_multi_array(
-  struct labcomm_encoder *e);
-void labcomm_encode_simple_a_fixed_int_multi_array(
-  struct labcomm_encoder *e,
-  simple_a_fixed_int_multi_array *v
-);
-extern int labcomm_sizeof_simple_a_fixed_int_multi_array(simple_a_fixed_int_multi_array *v);
-
-#ifndef PREDEFINED_simple_a_fixed_int_array_array_array
-typedef struct {
-  struct {
-    struct {
-      int a[2];
-    } a[2];
-  } a[2];
-} simple_a_fixed_int_array_array_array;
-#endif
-void labcomm_decoder_register_simple_a_fixed_int_array_array_array(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_a_fixed_int_array_array_array *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_simple_a_fixed_int_array_array_array(
-  struct labcomm_encoder *e);
-void labcomm_encode_simple_a_fixed_int_array_array_array(
-  struct labcomm_encoder *e,
-  simple_a_fixed_int_array_array_array *v
-);
-extern int labcomm_sizeof_simple_a_fixed_int_array_array_array(simple_a_fixed_int_array_array_array *v);
-
-#ifndef PREDEFINED_simple_a_variable_int_array
-typedef struct {
-  int n_0;
-  int *a;
-} simple_a_variable_int_array;
-#endif
-void labcomm_decoder_register_simple_a_variable_int_array(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_a_variable_int_array *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_simple_a_variable_int_array(
-  struct labcomm_encoder *e);
-void labcomm_encode_simple_a_variable_int_array(
-  struct labcomm_encoder *e,
-  simple_a_variable_int_array *v
-);
-extern int labcomm_sizeof_simple_a_variable_int_array(simple_a_variable_int_array *v);
-
-#ifndef PREDEFINED_simple_a_variable_int_multi_array
-typedef struct {
-  int n_0;
-  int n_1;
-  int n_2;
-  int *a;
-} simple_a_variable_int_multi_array;
-#endif
-void labcomm_decoder_register_simple_a_variable_int_multi_array(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_a_variable_int_multi_array *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_simple_a_variable_int_multi_array(
-  struct labcomm_encoder *e);
-void labcomm_encode_simple_a_variable_int_multi_array(
-  struct labcomm_encoder *e,
-  simple_a_variable_int_multi_array *v
-);
-extern int labcomm_sizeof_simple_a_variable_int_multi_array(simple_a_variable_int_multi_array *v);
-
-#ifndef PREDEFINED_simple_a_variable_int_array_array_array
-typedef struct {
-  int n_0;
-  struct {
-    int n_0;
-    struct {
-      int n_0;
-      int *a;
-    } *a;
-  } *a;
-} simple_a_variable_int_array_array_array;
-#endif
-void labcomm_decoder_register_simple_a_variable_int_array_array_array(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_a_variable_int_array_array_array *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_simple_a_variable_int_array_array_array(
-  struct labcomm_encoder *e);
-void labcomm_encode_simple_a_variable_int_array_array_array(
-  struct labcomm_encoder *e,
-  simple_a_variable_int_array_array_array *v
-);
-extern int labcomm_sizeof_simple_a_variable_int_array_array_array(simple_a_variable_int_array_array_array *v);
-
-#ifndef PREDEFINED_simple_an_int_struct
-typedef struct {
-  int a;
-  int b;
-} simple_an_int_struct;
-#endif
-void labcomm_decoder_register_simple_an_int_struct(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_an_int_struct *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_simple_an_int_struct(
-  struct labcomm_encoder *e);
-void labcomm_encode_simple_an_int_struct(
-  struct labcomm_encoder *e,
-  simple_an_int_struct *v
-);
-extern int labcomm_sizeof_simple_an_int_struct(simple_an_int_struct *v);
-
-#ifndef PREDEFINED_simple_a_void
-typedef char simple_a_void;
-#endif
-void labcomm_decoder_register_simple_a_void(
-  struct labcomm_decoder *d,
-  void (*handler)(
-    simple_a_void *v,
-    void *context
-  ),
-  void *context
-);
-void labcomm_encoder_register_simple_a_void(
-  struct labcomm_encoder *e);
-void labcomm_encode_simple_a_void(
-  struct labcomm_encoder *e,
-  simple_a_void *v
-);
-extern int labcomm_sizeof_simple_a_void(simple_a_void *v);
-
-#define LABCOMM_FORALL_SAMPLES_simple(func, sep) \
-  func(an_int, simple_an_int) sep \
-  func(a_fixed_int_array, simple_a_fixed_int_array) sep \
-  func(a_fixed_int_multi_array, simple_a_fixed_int_multi_array) sep \
-  func(a_fixed_int_array_array_array, simple_a_fixed_int_array_array_array) sep \
-  func(a_variable_int_array, simple_a_variable_int_array) sep \
-  func(a_variable_int_multi_array, simple_a_variable_int_multi_array) sep \
-  func(a_variable_int_array_array_array, simple_a_variable_int_array_array_array) sep \
-  func(an_int_struct, simple_an_int_struct) sep \
-  func(a_void, simple_a_void)
-#endif
diff --git a/test/gen/csharp/nested.cs b/test/gen/csharp/nested.cs
deleted file mode 100644
index a8dcd18..0000000
--- a/test/gen/csharp/nested.cs
+++ /dev/null
@@ -1,1045 +0,0 @@
-using System;
-using se.lth.control.labcomm;
-/* 
-sample struct {
-  int aa;
-  boolean bb;
-  int_array_ss ias;
-} struct_array_ss[1][_][_];
-*/
-
-public class struct_array_ss : LabCommSample {
-
-  public int aa;
-  public boolean bb;
-  public int[][,,][] ias;
-  
-  public interface Handler : LabCommHandler {
-    void handle(struct_array_ss[][][] value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(struct_array_ss);
-    }
-    
-    public String getName() {
-      return "struct_array_ss";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(struct_array_ss.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, struct_array_ss[][][] value) {
-    e.begin(typeof(struct_array_ss));
-    int i_0_max = 1;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      e.encodeInt(value[i_0].GetLength(0));
-      int i_1_max = value[i_0].GetLength(0);
-      for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-        e.encodeInt(value[i_0][i_1].GetLength(0));
-        int i_2_max = value[i_0][i_1].GetLength(0);
-        for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-          e.encodeInt(value[i_0][i_1][i_2].aa);
-          e.encodeBoolean(value[i_0][i_1][i_2].bb);
-          int i_3_max = 1;
-          for (int i_3 = 0 ; i_3 < i_3_max ; i_3++) {
-            e.encodeInt(value[i_0][i_1][i_2].ias[i_3].GetLength(0));
-            int i_4_max = value[i_0][i_1][i_2].ias[i_3].GetLength(0);
-            int i_5_max = 3;
-            e.encodeInt(value[i_0][i_1][i_2].ias[i_3].GetLength(2));
-            int i_6_max = value[i_0][i_1][i_2].ias[i_3].GetLength(2);
-            for (int i_4 = 0 ; i_4 < i_4_max ; i_4++) {
-              for (int i_5 = 0 ; i_5 < i_5_max ; i_5++) {
-                for (int i_6 = 0 ; i_6 < i_6_max ; i_6++) {
-                  int i_7_max = 5;
-                  for (int i_7 = 0 ; i_7 < i_7_max ; i_7++) {
-                    e.encodeInt(value[i_0][i_1][i_2].ias[i_3][i_4, i_5, i_6][i_7]);
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-    e.end(typeof(struct_array_ss));
-  }
-  
-  public static struct_array_ss[][][] decode(LabCommDecoder d) {
-    struct_array_ss[][][] result;
-    {
-      int i_0_max = 1;
-      result = new struct_array_ss[i_0_max]
-      [][];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        {
-          int i_1_max = d.decodeInt();
-          result[i_0] = new struct_array_ss[i_1_max]
-          [];
-          for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-            {
-              int i_2_max = d.decodeInt();
-              result[i_0][i_1] = new struct_array_ss[i_2_max]
-              ;
-              for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-                result[i_0][i_1][i_2] = new struct_array_ss();
-                result[i_0][i_1][i_2].aa = d.decodeInt();
-                result[i_0][i_1][i_2].bb = d.decodeBoolean();
-                {
-                  int i_3_max = 1;
-                  result[i_0][i_1][i_2].ias = new int[i_3_max]
-                  [][,,];
-                  for (int i_3 = 0 ; i_3 < i_3_max ; i_3++) {
-                    {
-                      int i_4_max = d.decodeInt();
-                      int i_5_max = 3;
-                      int i_6_max = d.decodeInt();
-                      result[i_0][i_1][i_2].ias[i_3] = new int[i_4_max, i_5_max, i_6_max]
-                      [];
-                      for (int i_4 = 0 ; i_4 < i_4_max ; i_4++) {
-                        for (int i_5 = 0 ; i_5 < i_5_max ; i_5++) {
-                          for (int i_6 = 0 ; i_6 < i_6_max ; i_6++) {
-                            {
-                              int i_7_max = 5;
-                              result[i_0][i_1][i_2].ias[i_3][i_4, i_5, i_6] = new int[i_7_max]
-                              ;
-                              for (int i_7 = 0 ; i_7 < i_7_max ; i_7++) {
-                                result[i_0][i_1][i_2].ias[i_3][i_4, i_5, i_6][i_7] = d.decodeInt();
-                              }
-                            }
-                          }
-                        }
-                      }
-                    }
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [1]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 1, 
-      // array [_]
-      0, 0, 0, 16, 
-        0, 0, 0, 1, 
-        0, 0, 0, 0, 
-        // array [_]
-        0, 0, 0, 16, 
-          0, 0, 0, 1, 
-          0, 0, 0, 0, 
-          // struct { 3 fields
-          0, 0, 0, 17, 
-            0, 0, 0, 3, 
-            // int 'aa'
-            0, 0, 0, 2, 
-            97, 97, 
-            0, 0, 0, 35, 
-            // boolean 'bb'
-            0, 0, 0, 2, 
-            98, 98, 
-            0, 0, 0, 32, 
-            // int_array_ss 'ias'
-            0, 0, 0, 3, 
-            105, 97, 115, 
-            // array [1]
-            0, 0, 0, 16, 
-              0, 0, 0, 1, 
-              0, 0, 0, 1, 
-              // array [_, 3, _]
-              0, 0, 0, 16, 
-                0, 0, 0, 3, 
-                0, 0, 0, 0, 
-                0, 0, 0, 3, 
-                0, 0, 0, 0, 
-                // array [5]
-                0, 0, 0, 16, 
-                  0, 0, 0, 1, 
-                  0, 0, 0, 5, 
-                  0, 0, 0, 35, 
-                // }
-              // }
-            // }
-          // }
-        // }
-      // }
-    // }
-  };
-
-}
-/* 
-typedef struct {
-  int a;
-} struct_t;
-*/
-
-public class struct_t : LabCommType {
-
-  public int a;
-  
-  public static void encode(LabCommEncoder e, struct_t value) {
-    e.encodeInt(value.a);
-  }
-  
-  public static struct_t decode(LabCommDecoder d) {
-    struct_t result;
-    result = new struct_t();
-    result.a = d.decodeInt();
-    return result;
-  }
-  
-}
-/* 
-typedef struct {
-  int a;
-} struct_array_t[2];
-*/
-
-public class struct_array_t : LabCommType {
-
-  public int a;
-  
-  public static void encode(LabCommEncoder e, struct_array_t[] value) {
-    int i_0_max = 2;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      e.encodeInt(value[i_0].a);
-    }
-  }
-  
-  public static struct_array_t[] decode(LabCommDecoder d) {
-    struct_array_t[] result;
-    {
-      int i_0_max = 2;
-      result = new struct_array_t[i_0_max]
-      ;
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        result[i_0] = new struct_array_t();
-        result[i_0].a = d.decodeInt();
-      }
-    }
-    return result;
-  }
-  
-}
-/* 
-typedef struct {
-  struct {
-    int a;
-  } a;
-} struct_struct_t;
-*/
-
-public class struct_struct_t : LabCommType {
-
-  public static class struct_a {
-    public int a;
-  }
-  
-  public struct_a a;
-  
-  public static void encode(LabCommEncoder e, struct_struct_t value) {
-    e.encodeInt(value.a.a);
-  }
-  
-  public static struct_struct_t decode(LabCommDecoder d) {
-    struct_struct_t result;
-    result = new struct_struct_t();
-    result.a = new struct_a();
-    result.a.a = d.decodeInt();
-    return result;
-  }
-  
-}
-/* 
-sample int int_s;
-*/
-
-public class int_s : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle(int value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(int_s);
-    }
-    
-    public String getName() {
-      return "int_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(int_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int value) {
-    e.begin(typeof(int_s));
-    e.encodeInt(value);
-    e.end(typeof(int_s));
-  }
-  
-  public static int decode(LabCommDecoder d) {
-    int result;
-    result = d.decodeInt();
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    0, 0, 0, 35, 
-  };
-
-}
-/* 
-sample int int_array_s[1][_, 3, _][5];
-*/
-
-public class int_array_s : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle(int[][,,][] value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(int_array_s);
-    }
-    
-    public String getName() {
-      return "int_array_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(int_array_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[][,,][] value) {
-    e.begin(typeof(int_array_s));
-    int i_0_max = 1;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      e.encodeInt(value[i_0].GetLength(0));
-      int i_1_max = value[i_0].GetLength(0);
-      int i_2_max = 3;
-      e.encodeInt(value[i_0].GetLength(2));
-      int i_3_max = value[i_0].GetLength(2);
-      for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-        for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-          for (int i_3 = 0 ; i_3 < i_3_max ; i_3++) {
-            int i_4_max = 5;
-            for (int i_4 = 0 ; i_4 < i_4_max ; i_4++) {
-              e.encodeInt(value[i_0][i_1, i_2, i_3][i_4]);
-            }
-          }
-        }
-      }
-    }
-    e.end(typeof(int_array_s));
-  }
-  
-  public static int[][,,][] decode(LabCommDecoder d) {
-    int[][,,][] result;
-    {
-      int i_0_max = 1;
-      result = new int[i_0_max]
-      [][,,];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        {
-          int i_1_max = d.decodeInt();
-          int i_2_max = 3;
-          int i_3_max = d.decodeInt();
-          result[i_0] = new int[i_1_max, i_2_max, i_3_max]
-          [];
-          for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-            for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-              for (int i_3 = 0 ; i_3 < i_3_max ; i_3++) {
-                {
-                  int i_4_max = 5;
-                  result[i_0][i_1, i_2, i_3] = new int[i_4_max]
-                  ;
-                  for (int i_4 = 0 ; i_4 < i_4_max ; i_4++) {
-                    result[i_0][i_1, i_2, i_3][i_4] = d.decodeInt();
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [1]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 1, 
-      // array [_, 3, _]
-      0, 0, 0, 16, 
-        0, 0, 0, 3, 
-        0, 0, 0, 0, 
-        0, 0, 0, 3, 
-        0, 0, 0, 0, 
-        // array [5]
-        0, 0, 0, 16, 
-          0, 0, 0, 1, 
-          0, 0, 0, 5, 
-          0, 0, 0, 35, 
-        // }
-      // }
-    // }
-  };
-
-}
-/* 
-sample struct {
-  int a;
-  double bcd;
-} struct_s;
-*/
-
-public class struct_s : LabCommSample {
-
-  public int a;
-  public double bcd;
-  
-  public interface Handler : LabCommHandler {
-    void handle(struct_s value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(struct_s);
-    }
-    
-    public String getName() {
-      return "struct_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(struct_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, struct_s value) {
-    e.begin(typeof(struct_s));
-    e.encodeInt(value.a);
-    e.encodeDouble(value.bcd);
-    e.end(typeof(struct_s));
-  }
-  
-  public static struct_s decode(LabCommDecoder d) {
-    struct_s result;
-    result = new struct_s();
-    result.a = d.decodeInt();
-    result.bcd = d.decodeDouble();
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // struct { 2 fields
-    0, 0, 0, 17, 
-      0, 0, 0, 2, 
-      // int 'a'
-      0, 0, 0, 1, 
-      97, 
-      0, 0, 0, 35, 
-      // double 'bcd'
-      0, 0, 0, 3, 
-      98, 99, 100, 
-      0, 0, 0, 38, 
-    // }
-  };
-
-}
-/* 
-sample struct {
-  int a;
-} struct_array_s[2];
-*/
-
-public class struct_array_s : LabCommSample {
-
-  public int a;
-  
-  public interface Handler : LabCommHandler {
-    void handle(struct_array_s[] value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(struct_array_s);
-    }
-    
-    public String getName() {
-      return "struct_array_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(struct_array_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, struct_array_s[] value) {
-    e.begin(typeof(struct_array_s));
-    int i_0_max = 2;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      e.encodeInt(value[i_0].a);
-    }
-    e.end(typeof(struct_array_s));
-  }
-  
-  public static struct_array_s[] decode(LabCommDecoder d) {
-    struct_array_s[] result;
-    {
-      int i_0_max = 2;
-      result = new struct_array_s[i_0_max]
-      ;
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        result[i_0] = new struct_array_s();
-        result[i_0].a = d.decodeInt();
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [2]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 2, 
-      // struct { 1 fields
-      0, 0, 0, 17, 
-        0, 0, 0, 1, 
-        // int 'a'
-        0, 0, 0, 1, 
-        97, 
-        0, 0, 0, 35, 
-      // }
-    // }
-  };
-
-}
-/* 
-sample struct {
-  struct {
-    int a;
-  } a;
-} struct_struct_s;
-*/
-
-public class struct_struct_s : LabCommSample {
-
-  public static class struct_a {
-    public int a;
-  }
-  
-  public struct_a a;
-  
-  public interface Handler : LabCommHandler {
-    void handle(struct_struct_s value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(struct_struct_s);
-    }
-    
-    public String getName() {
-      return "struct_struct_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(struct_struct_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, struct_struct_s value) {
-    e.begin(typeof(struct_struct_s));
-    e.encodeInt(value.a.a);
-    e.end(typeof(struct_struct_s));
-  }
-  
-  public static struct_struct_s decode(LabCommDecoder d) {
-    struct_struct_s result;
-    result = new struct_struct_s();
-    result.a = new struct_a();
-    result.a.a = d.decodeInt();
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // struct { 1 fields
-    0, 0, 0, 17, 
-      0, 0, 0, 1, 
-      // struct 'a'
-      0, 0, 0, 1, 
-      97, 
-      // struct { 1 fields
-      0, 0, 0, 17, 
-        0, 0, 0, 1, 
-        // int 'a'
-        0, 0, 0, 1, 
-        97, 
-        0, 0, 0, 35, 
-      // }
-    // }
-  };
-
-}
-/* 
-sample int_t int_t_s;
-*/
-
-public class int_t_s : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle(int value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(int_t_s);
-    }
-    
-    public String getName() {
-      return "int_t_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(int_t_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int value) {
-    e.begin(typeof(int_t_s));
-    e.encodeInt(value);
-    e.end(typeof(int_t_s));
-  }
-  
-  public static int decode(LabCommDecoder d) {
-    int result;
-    result = d.decodeInt();
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    0, 0, 0, 35, 
-  };
-
-}
-/* 
-sample int_array_t int_array_t_s;
-*/
-
-public class int_array_t_s : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle(int[,][][] value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(int_array_t_s);
-    }
-    
-    public String getName() {
-      return "int_array_t_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(int_array_t_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[,][][] value) {
-    e.begin(typeof(int_array_t_s));
-    int i_0_max = 1;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      int i_1_max = 2;
-      for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-        int i_2_max = 3;
-        int i_3_max = 4;
-        for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-          for (int i_3 = 0 ; i_3 < i_3_max ; i_3++) {
-            e.encodeInt(value[i_0][i_1][i_2, i_3]);
-          }
-        }
-      }
-    }
-    e.end(typeof(int_array_t_s));
-  }
-  
-  public static int[,][][] decode(LabCommDecoder d) {
-    int[,][][] result;
-    {
-      int i_0_max = 1;
-      result = new int[i_0_max]
-      [,][];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        {
-          int i_1_max = 2;
-          result[i_0] = new int[i_1_max]
-          [,];
-          for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-            {
-              int i_2_max = 3;
-              int i_3_max = 4;
-              result[i_0][i_1] = new int[i_2_max, i_3_max]
-              ;
-              for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-                for (int i_3 = 0 ; i_3 < i_3_max ; i_3++) {
-                  result[i_0][i_1][i_2, i_3] = d.decodeInt();
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [1]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 1, 
-      // array [2]
-      0, 0, 0, 16, 
-        0, 0, 0, 1, 
-        0, 0, 0, 2, 
-        // array [3, 4]
-        0, 0, 0, 16, 
-          0, 0, 0, 2, 
-          0, 0, 0, 3, 
-          0, 0, 0, 4, 
-          0, 0, 0, 35, 
-        // }
-      // }
-    // }
-  };
-
-}
-/* 
-sample struct_t struct_t_s;
-*/
-
-public class struct_t_s : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle(struct_t value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(struct_t_s);
-    }
-    
-    public String getName() {
-      return "struct_t_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(struct_t_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, struct_t value) {
-    e.begin(typeof(struct_t_s));
-    struct_t.encode(e, value);
-    e.end(typeof(struct_t_s));
-  }
-  
-  public static struct_t decode(LabCommDecoder d) {
-    struct_t result;
-    result = struct_t.decode(d);
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // struct { 1 fields
-    0, 0, 0, 17, 
-      0, 0, 0, 1, 
-      // int 'a'
-      0, 0, 0, 1, 
-      97, 
-      0, 0, 0, 35, 
-    // }
-  };
-
-}
-/* 
-sample struct_array_t struct_array_t_s;
-*/
-
-public class struct_array_t_s : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle(struct_array_t[] value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(struct_array_t_s);
-    }
-    
-    public String getName() {
-      return "struct_array_t_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(struct_array_t_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, struct_array_t[] value) {
-    e.begin(typeof(struct_array_t_s));
-    struct_array_t.encode(e, value);
-    e.end(typeof(struct_array_t_s));
-  }
-  
-  public static struct_array_t[] decode(LabCommDecoder d) {
-    struct_array_t[] result;
-    result = struct_array_t.decode(d);
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [2]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 2, 
-      // struct { 1 fields
-      0, 0, 0, 17, 
-        0, 0, 0, 1, 
-        // int 'a'
-        0, 0, 0, 1, 
-        97, 
-        0, 0, 0, 35, 
-      // }
-    // }
-  };
-
-}
-/* 
-sample struct_struct_t struct_struct_t_s;
-*/
-
-public class struct_struct_t_s : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle(struct_struct_t value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(struct_struct_t_s);
-    }
-    
-    public String getName() {
-      return "struct_struct_t_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(struct_struct_t_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, struct_struct_t value) {
-    e.begin(typeof(struct_struct_t_s));
-    struct_struct_t.encode(e, value);
-    e.end(typeof(struct_struct_t_s));
-  }
-  
-  public static struct_struct_t decode(LabCommDecoder d) {
-    struct_struct_t result;
-    result = struct_struct_t.decode(d);
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // struct { 1 fields
-    0, 0, 0, 17, 
-      0, 0, 0, 1, 
-      // struct 'a'
-      0, 0, 0, 1, 
-      97, 
-      // struct { 1 fields
-      0, 0, 0, 17, 
-        0, 0, 0, 1, 
-        // int 'a'
-        0, 0, 0, 1, 
-        97, 
-        0, 0, 0, 35, 
-      // }
-    // }
-  };
-
-}
diff --git a/test/gen/csharp/simple.cs b/test/gen/csharp/simple.cs
deleted file mode 100644
index 853d615..0000000
--- a/test/gen/csharp/simple.cs
+++ /dev/null
@@ -1,701 +0,0 @@
-using System;
-using se.lth.control.labcomm;
-/* 
-sample int an_int;
-*/
-
-public class an_int : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle(int value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(an_int);
-    }
-    
-    public String getName() {
-      return "an_int";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(an_int.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int value) {
-    e.begin(typeof(an_int));
-    e.encodeInt(value);
-    e.end(typeof(an_int));
-  }
-  
-  public static int decode(LabCommDecoder d) {
-    int result;
-    result = d.decodeInt();
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    0, 0, 0, 35, 
-  };
-
-}
-/* 
-sample int a_fixed_int_array[2];
-*/
-
-public class a_fixed_int_array : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle(int[] value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(a_fixed_int_array);
-    }
-    
-    public String getName() {
-      return "a_fixed_int_array";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(a_fixed_int_array.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[] value) {
-    e.begin(typeof(a_fixed_int_array));
-    int i_0_max = 2;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      e.encodeInt(value[i_0]);
-    }
-    e.end(typeof(a_fixed_int_array));
-  }
-  
-  public static int[] decode(LabCommDecoder d) {
-    int[] result;
-    {
-      int i_0_max = 2;
-      result = new int[i_0_max]
-      ;
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        result[i_0] = d.decodeInt();
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [2]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 2, 
-      0, 0, 0, 35, 
-    // }
-  };
-
-}
-/* 
-sample int a_fixed_int_multi_array[2, 2, 2];
-*/
-
-public class a_fixed_int_multi_array : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle(int[,,] value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(a_fixed_int_multi_array);
-    }
-    
-    public String getName() {
-      return "a_fixed_int_multi_array";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(a_fixed_int_multi_array.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[,,] value) {
-    e.begin(typeof(a_fixed_int_multi_array));
-    int i_0_max = 2;
-    int i_1_max = 2;
-    int i_2_max = 2;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-        for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-          e.encodeInt(value[i_0, i_1, i_2]);
-        }
-      }
-    }
-    e.end(typeof(a_fixed_int_multi_array));
-  }
-  
-  public static int[,,] decode(LabCommDecoder d) {
-    int[,,] result;
-    {
-      int i_0_max = 2;
-      int i_1_max = 2;
-      int i_2_max = 2;
-      result = new int[i_0_max, i_1_max, i_2_max]
-      ;
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-          for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-            result[i_0, i_1, i_2] = d.decodeInt();
-          }
-        }
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [2, 2, 2]
-    0, 0, 0, 16, 
-      0, 0, 0, 3, 
-      0, 0, 0, 2, 
-      0, 0, 0, 2, 
-      0, 0, 0, 2, 
-      0, 0, 0, 35, 
-    // }
-  };
-
-}
-/* 
-sample int a_fixed_int_array_array_array[2][2][2];
-*/
-
-public class a_fixed_int_array_array_array : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle(int[][][] value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(a_fixed_int_array_array_array);
-    }
-    
-    public String getName() {
-      return "a_fixed_int_array_array_array";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(a_fixed_int_array_array_array.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[][][] value) {
-    e.begin(typeof(a_fixed_int_array_array_array));
-    int i_0_max = 2;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      int i_1_max = 2;
-      for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-        int i_2_max = 2;
-        for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-          e.encodeInt(value[i_0][i_1][i_2]);
-        }
-      }
-    }
-    e.end(typeof(a_fixed_int_array_array_array));
-  }
-  
-  public static int[][][] decode(LabCommDecoder d) {
-    int[][][] result;
-    {
-      int i_0_max = 2;
-      result = new int[i_0_max]
-      [][];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        {
-          int i_1_max = 2;
-          result[i_0] = new int[i_1_max]
-          [];
-          for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-            {
-              int i_2_max = 2;
-              result[i_0][i_1] = new int[i_2_max]
-              ;
-              for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-                result[i_0][i_1][i_2] = d.decodeInt();
-              }
-            }
-          }
-        }
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [2]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 2, 
-      // array [2]
-      0, 0, 0, 16, 
-        0, 0, 0, 1, 
-        0, 0, 0, 2, 
-        // array [2]
-        0, 0, 0, 16, 
-          0, 0, 0, 1, 
-          0, 0, 0, 2, 
-          0, 0, 0, 35, 
-        // }
-      // }
-    // }
-  };
-
-}
-/* 
-sample int a_variable_int_array[_];
-*/
-
-public class a_variable_int_array : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle(int[] value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(a_variable_int_array);
-    }
-    
-    public String getName() {
-      return "a_variable_int_array";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(a_variable_int_array.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[] value) {
-    e.begin(typeof(a_variable_int_array));
-    e.encodeInt(value.GetLength(0));
-    int i_0_max = value.GetLength(0);
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      e.encodeInt(value[i_0]);
-    }
-    e.end(typeof(a_variable_int_array));
-  }
-  
-  public static int[] decode(LabCommDecoder d) {
-    int[] result;
-    {
-      int i_0_max = d.decodeInt();
-      result = new int[i_0_max]
-      ;
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        result[i_0] = d.decodeInt();
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [_]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 0, 
-      0, 0, 0, 35, 
-    // }
-  };
-
-}
-/* 
-sample int a_variable_int_multi_array[_, _, _];
-*/
-
-public class a_variable_int_multi_array : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle(int[,,] value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(a_variable_int_multi_array);
-    }
-    
-    public String getName() {
-      return "a_variable_int_multi_array";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(a_variable_int_multi_array.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[,,] value) {
-    e.begin(typeof(a_variable_int_multi_array));
-    e.encodeInt(value.GetLength(0));
-    int i_0_max = value.GetLength(0);
-    e.encodeInt(value.GetLength(1));
-    int i_1_max = value.GetLength(1);
-    e.encodeInt(value.GetLength(2));
-    int i_2_max = value.GetLength(2);
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-        for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-          e.encodeInt(value[i_0, i_1, i_2]);
-        }
-      }
-    }
-    e.end(typeof(a_variable_int_multi_array));
-  }
-  
-  public static int[,,] decode(LabCommDecoder d) {
-    int[,,] result;
-    {
-      int i_0_max = d.decodeInt();
-      int i_1_max = d.decodeInt();
-      int i_2_max = d.decodeInt();
-      result = new int[i_0_max, i_1_max, i_2_max]
-      ;
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-          for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-            result[i_0, i_1, i_2] = d.decodeInt();
-          }
-        }
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [_, _, _]
-    0, 0, 0, 16, 
-      0, 0, 0, 3, 
-      0, 0, 0, 0, 
-      0, 0, 0, 0, 
-      0, 0, 0, 0, 
-      0, 0, 0, 35, 
-    // }
-  };
-
-}
-/* 
-sample int a_variable_int_array_array_array[_][_][_];
-*/
-
-public class a_variable_int_array_array_array : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle(int[][][] value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(a_variable_int_array_array_array);
-    }
-    
-    public String getName() {
-      return "a_variable_int_array_array_array";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(a_variable_int_array_array_array.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[][][] value) {
-    e.begin(typeof(a_variable_int_array_array_array));
-    e.encodeInt(value.GetLength(0));
-    int i_0_max = value.GetLength(0);
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      e.encodeInt(value[i_0].GetLength(0));
-      int i_1_max = value[i_0].GetLength(0);
-      for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-        e.encodeInt(value[i_0][i_1].GetLength(0));
-        int i_2_max = value[i_0][i_1].GetLength(0);
-        for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-          e.encodeInt(value[i_0][i_1][i_2]);
-        }
-      }
-    }
-    e.end(typeof(a_variable_int_array_array_array));
-  }
-  
-  public static int[][][] decode(LabCommDecoder d) {
-    int[][][] result;
-    {
-      int i_0_max = d.decodeInt();
-      result = new int[i_0_max]
-      [][];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        {
-          int i_1_max = d.decodeInt();
-          result[i_0] = new int[i_1_max]
-          [];
-          for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-            {
-              int i_2_max = d.decodeInt();
-              result[i_0][i_1] = new int[i_2_max]
-              ;
-              for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-                result[i_0][i_1][i_2] = d.decodeInt();
-              }
-            }
-          }
-        }
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [_]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 0, 
-      // array [_]
-      0, 0, 0, 16, 
-        0, 0, 0, 1, 
-        0, 0, 0, 0, 
-        // array [_]
-        0, 0, 0, 16, 
-          0, 0, 0, 1, 
-          0, 0, 0, 0, 
-          0, 0, 0, 35, 
-        // }
-      // }
-    // }
-  };
-
-}
-/* 
-sample struct {
-  int a;
-  int b;
-} an_int_struct;
-*/
-
-public class an_int_struct : LabCommSample {
-
-  public int a;
-  public int b;
-  
-  public interface Handler : LabCommHandler {
-    void handle(an_int_struct value);
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(an_int_struct);
-    }
-    
-    public String getName() {
-      return "an_int_struct";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      ((Handler)h).handle(an_int_struct.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, an_int_struct value) {
-    e.begin(typeof(an_int_struct));
-    e.encodeInt(value.a);
-    e.encodeInt(value.b);
-    e.end(typeof(an_int_struct));
-  }
-  
-  public static an_int_struct decode(LabCommDecoder d) {
-    an_int_struct result;
-    result = new an_int_struct();
-    result.a = d.decodeInt();
-    result.b = d.decodeInt();
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // struct { 2 fields
-    0, 0, 0, 17, 
-      0, 0, 0, 2, 
-      // int 'a'
-      0, 0, 0, 1, 
-      97, 
-      0, 0, 0, 35, 
-      // int 'b'
-      0, 0, 0, 1, 
-      98, 
-      0, 0, 0, 35, 
-    // }
-  };
-
-}
-/* 
-sample void a_void;
-*/
-
-public class a_void : LabCommSample {
-
-  public interface Handler : LabCommHandler {
-    void handle();
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) {
-    e.register(new Dispatcher());
-  }
-  
-  private class Dispatcher : LabCommDispatcher {
-    
-    public Type getSampleClass() {
-      return typeof(a_void);
-    }
-    
-    public String getName() {
-      return "a_void";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d, LabCommHandler h) {
-      a_void.decode(d);
-      ((Handler)h).handle();
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e) {
-    e.begin(typeof(a_void));
-    e.end(typeof(a_void));
-  }
-  
-  public static void decode(LabCommDecoder d) {
-  }
-  
-  private static byte[] signature = new byte[] {
-    // void
-    0, 0, 0, 17, 
-    0, 0, 0, 0, 
-  };
-
-}
diff --git a/test/gen/csharp/test_nested.cs b/test/gen/csharp/test_nested.cs
deleted file mode 100644
index 38858cb..0000000
--- a/test/gen/csharp/test_nested.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-using System;
-using System.IO;
-using se.lth.control.labcomm;
-
-class x :
-struct_array_ss.Handler,
-int_s.Handler,
-int_array_s.Handler,
-struct_s.Handler,
-struct_array_s.Handler,
-struct_struct_s.Handler,
-int_t_s.Handler,
-int_array_t_s.Handler,
-struct_t_s.Handler,
-struct_array_t_s.Handler,
-struct_struct_t_s.Handler
-{
-
-  LabCommEncoderChannel encoder;
-
-  void struct_array_ss.Handler.handle(struct_array_ss[][][] data) {
-    Console.Error.WriteLine("struct_array_ss");
-    struct_array_ss.encode(encoder, data);
-  }
-
-  void int_s.Handler.handle(int data) {
-    Console.Error.WriteLine("int_s");
-    int_s.encode(encoder, data);
-  }
-
-  void int_array_s.Handler.handle(int[][,,][] data) {
-    Console.Error.WriteLine("int_array_s");
-    int_array_s.encode(encoder, data);
-  }
-
-  void struct_s.Handler.handle(struct_s data) {
-    Console.Error.WriteLine("struct_s");
-    struct_s.encode(encoder, data);
-  }
-
-  void struct_array_s.Handler.handle(struct_array_s[] data) {
-    Console.Error.WriteLine("struct_array_s");
-    struct_array_s.encode(encoder, data);
-  }
-
-  void struct_struct_s.Handler.handle(struct_struct_s data) {
-    Console.Error.WriteLine("struct_struct_s");
-    struct_struct_s.encode(encoder, data);
-  }
-
-  void int_t_s.Handler.handle(int data) {
-    Console.Error.WriteLine("int_t_s");
-    int_t_s.encode(encoder, data);
-  }
-
-  void int_array_t_s.Handler.handle(int[,][][] data) {
-    Console.Error.WriteLine("int_array_t_s");
-    int_array_t_s.encode(encoder, data);
-  }
-
-  void struct_t_s.Handler.handle(struct_t data) {
-    Console.Error.WriteLine("struct_t_s");
-    struct_t_s.encode(encoder, data);
-  }
-
-  void struct_array_t_s.Handler.handle(struct_array_t[] data) {
-    Console.Error.WriteLine("struct_array_t_s");
-    struct_array_t_s.encode(encoder, data);
-  }
-
-  void struct_struct_t_s.Handler.handle(struct_struct_t data) {
-    Console.Error.WriteLine("struct_struct_t_s");
-    struct_struct_t_s.encode(encoder, data);
-  }
-
-  public x(String InName, String OutName) {
-    FileStream InFile = new FileStream(InName,
-                                       FileMode.Open, 
-                                       FileAccess.Read);
-    LabCommDecoderChannel d = new LabCommDecoderChannel(InFile);
-    FileStream OutFile = new FileStream(OutName, 
-                                        FileMode.OpenOrCreate, 
-                                        FileAccess.Write);
-    encoder = new LabCommEncoderChannel(OutFile);
-
-    struct_array_ss.register(d, this);
-    int_s.register(d, this);
-    int_array_s.register(d, this);
-    struct_s.register(d, this);
-    struct_array_s.register(d, this);
-    struct_struct_s.register(d, this);
-    int_t_s.register(d, this);
-    int_array_t_s.register(d, this);
-    struct_t_s.register(d, this);
-    struct_array_t_s.register(d, this);
-    struct_struct_t_s.register(d, this);
-
-    struct_array_ss.register(encoder);
-    int_s.register(encoder);
-    int_array_s.register(encoder);
-    struct_s.register(encoder);
-    struct_array_s.register(encoder);
-    struct_struct_s.register(encoder);
-    int_t_s.register(encoder);
-    int_array_t_s.register(encoder);
-    struct_t_s.register(encoder);
-    struct_array_t_s.register(encoder);
-    struct_struct_t_s.register(encoder);
-
-    try {
-      d.run();
-    } catch (EndOfStreamException) {
-    }
-
-  }
-
-  static void Main(String[] arg) {
-    new x(arg[0], arg[1]);
-  }
-
-}
diff --git a/test/gen/csharp/test_simple.cs b/test/gen/csharp/test_simple.cs
deleted file mode 100644
index d127c42..0000000
--- a/test/gen/csharp/test_simple.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-using System;
-using System.IO;
-using se.lth.control.labcomm;
-
-class x :
-an_int.Handler,
-a_fixed_int_array.Handler,
-a_fixed_int_multi_array.Handler,
-a_fixed_int_array_array_array.Handler,
-a_variable_int_array.Handler,
-a_variable_int_multi_array.Handler,
-a_variable_int_array_array_array.Handler,
-an_int_struct.Handler,
-a_void.Handler
-{
-
-  LabCommEncoderChannel encoder;
-
-  void an_int.Handler.handle(int data) {
-    Console.Error.WriteLine("an_int");
-    an_int.encode(encoder, data);
-  }
-
-  void a_fixed_int_array.Handler.handle(int[] data) {
-    Console.Error.WriteLine("a_fixed_int_array");
-    a_fixed_int_array.encode(encoder, data);
-  }
-
-  void a_fixed_int_multi_array.Handler.handle(int[,,] data) {
-    Console.Error.WriteLine("a_fixed_int_multi_array");
-    a_fixed_int_multi_array.encode(encoder, data);
-  }
-
-  void a_fixed_int_array_array_array.Handler.handle(int[][][] data) {
-    Console.Error.WriteLine("a_fixed_int_array_array_array");
-    a_fixed_int_array_array_array.encode(encoder, data);
-  }
-
-  void a_variable_int_array.Handler.handle(int[] data) {
-    Console.Error.WriteLine("a_variable_int_array");
-    a_variable_int_array.encode(encoder, data);
-  }
-
-  void a_variable_int_multi_array.Handler.handle(int[,,] data) {
-    Console.Error.WriteLine("a_variable_int_multi_array");
-    a_variable_int_multi_array.encode(encoder, data);
-  }
-
-  void a_variable_int_array_array_array.Handler.handle(int[][][] data) {
-    Console.Error.WriteLine("a_variable_int_array_array_array");
-    a_variable_int_array_array_array.encode(encoder, data);
-  }
-
-  void an_int_struct.Handler.handle(an_int_struct data) {
-    Console.Error.WriteLine("an_int_struct");
-    an_int_struct.encode(encoder, data);
-  }
-
-  void a_void.Handler.handle() {
-    Console.Error.WriteLine("a_void");
-    a_void.encode(encoder);
-  }
-
-  public x(String InName, String OutName) {
-    FileStream InFile = new FileStream(InName,
-                                       FileMode.Open, 
-                                       FileAccess.Read);
-    LabCommDecoderChannel d = new LabCommDecoderChannel(InFile);
-    FileStream OutFile = new FileStream(OutName, 
-                                        FileMode.OpenOrCreate, 
-                                        FileAccess.Write);
-    encoder = new LabCommEncoderChannel(OutFile);
-
-    an_int.register(d, this);
-    a_fixed_int_array.register(d, this);
-    a_fixed_int_multi_array.register(d, this);
-    a_fixed_int_array_array_array.register(d, this);
-    a_variable_int_array.register(d, this);
-    a_variable_int_multi_array.register(d, this);
-    a_variable_int_array_array_array.register(d, this);
-    an_int_struct.register(d, this);
-    a_void.register(d, this);
-
-    an_int.register(encoder);
-    a_fixed_int_array.register(encoder);
-    a_fixed_int_multi_array.register(encoder);
-    a_fixed_int_array_array_array.register(encoder);
-    a_variable_int_array.register(encoder);
-    a_variable_int_multi_array.register(encoder);
-    a_variable_int_array_array_array.register(encoder);
-    an_int_struct.register(encoder);
-    a_void.register(encoder);
-
-    try {
-      d.run();
-    } catch (EndOfStreamException) {
-    }
-
-  }
-
-  static void Main(String[] arg) {
-    new x(arg[0], arg[1]);
-  }
-
-}
diff --git a/test/gen/java/nested/int_array_s.java b/test/gen/java/nested/int_array_s.java
deleted file mode 100644
index 851b1b5..0000000
--- a/test/gen/java/nested/int_array_s.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/* 
-sample int int_array_s[1][_, 3, _][5];
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class int_array_s implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_int_array_s(int[][][][][] value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return int_array_s.class;
-    }
-    
-    public String getName() {
-      return "int_array_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_int_array_s(int_array_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[][][][][] value) throws IOException {
-    e.begin(int_array_s.class);
-    int i_0_max = 1;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      e.encodeInt(value[i_0].length);
-      int i_1_max = value[i_0].length;
-      int i_2_max = 3;
-      e.encodeInt(value[i_0][0][0].length);
-      int i_3_max = value[i_0][0][0].length;
-      for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-        for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-          for (int i_3 = 0 ; i_3 < i_3_max ; i_3++) {
-            int i_4_max = 5;
-            for (int i_4 = 0 ; i_4 < i_4_max ; i_4++) {
-              e.encodeInt(value[i_0][i_1][i_2][i_3][i_4]);
-            }
-          }
-        }
-      }
-    }
-    e.end(int_array_s.class);
-  }
-  
-  public static int[][][][][] decode(LabCommDecoder d) throws IOException {
-    int[][][][][] result;
-    {
-      int i_0_max = 1;
-      result = new int[i_0_max][][][][];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        {
-          int i_1_max = d.decodeInt();
-          int i_2_max = 3;
-          int i_3_max = d.decodeInt();
-          result[i_0] = new int[i_1_max][][][];
-          for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-            result[i_0][i_1] = new int[i_2_max][][];
-            for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-              result[i_0][i_1][i_2] = new int[i_3_max][];
-              for (int i_3 = 0 ; i_3 < i_3_max ; i_3++) {
-                {
-                  int i_4_max = 5;
-                  result[i_0][i_1][i_2][i_3] = new int[i_4_max];
-                  for (int i_4 = 0 ; i_4 < i_4_max ; i_4++) {
-                    result[i_0][i_1][i_2][i_3][i_4] = d.decodeInt();
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [1]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 1, 
-      // array [_, 3, _]
-      0, 0, 0, 16, 
-        0, 0, 0, 3, 
-        0, 0, 0, 0, 
-        0, 0, 0, 3, 
-        0, 0, 0, 0, 
-        // array [5]
-        0, 0, 0, 16, 
-          0, 0, 0, 1, 
-          0, 0, 0, 5, 
-          0, 0, 0, 35, 
-        // }
-      // }
-    // }
-  };
-
-}
diff --git a/test/gen/java/nested/int_array_t_s.java b/test/gen/java/nested/int_array_t_s.java
deleted file mode 100644
index 707cc77..0000000
--- a/test/gen/java/nested/int_array_t_s.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/* 
-sample int_array_t int_array_t_s;
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class int_array_t_s implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_int_array_t_s(int[][][][] value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return int_array_t_s.class;
-    }
-    
-    public String getName() {
-      return "int_array_t_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_int_array_t_s(int_array_t_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[][][][] value) throws IOException {
-    e.begin(int_array_t_s.class);
-    int i_0_max = 1;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      int i_1_max = 2;
-      for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-        int i_2_max = 3;
-        int i_3_max = 4;
-        for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-          for (int i_3 = 0 ; i_3 < i_3_max ; i_3++) {
-            e.encodeInt(value[i_0][i_1][i_2][i_3]);
-          }
-        }
-      }
-    }
-    e.end(int_array_t_s.class);
-  }
-  
-  public static int[][][][] decode(LabCommDecoder d) throws IOException {
-    int[][][][] result;
-    {
-      int i_0_max = 1;
-      result = new int[i_0_max][][][];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        {
-          int i_1_max = 2;
-          result[i_0] = new int[i_1_max][][];
-          for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-            {
-              int i_2_max = 3;
-              int i_3_max = 4;
-              result[i_0][i_1] = new int[i_2_max][];
-              for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-                result[i_0][i_1][i_2] = new int[i_3_max];
-                for (int i_3 = 0 ; i_3 < i_3_max ; i_3++) {
-                  result[i_0][i_1][i_2][i_3] = d.decodeInt();
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [1]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 1, 
-      // array [2]
-      0, 0, 0, 16, 
-        0, 0, 0, 1, 
-        0, 0, 0, 2, 
-        // array [3, 4]
-        0, 0, 0, 16, 
-          0, 0, 0, 2, 
-          0, 0, 0, 3, 
-          0, 0, 0, 4, 
-          0, 0, 0, 35, 
-        // }
-      // }
-    // }
-  };
-
-}
diff --git a/test/gen/java/nested/int_s.java b/test/gen/java/nested/int_s.java
deleted file mode 100644
index f6d7379..0000000
--- a/test/gen/java/nested/int_s.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/* 
-sample int int_s;
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class int_s implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_int_s(int value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return int_s.class;
-    }
-    
-    public String getName() {
-      return "int_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_int_s(int_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int value) throws IOException {
-    e.begin(int_s.class);
-    e.encodeInt(value);
-    e.end(int_s.class);
-  }
-  
-  public static int decode(LabCommDecoder d) throws IOException {
-    int result;
-    result = d.decodeInt();
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    0, 0, 0, 35, 
-  };
-
-}
diff --git a/test/gen/java/nested/int_t_s.java b/test/gen/java/nested/int_t_s.java
deleted file mode 100644
index 206cb7a..0000000
--- a/test/gen/java/nested/int_t_s.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/* 
-sample int_t int_t_s;
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class int_t_s implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_int_t_s(int value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return int_t_s.class;
-    }
-    
-    public String getName() {
-      return "int_t_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_int_t_s(int_t_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int value) throws IOException {
-    e.begin(int_t_s.class);
-    e.encodeInt(value);
-    e.end(int_t_s.class);
-  }
-  
-  public static int decode(LabCommDecoder d) throws IOException {
-    int result;
-    result = d.decodeInt();
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    0, 0, 0, 35, 
-  };
-
-}
diff --git a/test/gen/java/nested/struct_array_s.java b/test/gen/java/nested/struct_array_s.java
deleted file mode 100644
index 41379c9..0000000
--- a/test/gen/java/nested/struct_array_s.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/* 
-sample struct {
-  int a;
-} struct_array_s[2];
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class struct_array_s implements LabCommSample {
-
-  public int a;
-  
-  public interface Handler extends LabCommHandler {
-    public void handle_struct_array_s(struct_array_s[] value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return struct_array_s.class;
-    }
-    
-    public String getName() {
-      return "struct_array_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_struct_array_s(struct_array_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, struct_array_s[] value) throws IOException {
-    e.begin(struct_array_s.class);
-    int i_0_max = 2;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      e.encodeInt(value[i_0].a);
-    }
-    e.end(struct_array_s.class);
-  }
-  
-  public static struct_array_s[] decode(LabCommDecoder d) throws IOException {
-    struct_array_s[] result;
-    {
-      int i_0_max = 2;
-      result = new struct_array_s[i_0_max];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        result[i_0] = new struct_array_s();
-        result[i_0].a = d.decodeInt();
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [2]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 2, 
-      // struct { 1 fields
-      0, 0, 0, 17, 
-        0, 0, 0, 1, 
-        // int 'a'
-        0, 0, 0, 1, 
-        97, 
-        0, 0, 0, 35, 
-      // }
-    // }
-  };
-
-}
diff --git a/test/gen/java/nested/struct_array_ss.java b/test/gen/java/nested/struct_array_ss.java
deleted file mode 100644
index 37c4304..0000000
--- a/test/gen/java/nested/struct_array_ss.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/* 
-sample struct {
-  int aa;
-  boolean bb;
-  int_array_ss ias;
-} struct_array_ss[1][_][_];
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class struct_array_ss implements LabCommSample {
-
-  public int aa;
-  public boolean bb;
-  public int[][][][][] ias;
-  
-  public interface Handler extends LabCommHandler {
-    public void handle_struct_array_ss(struct_array_ss[][][] value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return struct_array_ss.class;
-    }
-    
-    public String getName() {
-      return "struct_array_ss";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_struct_array_ss(struct_array_ss.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, struct_array_ss[][][] value) throws IOException {
-    e.begin(struct_array_ss.class);
-    int i_0_max = 1;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      e.encodeInt(value[i_0].length);
-      int i_1_max = value[i_0].length;
-      for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-        e.encodeInt(value[i_0][i_1].length);
-        int i_2_max = value[i_0][i_1].length;
-        for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-          e.encodeInt(value[i_0][i_1][i_2].aa);
-          e.encodeBoolean(value[i_0][i_1][i_2].bb);
-          int i_3_max = 1;
-          for (int i_3 = 0 ; i_3 < i_3_max ; i_3++) {
-            e.encodeInt(value[i_0][i_1][i_2].ias[i_3].length);
-            int i_4_max = value[i_0][i_1][i_2].ias[i_3].length;
-            int i_5_max = 3;
-            e.encodeInt(value[i_0][i_1][i_2].ias[i_3][0][0].length);
-            int i_6_max = value[i_0][i_1][i_2].ias[i_3][0][0].length;
-            for (int i_4 = 0 ; i_4 < i_4_max ; i_4++) {
-              for (int i_5 = 0 ; i_5 < i_5_max ; i_5++) {
-                for (int i_6 = 0 ; i_6 < i_6_max ; i_6++) {
-                  int i_7_max = 5;
-                  for (int i_7 = 0 ; i_7 < i_7_max ; i_7++) {
-                    e.encodeInt(value[i_0][i_1][i_2].ias[i_3][i_4][i_5][i_6][i_7]);
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-    e.end(struct_array_ss.class);
-  }
-  
-  public static struct_array_ss[][][] decode(LabCommDecoder d) throws IOException {
-    struct_array_ss[][][] result;
-    {
-      int i_0_max = 1;
-      result = new struct_array_ss[i_0_max][][];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        {
-          int i_1_max = d.decodeInt();
-          result[i_0] = new struct_array_ss[i_1_max][];
-          for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-            {
-              int i_2_max = d.decodeInt();
-              result[i_0][i_1] = new struct_array_ss[i_2_max];
-              for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-                result[i_0][i_1][i_2] = new struct_array_ss();
-                result[i_0][i_1][i_2].aa = d.decodeInt();
-                result[i_0][i_1][i_2].bb = d.decodeBoolean();
-                {
-                  int i_3_max = 1;
-                  result[i_0][i_1][i_2].ias = new int[i_3_max][][][][];
-                  for (int i_3 = 0 ; i_3 < i_3_max ; i_3++) {
-                    {
-                      int i_4_max = d.decodeInt();
-                      int i_5_max = 3;
-                      int i_6_max = d.decodeInt();
-                      result[i_0][i_1][i_2].ias[i_3] = new int[i_4_max][][][];
-                      for (int i_4 = 0 ; i_4 < i_4_max ; i_4++) {
-                        result[i_0][i_1][i_2].ias[i_3][i_4] = new int[i_5_max][][];
-                        for (int i_5 = 0 ; i_5 < i_5_max ; i_5++) {
-                          result[i_0][i_1][i_2].ias[i_3][i_4][i_5] = new int[i_6_max][];
-                          for (int i_6 = 0 ; i_6 < i_6_max ; i_6++) {
-                            {
-                              int i_7_max = 5;
-                              result[i_0][i_1][i_2].ias[i_3][i_4][i_5][i_6] = new int[i_7_max];
-                              for (int i_7 = 0 ; i_7 < i_7_max ; i_7++) {
-                                result[i_0][i_1][i_2].ias[i_3][i_4][i_5][i_6][i_7] = d.decodeInt();
-                              }
-                            }
-                          }
-                        }
-                      }
-                    }
-                  }
-                }
-              }
-            }
-          }
-        }
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [1]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 1, 
-      // array [_]
-      0, 0, 0, 16, 
-        0, 0, 0, 1, 
-        0, 0, 0, 0, 
-        // array [_]
-        0, 0, 0, 16, 
-          0, 0, 0, 1, 
-          0, 0, 0, 0, 
-          // struct { 3 fields
-          0, 0, 0, 17, 
-            0, 0, 0, 3, 
-            // int 'aa'
-            0, 0, 0, 2, 
-            97, 97, 
-            0, 0, 0, 35, 
-            // boolean 'bb'
-            0, 0, 0, 2, 
-            98, 98, 
-            0, 0, 0, 32, 
-            // int_array_ss 'ias'
-            0, 0, 0, 3, 
-            105, 97, 115, 
-            // array [1]
-            0, 0, 0, 16, 
-              0, 0, 0, 1, 
-              0, 0, 0, 1, 
-              // array [_, 3, _]
-              0, 0, 0, 16, 
-                0, 0, 0, 3, 
-                0, 0, 0, 0, 
-                0, 0, 0, 3, 
-                0, 0, 0, 0, 
-                // array [5]
-                0, 0, 0, 16, 
-                  0, 0, 0, 1, 
-                  0, 0, 0, 5, 
-                  0, 0, 0, 35, 
-                // }
-              // }
-            // }
-          // }
-        // }
-      // }
-    // }
-  };
-
-}
diff --git a/test/gen/java/nested/struct_array_t.java b/test/gen/java/nested/struct_array_t.java
deleted file mode 100644
index ba0364a..0000000
--- a/test/gen/java/nested/struct_array_t.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/* 
-typedef struct {
-  int a;
-} struct_array_t[2];
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommType;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommDecoder;
-
-public class struct_array_t implements LabCommType {
-
-  public int a;
-  
-  public static void encode(LabCommEncoder e, struct_array_t[] value) throws IOException {
-    int i_0_max = 2;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      e.encodeInt(value[i_0].a);
-    }
-  }
-  
-  public static struct_array_t[] decode(LabCommDecoder d) throws IOException {
-    struct_array_t[] result;
-    {
-      int i_0_max = 2;
-      result = new struct_array_t[i_0_max];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        result[i_0] = new struct_array_t();
-        result[i_0].a = d.decodeInt();
-      }
-    }
-    return result;
-  }
-  
-}
diff --git a/test/gen/java/nested/struct_array_t_s.java b/test/gen/java/nested/struct_array_t_s.java
deleted file mode 100644
index cab63bb..0000000
--- a/test/gen/java/nested/struct_array_t_s.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/* 
-sample struct_array_t struct_array_t_s;
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class struct_array_t_s implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_struct_array_t_s(struct_array_t[] value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return struct_array_t_s.class;
-    }
-    
-    public String getName() {
-      return "struct_array_t_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_struct_array_t_s(struct_array_t_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, struct_array_t[] value) throws IOException {
-    e.begin(struct_array_t_s.class);
-    struct_array_t.encode(e, value);
-    e.end(struct_array_t_s.class);
-  }
-  
-  public static struct_array_t[] decode(LabCommDecoder d) throws IOException {
-    struct_array_t[] result;
-    result = struct_array_t.decode(d);
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [2]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 2, 
-      // struct { 1 fields
-      0, 0, 0, 17, 
-        0, 0, 0, 1, 
-        // int 'a'
-        0, 0, 0, 1, 
-        97, 
-        0, 0, 0, 35, 
-      // }
-    // }
-  };
-
-}
diff --git a/test/gen/java/nested/struct_s.java b/test/gen/java/nested/struct_s.java
deleted file mode 100644
index c7879c0..0000000
--- a/test/gen/java/nested/struct_s.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/* 
-sample struct {
-  int a;
-  double bcd;
-} struct_s;
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class struct_s implements LabCommSample {
-
-  public int a;
-  public double bcd;
-  
-  public interface Handler extends LabCommHandler {
-    public void handle_struct_s(struct_s value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return struct_s.class;
-    }
-    
-    public String getName() {
-      return "struct_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_struct_s(struct_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, struct_s value) throws IOException {
-    e.begin(struct_s.class);
-    e.encodeInt(value.a);
-    e.encodeDouble(value.bcd);
-    e.end(struct_s.class);
-  }
-  
-  public static struct_s decode(LabCommDecoder d) throws IOException {
-    struct_s result;
-    result = new struct_s();
-    result.a = d.decodeInt();
-    result.bcd = d.decodeDouble();
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // struct { 2 fields
-    0, 0, 0, 17, 
-      0, 0, 0, 2, 
-      // int 'a'
-      0, 0, 0, 1, 
-      97, 
-      0, 0, 0, 35, 
-      // double 'bcd'
-      0, 0, 0, 3, 
-      98, 99, 100, 
-      0, 0, 0, 38, 
-    // }
-  };
-
-}
diff --git a/test/gen/java/nested/struct_struct_s.java b/test/gen/java/nested/struct_struct_s.java
deleted file mode 100644
index 8f6e30d..0000000
--- a/test/gen/java/nested/struct_struct_s.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/* 
-sample struct {
-  struct {
-    int a;
-  } a;
-} struct_struct_s;
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class struct_struct_s implements LabCommSample {
-
-  public static class struct_a {
-    public int a;
-  }
-  
-  public struct_a a;
-  
-  public interface Handler extends LabCommHandler {
-    public void handle_struct_struct_s(struct_struct_s value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return struct_struct_s.class;
-    }
-    
-    public String getName() {
-      return "struct_struct_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_struct_struct_s(struct_struct_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, struct_struct_s value) throws IOException {
-    e.begin(struct_struct_s.class);
-    e.encodeInt(value.a.a);
-    e.end(struct_struct_s.class);
-  }
-  
-  public static struct_struct_s decode(LabCommDecoder d) throws IOException {
-    struct_struct_s result;
-    result = new struct_struct_s();
-    result.a = new struct_a();
-    result.a.a = d.decodeInt();
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // struct { 1 fields
-    0, 0, 0, 17, 
-      0, 0, 0, 1, 
-      // struct 'a'
-      0, 0, 0, 1, 
-      97, 
-      // struct { 1 fields
-      0, 0, 0, 17, 
-        0, 0, 0, 1, 
-        // int 'a'
-        0, 0, 0, 1, 
-        97, 
-        0, 0, 0, 35, 
-      // }
-    // }
-  };
-
-}
diff --git a/test/gen/java/nested/struct_struct_t.java b/test/gen/java/nested/struct_struct_t.java
deleted file mode 100644
index 7864d86..0000000
--- a/test/gen/java/nested/struct_struct_t.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/* 
-typedef struct {
-  struct {
-    int a;
-  } a;
-} struct_struct_t;
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommType;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommDecoder;
-
-public class struct_struct_t implements LabCommType {
-
-  public static class struct_a {
-    public int a;
-  }
-  
-  public struct_a a;
-  
-  public static void encode(LabCommEncoder e, struct_struct_t value) throws IOException {
-    e.encodeInt(value.a.a);
-  }
-  
-  public static struct_struct_t decode(LabCommDecoder d) throws IOException {
-    struct_struct_t result;
-    result = new struct_struct_t();
-    result.a = new struct_a();
-    result.a.a = d.decodeInt();
-    return result;
-  }
-  
-}
diff --git a/test/gen/java/nested/struct_struct_t_s.java b/test/gen/java/nested/struct_struct_t_s.java
deleted file mode 100644
index 9a241c8..0000000
--- a/test/gen/java/nested/struct_struct_t_s.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/* 
-sample struct_struct_t struct_struct_t_s;
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class struct_struct_t_s implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_struct_struct_t_s(struct_struct_t value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return struct_struct_t_s.class;
-    }
-    
-    public String getName() {
-      return "struct_struct_t_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_struct_struct_t_s(struct_struct_t_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, struct_struct_t value) throws IOException {
-    e.begin(struct_struct_t_s.class);
-    struct_struct_t.encode(e, value);
-    e.end(struct_struct_t_s.class);
-  }
-  
-  public static struct_struct_t decode(LabCommDecoder d) throws IOException {
-    struct_struct_t result;
-    result = struct_struct_t.decode(d);
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // struct { 1 fields
-    0, 0, 0, 17, 
-      0, 0, 0, 1, 
-      // struct 'a'
-      0, 0, 0, 1, 
-      97, 
-      // struct { 1 fields
-      0, 0, 0, 17, 
-        0, 0, 0, 1, 
-        // int 'a'
-        0, 0, 0, 1, 
-        97, 
-        0, 0, 0, 35, 
-      // }
-    // }
-  };
-
-}
diff --git a/test/gen/java/nested/struct_t.java b/test/gen/java/nested/struct_t.java
deleted file mode 100644
index a248887..0000000
--- a/test/gen/java/nested/struct_t.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/* 
-typedef struct {
-  int a;
-} struct_t;
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommType;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommDecoder;
-
-public class struct_t implements LabCommType {
-
-  public int a;
-  
-  public static void encode(LabCommEncoder e, struct_t value) throws IOException {
-    e.encodeInt(value.a);
-  }
-  
-  public static struct_t decode(LabCommDecoder d) throws IOException {
-    struct_t result;
-    result = new struct_t();
-    result.a = d.decodeInt();
-    return result;
-  }
-  
-}
diff --git a/test/gen/java/nested/struct_t_s.java b/test/gen/java/nested/struct_t_s.java
deleted file mode 100644
index f2a6932..0000000
--- a/test/gen/java/nested/struct_t_s.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/* 
-sample struct_t struct_t_s;
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class struct_t_s implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_struct_t_s(struct_t value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return struct_t_s.class;
-    }
-    
-    public String getName() {
-      return "struct_t_s";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_struct_t_s(struct_t_s.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, struct_t value) throws IOException {
-    e.begin(struct_t_s.class);
-    struct_t.encode(e, value);
-    e.end(struct_t_s.class);
-  }
-  
-  public static struct_t decode(LabCommDecoder d) throws IOException {
-    struct_t result;
-    result = struct_t.decode(d);
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // struct { 1 fields
-    0, 0, 0, 17, 
-      0, 0, 0, 1, 
-      // int 'a'
-      0, 0, 0, 1, 
-      97, 
-      0, 0, 0, 35, 
-    // }
-  };
-
-}
diff --git a/test/gen/java/simple/a_fixed_int_array.java b/test/gen/java/simple/a_fixed_int_array.java
deleted file mode 100644
index 510e3d7..0000000
--- a/test/gen/java/simple/a_fixed_int_array.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/* 
-sample int a_fixed_int_array[2];
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class a_fixed_int_array implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_a_fixed_int_array(int[] value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return a_fixed_int_array.class;
-    }
-    
-    public String getName() {
-      return "a_fixed_int_array";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_a_fixed_int_array(a_fixed_int_array.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[] value) throws IOException {
-    e.begin(a_fixed_int_array.class);
-    int i_0_max = 2;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      e.encodeInt(value[i_0]);
-    }
-    e.end(a_fixed_int_array.class);
-  }
-  
-  public static int[] decode(LabCommDecoder d) throws IOException {
-    int[] result;
-    {
-      int i_0_max = 2;
-      result = new int[i_0_max];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        result[i_0] = d.decodeInt();
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [2]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 2, 
-      0, 0, 0, 35, 
-    // }
-  };
-
-}
diff --git a/test/gen/java/simple/a_fixed_int_array_array_array.java b/test/gen/java/simple/a_fixed_int_array_array_array.java
deleted file mode 100644
index 979184f..0000000
--- a/test/gen/java/simple/a_fixed_int_array_array_array.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/* 
-sample int a_fixed_int_array_array_array[2][2][2];
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class a_fixed_int_array_array_array implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_a_fixed_int_array_array_array(int[][][] value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return a_fixed_int_array_array_array.class;
-    }
-    
-    public String getName() {
-      return "a_fixed_int_array_array_array";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_a_fixed_int_array_array_array(a_fixed_int_array_array_array.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[][][] value) throws IOException {
-    e.begin(a_fixed_int_array_array_array.class);
-    int i_0_max = 2;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      int i_1_max = 2;
-      for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-        int i_2_max = 2;
-        for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-          e.encodeInt(value[i_0][i_1][i_2]);
-        }
-      }
-    }
-    e.end(a_fixed_int_array_array_array.class);
-  }
-  
-  public static int[][][] decode(LabCommDecoder d) throws IOException {
-    int[][][] result;
-    {
-      int i_0_max = 2;
-      result = new int[i_0_max][][];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        {
-          int i_1_max = 2;
-          result[i_0] = new int[i_1_max][];
-          for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-            {
-              int i_2_max = 2;
-              result[i_0][i_1] = new int[i_2_max];
-              for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-                result[i_0][i_1][i_2] = d.decodeInt();
-              }
-            }
-          }
-        }
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [2]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 2, 
-      // array [2]
-      0, 0, 0, 16, 
-        0, 0, 0, 1, 
-        0, 0, 0, 2, 
-        // array [2]
-        0, 0, 0, 16, 
-          0, 0, 0, 1, 
-          0, 0, 0, 2, 
-          0, 0, 0, 35, 
-        // }
-      // }
-    // }
-  };
-
-}
diff --git a/test/gen/java/simple/a_fixed_int_multi_array.java b/test/gen/java/simple/a_fixed_int_multi_array.java
deleted file mode 100644
index d0f53eb..0000000
--- a/test/gen/java/simple/a_fixed_int_multi_array.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/* 
-sample int a_fixed_int_multi_array[2, 2, 2];
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class a_fixed_int_multi_array implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_a_fixed_int_multi_array(int[][][] value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return a_fixed_int_multi_array.class;
-    }
-    
-    public String getName() {
-      return "a_fixed_int_multi_array";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_a_fixed_int_multi_array(a_fixed_int_multi_array.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[][][] value) throws IOException {
-    e.begin(a_fixed_int_multi_array.class);
-    int i_0_max = 2;
-    int i_1_max = 2;
-    int i_2_max = 2;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-        for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-          e.encodeInt(value[i_0][i_1][i_2]);
-        }
-      }
-    }
-    e.end(a_fixed_int_multi_array.class);
-  }
-  
-  public static int[][][] decode(LabCommDecoder d) throws IOException {
-    int[][][] result;
-    {
-      int i_0_max = 2;
-      int i_1_max = 2;
-      int i_2_max = 2;
-      result = new int[i_0_max][][];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        result[i_0] = new int[i_1_max][];
-        for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-          result[i_0][i_1] = new int[i_2_max];
-          for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-            result[i_0][i_1][i_2] = d.decodeInt();
-          }
-        }
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [2, 2, 2]
-    0, 0, 0, 16, 
-      0, 0, 0, 3, 
-      0, 0, 0, 2, 
-      0, 0, 0, 2, 
-      0, 0, 0, 2, 
-      0, 0, 0, 35, 
-    // }
-  };
-
-}
diff --git a/test/gen/java/simple/a_variable_int_array.java b/test/gen/java/simple/a_variable_int_array.java
deleted file mode 100644
index df4df75..0000000
--- a/test/gen/java/simple/a_variable_int_array.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/* 
-sample int a_variable_int_array[_];
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class a_variable_int_array implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_a_variable_int_array(int[] value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return a_variable_int_array.class;
-    }
-    
-    public String getName() {
-      return "a_variable_int_array";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_a_variable_int_array(a_variable_int_array.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[] value) throws IOException {
-    e.begin(a_variable_int_array.class);
-    e.encodeInt(value.length);
-    int i_0_max = value.length;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      e.encodeInt(value[i_0]);
-    }
-    e.end(a_variable_int_array.class);
-  }
-  
-  public static int[] decode(LabCommDecoder d) throws IOException {
-    int[] result;
-    {
-      int i_0_max = d.decodeInt();
-      result = new int[i_0_max];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        result[i_0] = d.decodeInt();
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [_]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 0, 
-      0, 0, 0, 35, 
-    // }
-  };
-
-}
diff --git a/test/gen/java/simple/a_variable_int_array_array_array.java b/test/gen/java/simple/a_variable_int_array_array_array.java
deleted file mode 100644
index c3ae12d..0000000
--- a/test/gen/java/simple/a_variable_int_array_array_array.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/* 
-sample int a_variable_int_array_array_array[_][_][_];
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class a_variable_int_array_array_array implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_a_variable_int_array_array_array(int[][][] value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return a_variable_int_array_array_array.class;
-    }
-    
-    public String getName() {
-      return "a_variable_int_array_array_array";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_a_variable_int_array_array_array(a_variable_int_array_array_array.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[][][] value) throws IOException {
-    e.begin(a_variable_int_array_array_array.class);
-    e.encodeInt(value.length);
-    int i_0_max = value.length;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      e.encodeInt(value[i_0].length);
-      int i_1_max = value[i_0].length;
-      for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-        e.encodeInt(value[i_0][i_1].length);
-        int i_2_max = value[i_0][i_1].length;
-        for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-          e.encodeInt(value[i_0][i_1][i_2]);
-        }
-      }
-    }
-    e.end(a_variable_int_array_array_array.class);
-  }
-  
-  public static int[][][] decode(LabCommDecoder d) throws IOException {
-    int[][][] result;
-    {
-      int i_0_max = d.decodeInt();
-      result = new int[i_0_max][][];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        {
-          int i_1_max = d.decodeInt();
-          result[i_0] = new int[i_1_max][];
-          for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-            {
-              int i_2_max = d.decodeInt();
-              result[i_0][i_1] = new int[i_2_max];
-              for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-                result[i_0][i_1][i_2] = d.decodeInt();
-              }
-            }
-          }
-        }
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [_]
-    0, 0, 0, 16, 
-      0, 0, 0, 1, 
-      0, 0, 0, 0, 
-      // array [_]
-      0, 0, 0, 16, 
-        0, 0, 0, 1, 
-        0, 0, 0, 0, 
-        // array [_]
-        0, 0, 0, 16, 
-          0, 0, 0, 1, 
-          0, 0, 0, 0, 
-          0, 0, 0, 35, 
-        // }
-      // }
-    // }
-  };
-
-}
diff --git a/test/gen/java/simple/a_variable_int_multi_array.java b/test/gen/java/simple/a_variable_int_multi_array.java
deleted file mode 100644
index e599fa0..0000000
--- a/test/gen/java/simple/a_variable_int_multi_array.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/* 
-sample int a_variable_int_multi_array[_, _, _];
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class a_variable_int_multi_array implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_a_variable_int_multi_array(int[][][] value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return a_variable_int_multi_array.class;
-    }
-    
-    public String getName() {
-      return "a_variable_int_multi_array";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_a_variable_int_multi_array(a_variable_int_multi_array.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int[][][] value) throws IOException {
-    e.begin(a_variable_int_multi_array.class);
-    e.encodeInt(value.length);
-    int i_0_max = value.length;
-    e.encodeInt(value[0].length);
-    int i_1_max = value[0].length;
-    e.encodeInt(value[0][0].length);
-    int i_2_max = value[0][0].length;
-    for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-      for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-        for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-          e.encodeInt(value[i_0][i_1][i_2]);
-        }
-      }
-    }
-    e.end(a_variable_int_multi_array.class);
-  }
-  
-  public static int[][][] decode(LabCommDecoder d) throws IOException {
-    int[][][] result;
-    {
-      int i_0_max = d.decodeInt();
-      int i_1_max = d.decodeInt();
-      int i_2_max = d.decodeInt();
-      result = new int[i_0_max][][];
-      for (int i_0 = 0 ; i_0 < i_0_max ; i_0++) {
-        result[i_0] = new int[i_1_max][];
-        for (int i_1 = 0 ; i_1 < i_1_max ; i_1++) {
-          result[i_0][i_1] = new int[i_2_max];
-          for (int i_2 = 0 ; i_2 < i_2_max ; i_2++) {
-            result[i_0][i_1][i_2] = d.decodeInt();
-          }
-        }
-      }
-    }
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // array [_, _, _]
-    0, 0, 0, 16, 
-      0, 0, 0, 3, 
-      0, 0, 0, 0, 
-      0, 0, 0, 0, 
-      0, 0, 0, 0, 
-      0, 0, 0, 35, 
-    // }
-  };
-
-}
diff --git a/test/gen/java/simple/a_void.java b/test/gen/java/simple/a_void.java
deleted file mode 100644
index 5c21ae4..0000000
--- a/test/gen/java/simple/a_void.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/* 
-sample void a_void;
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class a_void implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_a_void() throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return a_void.class;
-    }
-    
-    public String getName() {
-      return "a_void";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      a_void.decode(d);
-      ((Handler)h).handle_a_void();
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e) throws IOException {
-    e.begin(a_void.class);
-    e.end(a_void.class);
-  }
-  
-  public static void decode(LabCommDecoder d) throws IOException {
-  }
-  
-  private static byte[] signature = new byte[] {
-    // void
-    0, 0, 0, 17, 
-    0, 0, 0, 0, 
-  };
-
-}
diff --git a/test/gen/java/simple/an_int.java b/test/gen/java/simple/an_int.java
deleted file mode 100644
index 417cb0c..0000000
--- a/test/gen/java/simple/an_int.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/* 
-sample int an_int;
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class an_int implements LabCommSample {
-
-  public interface Handler extends LabCommHandler {
-    public void handle_an_int(int value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return an_int.class;
-    }
-    
-    public String getName() {
-      return "an_int";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_an_int(an_int.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, int value) throws IOException {
-    e.begin(an_int.class);
-    e.encodeInt(value);
-    e.end(an_int.class);
-  }
-  
-  public static int decode(LabCommDecoder d) throws IOException {
-    int result;
-    result = d.decodeInt();
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    0, 0, 0, 35, 
-  };
-
-}
diff --git a/test/gen/java/simple/an_int_struct.java b/test/gen/java/simple/an_int_struct.java
deleted file mode 100644
index 9da7ebe..0000000
--- a/test/gen/java/simple/an_int_struct.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/* 
-sample struct {
-  int a;
-  int b;
-} an_int_struct;
-*/
-import java.io.IOException;
-import se.lth.control.labcomm.LabCommDecoder;
-import se.lth.control.labcomm.LabCommDispatcher;
-import se.lth.control.labcomm.LabCommEncoder;
-import se.lth.control.labcomm.LabCommHandler;
-import se.lth.control.labcomm.LabCommSample;
-
-public class an_int_struct implements LabCommSample {
-
-  public int a;
-  public int b;
-  
-  public interface Handler extends LabCommHandler {
-    public void handle_an_int_struct(an_int_struct value) throws Exception;
-  }
-  
-  public static void register(LabCommDecoder d, Handler h) throws IOException {
-    d.register(new Dispatcher(), h);
-  }
-  
-  public static void register(LabCommEncoder e) throws IOException {
-    e.register(new Dispatcher());
-  }
-  
-  private static class Dispatcher implements LabCommDispatcher {
-    
-    public Class getSampleClass() {
-      return an_int_struct.class;
-    }
-    
-    public String getName() {
-      return "an_int_struct";
-    }
-    
-    public byte[] getSignature() {
-      return signature;
-    }
-    
-    public void decodeAndHandle(LabCommDecoder d,
-                                LabCommHandler h) throws Exception {
-      ((Handler)h).handle_an_int_struct(an_int_struct.decode(d));
-    }
-    
-  }
-  
-  public static void encode(LabCommEncoder e, an_int_struct value) throws IOException {
-    e.begin(an_int_struct.class);
-    e.encodeInt(value.a);
-    e.encodeInt(value.b);
-    e.end(an_int_struct.class);
-  }
-  
-  public static an_int_struct decode(LabCommDecoder d) throws IOException {
-    an_int_struct result;
-    result = new an_int_struct();
-    result.a = d.decodeInt();
-    result.b = d.decodeInt();
-    return result;
-  }
-  
-  private static byte[] signature = new byte[] {
-    // struct { 2 fields
-    0, 0, 0, 17, 
-      0, 0, 0, 2, 
-      // int 'a'
-      0, 0, 0, 1, 
-      97, 
-      0, 0, 0, 35, 
-      // int 'b'
-      0, 0, 0, 1, 
-      98, 
-      0, 0, 0, 35, 
-    // }
-  };
-
-}
diff --git a/test/gen/nested.typeinfo b/test/gen/nested.typeinfo
deleted file mode 100644
index 7b21149..0000000
--- a/test/gen/nested.typeinfo
+++ /dev/null
@@ -1,51 +0,0 @@
-C,typedef,int_array_ss,int_array_ss
-C,sample,struct_array_ss,struct_array_ss
-C,typedef,int_t,int_t
-C,typedef,int_array_t,int_array_t
-C,typedef,struct_t,struct_t
-C,typedef,struct_array_t,struct_array_t
-C,typedef,struct_struct_t,struct_struct_t
-C,sample,int_s,int_s
-C,sample,int_array_s,int_array_s
-C,sample,struct_s,struct_s
-C,sample,struct_array_s,struct_array_s
-C,sample,struct_struct_s,struct_struct_s
-C,sample,int_t_s,int_t_s
-C,sample,int_array_t_s,int_array_t_s
-C,sample,struct_t_s,struct_t_s
-C,sample,struct_array_t_s,struct_array_t_s
-C,sample,struct_struct_t_s,struct_struct_t_s
-Java,typedef,int_array_ss,int[][][][][]
-Java,sample,struct_array_ss,struct_array_ss[][][]
-Java,typedef,int_t,int
-Java,typedef,int_array_t,int[][][][]
-Java,typedef,struct_t,struct_t
-Java,typedef,struct_array_t,struct_array_t[]
-Java,typedef,struct_struct_t,struct_struct_t
-Java,sample,int_s,int
-Java,sample,int_array_s,int[][][][][]
-Java,sample,struct_s,struct_s
-Java,sample,struct_array_s,struct_array_s[]
-Java,sample,struct_struct_s,struct_struct_s
-Java,sample,int_t_s,int
-Java,sample,int_array_t_s,int[][][][]
-Java,sample,struct_t_s,struct_t
-Java,sample,struct_array_t_s,struct_array_t[]
-Java,sample,struct_struct_t_s,struct_struct_t
-C#,typedef,int_array_ss,int[][,,][]
-C#,sample,struct_array_ss,struct_array_ss[][][]
-C#,typedef,int_t,int
-C#,typedef,int_array_t,int[,][][]
-C#,typedef,struct_t,struct_t
-C#,typedef,struct_array_t,struct_array_t[]
-C#,typedef,struct_struct_t,struct_struct_t
-C#,sample,int_s,int
-C#,sample,int_array_s,int[][,,][]
-C#,sample,struct_s,struct_s
-C#,sample,struct_array_s,struct_array_s[]
-C#,sample,struct_struct_s,struct_struct_s
-C#,sample,int_t_s,int
-C#,sample,int_array_t_s,int[,][][]
-C#,sample,struct_t_s,struct_t
-C#,sample,struct_array_t_s,struct_array_t[]
-C#,sample,struct_struct_t_s,struct_struct_t
diff --git a/test/gen/nested.vec b/test/gen/nested.vec
deleted file mode 100644
index 3791316580bed3fed9da211c67eae50c9dfcad5c..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 114897
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
E0D!Kq!2kdN

diff --git a/test/gen/python/nested.py b/test/gen/python/nested.py
deleted file mode 100644
index a1c1343..0000000
--- a/test/gen/python/nested.py
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/usr/bin/python
-# Auto generated nested
-
-import labcomm
-
-class int_array_ss(object):
-    no_signature = labcomm.typedef('int_array_ss',
-        labcomm.array([1],
-            labcomm.array([0, 3, 0],
-                labcomm.array([5],
-                    labcomm.INTEGER()))))
-
-class struct_array_ss(object):
-    signature = labcomm.sample('struct_array_ss', 
-        labcomm.array([1],
-            labcomm.array([0],
-                labcomm.array([0],
-                    labcomm.struct([
-                        ('aa', labcomm.INTEGER()),
-                        ('bb', labcomm.BOOLEAN()),
-                        ('ias', labcomm.array([1],
-                            labcomm.array([0, 3, 0],
-                                labcomm.array([5],
-                                    labcomm.INTEGER()))))])))))
-
-class int_t(object):
-    no_signature = labcomm.typedef('int_t',
-        labcomm.INTEGER())
-
-class int_array_t(object):
-    no_signature = labcomm.typedef('int_array_t',
-        labcomm.array([1],
-            labcomm.array([2],
-                labcomm.array([3, 4],
-                    labcomm.INTEGER()))))
-
-class struct_t(object):
-    no_signature = labcomm.typedef('struct_t',
-        labcomm.struct([
-            ('a', labcomm.INTEGER())]))
-
-class struct_array_t(object):
-    no_signature = labcomm.typedef('struct_array_t',
-        labcomm.array([2],
-            labcomm.struct([
-                ('a', labcomm.INTEGER())])))
-
-class struct_struct_t(object):
-    no_signature = labcomm.typedef('struct_struct_t',
-        labcomm.struct([
-            ('a', labcomm.struct([
-                ('a', labcomm.INTEGER())]))]))
-
-class int_s(object):
-    signature = labcomm.sample('int_s', 
-        labcomm.INTEGER())
-
-class int_array_s(object):
-    signature = labcomm.sample('int_array_s', 
-        labcomm.array([1],
-            labcomm.array([0, 3, 0],
-                labcomm.array([5],
-                    labcomm.INTEGER()))))
-
-class struct_s(object):
-    signature = labcomm.sample('struct_s', 
-        labcomm.struct([
-            ('a', labcomm.INTEGER()),
-            ('bcd', labcomm.DOUBLE())]))
-
-class struct_array_s(object):
-    signature = labcomm.sample('struct_array_s', 
-        labcomm.array([2],
-            labcomm.struct([
-                ('a', labcomm.INTEGER())])))
-
-class struct_struct_s(object):
-    signature = labcomm.sample('struct_struct_s', 
-        labcomm.struct([
-            ('a', labcomm.struct([
-                ('a', labcomm.INTEGER())]))]))
-
-class int_t_s(object):
-    signature = labcomm.sample('int_t_s', 
-        labcomm.INTEGER())
-
-class int_array_t_s(object):
-    signature = labcomm.sample('int_array_t_s', 
-        labcomm.array([1],
-            labcomm.array([2],
-                labcomm.array([3, 4],
-                    labcomm.INTEGER()))))
-
-class struct_t_s(object):
-    signature = labcomm.sample('struct_t_s', 
-        labcomm.struct([
-            ('a', labcomm.INTEGER())]))
-
-class struct_array_t_s(object):
-    signature = labcomm.sample('struct_array_t_s', 
-        labcomm.array([2],
-            labcomm.struct([
-                ('a', labcomm.INTEGER())])))
-
-class struct_struct_t_s(object):
-    signature = labcomm.sample('struct_struct_t_s', 
-        labcomm.struct([
-            ('a', labcomm.struct([
-                ('a', labcomm.INTEGER())]))]))
-
diff --git a/test/gen/python/simple.py b/test/gen/python/simple.py
deleted file mode 100644
index 4c5e0e6..0000000
--- a/test/gen/python/simple.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/python
-# Auto generated simple
-
-import labcomm
-
-class an_int(object):
-    signature = labcomm.sample('an_int', 
-        labcomm.INTEGER())
-
-class a_fixed_int_array(object):
-    signature = labcomm.sample('a_fixed_int_array', 
-        labcomm.array([2],
-            labcomm.INTEGER()))
-
-class a_fixed_int_multi_array(object):
-    signature = labcomm.sample('a_fixed_int_multi_array', 
-        labcomm.array([2, 2, 2],
-            labcomm.INTEGER()))
-
-class a_fixed_int_array_array_array(object):
-    signature = labcomm.sample('a_fixed_int_array_array_array', 
-        labcomm.array([2],
-            labcomm.array([2],
-                labcomm.array([2],
-                    labcomm.INTEGER()))))
-
-class a_variable_int_array(object):
-    signature = labcomm.sample('a_variable_int_array', 
-        labcomm.array([0],
-            labcomm.INTEGER()))
-
-class a_variable_int_multi_array(object):
-    signature = labcomm.sample('a_variable_int_multi_array', 
-        labcomm.array([0, 0, 0],
-            labcomm.INTEGER()))
-
-class a_variable_int_array_array_array(object):
-    signature = labcomm.sample('a_variable_int_array_array_array', 
-        labcomm.array([0],
-            labcomm.array([0],
-                labcomm.array([0],
-                    labcomm.INTEGER()))))
-
-class an_int_struct(object):
-    signature = labcomm.sample('an_int_struct', 
-        labcomm.struct([
-            ('a', labcomm.INTEGER()),
-            ('b', labcomm.INTEGER())]))
-
-class a_void(object):
-    signature = labcomm.sample('a_void', 
-        labcomm.struct([])
-)
-
diff --git a/test/gen/simple.typeinfo b/test/gen/simple.typeinfo
deleted file mode 100644
index a990483..0000000
--- a/test/gen/simple.typeinfo
+++ /dev/null
@@ -1,27 +0,0 @@
-C,sample,an_int,an_int
-C,sample,a_fixed_int_array,a_fixed_int_array
-C,sample,a_fixed_int_multi_array,a_fixed_int_multi_array
-C,sample,a_fixed_int_array_array_array,a_fixed_int_array_array_array
-C,sample,a_variable_int_array,a_variable_int_array
-C,sample,a_variable_int_multi_array,a_variable_int_multi_array
-C,sample,a_variable_int_array_array_array,a_variable_int_array_array_array
-C,sample,an_int_struct,an_int_struct
-C,sample,a_void,a_void
-Java,sample,an_int,int
-Java,sample,a_fixed_int_array,int[]
-Java,sample,a_fixed_int_multi_array,int[][][]
-Java,sample,a_fixed_int_array_array_array,int[][][]
-Java,sample,a_variable_int_array,int[]
-Java,sample,a_variable_int_multi_array,int[][][]
-Java,sample,a_variable_int_array_array_array,int[][][]
-Java,sample,an_int_struct,an_int_struct
-Java,sample,a_void,void
-C#,sample,an_int,int
-C#,sample,a_fixed_int_array,int[]
-C#,sample,a_fixed_int_multi_array,int[,,]
-C#,sample,a_fixed_int_array_array_array,int[][][]
-C#,sample,a_variable_int_array,int[]
-C#,sample,a_variable_int_multi_array,int[,,]
-C#,sample,a_variable_int_array_array_array,int[][][]
-C#,sample,an_int_struct,an_int_struct
-C#,sample,a_void,void
diff --git a/test/gen/simple.vec b/test/gen/simple.vec
deleted file mode 100644
index 36516c7d0b6bd674da98d73d2bd8598766edd35d..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 3494
zcmZQzU|?ckU}#`qU=U1<Ps^-GO^MIUD~V4mDoU(mU|<knU|?W`DpH2hjSLJ7vKWdX
zS|B8vMr1>f*)Ri}7#JADkqyi(%_+%5F^U;#H^{Ld4Aa`oz`!7q7+;oHl$n^6lZw^t
z3=9kmF!e1A3=9g`)I)58kVwu4>4iBNoeeXym4Sgl3e8OHJ^+~j!!X@#3=9lxiScFm
znJJ)1fJ%e>*bbJ-1NjNb2OSIy47`b8(fHz$qSE9Ns5X!m#zd$}#v~}C0Ti_$42@-|
z`3w#9|Ns97VFm_<Mvy!{3{nHrh=*<jnTHQEFfcUXvj-#xQiI11m{b!!dq8pw3=E*e
z0a6d58KGu_*i0Zc2&1b3DTa!HLKDhGH3!LTCJ-Bh85kHq2@9kiM1wL6jE!s#NDd|r
zQUk&;K1dym52Ml5gVcc3gD^-A#0OyzAB2(FAbF4&h(<OKpBj)lSU7?7fz%?4A+tg9
z$mWC9Lc<i@3~X}P#L&%znGaG6VuLWc8jzci;}awgQjac<&IhT3nFp2w6)+(8gD@H!
zq!wf*7=z?N7)=d6Igoy2yI^dP9uOOZ(ba(51QQ3TgYjWBx_Xcrka`dX$$|JF4B~?@
zG8-fh5(Cl5=HXKVQU}5?eIT_UJ_v)vKr{%0*dTLZG)N4l79<AZgJ_T%kT?j##9%Zw
zF_3zgKA1X?7)UKh9E3r97!6Vb!szlKKDszMAKe^~9uNkZ4Z_H5kXjHQhC%Wm4B~@m
z5C*Y97{mr)WHv}YNDM@S+yP_bQ-iJ!#)r`$vtZ_c#L&$G@j)1*285B>=z2l&ATfMu
zKz1-9m4hI)$YRKBkXbM@LE>PwP`&78V3WfphHfUze2`iY8-&r-fb9m^3&POy8>Ajx
z9G#DD4oDAjJ%G#xsRhe}$_kJ@AdJpN=Y!OMFarYvs9^!JAA~`E0P#WQA@f0OkQlN&
zG9M%l#?Ueg*$i+wjU*0I2hxi!4iW=lxHw1;2&1_Xxg18e2QCiM1Hwr9K<46-2g`xN
z2c!odMluiN2js9o=7ZQEGm+(y`5<{1MplC?1``K~f%JlCkQfNV{ERLRk^^CoJV-qV
zgVcb;Ko}$r;-ia$<UklC50e9_1BoGHkUU5nhLPp4u|euV=7BIs9>fRfMdpLpATeZl
zWIjk9jFHkRNFFYRBn}b-%Yno|7#d$7F%SmldyqH`L*+sGKo~hsA-feWjzu5HTwL;C
zIZ(QS>BB`cFff3c=k1`h$H2e<YLJ7%qaCE4fq|g|Bo4wbHb@f2hN%IG!PJ1*Pz-9u
SGr-h<XqXxh8>R-t24Mh;dE@&4

diff --git a/test/run b/test/run
index 3045653..07c4a0c 100755
--- a/test/run
+++ b/test/run
@@ -1,7 +1,6 @@
 #!/usr/bin/python
 # -*- coding: iso8859-15 -*-
 
-import labcomm
 import math
 import os
 import sys
@@ -157,6 +156,8 @@ if __name__ == "__main__":
                             "gen/%s.typeinfo" % f)
 
 
+    sys.path.insert(0, "../lib/python")    
+    import labcomm;
     sys.path.insert(0, "gen/python")    
     for f in files:
         print f
diff --git a/test/run.py b/test/run.py
index 32e6ff5..927e1a8 100755
--- a/test/run.py
+++ b/test/run.py
@@ -1,7 +1,6 @@
 #!/usr/bin/python
 # -*- coding: iso8859-15 -*-
 
-import labcomm
 import math
 import os
 import sys
@@ -122,6 +121,8 @@ def generate(decl):
     raise Exception("unhandled decl %s" % decl.__class__)
 
 if __name__ == "__main__":
+    sys.path.insert(0, "../lib/python/")    
+    import labcomm
     print os.getcwd(), sys.argv
     if not os.path.exists("gen"):
         os.makedirs("gen")
-- 
GitLab