[Avida-SVN] r2417 - in development: source/script source/targets/avida-s tests tests/_asl_fail_003_arg_default_req tests/_asl_fail_003_arg_default_req/config tests/_asl_fail_004_arg_missing_req tests/_asl_fail_004_arg_missing_req/config tests/_asl_fail_005_cannot_cast tests/_asl_fail_005_cannot_cast/config tests/_asl_fail_006_func_call_mismatch tests/_asl_fail_006_func_call_mismatch/config tests/_asl_fail_007_func_redef tests/_asl_fail_007_func_redef/config tests/_asl_fail_008_func_rtype_mismatch tests/_asl_fail_008_func_rtype_mismatch/config tests/_asl_fail_009_func_undeclared tests/_asl_fail_009_func_undeclared/config tests/_asl_fail_010_func_undefined tests/_asl_fail_010_func_undefined/config tests/_asl_fail_011_too_many_args tests/_asl_fail_011_too_many_args/config tests/_asl_fail_012_undefined_type_op tests/_asl_fail_012_undefined_type_op/config tests/_asl_fail_013_unpack_wild_nonarray tests/_asl_fail_013_unpack_wild_nonarray/config tests/_asl_fail_014_var_dims_invalid tes! ts/_asl_fail_014_var_dims_invalid/config tests/_asl_fail_015_var_undefined tests/_asl_fail_015_var_undefined/config tests/_asl_fail_016_var_redefinition tests/_asl_fail_016_var_redefinition/config tests/_asl_good_009_if_block tests/_asl_good_009_if_block/config tests/_asl_good_010_foreach_block tests/_asl_good_010_foreach_block/config tests/_asl_good_011_while_block tests/_asl_good_011_while_block/config tests/_asl_good_012_multiple_level_scope tests/_asl_good_012_multiple_level_scope/config

brysonda at myxo.css.msu.edu brysonda at myxo.css.msu.edu
Mon Mar 3 13:26:18 PST 2008


Author: brysonda
Date: 2008-03-03 16:26:17 -0500 (Mon, 03 Mar 2008)
New Revision: 2417

Added:
   development/tests/_asl_fail_003_arg_default_req/
   development/tests/_asl_fail_003_arg_default_req/config/
   development/tests/_asl_fail_003_arg_default_req/config/main.asl
   development/tests/_asl_fail_003_arg_default_req/expected/
   development/tests/_asl_fail_003_arg_default_req/test_list
   development/tests/_asl_fail_004_arg_missing_req/
   development/tests/_asl_fail_004_arg_missing_req/config/
   development/tests/_asl_fail_004_arg_missing_req/config/main.asl
   development/tests/_asl_fail_004_arg_missing_req/expected/
   development/tests/_asl_fail_004_arg_missing_req/test_list
   development/tests/_asl_fail_005_cannot_cast/
   development/tests/_asl_fail_005_cannot_cast/config/
   development/tests/_asl_fail_005_cannot_cast/config/main.asl
   development/tests/_asl_fail_005_cannot_cast/expected/
   development/tests/_asl_fail_005_cannot_cast/test_list
   development/tests/_asl_fail_006_func_call_mismatch/
   development/tests/_asl_fail_006_func_call_mismatch/config/
   development/tests/_asl_fail_006_func_call_mismatch/config/main.asl
   development/tests/_asl_fail_006_func_call_mismatch/expected/
   development/tests/_asl_fail_006_func_call_mismatch/test_list
   development/tests/_asl_fail_007_func_redef/
   development/tests/_asl_fail_007_func_redef/config/
   development/tests/_asl_fail_007_func_redef/config/main.asl
   development/tests/_asl_fail_007_func_redef/expected/
   development/tests/_asl_fail_007_func_redef/test_list
   development/tests/_asl_fail_008_func_rtype_mismatch/
   development/tests/_asl_fail_008_func_rtype_mismatch/config/
   development/tests/_asl_fail_008_func_rtype_mismatch/config/main.asl
   development/tests/_asl_fail_008_func_rtype_mismatch/expected/
   development/tests/_asl_fail_008_func_rtype_mismatch/test_list
   development/tests/_asl_fail_009_func_undeclared/
   development/tests/_asl_fail_009_func_undeclared/config/
   development/tests/_asl_fail_009_func_undeclared/config/main.asl
   development/tests/_asl_fail_009_func_undeclared/expected/
   development/tests/_asl_fail_009_func_undeclared/test_list
   development/tests/_asl_fail_010_func_undefined/
   development/tests/_asl_fail_010_func_undefined/config/
   development/tests/_asl_fail_010_func_undefined/config/main.asl
   development/tests/_asl_fail_010_func_undefined/expected/
   development/tests/_asl_fail_010_func_undefined/test_list
   development/tests/_asl_fail_011_too_many_args/
   development/tests/_asl_fail_011_too_many_args/config/
   development/tests/_asl_fail_011_too_many_args/config/main.asl
   development/tests/_asl_fail_011_too_many_args/expected/
   development/tests/_asl_fail_011_too_many_args/test_list
   development/tests/_asl_fail_012_undefined_type_op/
   development/tests/_asl_fail_012_undefined_type_op/config/
   development/tests/_asl_fail_012_undefined_type_op/config/main.asl
   development/tests/_asl_fail_012_undefined_type_op/expected/
   development/tests/_asl_fail_012_undefined_type_op/test_list
   development/tests/_asl_fail_013_unpack_wild_nonarray/
   development/tests/_asl_fail_013_unpack_wild_nonarray/config/
   development/tests/_asl_fail_013_unpack_wild_nonarray/config/main.asl
   development/tests/_asl_fail_013_unpack_wild_nonarray/expected/
   development/tests/_asl_fail_013_unpack_wild_nonarray/test_list
   development/tests/_asl_fail_014_var_dims_invalid/
   development/tests/_asl_fail_014_var_dims_invalid/config/
   development/tests/_asl_fail_014_var_dims_invalid/config/main.asl
   development/tests/_asl_fail_014_var_dims_invalid/expected/
   development/tests/_asl_fail_014_var_dims_invalid/test_list
   development/tests/_asl_fail_015_var_undefined/
   development/tests/_asl_fail_015_var_undefined/config/
   development/tests/_asl_fail_015_var_undefined/config/main.asl
   development/tests/_asl_fail_015_var_undefined/expected/
   development/tests/_asl_fail_015_var_undefined/test_list
   development/tests/_asl_fail_016_var_redefinition/
   development/tests/_asl_fail_016_var_redefinition/config/
   development/tests/_asl_fail_016_var_redefinition/config/main.asl
   development/tests/_asl_fail_016_var_redefinition/expected/
   development/tests/_asl_fail_016_var_redefinition/test_list
   development/tests/_asl_good_009_if_block/
   development/tests/_asl_good_009_if_block/config/
   development/tests/_asl_good_009_if_block/config/main.asl
   development/tests/_asl_good_009_if_block/expected/
   development/tests/_asl_good_009_if_block/test_list
   development/tests/_asl_good_010_foreach_block/
   development/tests/_asl_good_010_foreach_block/config/
   development/tests/_asl_good_010_foreach_block/config/main.asl
   development/tests/_asl_good_010_foreach_block/expected/
   development/tests/_asl_good_010_foreach_block/test_list
   development/tests/_asl_good_011_while_block/
   development/tests/_asl_good_011_while_block/config/
   development/tests/_asl_good_011_while_block/config/main.asl
   development/tests/_asl_good_011_while_block/expected/
   development/tests/_asl_good_011_while_block/test_list
   development/tests/_asl_good_012_multiple_level_scope/
   development/tests/_asl_good_012_multiple_level_scope/config/
   development/tests/_asl_good_012_multiple_level_scope/config/main.asl
   development/tests/_asl_good_012_multiple_level_scope/expected/
   development/tests/_asl_good_012_multiple_level_scope/test_list
Modified:
   development/source/script/AvidaScript.h
   development/source/script/cDumpASTVisitor.cc
   development/source/script/cParser.cc
   development/source/script/cSemanticASTVisitor.cc
   development/source/script/cSemanticASTVisitor.h
   development/source/script/cSymbolTable.cc
   development/source/script/cSymbolTable.h
   development/source/targets/avida-s/main.cc
Log:
AS:
Add tests to validate semantic check functionality.
Fix various parser bugs.
Fix semantic error reporting for multi-argument errors.
Add PostCheck pass to check the global symbol table.
Define the code of the internal main function within the symbol table.
Add name-shadowing to the symbol table, so that lower scoped symbols can override higher scopes.
Add single definition debug toggles to parser and semantic checker

Modified: development/source/script/AvidaScript.h
===================================================================
--- development/source/script/AvidaScript.h	2008-03-03 16:26:48 UTC (rev 2416)
+++ development/source/script/AvidaScript.h	2008-03-03 21:26:17 UTC (rev 2417)
@@ -61,7 +61,7 @@
   AS_TOKEN_IDX_OPEN, // 26
   AS_TOKEN_IDX_CLOSE,
   
-  AS_TOKEN_ARR_OPEN, // 28Avida::Exit
+  AS_TOKEN_ARR_OPEN, // 28
   AS_TOKEN_ARR_CLOSE,
   AS_TOKEN_ARR_RANGE,
   AS_TOKEN_ARR_EXPAN,

Modified: development/source/script/cDumpASTVisitor.cc
===================================================================
--- development/source/script/cDumpASTVisitor.cc	2008-03-03 16:26:48 UTC (rev 2416)
+++ development/source/script/cDumpASTVisitor.cc	2008-03-03 21:26:17 UTC (rev 2417)
@@ -201,17 +201,17 @@
   }
   cout << ")" << endl;
   
-  indent();
-  cout << "{" << endl;
-  
   if (node.GetCode()) {
+    indent();
+    cout << "{" << endl;
+    
     m_depth++;
     node.GetCode()->Accept(*this);
     m_depth--;
+
+    indent();
+    cout << "}" << endl;
   }
-
-  indent();
-  cout << "}" << endl;
 }
 
 

Modified: development/source/script/cParser.cc
===================================================================
--- development/source/script/cParser.cc	2008-03-03 16:26:48 UTC (rev 2416)
+++ development/source/script/cParser.cc	2008-03-03 21:26:17 UTC (rev 2417)
@@ -187,9 +187,17 @@
 
  */
 
+#ifndef DEBUG_AS_PARSER
+#define DEBUG_AS_PARSER 0
+#endif
 
-#define PARSE_DEBUG(x) /*{ std::cerr << x << std::endl; }*/
-#define PARSE_TRACE(x) /*{ std::cerr << "trace: " << x << std::endl; }*/
+#if DEBUG_AS_PARSER
+# define PARSE_DEBUG(x) /*{ std::cerr << x << std::endl; }*/
+# define PARSE_TRACE(x) /*{ std::cerr << "trace: " << x << std::endl; }*/
+#else
+# define PARSE_DEBUG(x)
+# define PARSE_TRACE(x)
+#endif
 
 #define PARSE_ERROR(x) reportError(AS_PARSE_ERR_ ## x, __LINE__)
 #define PARSE_UNEXPECT() { if (currentToken()) { PARSE_ERROR(UNEXPECTED_TOKEN); } else { PARSE_ERROR(EOF); } return NULL; }
@@ -367,7 +375,7 @@
       else eoe = true;
     }
   }
-    
+  
   return ce.Release();
 }
 
@@ -610,6 +618,7 @@
     case TOKEN(OP_LOGIC_NOT):
     case TOKEN(OP_SUB):
       ASToken_t op = currentToken();
+      nextToken(); // consume operation
       cASTNode* r = parseExpression();
       if (!r) {
         PARSE_ERROR(NULL_EXPR);
@@ -741,9 +750,23 @@
     case TOKEN(ASSIGN):
       return parseAssignment();
       break;
+    case TOKEN(PREC_OPEN):
+      {
+        cASTFunctionCall* fc = new cASTFunctionCall(FILEPOS, currentText());
+        nextToken(); // consume id token
+        if (nextToken() != TOKEN(PREC_CLOSE)) fc->SetArguments(parseArgumentList());        
+        if (currentToken() != TOKEN(PREC_CLOSE)) PARSE_UNEXPECT();
+        nextToken(); // consume ')'
+        
+        if (currentToken() == TOKEN(DOT) || currentToken() == TOKEN(IDX_OPEN)) {
+          return parseCallExpression(fc, true);
+        }
+        
+        return fc;
+      }
+      break;
     case TOKEN(DOT):
     case TOKEN(IDX_OPEN):
-    case TOKEN(PREC_OPEN):
       cASTNode* target = new cASTVariableReference(FILEPOS, currentText());
       nextToken(); // consume id
       return parseCallExpression(target, true);
@@ -796,7 +819,7 @@
 cASTNode* cParser::parseLooseBlock()
 {
   PARSE_TRACE("parseLooseBlock");
-  nextToken();
+  //nextToken();
   tAutoRelease<cASTNode> sl(parseStatementList());
   
   if (currentToken() != TOKEN(ARR_CLOSE)) PARSE_UNEXPECT();
@@ -983,7 +1006,11 @@
 
 void cParser::reportError(ASParseError_t err, const int line)
 {
-#define ERR_ENDL "  (cParser.cc:" << line << ")" << std::endl
+#if DEBUG_AS_PARSER
+# define ERR_ENDL "  (cParser.cc:" << line << ")" << std::endl
+#else
+# define ERR_ENDL std::endl
+#endif
   
   m_success = false;
 

Modified: development/source/script/cSemanticASTVisitor.cc
===================================================================
--- development/source/script/cSemanticASTVisitor.cc	2008-03-03 16:26:48 UTC (rev 2416)
+++ development/source/script/cSemanticASTVisitor.cc	2008-03-03 21:26:17 UTC (rev 2417)
@@ -32,6 +32,10 @@
 using namespace AvidaScript;
 
 
+#ifndef DEBUG_AS_SEMANTIC
+#define DEBUG_AS_SEMANTIC 0
+#endif
+
 #define SEMANTIC_ERROR(code, ...) reportError(AS_SEMANTIC_ERR_ ## code, node.GetFilePosition(),  __LINE__, ##__VA_ARGS__)
 #define SEMANTIC_WARNING(code, ...) reportError(AS_SEMANTIC_WARN_ ## code, node.GetFilePosition(),  __LINE__, ##__VA_ARGS__)
 
@@ -66,13 +70,14 @@
 }
 
 
-cSemanticASTVisitor::cSemanticASTVisitor(cASLibrary* lib, cSymbolTable* global_symtbl)
+cSemanticASTVisitor::cSemanticASTVisitor(cASLibrary* lib, cSymbolTable* global_symtbl, cASTNode* main)
   : m_library(lib), m_global_symtbl(global_symtbl), m_parent_scope(global_symtbl), m_fun_id(0), m_cur_symtbl(global_symtbl)
   , m_success(true), m_fun_def(false)
 {
   // Add internal definition of the global function
   int fun_id = -1;
   m_global_symtbl->AddFunction("__asmain", TYPE(INT), fun_id);
+  m_global_symtbl->SetFunctionDefinition(0, main);
 }
 
 
@@ -611,6 +616,17 @@
   // Rest of variable type checking must be done at runtime
 }
 
+void cSemanticASTVisitor::PostCheck()
+{
+  // Check all functions in the current scope level and make sure they have been defined
+  cSymbolTable::cFunctionIterator fit = m_global_symtbl->ActiveFunctionIterator();
+  while (fit.Next()) if (!fit.HasCode())
+    reportError(AS_SEMANTIC_ERR_FUNCTION_UNDEFINED, m_global_symtbl->GetFunctionDefinition(0)->GetFilePosition()
+                ,  __LINE__, (const char*)fit.GetName());
+}
+
+
+
 ASType_t cSemanticASTVisitor::getConsensusType(ASType_t left, ASType_t right)
 {
   switch (left) {
@@ -750,7 +766,12 @@
 
 void cSemanticASTVisitor::reportError(ASSemanticError_t err, const cASFilePosition& fp, const int line, ...)
 {
-#define ERR_ENDL "  (cSemanticASTVisitor.cc:" << line << ")" << std::endl
+#if DEBUG_AS_SEMANTIC
+# define ERR_ENDL "  (cSemanticASTVisitor.cc:" << line << ")" << std::endl
+#else
+# define ERR_ENDL std::endl
+#endif
+  
 #define VA_ARG_STR va_arg(vargs, const char*)
   
   std::cerr << fp.GetFilename() << ":" << fp.GetLineNumber();
@@ -761,7 +782,11 @@
   va_start(vargs, line);
   switch (err) {
     case AS_SEMANTIC_WARN_LOSS_OF_PRECISION:
-      std::cerr << "loss of precision occuring in cast of " << VA_ARG_STR << " to " << VA_ARG_STR << ERR_ENDL;
+      {
+        const char* type1 = VA_ARG_STR;
+        const char* type2 = VA_ARG_STR;
+        std::cerr << "loss of precision occuring in cast of " << type1 << " to " << type2 << ERR_ENDL;
+      }
       break;
     case AS_SEMANTIC_WARN_NO_DIMENSIONS:
       std::cerr << "no dimensions specified" << ERR_ENDL;
@@ -774,14 +799,21 @@
       break;
       
     case AS_SEMANTIC_ERR_ARGUMENT_DEFAULT_REQUIRED:
-      std::cerr << "'" << VA_ARG_STR << "' argument of '" << VA_ARG_STR << "()' requires a default value due to previous"
-                << "argument defaults" << ERR_ENDL;
+      {
+        const char* arg = VA_ARG_STR;
+        const char* fun = VA_ARG_STR;
+        std::cerr << "'" << arg << "' argument of '" << fun << "()' requires a default value" << ERR_ENDL;
+      }
       break;
     case AS_SEMANTIC_ERR_ARGUMENT_MISSING_REQUIRED:
       std::cerr << "required argument " << VA_ARG_STR << " not found" << ERR_ENDL;
       break;
     case AS_SEMANTIC_ERR_CANNOT_CAST:
-      std::cerr << "cannot cast " << VA_ARG_STR << " to " << VA_ARG_STR << ERR_ENDL;
+      {
+        const char* type1 = VA_ARG_STR;
+        const char* type2 = VA_ARG_STR;
+        std::cerr << "cannot cast " << type1 << " to " << type2 << ERR_ENDL;
+      }
       break;
     case AS_SEMANTIC_ERR_FUNCTION_CALL_SIGNATURE_MISMATCH:
       std::cerr << "invalid call signature for '" << VA_ARG_STR << "()'" << ERR_ENDL;
@@ -813,13 +845,21 @@
       std::cerr << "too many arguments" << ERR_ENDL;
       break;
     case AS_SEMANTIC_ERR_UNDEFINED_TYPE_OP:
-      std::cerr << "'" << VA_ARG_STR << "' operation undefined for type '" << VA_ARG_STR << "'" << ERR_ENDL;
+      {
+        const char* op = VA_ARG_STR;
+        const char* type = VA_ARG_STR;
+        std::cerr << "'" << op << "' operation undefined for type '" << type << "'" << ERR_ENDL;
+      }
       break;
     case AS_SEMANTIC_ERR_UNPACK_WILD_NONARRAY:
-      std::cerr << "cannot unpack ... items into '" << VA_ARG_STR << "', variable must be an array" << ERR_ENDL;
+      std::cerr << "cannot unpack .. items into '" << VA_ARG_STR << "', variable must be an array" << ERR_ENDL;
       break;
     case AS_SEMANTIC_ERR_VARIABLE_DIMENSIONS_INVALID:
-      std::cerr << "dimensions of '" << VA_ARG_STR << "' invalid for type " << VA_ARG_STR << ERR_ENDL;
+      {
+        const char* var = VA_ARG_STR;
+        const char* type = VA_ARG_STR;
+        std::cerr << "dimensions of '" << var << "' invalid for type " << type << ERR_ENDL;
+      }
       break;
     case AS_SEMANTIC_ERR_VARIABLE_UNDEFINED:
       {

Modified: development/source/script/cSemanticASTVisitor.h
===================================================================
--- development/source/script/cSemanticASTVisitor.h	2008-03-03 16:26:48 UTC (rev 2416)
+++ development/source/script/cSemanticASTVisitor.h	2008-03-03 21:26:17 UTC (rev 2417)
@@ -66,7 +66,7 @@
   
   
 public:
-  cSemanticASTVisitor(cASLibrary* lib, cSymbolTable* global_symtbl);
+  cSemanticASTVisitor(cASLibrary* lib, cSymbolTable* global_symtbl, cASTNode* main);
   
   inline bool WasSuccessful() { return m_success; }
   
@@ -96,6 +96,9 @@
   void visitVariableReference(cASTVariableReference&);
   void visitUnpackTarget(cASTUnpackTarget&);
 
+  void PostCheck();
+
+
 private:
   ASType_t getConsensusType(ASType_t t1, ASType_t t2);
   inline bool validArithmeticType(ASType_t type, bool allow_matrix = false) const;

Modified: development/source/script/cSymbolTable.cc
===================================================================
--- development/source/script/cSymbolTable.cc	2008-03-03 16:26:48 UTC (rev 2416)
+++ development/source/script/cSymbolTable.cc	2008-03-03 21:26:17 UTC (rev 2417)
@@ -33,23 +33,39 @@
 
 bool cSymbolTable::AddVariable(const cString& name, ASType_t type, int& var_id)
 {
-  if (LookupVariable(name, var_id)) return false;
-
+  int shadow = var_id;
+  bool found = LookupVariable(name, var_id);
+  if (found && m_sym_tbl[var_id]->scope == m_scope && !m_sym_tbl[var_id]->deactivate) return false;
+  
   var_id = m_sym_tbl.GetSize();
   m_sym_tbl.Push(new sSymbolEntry(name, type, m_scope));
-  m_sym_dict.Add(name, var_id);
   
+  if (found) {
+    m_sym_dict.SetValue(name, var_id);
+    m_sym_tbl[var_id]->shadow = shadow;
+  } else {
+    m_sym_dict.Add(name, var_id);
+  }
+  
   return true;
 }
 
 bool cSymbolTable::AddFunction(const cString& name, ASType_t type, int& fun_id)
 {
-  if (LookupFunction(name, fun_id)) return false;
+  int shadow = fun_id;
+  bool found = LookupFunction(name, fun_id);
+  if (found && m_fun_tbl[fun_id]->scope == m_scope && !m_fun_tbl[fun_id]->deactivate) return false;
   
   fun_id = m_fun_tbl.GetSize();
   m_fun_tbl.Push(new sFunctionEntry(name, type, m_scope));
-  m_fun_dict.Add(name, fun_id);
   
+  if (found) {
+    m_fun_dict.SetValue(name, fun_id);
+    m_fun_tbl[fun_id]->shadow = shadow;
+  } else {
+    m_fun_dict.Add(name, fun_id);
+  }
+  
   return true;
 }
 
@@ -60,7 +76,8 @@
   for (int i = 0; i < m_sym_tbl.GetSize(); i++) {
     sSymbolEntry* se = m_sym_tbl[i];
     if (se->scope == m_scope && !se->deactivate) {
-      m_sym_dict.Remove(se->name);
+      if (se->shadow == -1) m_sym_dict.Remove(se->name);
+      else m_sym_dict.SetValue(se->name, se->shadow);
       se->deactivate = m_deactivate_cycle;
     }
   }
@@ -68,7 +85,8 @@
   for (int i = 0; i < m_fun_tbl.GetSize(); i++) {
     sFunctionEntry* fe = m_fun_tbl[i];
     if (fe->scope == m_scope && !fe->deactivate) {
-      m_fun_dict.Remove(fe->name);
+      if (fe->shadow == -1) m_fun_dict.Remove(fe->name);
+      else m_fun_dict.SetValue(fe->name, fe->shadow);
       fe->deactivate = m_deactivate_cycle;
     }
   }

Modified: development/source/script/cSymbolTable.h
===================================================================
--- development/source/script/cSymbolTable.h	2008-03-03 16:26:48 UTC (rev 2416)
+++ development/source/script/cSymbolTable.h	2008-03-03 21:26:17 UTC (rev 2417)
@@ -44,10 +44,11 @@
     ASType_t type;
 
     int scope;
+    int shadow;
     bool deactivate;
     
     sSymbolEntry(const cString& in_name, ASType_t in_type, int in_scope)
-      : name(in_name), type(in_type), scope(in_scope), deactivate(0) { ; }
+      : name(in_name), type(in_type), scope(in_scope), shadow(-1), deactivate(0) { ; }
   };
   tArray<sSymbolEntry*> m_sym_tbl;
   tDictionary<int> m_sym_dict;
@@ -61,10 +62,12 @@
     cASTNode* code;
     
     int scope;
+    int shadow;
     int deactivate;
     
     sFunctionEntry(const cString& in_name, ASType_t in_type, int in_scope)
-      : name(in_name), type(in_type), signature(NULL), symtbl(NULL), code(NULL), scope(in_scope), deactivate(0) { ; }
+      : name(in_name), type(in_type), signature(NULL), symtbl(NULL), code(NULL), scope(in_scope), shadow(-1)
+      , deactivate(0) { ; }
     ~sFunctionEntry() { delete signature; delete symtbl; delete code; }
   };
   tArray<sFunctionEntry*> m_fun_tbl;
@@ -129,12 +132,12 @@
     int m_idx;
     
     cFunctionIterator(cSymbolTable* symtbl)
-      : m_symtbl(symtbl), m_scope(symtbl->GetScope()), m_idx(symtbl->GetNumFunctions() - 1) { ; }
+      : m_symtbl(symtbl), m_scope(symtbl->GetScope()), m_idx(symtbl->GetNumFunctions()) { ; }
 
   public:
     bool Next()
     {
-      for (; m_idx >= 0; m_idx--)
+      for (m_idx--; m_idx >= 0; m_idx--)
         if (m_symtbl->GetFunctionScope(m_idx) == m_scope && m_symtbl->IsFunctionActive(m_idx)) return true;
       
       return false;

Modified: development/source/targets/avida-s/main.cc
===================================================================
--- development/source/targets/avida-s/main.cc	2008-03-03 16:26:48 UTC (rev 2416)
+++ development/source/targets/avida-s/main.cc	2008-03-03 21:26:17 UTC (rev 2417)
@@ -52,8 +52,10 @@
       std::cout << std::endl;
       
       cSymbolTable global_symtbl;
-      cSemanticASTVisitor semantic_check(lib, &global_symtbl);
+      cSemanticASTVisitor semantic_check(lib, &global_symtbl, tree);
       tree->Accept(semantic_check);
+      semantic_check.PostCheck();
+      
       if (!semantic_check.WasSuccessful()) {
         std::cerr << "error: semantics check failed" << std::endl;
         Avida::Exit(AS_EXIT_FAIL_SEMANTIC);

Added: development/tests/_asl_fail_003_arg_default_req/config/main.asl
===================================================================
--- development/tests/_asl_fail_003_arg_default_req/config/main.asl	                        (rev 0)
+++ development/tests/_asl_fail_003_arg_default_req/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,4 @@
+function int foo(int x, int y = 1, int z) {
+  return 0;
+}
+

Added: development/tests/_asl_fail_003_arg_default_req/test_list
===================================================================
--- development/tests/_asl_fail_003_arg_default_req/test_list	                        (rev 0)
+++ development/tests/_asl_fail_003_arg_default_req/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,31 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = require
+createdby = David Bryson
+email = brysonda at egr.msu.edu
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_fail_004_arg_missing_req/config/main.asl
===================================================================
--- development/tests/_asl_fail_004_arg_missing_req/config/main.asl	                        (rev 0)
+++ development/tests/_asl_fail_004_arg_missing_req/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,4 @@
+function int foo(int x, int y, int z = 1) { return 0; }
+
+foo(1);
+

Added: development/tests/_asl_fail_004_arg_missing_req/test_list
===================================================================
--- development/tests/_asl_fail_004_arg_missing_req/test_list	                        (rev 0)
+++ development/tests/_asl_fail_004_arg_missing_req/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,31 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = require
+createdby = David Bryson
+email = brysonda at egr.msu.edu
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_fail_005_cannot_cast/config/main.asl
===================================================================
--- development/tests/_asl_fail_005_cannot_cast/config/main.asl	                        (rev 0)
+++ development/tests/_asl_fail_005_cannot_cast/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,2 @@
+float x = { 0 };
+

Added: development/tests/_asl_fail_005_cannot_cast/test_list
===================================================================
--- development/tests/_asl_fail_005_cannot_cast/test_list	                        (rev 0)
+++ development/tests/_asl_fail_005_cannot_cast/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,31 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = require
+createdby = David Bryson
+email = brysonda at egr.msu.edu
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_fail_006_func_call_mismatch/config/main.asl
===================================================================
--- development/tests/_asl_fail_006_func_call_mismatch/config/main.asl	                        (rev 0)
+++ development/tests/_asl_fail_006_func_call_mismatch/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,3 @@
+function int foo(int x) { return 0; }
+
+foo({ 0 });

Added: development/tests/_asl_fail_006_func_call_mismatch/test_list
===================================================================
--- development/tests/_asl_fail_006_func_call_mismatch/test_list	                        (rev 0)
+++ development/tests/_asl_fail_006_func_call_mismatch/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,31 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = require
+createdby = David Bryson
+email = brysonda at egr.msu.edu
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_fail_007_func_redef/config/main.asl
===================================================================
--- development/tests/_asl_fail_007_func_redef/config/main.asl	                        (rev 0)
+++ development/tests/_asl_fail_007_func_redef/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,4 @@
+ at function int foo(int x);
+
+function int foo(float x) { return 0; }
+

Added: development/tests/_asl_fail_007_func_redef/test_list
===================================================================
--- development/tests/_asl_fail_007_func_redef/test_list	                        (rev 0)
+++ development/tests/_asl_fail_007_func_redef/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,31 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = require
+createdby = David Bryson
+email = brysonda at egr.msu.edu
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_fail_008_func_rtype_mismatch/config/main.asl
===================================================================
--- development/tests/_asl_fail_008_func_rtype_mismatch/config/main.asl	                        (rev 0)
+++ development/tests/_asl_fail_008_func_rtype_mismatch/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,3 @@
+ at function int foo(int x);
+
+function float foo(int x) { return 0.0; }

Added: development/tests/_asl_fail_008_func_rtype_mismatch/test_list
===================================================================
--- development/tests/_asl_fail_008_func_rtype_mismatch/test_list	                        (rev 0)
+++ development/tests/_asl_fail_008_func_rtype_mismatch/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,31 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = require
+createdby = David Bryson
+email = brysonda at egr.msu.edu
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_fail_009_func_undeclared/config/main.asl
===================================================================
--- development/tests/_asl_fail_009_func_undeclared/config/main.asl	                        (rev 0)
+++ development/tests/_asl_fail_009_func_undeclared/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,2 @@
+int x = foo(0);
+

Added: development/tests/_asl_fail_009_func_undeclared/test_list
===================================================================
--- development/tests/_asl_fail_009_func_undeclared/test_list	                        (rev 0)
+++ development/tests/_asl_fail_009_func_undeclared/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,31 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = require
+createdby = David Bryson
+email = brysonda at egr.msu.edu
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_fail_010_func_undefined/config/main.asl
===================================================================
--- development/tests/_asl_fail_010_func_undefined/config/main.asl	                        (rev 0)
+++ development/tests/_asl_fail_010_func_undefined/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,2 @@
+ at function int foo(int x);
+

Added: development/tests/_asl_fail_010_func_undefined/test_list
===================================================================
--- development/tests/_asl_fail_010_func_undefined/test_list	                        (rev 0)
+++ development/tests/_asl_fail_010_func_undefined/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,31 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = require
+createdby = David Bryson
+email = brysonda at egr.msu.edu
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_fail_011_too_many_args/config/main.asl
===================================================================
--- development/tests/_asl_fail_011_too_many_args/config/main.asl	                        (rev 0)
+++ development/tests/_asl_fail_011_too_many_args/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,2 @@
+matrix x(2, 3, 4);
+

Added: development/tests/_asl_fail_011_too_many_args/test_list
===================================================================
--- development/tests/_asl_fail_011_too_many_args/test_list	                        (rev 0)
+++ development/tests/_asl_fail_011_too_many_args/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,31 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = require
+createdby = David Bryson
+email = brysonda at egr.msu.edu
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_fail_012_undefined_type_op/config/main.asl
===================================================================
--- development/tests/_asl_fail_012_undefined_type_op/config/main.asl	                        (rev 0)
+++ development/tests/_asl_fail_012_undefined_type_op/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,2 @@
+int x = ~0.0;
+

Added: development/tests/_asl_fail_012_undefined_type_op/test_list
===================================================================
--- development/tests/_asl_fail_012_undefined_type_op/test_list	                        (rev 0)
+++ development/tests/_asl_fail_012_undefined_type_op/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,31 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = require
+createdby = David Bryson
+email = brysonda at egr.msu.edu
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_fail_013_unpack_wild_nonarray/config/main.asl
===================================================================
--- development/tests/_asl_fail_013_unpack_wild_nonarray/config/main.asl	                        (rev 0)
+++ development/tests/_asl_fail_013_unpack_wild_nonarray/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,6 @@
+int x;
+int y;
+array z;
+
+@{x, z, y..} = { 0, 1, 2, 3 };
+

Added: development/tests/_asl_fail_013_unpack_wild_nonarray/test_list
===================================================================
--- development/tests/_asl_fail_013_unpack_wild_nonarray/test_list	                        (rev 0)
+++ development/tests/_asl_fail_013_unpack_wild_nonarray/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,31 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = require
+createdby = David Bryson
+email = brysonda at egr.msu.edu
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_fail_014_var_dims_invalid/config/main.asl
===================================================================
--- development/tests/_asl_fail_014_var_dims_invalid/config/main.asl	                        (rev 0)
+++ development/tests/_asl_fail_014_var_dims_invalid/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,2 @@
+int x(0, 1);
+

Added: development/tests/_asl_fail_014_var_dims_invalid/test_list
===================================================================
--- development/tests/_asl_fail_014_var_dims_invalid/test_list	                        (rev 0)
+++ development/tests/_asl_fail_014_var_dims_invalid/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,31 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = require
+createdby = David Bryson
+email = brysonda at egr.msu.edu
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_fail_015_var_undefined/config/main.asl
===================================================================
--- development/tests/_asl_fail_015_var_undefined/config/main.asl	                        (rev 0)
+++ development/tests/_asl_fail_015_var_undefined/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1 @@
+int x = foo + 1;

Added: development/tests/_asl_fail_015_var_undefined/test_list
===================================================================
--- development/tests/_asl_fail_015_var_undefined/test_list	                        (rev 0)
+++ development/tests/_asl_fail_015_var_undefined/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,31 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = require
+createdby = David Bryson
+email = brysonda at egr.msu.edu
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_fail_016_var_redefinition/config/main.asl
===================================================================
--- development/tests/_asl_fail_016_var_redefinition/config/main.asl	                        (rev 0)
+++ development/tests/_asl_fail_016_var_redefinition/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,2 @@
+int x;
+int x;

Added: development/tests/_asl_fail_016_var_redefinition/test_list
===================================================================
--- development/tests/_asl_fail_016_var_redefinition/test_list	                        (rev 0)
+++ development/tests/_asl_fail_016_var_redefinition/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,31 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = require
+createdby = David Bryson
+email = brysonda at egr.msu.edu
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_good_009_if_block/config/main.asl
===================================================================
--- development/tests/_asl_good_009_if_block/config/main.asl	                        (rev 0)
+++ development/tests/_asl_good_009_if_block/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,12 @@
+int y = 4;
+
+if (true) {
+	int x = y + 12;
+} elseif (false) {
+	int x = y * 6;
+} elseif (4) {
+	int x = y - 2;
+} else {
+	int x = 0;
+}
+

Added: development/tests/_asl_good_009_if_block/test_list
===================================================================
--- development/tests/_asl_good_009_if_block/test_list	                        (rev 0)
+++ development/tests/_asl_good_009_if_block/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,32 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+; Command line arguments to pass to the application
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = disallow
+createdby = David Bryson ; Who created the test
+email = brysonda at egr.msu.edu ; Email address for the test's creator
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_good_010_foreach_block/config/main.asl
===================================================================
--- development/tests/_asl_good_010_foreach_block/config/main.asl	                        (rev 0)
+++ development/tests/_asl_good_010_foreach_block/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,5 @@
+foreach int x (4 ^ 2)
+{
+	int y = x + 3;
+}
+

Added: development/tests/_asl_good_010_foreach_block/test_list
===================================================================
--- development/tests/_asl_good_010_foreach_block/test_list	                        (rev 0)
+++ development/tests/_asl_good_010_foreach_block/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,32 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+; Command line arguments to pass to the application
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = disallow
+createdby = David Bryson ; Who created the test
+email = brysonda at egr.msu.edu ; Email address for the test's creator
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_good_011_while_block/config/main.asl
===================================================================
--- development/tests/_asl_good_011_while_block/config/main.asl	                        (rev 0)
+++ development/tests/_asl_good_011_while_block/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,2 @@
+while (0) { int y = 1; }
+

Added: development/tests/_asl_good_011_while_block/test_list
===================================================================
--- development/tests/_asl_good_011_while_block/test_list	                        (rev 0)
+++ development/tests/_asl_good_011_while_block/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,32 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+; Command line arguments to pass to the application
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = disallow
+createdby = David Bryson ; Who created the test
+email = brysonda at egr.msu.edu ; Email address for the test's creator
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---

Added: development/tests/_asl_good_012_multiple_level_scope/config/main.asl
===================================================================
--- development/tests/_asl_good_012_multiple_level_scope/config/main.asl	                        (rev 0)
+++ development/tests/_asl_good_012_multiple_level_scope/config/main.asl	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,16 @@
+function int foo(int x = 0)
+{
+	int z = 4;
+	while (x) {
+		int z = 12 - x;
+		{
+			int x = 1;
+		}
+		x = x - 1;
+	}
+}
+
+int z = 6;
+
+foo(z);
+

Added: development/tests/_asl_good_012_multiple_level_scope/test_list
===================================================================
--- development/tests/_asl_good_012_multiple_level_scope/test_list	                        (rev 0)
+++ development/tests/_asl_good_012_multiple_level_scope/test_list	2008-03-03 21:26:17 UTC (rev 2417)
@@ -0,0 +1,32 @@
+;--- Begin Test Configuration File (test_list) ---
+[main]
+; Command line arguments to pass to the application
+args = 
+app = %(builddir)s/work/avida-s
+nonzeroexit = disallow
+createdby = David Bryson ; Who created the test
+email = brysonda at egr.msu.edu ; Email address for the test's creator
+
+[consistency]
+enabled = yes            ; Is this test a consistency test?
+long = no                ; Is this test a long test?
+
+[performance]
+enabled = no             ; Is this test a performance test?
+long = no                ; Is this test a long test?
+
+; The following variables can be used in constructing setting values by calling
+; them with %(variable_name)s.  For example see 'app' above.
+;
+; builddir 
+; cpus
+; default_app 
+; mode 
+; perf_repeat 
+; perf_user_margin 
+; perf_wall_margin 
+; svn 
+; svnmetadir 
+; svnversion 
+; testdir 
+;--- End Test Configuration File ---




More information about the Avida-cvs mailing list