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 1,904 of 2,753   
   Tony Finch to Matthias-Christian Ott   
   Re: Testing strategy for compiler   
   21 Jun 10 20:18:24   
   
   From: dot@dotat.at   
      
   Matthias-Christian Ott  wrote:   
   >   
   >If you have a formal (generative) grammar for your language, you can   
   >generate all valid strings of language and test whether your parser   
   >recognises them. So you have practical tests which also cover obscure   
   >programmes. You could use yagg [1] for this purpose.   
      
   As our esteemed moderator points out, you also want to test invalid   
   inputs. One possible tactic is to randomly perturb a valid program by   
   adding and/or deleting a few characters or tokens. (Though it might be   
   tricky to ensure you don't make an edit that leaves the program valid!)   
      
   Tony.   
   --   
   f.anthony.n.finch    http://dotat.at/   
   [I recall seeing some work about a decade ago on making small perturbations   
   to the source code of programs. -John]   
      
   --- 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