Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

checks integrity of test data in programming contests like the ACM ICPC

License

NotificationsYou must be signed in to change notification settings

DOMjudge/checktestdata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build StatusCoverage StatusCoverity Scan Status

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.

Grammar specification

Checktestdata language specification

We also have aHaskell implementation of thechecktestdata program, which supports this specification as well as aHaskell embedded domain-specific language.

Installation and use

Requirements:

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 automake

For Redhat-like distributions try:

yum install make g++ boost-devel gmp-devel automake

To compile checktestdata, run:

./bootstrapmake distmake

Leave out themake dist step if you use the pre-generated scanner/parserfiles on the release branch.

Finally, you can run

make check

to 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 --help

Library

The 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.

Copyright & Licencing

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.

Contact

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors12


[8]ページ先頭

©2009-2025 Movatter.jp