home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,200 of 2,753   
   Rafael R. Sevilla to All   
   Unit testing a compiler   
   13 Mar 13 11:50:30   
   
   From: dido@imperium.ph   
      
   I am currently writing a simple byte compiler for a simple dialect of   
   Lisp, and am wondering what is the best practice for testing such a   
   compiler.  It is certainly possible to run the compiler on some test   
   code and then compare the code it generates with some reference code,   
   but as the code samples become more complicated that rapidly becomes   
   unwieldy.  Would it instead be better to test the compiler by actually   
   running the code it generates, and then comparing the results with what   
   the code snippet is supposed to evaluate to?  Any other ideas on how to   
   go about testing the code generator?  What about when optimizations are   
   being performed?   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca