[SCM] Lisaac compiler branch, master, updated. 81cb6f7efce918e2162481d475b0e73fc43271bc

Benoit Sonntag sonntag at icps.u-strasbg.fr
Wed Jul 29 13:52:11 UTC 2009


The following commit has been merged in the master branch:
commit 81cb6f7efce918e2162481d475b0e73fc43271bc
Author: Benoit Sonntag <sonntag at icps.u-strasbg.fr>
Date:   Wed Jul 29 15:52:07 2009 +0200

    Bug Cowgar ok

diff --git a/lib2/string/abstract_string.li b/lib2/string/abstract_string.li
index 07aa6a9..3de38cd 100644
--- a/lib2/string/abstract_string.li
+++ b/lib2/string/abstract_string.li
@@ -376,7 +376,7 @@ Section Public
     result := TRUE;
     { (! result) || { i = 0}}.until_do {
       result := item i.is_bit;
-      i := i - 1
+      i := i - 1;
     };
     ? {result = (count = occurrences '0' + occurrences '1')};
     result
diff --git a/src/profil_block.li b/src/profil_block.li
index c00c688..a86085e 100644
--- a/src/profil_block.li
+++ b/src/profil_block.li
@@ -351,7 +351,21 @@ Section Public
   );
   */
   
-  - is_sub_type other:TYPE :BOOLEAN <- Self == other;
+  - is_sub_type other:TYPE :BOOLEAN <- 
+  ( + result:BOOLEAN;
+    + t:TYPE_BLOCK;
+        
+    result := Self == other;
+    (result).if_false {
+      t ?= other;
+      result := (
+        (t != NULL) && 
+        {t.argument_list = to_type_block.argument_list} &&
+        {to_type_block.is_sub_type_result t}
+      );
+    };
+    result
+  );
   
   //
   // Display.
diff --git a/src/type/type_block.li b/src/type/type_block.li
index a0f2d5d..67902aa 100644
--- a/src/type/type_block.li
+++ b/src/type/type_block.li
@@ -171,6 +171,26 @@ Section Public
     {me.result_list = result_list}
   );
   
+  - is_sub_type_result other:TYPE_BLOCK :BOOLEAN <-
+  ( + result:BOOLEAN;
+    + j:INTEGER;
+    (result_list = other.result_list) ||
+    {
+      (result_list != NULL) && 
+      {other.result_list != NULL} && 
+      {result_list.count = other.result_list.count} && 
+      {
+        result := TRUE;
+        j := result_list.lower;
+        {(j <= result_list.upper) && {result}}.while_do {
+          result := result_list.item j.is_sub_type (other.result_list.item j);
+          j := j + 1;
+        };
+        result
+      }
+    }
+  );
+  
   //
   // Display.
   //

-- 
Lisaac compiler



More information about the Lisaac-commits mailing list