![]() |
|
|
|||||||
![]() |
C Programming - syntactically comprehensive test program |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Posts: n/a
|
I need a syntactically comprehensive test program to test a C parser
on. Does anyone know where I might find a program that uses all syntactical elements of the language and combines them in cunning/ realistic ways so that one might be confident that a pass on this program will mean a pass on any valid C program. Big ask, but I thought someone might know of a suitable file(s). |
|
|
|
#2 |
|
Posts: n/a
|
nob...@gmail.com wrote:
> I need a syntactically comprehensive test program to test a C parser > on. Does anyone know where I might find a program that uses all > syntactical elements of the language and combines them in cunning/ > realistic ways so that one might be confident that a pass on this > program will mean a pass on any valid C program. > > Big ask, but I thought someone might know of a suitable file(s). gcc comes bundled with it's own test routines. I also think P.J. Plauger's dinkumware.com offers to certify compilers and libraries for standard conformance. |
|
|
|
#3 |
|
Posts: n/a
|
On Feb 28, 3:41 am, nob...@gmail.com wrote:
> I need a syntactically comprehensive test program to test a C parser > on. Does anyone know where I might find a program that uses all > syntactical elements of the language and combines them in cunning/ > realistic ways so that one might be confident that a pass on this > program will mean a pass on any valid C program. > > Big ask, but I thought someone might know of a suitable file(s). http://www.plumhall.com/suites.html http://www.opengroup.org/testing/tes...s/perenial.htm http://www.ace.nl/compiler/supertest.html There's a few gazillion more here: http://www.google.com/search?q=C+val...&start=10&sa=N |
|
|
|
#4 |
|
Posts: n/a
|
"santosh" <> writes:
> nob...@gmail.com wrote: >> I need a syntactically comprehensive test program to test a C parser >> on. Does anyone know where I might find a program that uses all >> syntactical elements of the language and combines them in cunning/ >> realistic ways so that one might be confident that a pass on this >> program will mean a pass on any valid C program. >> >> Big ask, but I thought someone might know of a suitable file(s). > > gcc comes bundled with it's own test routines. I also think P.J. > Plauger's dinkumware.com offers to certify compilers and libraries for > standard conformance. I haven't looked at gcc's test suite. I'm sure it includes tests for gcc-specific extensions. Before using it, make sure that those tests are cleanly separated from the ones that use only standard C. -- Keith Thompson (The_Other_Keith) kst- <http://www.ghoti.net/~kst> San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst> "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister" |
|
|
|
#5 |
|
Posts: n/a
|
<> wrote in message
>I need a syntactically comprehensive test program to test a C parser > on. Does anyone know where I might find a program that uses all > syntactical elements of the language and combines them in cunning/ > realistic ways so that one might be confident that a pass on this > program will mean a pass on any valid C program. > > Big ask, but I thought someone might know of a suitable file(s). > Look for a program called C torture, which is designed to stress compilers. Unfortunately it is extremely difficult to verify that a grammar parser is correct. Non-artificial bugs will often fail to manifest themselves on the vast majority of inputs. C torture is a good test, but not definitive by any means, which is why ANSI haven't endorsed it or any similar test suite. -- Free games and programming goodies. http://www.personal.leeds.ac.uk/~bgy1mm |
|
|
|
#6 |
|
Posts: n/a
|
Too bad NIST never wrote one for C. There testers for other languages
are really good. http://www.itl.nist.gov/div897/ctg/software.htm#pubsoft I use their SQL test suite all the time, and it is fantastic. |
|
|
|
#7 |
|
Posts: n/a
|
Malcolm McLean wrote:
> <> wrote in message > >> I need a syntactically comprehensive test program to test a C >> parser on. Does anyone know where I might find a program that >> uses all syntactical elements of the language and combines them >> in cunning/realistic ways so that one might be confident that a >> pass on this program will mean a pass on any valid C program. >> >> Big ask, but I thought someone might know of a suitable file(s). > > Look for a program called C torture, which is designed to stress > compilers. > > Unfortunately it is extremely difficult to verify that a grammar > parser is correct. Non-artificial bugs will often fail to > manifest themselves on the vast majority of inputs. C torture is > a good test, but not definitive by any means, which is why ANSI > haven't endorsed it or any similar test suite. It is hard to test that a compiler system is correct. It is much easier to test that it adheres to a specific clause in the standard. This was the approach taken 25 years ago in the Pascal Test Suite, which unfortunately got hidden by Prospero, when the original had been open to all. -- Chuck F (cbfalconer at maineline dot net) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| On Your Way to Success: the Test 70-640 | jiajiainlove@gmail.com | MCTS | 1 | 03-16-2009 10:47 AM |
| On Your Way to Success: the Test 70-640 | jiajiainlove@gmail.com | MCITP | 0 | 03-16-2009 12:51 AM |
| This is incredible! | jc_ice | DVD Video | 1 | 08-13-2006 09:47 AM |
| The Practice Test Package Development: A New Service on the Certification Market | David Johnson | A+ Certification | 0 | 01-19-2005 09:52 AM |
| Re: A+ Test Info (June) | RussS | A+ Certification | 0 | 08-04-2003 12:16 AM |