summaryrefslogtreecommitdiffstats
path: root/systemtest/testdata/testset1
diff options
context:
space:
mode:
Diffstat (limited to 'systemtest/testdata/testset1')
-rw-r--r--systemtest/testdata/testset1/agg1.ql6
-rw-r--r--systemtest/testdata/testset1/agg1.ql.java.out15
-rw-r--r--systemtest/testdata/testset1/agg1.ql.out24
-rw-r--r--systemtest/testdata/testset1/agg2.ql6
-rw-r--r--systemtest/testdata/testset1/agg2.ql.java.out29
-rw-r--r--systemtest/testdata/testset1/agg2.ql.out44
-rw-r--r--systemtest/testdata/testset1/agg3.ql6
-rw-r--r--systemtest/testdata/testset1/agg3.ql.java.out57
-rw-r--r--systemtest/testdata/testset1/agg3.ql.out84
-rw-r--r--systemtest/testdata/testset1/dot1.ql5
-rw-r--r--systemtest/testdata/testset1/dot1.ql.java.out29
-rw-r--r--systemtest/testdata/testset1/dot1.ql.out44
-rw-r--r--systemtest/testdata/testset1/dot2.ql5
-rw-r--r--systemtest/testdata/testset1/dot2.ql.java.out29
-rw-r--r--systemtest/testdata/testset1/dot2.ql.out44
-rw-r--r--systemtest/testdata/testset1/dot3.ql5
-rw-r--r--systemtest/testdata/testset1/dot3.ql.java.out29
-rw-r--r--systemtest/testdata/testset1/dot3.ql.out44
-rw-r--r--systemtest/testdata/testset1/dot4.ql5
-rw-r--r--systemtest/testdata/testset1/dot4.ql.java.out29
-rw-r--r--systemtest/testdata/testset1/dot4.ql.out44
-rw-r--r--systemtest/testdata/testset1/dot5.ql6
-rw-r--r--systemtest/testdata/testset1/dot5.ql.java.out29
-rw-r--r--systemtest/testdata/testset1/dot5.ql.out44
-rw-r--r--systemtest/testdata/testset1/dot6.ql5
-rw-r--r--systemtest/testdata/testset1/dot6.ql.java.out29
-rw-r--r--systemtest/testdata/testset1/dot6.ql.out44
-rw-r--r--systemtest/testdata/testset1/dot7.ql2
-rw-r--r--systemtest/testdata/testset1/dot7.ql.java.out15
-rw-r--r--systemtest/testdata/testset1/dot7.ql.out44
-rw-r--r--systemtest/testdata/testset1/ind1.ql5
-rw-r--r--systemtest/testdata/testset1/ind1.ql.java.out29
-rw-r--r--systemtest/testdata/testset1/ind1.ql.out44
-rw-r--r--systemtest/testdata/testset1/ind2.ql5
-rw-r--r--systemtest/testdata/testset1/ind2.ql.java.out15
-rw-r--r--systemtest/testdata/testset1/ind2.ql.out44
-rw-r--r--systemtest/testdata/testset1/ind3.ql5
-rw-r--r--systemtest/testdata/testset1/ind3.ql.java.out29
-rw-r--r--systemtest/testdata/testset1/ind3.ql.out44
-rw-r--r--systemtest/testdata/testset1/opt1.ql7
-rw-r--r--systemtest/testdata/testset1/opt1.ql.java.out29
-rw-r--r--systemtest/testdata/testset1/opt1.ql.out44
-rw-r--r--systemtest/testdata/testset1/opt2.ql5
-rw-r--r--systemtest/testdata/testset1/opt2.ql.java.out57
-rw-r--r--systemtest/testdata/testset1/opt2.ql.out84
-rw-r--r--systemtest/testdata/testset1/opt4.ql6
-rw-r--r--systemtest/testdata/testset1/opt4.ql.java.out29
-rw-r--r--systemtest/testdata/testset1/opt4.ql.out44
-rw-r--r--systemtest/testdata/testset1/opt5.ql6
-rw-r--r--systemtest/testdata/testset1/opt5.ql.java.out57
-rw-r--r--systemtest/testdata/testset1/opt5.ql.out84
-rw-r--r--systemtest/testdata/testset1/trim1.ql5
-rw-r--r--systemtest/testdata/testset1/trim1.ql.java.out29
-rw-r--r--systemtest/testdata/testset1/trim1.ql.out30
-rw-r--r--systemtest/testdata/testset1/trim2.ql5
-rw-r--r--systemtest/testdata/testset1/trim2.ql.java.out29
-rw-r--r--systemtest/testdata/testset1/trim2.ql.out30
-rw-r--r--systemtest/testdata/testset1/trim3.ql5
-rw-r--r--systemtest/testdata/testset1/trim3.ql.java.out57
-rw-r--r--systemtest/testdata/testset1/trim3.ql.out56
-rw-r--r--systemtest/testdata/testset1/trim4.ql5
-rw-r--r--systemtest/testdata/testset1/trim4.ql.java.out57
-rw-r--r--systemtest/testdata/testset1/trim4.ql.out56
-rw-r--r--systemtest/testdata/testset1/trim5.ql5
-rw-r--r--systemtest/testdata/testset1/trim5.ql.java.out57
-rw-r--r--systemtest/testdata/testset1/trim5.ql.out44
-rw-r--r--systemtest/testdata/testset1/trim6.ql5
-rw-r--r--systemtest/testdata/testset1/trim6.ql.java.out57
-rw-r--r--systemtest/testdata/testset1/trim6.ql.out44
69 files changed, 2049 insertions, 0 deletions
diff --git a/systemtest/testdata/testset1/agg1.ql b/systemtest/testdata/testset1/agg1.ql
new file mode 100644
index 0000000..9534f28
--- /dev/null
+++ b/systemtest/testdata/testset1/agg1.ql
@@ -0,0 +1,6 @@
+-- Testbed: result_type=set <marray <char, [0:10,0:10]>>
+-- Testbed: result_elements=1
+
+select a
+from ImgCharA as a
+where some_cell( a > 0 )
diff --git a/systemtest/testdata/testset1/agg1.ql.java.out b/systemtest/testdata/testset1/agg1.ql.java.out
new file mode 100644
index 0000000..ec9b48e
--- /dev/null
+++ b/systemtest/testdata/testset1/agg1.ql.java.out
@@ -0,0 +1,15 @@
+
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/agg1.ql.out b/systemtest/testdata/testset1/agg1.ql.out
new file mode 100644
index 0000000..6afbc1f
--- /dev/null
+++ b/systemtest/testdata/testset1/agg1.ql.out
@@ -0,0 +1,24 @@
+-- Testbed line: result_type=set <marray <char, [0:10,0:10]>>
+-- Testbed line: result_elements=1
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <char, [0:10,0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ 1 1 1 1 1 1 1 1 1 1 1
+ 1 1 1 1 1 1 1 1 1 1 1
+ 1 1 1 1 1 1 1 1 1 1 1
+ 1 1 1 1 1 1 1 1 1 1 1
+ 1 1 1 1 1 1 1 1 1 1 1
+ 1 1 1 1 1 1 1 1 1 1 1
+ 1 1 1 1 1 1 1 1 1 1 1
+ 1 1 1 1 1 1 1 1 1 1 1
+ 1 1 1 1 1 1 1 1 1 1 1
+ 1 1 1 1 1 1 1 1 1 1 1
+ 1 1 1 1 1 1 1 1 1 1 1
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/agg2.ql b/systemtest/testdata/testset1/agg2.ql
new file mode 100644
index 0000000..27ef685
--- /dev/null
+++ b/systemtest/testdata/testset1/agg2.ql
@@ -0,0 +1,6 @@
+-- Testbed: result_type=set <marray <char, [0:10,0:10]>>
+-- Testbed: result_elements=2
+
+select a * b
+from ImgCharA as a, ImgCharB as b
+where some_cell( a*b > 0 )
diff --git a/systemtest/testdata/testset1/agg2.ql.java.out b/systemtest/testdata/testset1/agg2.ql.java.out
new file mode 100644
index 0000000..ac09ddd
--- /dev/null
+++ b/systemtest/testdata/testset1/agg2.ql.java.out
@@ -0,0 +1,29 @@
+
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/agg2.ql.out b/systemtest/testdata/testset1/agg2.ql.out
new file mode 100644
index 0000000..816708e
--- /dev/null
+++ b/systemtest/testdata/testset1/agg2.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <char, [0:10,0:10]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <char, [0:10,0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+Image 2
+GMarray
+ Type Structure........: marray <char, [0:10,0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/agg3.ql b/systemtest/testdata/testset1/agg3.ql
new file mode 100644
index 0000000..9833e16
--- /dev/null
+++ b/systemtest/testdata/testset1/agg3.ql
@@ -0,0 +1,6 @@
+-- Testbed: result_type=set <marray <long, [0:10,0:10]>>
+-- Testbed: result_elements=4
+
+select (a+2)*(b+1)
+from ImgCharA as a, ImgCharB as b
+where some_cell( (a+2)*(b+1) > 0 )
diff --git a/systemtest/testdata/testset1/agg3.ql.java.out b/systemtest/testdata/testset1/agg3.ql.java.out
new file mode 100644
index 0000000..aff941e
--- /dev/null
+++ b/systemtest/testdata/testset1/agg3.ql.java.out
@@ -0,0 +1,57 @@
+
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/agg3.ql.out b/systemtest/testdata/testset1/agg3.ql.out
new file mode 100644
index 0000000..14fa211
--- /dev/null
+++ b/systemtest/testdata/testset1/agg3.ql.out
@@ -0,0 +1,84 @@
+-- Testbed line: result_type=set <marray <long, [0:10,0:10]>>
+-- Testbed line: result_elements=4
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+Image 2
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+Image 3
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+Image 4
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/dot1.ql b/systemtest/testdata/testset1/dot1.ql
new file mode 100644
index 0000000..4ae5b39
--- /dev/null
+++ b/systemtest/testdata/testset1/dot1.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <long, [0:10,0:10]>>
+-- Testbed: result_elements=2
+
+select a * { 5l, 10l, true }.1
+from ImgCharA as a
diff --git a/systemtest/testdata/testset1/dot1.ql.java.out b/systemtest/testdata/testset1/dot1.ql.java.out
new file mode 100644
index 0000000..063c356
--- /dev/null
+++ b/systemtest/testdata/testset1/dot1.ql.java.out
@@ -0,0 +1,29 @@
+
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/dot1.ql.out b/systemtest/testdata/testset1/dot1.ql.out
new file mode 100644
index 0000000..1fb429d
--- /dev/null
+++ b/systemtest/testdata/testset1/dot1.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <long, [0:10,0:10]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+Image 2
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/dot2.ql b/systemtest/testdata/testset1/dot2.ql
new file mode 100644
index 0000000..b0470f4
--- /dev/null
+++ b/systemtest/testdata/testset1/dot2.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <float, [0:10,0:10]>>
+-- Testbed: result_elements=2
+
+select a * ({ 10l, { 8ul, 10f, 10.0 }}.1).2
+from ImgCharA as a
diff --git a/systemtest/testdata/testset1/dot2.ql.java.out b/systemtest/testdata/testset1/dot2.ql.java.out
new file mode 100644
index 0000000..1a89a0b
--- /dev/null
+++ b/systemtest/testdata/testset1/dot2.ql.java.out
@@ -0,0 +1,29 @@
+
+rasj.RasMArrayFloat
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+rasj.RasMArrayFloat
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 65 32 0 0 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/dot2.ql.out b/systemtest/testdata/testset1/dot2.ql.out
new file mode 100644
index 0000000..8bfe824
--- /dev/null
+++ b/systemtest/testdata/testset1/dot2.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <float, [0:10,0:10]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <float, [0:10,0:10]>
+ Type Schema...........: marray< float >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: float
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+Image 2
+GMarray
+ Type Structure........: marray <float, [0:10,0:10]>
+ Type Schema...........: marray< float >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: float
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/dot3.ql b/systemtest/testdata/testset1/dot3.ql
new file mode 100644
index 0000000..558643a
--- /dev/null
+++ b/systemtest/testdata/testset1/dot3.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <octet, [0:10,0:10]>>
+-- Testbed: result_elements=2
+
+select a * ({1l,2o}+{3l,4o}).1
+from ImgCharA as a
diff --git a/systemtest/testdata/testset1/dot3.ql.java.out b/systemtest/testdata/testset1/dot3.ql.java.out
new file mode 100644
index 0000000..7cfff06
--- /dev/null
+++ b/systemtest/testdata/testset1/dot3.ql.java.out
@@ -0,0 +1,29 @@
+
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/dot3.ql.out b/systemtest/testdata/testset1/dot3.ql.out
new file mode 100644
index 0000000..c6f0ef5
--- /dev/null
+++ b/systemtest/testdata/testset1/dot3.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <octet, [0:10,0:10]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <octet, [0:10,0:10]>
+ Type Schema...........: marray< octet >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: octet
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+Image 2
+GMarray
+ Type Structure........: marray <octet, [0:10,0:10]>
+ Type Schema...........: marray< octet >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: octet
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/dot4.ql b/systemtest/testdata/testset1/dot4.ql
new file mode 100644
index 0000000..58ba945
--- /dev/null
+++ b/systemtest/testdata/testset1/dot4.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <long, [0:10,0:10]>>
+-- Testbed: result_elements=2
+
+select a * ({ 1l, { 8l, 10l, 10l }}.1).2
+from ImgCharA as a
diff --git a/systemtest/testdata/testset1/dot4.ql.java.out b/systemtest/testdata/testset1/dot4.ql.java.out
new file mode 100644
index 0000000..063c356
--- /dev/null
+++ b/systemtest/testdata/testset1/dot4.ql.java.out
@@ -0,0 +1,29 @@
+
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 0 0 0 10 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/dot4.ql.out b/systemtest/testdata/testset1/dot4.ql.out
new file mode 100644
index 0000000..1fb429d
--- /dev/null
+++ b/systemtest/testdata/testset1/dot4.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <long, [0:10,0:10]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+Image 2
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/dot5.ql b/systemtest/testdata/testset1/dot5.ql
new file mode 100644
index 0000000..d375924
--- /dev/null
+++ b/systemtest/testdata/testset1/dot5.ql
@@ -0,0 +1,6 @@
+-- Testbed: result_type=set <marray <char, [0:10,0:10]>>
+-- Testbed: result_elements=2
+
+select a.red + a.green + a.blue
+from ImgRGBA as a
+where some_cell( a.red > 0 )
diff --git a/systemtest/testdata/testset1/dot5.ql.java.out b/systemtest/testdata/testset1/dot5.ql.java.out
new file mode 100644
index 0000000..8668345
--- /dev/null
+++ b/systemtest/testdata/testset1/dot5.ql.java.out
@@ -0,0 +1,29 @@
+
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/dot5.ql.out b/systemtest/testdata/testset1/dot5.ql.out
new file mode 100644
index 0000000..f63bae4
--- /dev/null
+++ b/systemtest/testdata/testset1/dot5.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <char, [0:10,0:10]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <char, [0:10,0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+Image 2
+GMarray
+ Type Structure........: marray <char, [0:10,0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+ 6 6 6 6 6 6 6 6 6 6 6
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/dot6.ql b/systemtest/testdata/testset1/dot6.ql
new file mode 100644
index 0000000..f3f7239
--- /dev/null
+++ b/systemtest/testdata/testset1/dot6.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <char, [0:10,0:10]>>
+-- Testbed: result_elements=2
+
+select (a * 2c).green
+from ImgRGBA as a
diff --git a/systemtest/testdata/testset1/dot6.ql.java.out b/systemtest/testdata/testset1/dot6.ql.java.out
new file mode 100644
index 0000000..44c334a
--- /dev/null
+++ b/systemtest/testdata/testset1/dot6.ql.java.out
@@ -0,0 +1,29 @@
+
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/dot6.ql.out b/systemtest/testdata/testset1/dot6.ql.out
new file mode 100644
index 0000000..94951cf
--- /dev/null
+++ b/systemtest/testdata/testset1/dot6.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <char, [0:10,0:10]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <char, [0:10,0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+Image 2
+GMarray
+ Type Structure........: marray <char, [0:10,0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+ 4 4 4 4 4 4 4 4 4 4 4
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/dot7.ql b/systemtest/testdata/testset1/dot7.ql
new file mode 100644
index 0000000..75b845f
--- /dev/null
+++ b/systemtest/testdata/testset1/dot7.ql
@@ -0,0 +1,2 @@
+select ( a.green > 0 ) * { 255c, 0c, 0c } + ( a.red > 0 ) * { 0c, 127c, 0c }
+from ImgRGBA as a
diff --git a/systemtest/testdata/testset1/dot7.ql.java.out b/systemtest/testdata/testset1/dot7.ql.java.out
new file mode 100644
index 0000000..a6d1707
--- /dev/null
+++ b/systemtest/testdata/testset1/dot7.ql.java.out
@@ -0,0 +1,15 @@
+
+rasj.RasGMArray
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:205,0:205]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 3
+ Data format...........: 0
+ Data size (bytes).....: 363
+ -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 -1 127 0 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/dot7.ql.out b/systemtest/testdata/testset1/dot7.ql.out
new file mode 100644
index 0000000..115b9c5
--- /dev/null
+++ b/systemtest/testdata/testset1/dot7.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <struct { char 0, char 1, char 2 }, [0:10,0:10]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <struct { char 0, char 1, char 2 }, [0:10,0:10]>
+ Type Schema...........: marray< struct{ char 0, char 1, char 2 } >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: struct{ char 0, char 1, char 2 }
+ Base Type Length......: 3
+ Data format.......... : Array
+ Data size (bytes).... : 363
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+Image 2
+GMarray
+ Type Structure........: marray <struct { char 0, char 1, char 2 }, [0:10,0:10]>
+ Type Schema...........: marray< struct{ char 0, char 1, char 2 } >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: struct{ char 0, char 1, char 2 }
+ Base Type Length......: 3
+ Data format.......... : Array
+ Data size (bytes).... : 363
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+{ 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0} { 255, 127, 0}
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/ind1.ql b/systemtest/testdata/testset1/ind1.ql
new file mode 100644
index 0000000..5cea87c
--- /dev/null
+++ b/systemtest/testdata/testset1/ind1.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <octet, [0:10,0:10]>>
+-- Testbed: result_elements=2
+
+select -a
+from ImgCharA as a
diff --git a/systemtest/testdata/testset1/ind1.ql.java.out b/systemtest/testdata/testset1/ind1.ql.java.out
new file mode 100644
index 0000000..5f995b1
--- /dev/null
+++ b/systemtest/testdata/testset1/ind1.ql.java.out
@@ -0,0 +1,29 @@
+
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/ind1.ql.out b/systemtest/testdata/testset1/ind1.ql.out
new file mode 100644
index 0000000..229c499
--- /dev/null
+++ b/systemtest/testdata/testset1/ind1.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <octet, [0:10,0:10]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <octet, [0:10,0:10]>
+ Type Schema...........: marray< octet >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: octet
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+ 0 0 0 0 0 0 0 0 0 0 0
+Image 2
+GMarray
+ Type Structure........: marray <octet, [0:10,0:10]>
+ Type Schema...........: marray< octet >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: octet
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+ -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/ind2.ql b/systemtest/testdata/testset1/ind2.ql
new file mode 100644
index 0000000..4a626e1
--- /dev/null
+++ b/systemtest/testdata/testset1/ind2.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <struct { char red, char green, char blue }, [0:10,0:10]>>
+-- Testbed: result_elements=2
+
+select a * 2c
+from ImgRGBA as a
diff --git a/systemtest/testdata/testset1/ind2.ql.java.out b/systemtest/testdata/testset1/ind2.ql.java.out
new file mode 100644
index 0000000..81be0e5
--- /dev/null
+++ b/systemtest/testdata/testset1/ind2.ql.java.out
@@ -0,0 +1,15 @@
+
+rasj.RasGMArray
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:205,0:205]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 3
+ Data format...........: 0
+ Data size (bytes).....: 363
+ 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 2 4 6 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/ind2.ql.out b/systemtest/testdata/testset1/ind2.ql.out
new file mode 100644
index 0000000..947574e
--- /dev/null
+++ b/systemtest/testdata/testset1/ind2.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <struct { char red, char green, char blue }, [0:10,0:10]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <struct { char red, char green, char blue }, [0:10,0:10]>
+ Type Schema...........: marray< struct{ char red, char green, char blue } >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: struct{ char red, char green, char blue }
+ Base Type Length......: 3
+ Data format.......... : Array
+ Data size (bytes).... : 363
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+Image 2
+GMarray
+ Type Structure........: marray <struct { char red, char green, char blue }, [0:10,0:10]>
+ Type Schema...........: marray< struct{ char red, char green, char blue } >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: struct{ char red, char green, char blue }
+ Base Type Length......: 3
+ Data format.......... : Array
+ Data size (bytes).... : 363
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+{ 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6} { 2, 4, 6}
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/ind3.ql b/systemtest/testdata/testset1/ind3.ql
new file mode 100644
index 0000000..623f422
--- /dev/null
+++ b/systemtest/testdata/testset1/ind3.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <bool, [0:10,0:10]>>
+-- Testbed: result_elements=2
+
+select a > 0
+from ImgCharA as a
diff --git a/systemtest/testdata/testset1/ind3.ql.java.out b/systemtest/testdata/testset1/ind3.ql.java.out
new file mode 100644
index 0000000..f2deb7a
--- /dev/null
+++ b/systemtest/testdata/testset1/ind3.ql.java.out
@@ -0,0 +1,29 @@
+
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/ind3.ql.out b/systemtest/testdata/testset1/ind3.ql.out
new file mode 100644
index 0000000..53e26a4
--- /dev/null
+++ b/systemtest/testdata/testset1/ind3.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <bool, [0:10,0:10]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <bool, [0:10,0:10]>
+ Type Schema...........: marray< bool >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: bool
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ F F F F F F F F F F F
+ F F F F F F F F F F F
+ F F F F F F F F F F F
+ F F F F F F F F F F F
+ F F F F F F F F F F F
+ F F F F F F F F F F F
+ F F F F F F F F F F F
+ F F F F F F F F F F F
+ F F F F F F F F F F F
+ F F F F F F F F F F F
+ F F F F F F F F F F F
+Image 2
+GMarray
+ Type Structure........: marray <bool, [0:10,0:10]>
+ Type Schema...........: marray< bool >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: bool
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ T T T T T T T T T T T
+ T T T T T T T T T T T
+ T T T T T T T T T T T
+ T T T T T T T T T T T
+ T T T T T T T T T T T
+ T T T T T T T T T T T
+ T T T T T T T T T T T
+ T T T T T T T T T T T
+ T T T T T T T T T T T
+ T T T T T T T T T T T
+ T T T T T T T T T T T
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/opt1.ql b/systemtest/testdata/testset1/opt1.ql
new file mode 100644
index 0000000..36ea1b8
--- /dev/null
+++ b/systemtest/testdata/testset1/opt1.ql
@@ -0,0 +1,7 @@
+-- Opt: evaluation on constant expressions
+
+-- Testbed: result_type=set <marray <long, [0:10,0:10]>>
+-- Testbed: result_elements=2
+
+select a + 1 * 2
+from ImgCharA as a
diff --git a/systemtest/testdata/testset1/opt1.ql.java.out b/systemtest/testdata/testset1/opt1.ql.java.out
new file mode 100644
index 0000000..9b791b0
--- /dev/null
+++ b/systemtest/testdata/testset1/opt1.ql.java.out
@@ -0,0 +1,29 @@
+
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 0 0 0 3 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/opt1.ql.out b/systemtest/testdata/testset1/opt1.ql.out
new file mode 100644
index 0000000..1f50401
--- /dev/null
+++ b/systemtest/testdata/testset1/opt1.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <long, [0:10,0:10]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2
+ 2 2 2 2 2 2 2 2 2 2 2
+Image 2
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 3 3 3 3 3 3 3 3 3 3 3
+ 3 3 3 3 3 3 3 3 3 3 3
+ 3 3 3 3 3 3 3 3 3 3 3
+ 3 3 3 3 3 3 3 3 3 3 3
+ 3 3 3 3 3 3 3 3 3 3 3
+ 3 3 3 3 3 3 3 3 3 3 3
+ 3 3 3 3 3 3 3 3 3 3 3
+ 3 3 3 3 3 3 3 3 3 3 3
+ 3 3 3 3 3 3 3 3 3 3 3
+ 3 3 3 3 3 3 3 3 3 3 3
+ 3 3 3 3 3 3 3 3 3 3 3
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/opt2.ql b/systemtest/testdata/testset1/opt2.ql
new file mode 100644
index 0000000..d6af2bb
--- /dev/null
+++ b/systemtest/testdata/testset1/opt2.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <long, [0:10,0:10]>>
+-- Testbed: result_elements=4
+
+select a + 1 + b + 2
+from ImgCharA as a, ImgCharB as b
diff --git a/systemtest/testdata/testset1/opt2.ql.java.out b/systemtest/testdata/testset1/opt2.ql.java.out
new file mode 100644
index 0000000..8d63a2c
--- /dev/null
+++ b/systemtest/testdata/testset1/opt2.ql.java.out
@@ -0,0 +1,57 @@
+
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13 0 0 0 13
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14 0 0 0 14
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23 0 0 0 23
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 0 0 0 24 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/opt2.ql.out b/systemtest/testdata/testset1/opt2.ql.out
new file mode 100644
index 0000000..f47a6c4
--- /dev/null
+++ b/systemtest/testdata/testset1/opt2.ql.out
@@ -0,0 +1,84 @@
+-- Testbed line: result_type=set <marray <long, [0:10,0:10]>>
+-- Testbed line: result_elements=4
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 13 13 13 13 13 13 13 13 13 13 13
+ 13 13 13 13 13 13 13 13 13 13 13
+ 13 13 13 13 13 13 13 13 13 13 13
+ 13 13 13 13 13 13 13 13 13 13 13
+ 13 13 13 13 13 13 13 13 13 13 13
+ 13 13 13 13 13 13 13 13 13 13 13
+ 13 13 13 13 13 13 13 13 13 13 13
+ 13 13 13 13 13 13 13 13 13 13 13
+ 13 13 13 13 13 13 13 13 13 13 13
+ 13 13 13 13 13 13 13 13 13 13 13
+ 13 13 13 13 13 13 13 13 13 13 13
+Image 2
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 14 14 14 14 14 14 14 14 14 14 14
+ 14 14 14 14 14 14 14 14 14 14 14
+ 14 14 14 14 14 14 14 14 14 14 14
+ 14 14 14 14 14 14 14 14 14 14 14
+ 14 14 14 14 14 14 14 14 14 14 14
+ 14 14 14 14 14 14 14 14 14 14 14
+ 14 14 14 14 14 14 14 14 14 14 14
+ 14 14 14 14 14 14 14 14 14 14 14
+ 14 14 14 14 14 14 14 14 14 14 14
+ 14 14 14 14 14 14 14 14 14 14 14
+ 14 14 14 14 14 14 14 14 14 14 14
+Image 3
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 23 23 23 23 23 23 23 23 23 23 23
+ 23 23 23 23 23 23 23 23 23 23 23
+ 23 23 23 23 23 23 23 23 23 23 23
+ 23 23 23 23 23 23 23 23 23 23 23
+ 23 23 23 23 23 23 23 23 23 23 23
+ 23 23 23 23 23 23 23 23 23 23 23
+ 23 23 23 23 23 23 23 23 23 23 23
+ 23 23 23 23 23 23 23 23 23 23 23
+ 23 23 23 23 23 23 23 23 23 23 23
+ 23 23 23 23 23 23 23 23 23 23 23
+ 23 23 23 23 23 23 23 23 23 23 23
+Image 4
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 24 24 24 24 24 24 24 24 24 24 24
+ 24 24 24 24 24 24 24 24 24 24 24
+ 24 24 24 24 24 24 24 24 24 24 24
+ 24 24 24 24 24 24 24 24 24 24 24
+ 24 24 24 24 24 24 24 24 24 24 24
+ 24 24 24 24 24 24 24 24 24 24 24
+ 24 24 24 24 24 24 24 24 24 24 24
+ 24 24 24 24 24 24 24 24 24 24 24
+ 24 24 24 24 24 24 24 24 24 24 24
+ 24 24 24 24 24 24 24 24 24 24 24
+ 24 24 24 24 24 24 24 24 24 24 24
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/opt4.ql b/systemtest/testdata/testset1/opt4.ql
new file mode 100644
index 0000000..27ef685
--- /dev/null
+++ b/systemtest/testdata/testset1/opt4.ql
@@ -0,0 +1,6 @@
+-- Testbed: result_type=set <marray <char, [0:10,0:10]>>
+-- Testbed: result_elements=2
+
+select a * b
+from ImgCharA as a, ImgCharB as b
+where some_cell( a*b > 0 )
diff --git a/systemtest/testdata/testset1/opt4.ql.java.out b/systemtest/testdata/testset1/opt4.ql.java.out
new file mode 100644
index 0000000..ac09ddd
--- /dev/null
+++ b/systemtest/testdata/testset1/opt4.ql.java.out
@@ -0,0 +1,29 @@
+
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 121
+ 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/opt4.ql.out b/systemtest/testdata/testset1/opt4.ql.out
new file mode 100644
index 0000000..816708e
--- /dev/null
+++ b/systemtest/testdata/testset1/opt4.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <char, [0:10,0:10]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <char, [0:10,0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+ 10 10 10 10 10 10 10 10 10 10 10
+Image 2
+GMarray
+ Type Structure........: marray <char, [0:10,0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 121
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+ 20 20 20 20 20 20 20 20 20 20 20
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/opt5.ql b/systemtest/testdata/testset1/opt5.ql
new file mode 100644
index 0000000..9833e16
--- /dev/null
+++ b/systemtest/testdata/testset1/opt5.ql
@@ -0,0 +1,6 @@
+-- Testbed: result_type=set <marray <long, [0:10,0:10]>>
+-- Testbed: result_elements=4
+
+select (a+2)*(b+1)
+from ImgCharA as a, ImgCharB as b
+where some_cell( (a+2)*(b+1) > 0 )
diff --git a/systemtest/testdata/testset1/opt5.ql.java.out b/systemtest/testdata/testset1/opt5.ql.java.out
new file mode 100644
index 0000000..aff941e
--- /dev/null
+++ b/systemtest/testdata/testset1/opt5.ql.java.out
@@ -0,0 +1,57 @@
+
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22 0 0 0 22
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33 0 0 0 33
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42 0 0 0 42
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10,0:10]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 484
+ 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 0 0 0 63 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/opt5.ql.out b/systemtest/testdata/testset1/opt5.ql.out
new file mode 100644
index 0000000..14fa211
--- /dev/null
+++ b/systemtest/testdata/testset1/opt5.ql.out
@@ -0,0 +1,84 @@
+-- Testbed line: result_type=set <marray <long, [0:10,0:10]>>
+-- Testbed line: result_elements=4
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+ 22 22 22 22 22 22 22 22 22 22 22
+Image 2
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+ 33 33 33 33 33 33 33 33 33 33 33
+Image 3
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+ 42 42 42 42 42 42 42 42 42 42 42
+Image 4
+GMarray
+ Type Structure........: marray <long, [0:10,0:10]>
+ Type Schema...........: marray< long >
+ Domain................: [0:10,0:10]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 484
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+ 63 63 63 63 63 63 63 63 63 63 63
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/trim1.ql b/systemtest/testdata/testset1/trim1.ql
new file mode 100644
index 0000000..e811114
--- /dev/null
+++ b/systemtest/testdata/testset1/trim1.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <char, [2:5,5:8]>>
+-- Testbed: result_elements=2
+
+select a[2:5,5:8]
+from ImgCharA as a
diff --git a/systemtest/testdata/testset1/trim1.ql.java.out b/systemtest/testdata/testset1/trim1.ql.java.out
new file mode 100644
index 0000000..fb615af
--- /dev/null
+++ b/systemtest/testdata/testset1/trim1.ql.java.out
@@ -0,0 +1,29 @@
+
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [2:5,5:8]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 16
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [2:5,5:8]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 16
+ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/trim1.ql.out b/systemtest/testdata/testset1/trim1.ql.out
new file mode 100644
index 0000000..dd783e2
--- /dev/null
+++ b/systemtest/testdata/testset1/trim1.ql.out
@@ -0,0 +1,30 @@
+-- Testbed line: result_type=set <marray <char, [2:5,5:8]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <char, [2:5,5:8]>
+ Type Schema...........: marray< char >
+ Domain................: [2:5,5:8]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 16
+ 0 0 0 0
+ 0 0 0 0
+ 0 0 0 0
+ 0 0 0 0
+Image 2
+GMarray
+ Type Structure........: marray <char, [2:5,5:8]>
+ Type Schema...........: marray< char >
+ Domain................: [2:5,5:8]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 16
+ 1 1 1 1
+ 1 1 1 1
+ 1 1 1 1
+ 1 1 1 1
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/trim2.ql b/systemtest/testdata/testset1/trim2.ql
new file mode 100644
index 0000000..f0b3ee4
--- /dev/null
+++ b/systemtest/testdata/testset1/trim2.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <long, [2:5,5:8]>>
+-- Testbed: result_elements=2
+
+select (a*2)[2:5,5:8]
+from ImgCharA as a
diff --git a/systemtest/testdata/testset1/trim2.ql.java.out b/systemtest/testdata/testset1/trim2.ql.java.out
new file mode 100644
index 0000000..bef0467
--- /dev/null
+++ b/systemtest/testdata/testset1/trim2.ql.java.out
@@ -0,0 +1,29 @@
+
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [2:5,5:8]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 64
+ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+rasj.RasMArrayInteger
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [2:5,5:8]
+ TilingDomain..........: [0:177,0:177]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 4
+ Data format...........: 0
+ Data size (bytes).....: 64
+ 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 0 0 0 2 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/trim2.ql.out b/systemtest/testdata/testset1/trim2.ql.out
new file mode 100644
index 0000000..f18042c
--- /dev/null
+++ b/systemtest/testdata/testset1/trim2.ql.out
@@ -0,0 +1,30 @@
+-- Testbed line: result_type=set <marray <long, [2:5,5:8]>>
+-- Testbed line: result_elements=2
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <long, [2:5,5:8]>
+ Type Schema...........: marray< long >
+ Domain................: [2:5,5:8]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 64
+ 0 0 0 0
+ 0 0 0 0
+ 0 0 0 0
+ 0 0 0 0
+Image 2
+GMarray
+ Type Structure........: marray <long, [2:5,5:8]>
+ Type Schema...........: marray< long >
+ Domain................: [2:5,5:8]
+ Base Type Schema......: long
+ Base Type Length......: 4
+ Data format.......... : Array
+ Data size (bytes).... : 64
+ 2 2 2 2
+ 2 2 2 2
+ 2 2 2 2
+ 2 2 2 2
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/trim3.ql b/systemtest/testdata/testset1/trim3.ql
new file mode 100644
index 0000000..51a6c32
--- /dev/null
+++ b/systemtest/testdata/testset1/trim3.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <char, [2:5,5:8]>>
+-- Testbed: result_elements=4
+
+select a[2:5,5:8]+b[2:5,5:8]
+from ImgCharA as a, ImgCharB as b
diff --git a/systemtest/testdata/testset1/trim3.ql.java.out b/systemtest/testdata/testset1/trim3.ql.java.out
new file mode 100644
index 0000000..ac8312e
--- /dev/null
+++ b/systemtest/testdata/testset1/trim3.ql.java.out
@@ -0,0 +1,57 @@
+
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [2:5,5:8]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 16
+ 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [2:5,5:8]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 16
+ 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [2:5,5:8]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 16
+ 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [2:5,5:8]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 16
+ 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/trim3.ql.out b/systemtest/testdata/testset1/trim3.ql.out
new file mode 100644
index 0000000..6cab68c
--- /dev/null
+++ b/systemtest/testdata/testset1/trim3.ql.out
@@ -0,0 +1,56 @@
+-- Testbed line: result_type=set <marray <char, [2:5,5:8]>>
+-- Testbed line: result_elements=4
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <char, [2:5,5:8]>
+ Type Schema...........: marray< char >
+ Domain................: [2:5,5:8]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 16
+ 10 10 10 10
+ 10 10 10 10
+ 10 10 10 10
+ 10 10 10 10
+Image 2
+GMarray
+ Type Structure........: marray <char, [2:5,5:8]>
+ Type Schema...........: marray< char >
+ Domain................: [2:5,5:8]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 16
+ 11 11 11 11
+ 11 11 11 11
+ 11 11 11 11
+ 11 11 11 11
+Image 3
+GMarray
+ Type Structure........: marray <char, [2:5,5:8]>
+ Type Schema...........: marray< char >
+ Domain................: [2:5,5:8]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 16
+ 20 20 20 20
+ 20 20 20 20
+ 20 20 20 20
+ 20 20 20 20
+Image 4
+GMarray
+ Type Structure........: marray <char, [2:5,5:8]>
+ Type Schema...........: marray< char >
+ Domain................: [2:5,5:8]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 16
+ 21 21 21 21
+ 21 21 21 21
+ 21 21 21 21
+ 21 21 21 21
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/trim4.ql b/systemtest/testdata/testset1/trim4.ql
new file mode 100644
index 0000000..9750e1b
--- /dev/null
+++ b/systemtest/testdata/testset1/trim4.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <char, [2:5,5:8]>>
+-- Testbed: result_elements=4
+
+select (a+b)[2:5,5:8]
+from ImgCharA as a, ImgCharB as b
diff --git a/systemtest/testdata/testset1/trim4.ql.java.out b/systemtest/testdata/testset1/trim4.ql.java.out
new file mode 100644
index 0000000..ac8312e
--- /dev/null
+++ b/systemtest/testdata/testset1/trim4.ql.java.out
@@ -0,0 +1,57 @@
+
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [2:5,5:8]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 16
+ 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [2:5,5:8]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 16
+ 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [2:5,5:8]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 16
+ 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [2:5,5:8]
+ TilingDomain..........: [0:356,0:356]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 16
+ 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/trim4.ql.out b/systemtest/testdata/testset1/trim4.ql.out
new file mode 100644
index 0000000..6cab68c
--- /dev/null
+++ b/systemtest/testdata/testset1/trim4.ql.out
@@ -0,0 +1,56 @@
+-- Testbed line: result_type=set <marray <char, [2:5,5:8]>>
+-- Testbed line: result_elements=4
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <char, [2:5,5:8]>
+ Type Schema...........: marray< char >
+ Domain................: [2:5,5:8]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 16
+ 10 10 10 10
+ 10 10 10 10
+ 10 10 10 10
+ 10 10 10 10
+Image 2
+GMarray
+ Type Structure........: marray <char, [2:5,5:8]>
+ Type Schema...........: marray< char >
+ Domain................: [2:5,5:8]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 16
+ 11 11 11 11
+ 11 11 11 11
+ 11 11 11 11
+ 11 11 11 11
+Image 3
+GMarray
+ Type Structure........: marray <char, [2:5,5:8]>
+ Type Schema...........: marray< char >
+ Domain................: [2:5,5:8]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 16
+ 20 20 20 20
+ 20 20 20 20
+ 20 20 20 20
+ 20 20 20 20
+Image 4
+GMarray
+ Type Structure........: marray <char, [2:5,5:8]>
+ Type Schema...........: marray< char >
+ Domain................: [2:5,5:8]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 16
+ 21 21 21 21
+ 21 21 21 21
+ 21 21 21 21
+ 21 21 21 21
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/trim5.ql b/systemtest/testdata/testset1/trim5.ql
new file mode 100644
index 0000000..3f68232
--- /dev/null
+++ b/systemtest/testdata/testset1/trim5.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <char, [0:10]>>
+-- Testbed: result_elements=4
+
+select (a * b)[5,*:*].green
+from ImgRGBA as a, ImgRGBA as b
diff --git a/systemtest/testdata/testset1/trim5.ql.java.out b/systemtest/testdata/testset1/trim5.ql.java.out
new file mode 100644
index 0000000..c104e32
--- /dev/null
+++ b/systemtest/testdata/testset1/trim5.ql.java.out
@@ -0,0 +1,57 @@
+
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10]
+ TilingDomain..........: [0:127999]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 11
+ 4 4 4 4 4 4 4 4 4 4 4
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10]
+ TilingDomain..........: [0:127999]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 11
+ 4 4 4 4 4 4 4 4 4 4 4
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10]
+ TilingDomain..........: [0:127999]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 11
+ 4 4 4 4 4 4 4 4 4 4 4
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10]
+ TilingDomain..........: [0:127999]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 11
+ 4 4 4 4 4 4 4 4 4 4 4 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/trim5.ql.out b/systemtest/testdata/testset1/trim5.ql.out
new file mode 100644
index 0000000..276581c
--- /dev/null
+++ b/systemtest/testdata/testset1/trim5.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <char, [0:10]>>
+-- Testbed line: result_elements=4
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <char, [0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 11
+ 4 4 4 4 4 4 4 4 4 4 4
+Image 2
+GMarray
+ Type Structure........: marray <char, [0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 11
+ 4 4 4 4 4 4 4 4 4 4 4
+Image 3
+GMarray
+ Type Structure........: marray <char, [0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 11
+ 4 4 4 4 4 4 4 4 4 4 4
+Image 4
+GMarray
+ Type Structure........: marray <char, [0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 11
+ 4 4 4 4 4 4 4 4 4 4 4
+-- Testbed end block:
diff --git a/systemtest/testdata/testset1/trim6.ql b/systemtest/testdata/testset1/trim6.ql
new file mode 100644
index 0000000..f8a8468
--- /dev/null
+++ b/systemtest/testdata/testset1/trim6.ql
@@ -0,0 +1,5 @@
+-- Testbed: result_type=set <marray <char, [0:10]>>
+-- Testbed: result_elements=4
+
+select (a * b).green [5,*:*]
+from ImgRGBA as a, ImgRGBA as b
diff --git a/systemtest/testdata/testset1/trim6.ql.java.out b/systemtest/testdata/testset1/trim6.ql.java.out
new file mode 100644
index 0000000..c104e32
--- /dev/null
+++ b/systemtest/testdata/testset1/trim6.ql.java.out
@@ -0,0 +1,57 @@
+
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10]
+ TilingDomain..........: [0:127999]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 11
+ 4 4 4 4 4 4 4 4 4 4 4
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10]
+ TilingDomain..........: [0:127999]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 11
+ 4 4 4 4 4 4 4 4 4 4 4
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10]
+ TilingDomain..........: [0:127999]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 11
+ 4 4 4 4 4 4 4 4 4 4 4
+rasj.RasMArrayByte
+ Object Name...........:
+ Object Type...........: 1
+ Object Type Name......:
+ Type Structure........:
+ Type Schema...........: <nn>
+ Domain................: [0:10]
+ TilingDomain..........: [0:127999]
+ TileSize..............: 128000 bytes
+ Base Type Schema......: <nn>
+ Base Type Length......: 1
+ Data format...........: 0
+ Data size (bytes).....: 11
+ 4 4 4 4 4 4 4 4 4 4 4 \ No newline at end of file
diff --git a/systemtest/testdata/testset1/trim6.ql.out b/systemtest/testdata/testset1/trim6.ql.out
new file mode 100644
index 0000000..276581c
--- /dev/null
+++ b/systemtest/testdata/testset1/trim6.ql.out
@@ -0,0 +1,44 @@
+-- Testbed line: result_type=set <marray <char, [0:10]>>
+-- Testbed line: result_elements=4
+-- Testbed start block:
+Image 1
+GMarray
+ Type Structure........: marray <char, [0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 11
+ 4 4 4 4 4 4 4 4 4 4 4
+Image 2
+GMarray
+ Type Structure........: marray <char, [0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 11
+ 4 4 4 4 4 4 4 4 4 4 4
+Image 3
+GMarray
+ Type Structure........: marray <char, [0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 11
+ 4 4 4 4 4 4 4 4 4 4 4
+Image 4
+GMarray
+ Type Structure........: marray <char, [0:10]>
+ Type Schema...........: marray< char >
+ Domain................: [0:10]
+ Base Type Schema......: char
+ Base Type Length......: 1
+ Data format.......... : Array
+ Data size (bytes).... : 11
+ 4 4 4 4 4 4 4 4 4 4 4
+-- Testbed end block: