about summary refs log tree commit diff stats
path: root/html/057static_dispatch.cc.html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-01-26 23:47:23 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-01-26 23:47:23 -0800
commitd009e158803956c76adbf8f58a62884c3e7affb3 (patch)
treeb88198e28d15cd1fc064f5300365a190decc4c50 /html/057static_dispatch.cc.html
parent2da43c9462c7b7c1bb78d2f2826b3b97b4874973 (diff)
downloadmu-d009e158803956c76adbf8f58a62884c3e7affb3.tar.gz
2605
Diffstat (limited to 'html/057static_dispatch.cc.html')
-rw-r--r--html/057static_dispatch.cc.html98
1 files changed, 33 insertions, 65 deletions
diff --git a/html/057static_dispatch.cc.html b/html/057static_dispatch.cc.html
index 04d02ab2..319c72e9 100644
--- a/html/057static_dispatch.cc.html
+++ b/html/057static_dispatch.cc.html
@@ -13,8 +13,8 @@
 pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background-color: #080808; }
 body { font-family: monospace; color: #eeeeee; background-color: #080808; }
 * { font-size: 1.05em; }
-.traceContains { color: #008000; }
 .traceAbsent { color: #c00000; }
+.traceContains { color: #008000; }
 .Identifier { color: #804000; }
 .cSpecial { color: #008000; }
 .Comment { color: #9090ff; }
@@ -65,16 +65,14 @@ for <span class="Delimiter">(</span>map&lt;string<span class="Delimiter">,</span
 <span class="Delimiter">}</span>
 
 <span class="Delimiter">:(before &quot;End Load Recipe Header(result)&quot;)</span>
-if <span class="Delimiter">(</span>contains_key<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> result<span class="Delimiter">.</span>name<span class="Delimiter">))</span> <span class="Delimiter">{</span>
+if <span class="Delimiter">(</span>result<span class="Delimiter">.</span>name != <span class="Constant">&quot;main&quot;</span> &amp;&amp; contains_key<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> result<span class="Delimiter">.</span>name<span class="Delimiter">))</span> <span class="Delimiter">{</span>
   const recipe_ordinal r = get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> result<span class="Delimiter">.</span>name<span class="Delimiter">);</span>
-<span class="CommentedCode">//?   LOG &lt;&lt; &quot;checking &quot; &lt;&lt; r &lt;&lt; &quot; &quot; &lt;&lt; result.name &lt;&lt; '\n';</span>
 <span class="CommentedCode">//?   cerr &lt;&lt; result.name &lt;&lt; &quot;: &quot; &lt;&lt; contains_key(Recipe, r) &lt;&lt; (contains_key(Recipe, r) ? get(Recipe, r).has_header : 0) &lt;&lt; matching_variant_name(result) &lt;&lt; '\n';</span>
   if <span class="Delimiter">(</span>!contains_key<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">)</span> || get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">).</span>has_header<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     string new_name = matching_variant_name<span class="Delimiter">(</span>result<span class="Delimiter">);</span>
     if <span class="Delimiter">(</span>new_name<span class="Delimiter">.</span>empty<span class="Delimiter">())</span> <span class="Delimiter">{</span>
       <span class="Comment">// variant doesn't already exist</span>
       new_name = next_unused_recipe_name<span class="Delimiter">(</span>result<span class="Delimiter">.</span>name<span class="Delimiter">);</span>
-<span class="CommentedCode">//?       LOG &lt;&lt; &quot;adding a variant of &quot; &lt;&lt; result.name &lt;&lt; &quot;: &quot; &lt;&lt; new_name &lt;&lt; &quot; is now &quot; &lt;&lt; Next_recipe_ordinal &lt;&lt; '\n';</span>
       put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> new_name<span class="Delimiter">,</span> Next_recipe_ordinal++<span class="Delimiter">);</span>
       get_or_insert<span class="Delimiter">(</span>Recipe_variants<span class="Delimiter">,</span> result<span class="Delimiter">.</span>name<span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> new_name<span class="Delimiter">));</span>
     <span class="Delimiter">}</span>
@@ -84,7 +82,6 @@ if <span class="Delimiter">(</span>contains_key<span class="Delimiter">(</span>R
 <span class="Delimiter">}</span>
 else <span class="Delimiter">{</span>
   <span class="Comment">// save first variant</span>
-<span class="CommentedCode">//?   LOG &lt;&lt; &quot;saving first variant of &quot; &lt;&lt; result.name &lt;&lt; &quot;: &quot; &lt;&lt; Next_recipe_ordinal &lt;&lt; '\n';</span>
   put<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> result<span class="Delimiter">.</span>name<span class="Delimiter">,</span> Next_recipe_ordinal++<span class="Delimiter">);</span>
   get_or_insert<span class="Delimiter">(</span>Recipe_variants<span class="Delimiter">,</span> result<span class="Delimiter">.</span>name<span class="Delimiter">).</span>push_back<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe_ordinal<span class="Delimiter">,</span> result<span class="Delimiter">.</span>name<span class="Delimiter">));</span>
 <span class="Delimiter">}</span>
@@ -93,14 +90,11 @@ else <span class="Delimiter">{</span>
 string matching_variant_name<span class="Delimiter">(</span>const recipe&amp; rr<span class="Delimiter">)</span> <span class="Delimiter">{</span>
   const vector&lt;recipe_ordinal&gt;&amp; variants = get_or_insert<span class="Delimiter">(</span>Recipe_variants<span class="Delimiter">,</span> rr<span class="Delimiter">.</span>name<span class="Delimiter">);</span>
   for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>variants<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
-<span class="CommentedCode">//?     LOG &lt;&lt; &quot;checking variant &quot; &lt;&lt; variants.at(i) &lt;&lt; &quot; of &quot; &lt;&lt; rr.name &lt;&lt; '\n';</span>
     if <span class="Delimiter">(</span>!contains_key<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> variants<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span>
     const recipe&amp; candidate = get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> variants<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">));</span>
     if <span class="Delimiter">(</span>!all_reagents_match<span class="Delimiter">(</span>rr<span class="Delimiter">,</span> candidate<span class="Delimiter">))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span>
-<span class="CommentedCode">//?     LOG &lt;&lt; &quot;  exists\n&quot;;</span>
     <span class="Identifier">return</span> candidate<span class="Delimiter">.</span>name<span class="Delimiter">;</span>
   <span class="Delimiter">}</span>
-<span class="CommentedCode">//?   LOG &lt;&lt; &quot;  does not exist\n&quot;;</span>
   <span class="Identifier">return</span> <span class="Constant">&quot;&quot;</span><span class="Delimiter">;</span>
 <span class="Delimiter">}</span>
 
@@ -178,7 +172,7 @@ for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</
 <span class="Delimiter">}</span>
 
 <span class="Comment">//: after filling in all missing types (because we'll be introducing 'blank' types in this transform in a later layer, for shape-shifting recipes)</span>
-<span class="Delimiter">:(after &quot;End Type Modifying Transforms&quot;)</span>
+<span class="Delimiter">:(after &quot;Transform.push_back(transform_names)&quot;)</span>
 Transform<span class="Delimiter">.</span>push_back<span class="Delimiter">(</span>resolve_ambiguous_calls<span class="Delimiter">);</span>  <span class="Comment">// idempotent</span>
 
 <span class="Delimiter">:(code)</span>
@@ -224,13 +218,8 @@ long long int variant_score<span class="Delimiter">(</span>const instruction&amp
     <span class="Identifier">return</span> -<span class="Constant">1</span><span class="Delimiter">;</span>
   <span class="Delimiter">}</span>
   const vector&lt;reagent&gt;&amp; header_ingredients = get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> variant<span class="Delimiter">).</span>ingredients<span class="Delimiter">;</span>
-  if <span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span> &lt; SIZE<span class="Delimiter">(</span>header_ingredients<span class="Delimiter">))</span> <span class="Delimiter">{</span>
-    trace<span class="Delimiter">(</span><span class="Constant">9993</span><span class="Delimiter">,</span> <span class="Constant">&quot;transform&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;too few ingredients&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
-<span class="CommentedCode">//?     cerr &lt;&lt; &quot;too few ingredients\n&quot;;</span>
-    <span class="Identifier">return</span> -<span class="Constant">1</span><span class="Delimiter">;</span>
-  <span class="Delimiter">}</span>
 <span class="CommentedCode">//?   cerr &lt;&lt; &quot;=== checking ingredients\n&quot;;</span>
-  for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>header_ingredients<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; min<span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">),</span> SIZE<span class="Delimiter">(</span>header_ingredients<span class="Delimiter">));</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     if <span class="Delimiter">(</span>!types_match<span class="Delimiter">(</span>header_ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">),</span> inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)))</span> <span class="Delimiter">{</span>
       trace<span class="Delimiter">(</span><span class="Constant">9993</span><span class="Delimiter">,</span> <span class="Constant">&quot;transform&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;mismatch: ingredient &quot;</span> &lt;&lt; i &lt;&lt; end<span class="Delimiter">();</span>
 <span class="CommentedCode">//?       cerr &lt;&lt; &quot;mismatch: ingredient &quot; &lt;&lt; i &lt;&lt; '\n';</span>
@@ -253,13 +242,8 @@ long long int variant_score<span class="Delimiter">(</span>const instruction&amp
     <span class="Delimiter">}</span>
   <span class="Delimiter">}</span>
 <span class="CommentedCode">//?   cerr &lt;&lt; &quot;=== done checking ingredients\n&quot;;</span>
-  if <span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">)</span> &gt; SIZE<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> variant<span class="Delimiter">).</span>products<span class="Delimiter">))</span> <span class="Delimiter">{</span>
-    trace<span class="Delimiter">(</span><span class="Constant">9993</span><span class="Delimiter">,</span> <span class="Constant">&quot;transform&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;too few products&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
-<span class="CommentedCode">//?     cerr &lt;&lt; &quot;too few products\n&quot;;</span>
-    <span class="Identifier">return</span> -<span class="Constant">1</span><span class="Delimiter">;</span>
-  <span class="Delimiter">}</span>
   const vector&lt;reagent&gt;&amp; header_products = get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> variant<span class="Delimiter">).</span>products<span class="Delimiter">;</span>
-  for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">);</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
+  for <span class="Delimiter">(</span>long long int i = <span class="Constant">0</span><span class="Delimiter">;</span> i &lt; min<span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>header_products<span class="Delimiter">),</span> SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">));</span> ++i<span class="Delimiter">)</span> <span class="Delimiter">{</span>
     if <span class="Delimiter">(</span>is_dummy<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)))</span> <span class="Identifier">continue</span><span class="Delimiter">;</span>
     if <span class="Delimiter">(</span>!types_match<span class="Delimiter">(</span>header_products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">),</span> inst<span class="Delimiter">.</span>products<span class="Delimiter">.</span>at<span class="Delimiter">(</span>i<span class="Delimiter">)))</span> <span class="Delimiter">{</span>
       trace<span class="Delimiter">(</span><span class="Constant">9993</span><span class="Delimiter">,</span> <span class="Constant">&quot;transform&quot;</span><span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;mismatch: product &quot;</span> &lt;&lt; i &lt;&lt; end<span class="Delimiter">();</span>
@@ -283,8 +267,8 @@ long long int variant_score<span class="Delimiter">(</span>const instruction&amp
     <span class="Delimiter">}</span>
   <span class="Delimiter">}</span>
   <span class="Comment">// the greater the number of unused ingredients/products, the lower the score</span>
-  <span class="Identifier">return</span> result - <span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> variant<span class="Delimiter">).</span>products<span class="Delimiter">)</span>-SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">))</span>
-                - <span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span>-SIZE<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> variant<span class="Delimiter">).</span>ingredients<span class="Delimiter">));</span>  <span class="Comment">// ok to go negative</span>
+  <span class="Identifier">return</span> result - abs<span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> variant<span class="Delimiter">).</span>products<span class="Delimiter">)</span>-SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>products<span class="Delimiter">))</span>
+                - abs<span class="Delimiter">(</span>SIZE<span class="Delimiter">(</span>inst<span class="Delimiter">.</span>ingredients<span class="Delimiter">)</span>-SIZE<span class="Delimiter">(</span>get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> variant<span class="Delimiter">).</span>ingredients<span class="Delimiter">));</span>
 <span class="Delimiter">}</span>
 
 <span class="Delimiter">:(scenario static_dispatch_disabled_on_headerless_definition)</span>
@@ -348,13 +332,13 @@ $error: <span class="Constant">0</span>
 <span class="Delimiter">:(scenario static_dispatch_works_with_compound_type_containing_container_defined_after_first_use)</span>
 <span class="Special">% Hide_errors = true;</span>
 recipe main [
-  x:address:foo<span class="Special"> &lt;- </span>new foo:type
+  x:address:shared:foo<span class="Special"> &lt;- </span>new foo:type
   test x
 ]
 container foo [
   x:number
 ]
-recipe test a:address:foo <span class="Delimiter">-&gt;</span> z:number [
+recipe test a:address:shared:foo <span class="Delimiter">-&gt;</span> z:number [
   local-scope
   load-ingredients
   z:number<span class="Special"> &lt;- </span>get *a<span class="Delimiter">,</span> x:offset
@@ -364,10 +348,10 @@ $error: <span class="Constant">0</span>
 <span class="Delimiter">:(scenario static_dispatch_works_with_compound_type_containing_container_defined_after_second_use)</span>
 <span class="Special">% Hide_errors = true;</span>
 recipe main [
-  x:address:foo<span class="Special"> &lt;- </span>new foo:type
+  x:address:shared:foo<span class="Special"> &lt;- </span>new foo:type
   test x
 ]
-recipe test a:address:foo <span class="Delimiter">-&gt;</span> z:number [
+recipe test a:address:shared:foo <span class="Delimiter">-&gt;</span> z:number [
   local-scope
   load-ingredients
   z:number<span class="Special"> &lt;- </span>get *a<span class="Delimiter">,</span> x:offset
@@ -400,7 +384,7 @@ recipe foo x:number <span class="Delimiter">-&gt;</span> y:number [
   load-ingredients
   reply <span class="Constant">34</span>
 ]
-<span class="traceContains">+error: foo: wrong type for ingredient x:number</span>
+<span class="traceContains">+error: main: ingredient 0 has the wrong type at '1:number/raw &lt;- foo x'</span>
 <span class="traceAbsent">-mem: storing 34 in location 1</span>
 
 <span class="Delimiter">:(scenario static_dispatch_dispatches_literal_to_boolean_before_character)</span>
@@ -454,43 +438,6 @@ recipe foo x:number <span class="Delimiter">-&gt;</span> y:number [
 <span class="Comment"># number variant is preferred</span>
 <span class="traceContains">+mem: storing 35 in location 1</span>
 
-<span class="Comment">//: after we make all attempts to dispatch, any unhandled cases will end up at</span>
-<span class="Comment">//: some wrong variant and trigger an error while trying to load-ingredients</span>
-
-<span class="Delimiter">:(scenario static_dispatch_shows_clear_error_on_missing_variant)</span>
-<span class="Special">% Hide_errors = true;</span>
-recipe main [
-  <span class="Constant">1</span>:number<span class="Special"> &lt;- </span>foo <span class="Constant">34</span>
-]
-recipe foo x:boolean <span class="Delimiter">-&gt;</span> y:number [
-  local-scope
-  load-ingredients
-  reply <span class="Constant">35</span>
-]
-<span class="traceContains">+error: foo: wrong type for ingredient x:boolean</span>
-<span class="traceContains">+error:   (we're inside recipe foo x:boolean -&gt; y:number)</span>
-<span class="traceContains">+error:   (we're trying to call '1:number &lt;- foo 34' inside recipe main)</span>
-
-<span class="Delimiter">:(before &quot;End next-ingredient Type Mismatch Error&quot;)</span>
-raise_error &lt;&lt; <span class="Constant">&quot;   (we're inside &quot;</span> &lt;&lt; header_label<span class="Delimiter">(</span>current_call<span class="Delimiter">().</span>running_recipe<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;)</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
-raise_error &lt;&lt; <span class="Constant">&quot;   (we're trying to call '&quot;</span> &lt;&lt; to_instruction<span class="Delimiter">(</span>*++Current_routine<span class="Delimiter">-&gt;</span>calls<span class="Delimiter">.</span>begin<span class="Delimiter">()).</span>to_string<span class="Delimiter">()</span> &lt;&lt; <span class="Constant">&quot;' inside &quot;</span> &lt;&lt; header_label<span class="Delimiter">((</span>++Current_routine<span class="Delimiter">-&gt;</span>calls<span class="Delimiter">.</span>begin<span class="Delimiter">())-&gt;</span>running_recipe<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;)</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
-
-<span class="Delimiter">:(scenario static_dispatch_shows_clear_error_on_missing_variant_2)</span>
-<span class="Special">% Hide_errors = true;</span>
-recipe main [
-  <span class="Constant">1</span>:boolean<span class="Special"> &lt;- </span>foo <span class="Constant">34</span>
-]
-recipe foo x:number <span class="Delimiter">-&gt;</span> y:number [
-  local-scope
-  load-ingredients
-  reply x
-]
-<span class="traceContains">+error: foo: reply ingredient x can't be saved in 1:boolean</span>
-<span class="traceContains">+error:   (we just returned from recipe foo x:number -&gt; y:number)</span>
-
-<span class="Delimiter">:(before &quot;End reply Type Mismatch Error&quot;)</span>
-raise_error &lt;&lt; <span class="Constant">&quot;   (we just returned from &quot;</span> &lt;&lt; header_label<span class="Delimiter">(</span>caller_instruction<span class="Delimiter">.</span>operation<span class="Delimiter">)</span> &lt;&lt; <span class="Constant">&quot;)</span><span class="cSpecial">\n</span><span class="Constant">&quot;</span> &lt;&lt; end<span class="Delimiter">();</span>
-
 <span class="Delimiter">:(code)</span>
 string header_label<span class="Delimiter">(</span>recipe_ordinal r<span class="Delimiter">)</span> <span class="Delimiter">{</span>
   const recipe&amp; caller = get<span class="Delimiter">(</span>Recipe<span class="Delimiter">,</span> r<span class="Delimiter">);</span>
@@ -527,6 +474,27 @@ recipe! foo x:address:number <span class="Delimiter">-&gt;</span> y:number [
 <span class="traceContains">+mem: storing 34 in location 2</span>
 $error: <span class="Constant">0</span>
 $warn: <span class="Constant">0</span>
+
+<span class="Delimiter">:(scenario dispatch_errors_come_after_unknown_name_errors)</span>
+<span class="Special">% Hide_errors = true;</span>
+recipe main [
+  y:number<span class="Special"> &lt;- </span>foo x
+]
+recipe foo a:number <span class="Delimiter">-&gt;</span> b:number [
+  local-scope
+  load-ingredients
+  reply <span class="Constant">34</span>
+]
+recipe foo a:boolean <span class="Delimiter">-&gt;</span> b:number [
+  local-scope
+  load-ingredients
+  reply <span class="Constant">35</span>
+]
+<span class="traceContains">+error: main: missing type for x in 'y:number &lt;- foo x'</span>
+<span class="traceContains">+error: main: failed to find a matching call for 'y:number &lt;- foo x'</span>
+
+<span class="Delimiter">:(before &quot;End Includes&quot;)</span>
+using std::abs<span class="Delimiter">;</span>
 </pre>
 </body>
 </html>