From f344b250f6f062a1a1902bf69b23ebf9b565de0e Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 17 Sep 2016 15:01:51 -0700 Subject: 3395 --- html/055shape_shifting_container.cc.html | 110 +++++++++++++++---------------- 1 file changed, 55 insertions(+), 55 deletions(-) (limited to 'html/055shape_shifting_container.cc.html') diff --git a/html/055shape_shifting_container.cc.html b/html/055shape_shifting_container.cc.html index d6bc71c3..42065f9c 100644 --- a/html/055shape_shifting_container.cc.html +++ b/html/055shape_shifting_container.cc.html @@ -59,10 +59,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color :(scenario size_of_shape_shifting_container) container foo:_t [ x:_t - y:number + y:num ] def main [ - 1:foo:number <- merge 12, 13 + 1:foo:num <- merge 12, 13 3:foo:point <- merge 14, 15, 16 ] +mem: storing 12 in location 1 @@ -78,7 +78,7 @@ container foo:_a:_b [ y:_b ] def main [ - 1:foo:number:boolean <- merge 34, 1/true + 1:foo:num:bool <- merge 34, 1/true ] $error: 0 @@ -88,9 +88,9 @@ container foo:_a:_b [ y:_b ] def main [ - 1:address:array:character <- new [abc] + 1:text <- new [abc] # compound types for type ingredients - {2: (foo number (address array character))} <- merge 34/x, 1:address:array:character/y + {2: (foo number (address array character))} <- merge 34/x, 1:text/y ] $error: 0 @@ -104,8 +104,8 @@ container bar:_a:_b [ {data: (foo _a (address _b))} ] def main [ - 1:address:array:character <- new [abc] - 2:bar:number:array:character <- merge 34/x, 1:address:array:character/y + 1:text <- new [abc] + 2:bar:num:@:char <- merge 34/x, 1:text/y ] $error: 0 @@ -131,7 +131,7 @@ container foo:_b [ :(scenario type_ingredient_must_start_with_underscore) % Hide_errors = true; container foo:t [ - x:number + x:num ] +error: foo: type ingredient 't' must begin with an underscore @@ -238,10 +238,10 @@ map<string, type_ordinal> type_ingredient_n :(scenario size_of_shape_shifting_exclusive_container) exclusive-container foo:_t [ x:_t - y:number + y:num ] def main [ - 1:foo:number <- merge 0/x, 34 + 1:foo:num <- merge 0/x, 34 3:foo:point <- merge 0/x, 15, 16 6:foo:point <- merge 1/y, 23 ] @@ -262,18 +262,18 @@ def main [ :(scenario get_on_shape_shifting_container) container foo:_t [ x:_t - y:number + y:num ] def main [ 1:foo:point <- merge 14, 15, 16 - 2:number <- get 1:foo:point, y:offset + 2:num <- get 1:foo:point, y:offset ] +mem: storing 16 in location 2 :(scenario get_on_shape_shifting_container_2) container foo:_t [ x:_t - y:number + y:num ] def main [ 1:foo:point <- merge 14, 15, 16 @@ -285,26 +285,26 @@ def main [ :(scenario get_on_shape_shifting_container_3) container foo:_t [ x:_t - y:number + y:num ] def main [ - 1:foo:address:point <- merge 34/unsafe, 48 - 3:address:point <- get 1:foo:address:point, x:offset + 1:foo:&:point <- merge 34/unsafe, 48 + 3:&:point <- get 1:foo:&:point, x:offset ] +mem: storing 34 in location 3 :(scenario get_on_shape_shifting_container_inside_container) container foo:_t [ x:_t - y:number + y:num ] container bar [ x:foo:point - y:number + y:num ] def main [ 1:bar <- merge 14, 15, 16, 17 - 2:number <- get 1:bar, 1:offset + 2:num <- get 1:bar, 1:offset ] +mem: storing 17 in location 2 @@ -314,10 +314,10 @@ container foo:_a:_b [ y:_b ] def main [ - 1:address:array:character <- new [abc] - {2: (foo number (address array character))} <- merge 34/x, 1:address:array:character/y - 3:address:array:character <- get {2: (foo number (address array character))}, y:offset - 4:boolean <- equal 1:address:array:character, 3:address:array:character + 1:text <- new [abc] + {2: (foo number (address array character))} <- merge 34/x, 1:text/y + 3:text <- get {2: (foo number (address array character))}, y:offset + 4:bool <- equal 1:text, 3:text ] +mem: storing 1 in location 4 @@ -403,7 +403,7 @@ assert(!contains_type_ingredientvoid test_replace_type_ingredients_entire() { run("container foo:_elem [\n" " x:_elem\n" - " y:number\n" + " y:num\n" "]\n"); reagent callsite("x:foo:point"); reagent element = element_type(callsite.type, 0); @@ -439,7 +439,7 @@ assert(!contains_type_ingredient" x:_elem\n" "]\n" "container bar:_elem [\n" - " x:foo:_elem:number\n" + " x:foo:_elem:num\n" "]\n"); reagent callsite("x:bar:address"); reagent element = element_type(callsite.type, 0); @@ -485,7 +485,7 @@ assert(!contains_type_ingredientvoid test_replace_middle_type_ingredient_with_multiple3() { run("container foo_table:_key:_value [\n" - " data:address:array:foo_table_row:_key:_value\n" + " data:&:@:foo_table_row:_key:_value\n" "]\n" "\n" "container foo_table_row:_key:_value [\n" @@ -509,11 +509,11 @@ assert(!contains_type_ingredient% Hide_errors = true; container foo:_t [ x:_t - y:number + y:num ] def main [ 10:foo:point <- merge 14, 15, 16 - 1:number <- get 10:foo, 1:offset + 1:num <- get 10:foo, 1:offset ] +error: illegal type "foo" seems to be missing a type ingredient or three @@ -538,7 +538,7 @@ type_info& info = get(Type:(before "End Unit Tests") void test_container_sizes_shape_shifting_container() { run("container foo:_t [\n" - " x:number\n" + " x:num\n" " y:_t\n" "]\n"); reagent r("x:foo:point"); @@ -548,23 +548,23 @@ type_info& info = get(Typevoid test_container_sizes_shape_shifting_exclusive_container() { run("exclusive-container foo:_t [\n" - " x:number\n" + " x:num\n" " y:_t\n" "]\n"); reagent r("x:foo:point"); compute_container_sizes(r); CHECK_EQ(r.metadata.size, 3); - reagent r2("x:foo:number"); + reagent r2("x:foo:num"); compute_container_sizes(r2); CHECK_EQ(r2.metadata.size, 2); } void test_container_sizes_compound_type_ingredient() { run("container foo:_t [\n" - " x:number\n" + " x:num\n" " y:_t\n" "]\n"); - reagent r("x:foo:address:point"); + reagent r("x:foo:&:point"); compute_container_sizes(r); CHECK_EQ(r.metadata.size, 2); // scan also pre-computes metadata for type ingredient @@ -575,10 +575,10 @@ type_info& info = get(Typevoid test_container_sizes_recursive_shape_shifting_container() { run("container foo:_t [\n" - " x:number\n" - " y:address:foo:_t\n" + " x:num\n" + " y:&:foo:_t\n" "]\n"); - reagent r2("x:foo:number"); + reagent r2("x:foo:num"); compute_container_sizes(r2); CHECK_EQ(r2.metadata.size, 2); } @@ -598,10 +598,10 @@ type_info& info = get(Type:(before "End Unit Tests") void test_container_address_offsets_in_shape_shifting_container() { run("container foo:_t [\n" - " x:number\n" + " x:num\n" " y:_t\n" "]\n"); - reagent r("x:foo:address:number"); + reagent r("x:foo:&:num"); compute_container_sizes(r); compute_container_address_offsets(r); CHECK_EQ(SIZE(r.metadata.address), 1); @@ -615,14 +615,14 @@ type_info& info = get(Typevoid test_container_address_offsets_in_nested_shape_shifting_container() { run("container foo:_t [\n" - " x:number\n" + " x:num\n" " y:_t\n" "]\n" "container bar:_t [\n" " x:_t\n" " y:foo:_t\n" "]\n"); - reagent r("x:bar:address:number"); + reagent r("x:bar:&:num"); CLEAR_TRACE; compute_container_sizes(r); compute_container_address_offsets(r); @@ -642,12 +642,12 @@ type_info& info = get(Type:(scenario merge_check_shape_shifting_container_containing_exclusive_container) container foo:_elem [ - x:number + x:num y:_elem ] exclusive-container bar [ - x:number - y:number + x:num + y:num ] def main [ 1:foo:bar <- merge 23, 1/y, 34 @@ -660,12 +660,12 @@ $error: 0 :(scenario merge_check_shape_shifting_container_containing_exclusive_container_2) % Hide_errors = true; container foo:_elem [ - x:number + x:num y:_elem ] exclusive-container bar [ - x:number - y:number + x:num + y:num ] def main [ 1:foo:bar <- merge 23, 1/y, 34, 35 @@ -674,12 +674,12 @@ def main [ :(scenario merge_check_shape_shifting_exclusive_container_containing_container) exclusive-container foo:_elem [ - x:number + x:num y:_elem ] container bar [ - x:number - y:number + x:num + y:num ] def main [ 1:foo:bar <- merge 1/y, 23, 34 @@ -691,12 +691,12 @@ $error: 0 :(scenario merge_check_shape_shifting_exclusive_container_containing_container_2) exclusive-container foo:_elem [ - x:number + x:num y:_elem ] container bar [ - x:number - y:number + x:num + y:num ] def main [ 1:foo:bar <- merge 0/x, 23 @@ -706,12 +706,12 @@ $error: 0 :(scenario merge_check_shape_shifting_exclusive_container_containing_container_3) % Hide_errors = true; exclusive-container foo:_elem [ - x:number + x:num y:_elem ] container bar [ - x:number - y:number + x:num + y:num ] def main [ 1:foo:bar <- merge 1/y, 23 -- cgit 1.4.1-2-gfad0