- Notifications
You must be signed in to change notification settings - Fork26
checks integrity of test data in programming contests like the ACM ICPC
License
DOMjudge/checktestdata
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Checktestdata is a tool to verify the syntactical integrity of test cases inprogramming contests like the ACM ICPC.
It allows you to specify a simple grammar for your testdata input files,according to which the testdata is checked. Inthe examples directoryyou find two sample scriptshello.ctd andfltcmp.ctd from theDOMjudge sample problemshello andfltcmp, and underexamples/nwerc2008 thescripts used for theNWERC 2008 problemset.
Checktestdata language specification
We also have aHaskell implementation of thechecktestdata program, which supports this specification as well as aHaskell embedded domain-specific language.
Requirements:
- A C++ compiler that supports C++11 including regex support.(GNU g++ >= 4.9 and LLVM clang++ >= 3.5 are known to work)
- Libboost (http://www.boost.org/)
- The GNU GMP libraries (http://gmplib.org/)
- Automake (https://www.gnu.org/software/automake/)
- flexc++/bisonc++ (optional)
If you don't haveflexc++ and/orbisonc++ available, you may use the releasebranch where we've pre-generated the scanner/parser files.
Command line for installing the build dependencies on Debian orUbuntu, when using the release branch:
apt-get install make g++ libboost-dev libgmp-dev autotools-dev automakeFor Redhat-like distributions try:
yum install make g++ boost-devel gmp-devel automakeTo compile checktestdata, run:
./bootstrapmake distmakeLeave out themake dist step if you use the pre-generated scanner/parserfiles on the release branch.
Finally, you can run
make checkto run a number of tests. Note that a few of the tests arenon-deterministic and may sometimes return an error. This is ok, but themake check command should run successfully more than 90% of the time.
For usage instructions run:
checktestdata --helpThe commandline program is built upon the separate librarylibchecktestdata.hpp (seechecktestdata.cc as an example for how to use thislibrary) that can be used to write the syntax checking part of special comparescripts. It can easily handle the tedious task of verifying that a team'ssubmission output is syntactically valid, leaving just the task of semanticvalidation to another program.
When you want to supportpresentation error as a verdict, also in variableoutput problems, the option whitespace-ok can be useful. This allows anynon-empty sequence of whitespace (no newlines though) where the SPACE commandis used, as well as leading and trailing whitespace on lines (when using theNEWLINE command). Please note that with this option enabled, whitespacematching is greedy, so the script code
INT(1,2) SPACE SPACE INT(1,2)does not match1__2 (where the two underscores represent spaces), because thefirstSPACE command already matches both, so the second cannot matchanything.
Checktestdata is Copyright © 2008 - 2025 by the checktestdata developers andall respective contributors. The current checktestdata developers are JeroenBransen, Jaap Eldering, Jan Kuipers, and Tobias Werth; see the git commits fora complete list of contributors.
Checktestdata, including its documentation, is free software; you canredistribute it and/or modify it under the terms of the two-clauseBSD license. See the fileCOPYING.
The M4 autoconf macros are licenced under all-permissive and GPL3+licences; see the respective files under m4/ for details.
The developers can be reached through the mailinglistdomjudge-devel@domjudge.org. You need to be subscribed beforeyou can post. Information, subscription and archives are available at:https://www.domjudge.org/mailman/listinfo/domjudge-devel
DOMjudge has a Slack workspace where a number of developers and usersof DOMjudge & checktestdata linger. More information can be found athttps://www.domjudge.org/chat
About
checks integrity of test data in programming contests like the ACM ICPC
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors12
Uh oh!
There was an error while loading.Please reload this page.