Giter Club home page Giter Club logo

checktestdata's Introduction

Checktestdata

Checktestdata is a tool to verify the syntactical integrity of test cases in programming 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. Two sample scripts hello.ctd and fltcmp.ctd are provided for DOMjudge sample problems hello and fltcmp.

Grammar specification

Checktestdata language specification

Installation

Requirements:

  • recent g++ (>= 4.7)
  • Libboost and the boost::regex extension
  • The GNU GMP libraries (http://gmplib.org/)
  • flexc++/bisonc++ (optional)

If you don't have flexc++ and/or bisonc++ available, you may use the release branch where we've pre-generated the scanner/parser files.

Command line for installing the build dependencies on Debian or Ubuntu, when using the release branch:

apt-get install make g++ libboost-regex-dev libgmp3-dev

For Redhat-like distributions try:

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

To compile checktestdata, run:

./bootstrap
make dist
make

Leave out the make dist step if you use the pre-generated scanner/parser files on the release branch.

Library

The commandline program is built upon the separate library libchecktestdata.hpp (see checktestdata.cc as an example for how to use this library) that can be used to write the syntax checking part of special compare scripts. It can easily handle the tedious task of verifying that a team's submission output is syntactically valid, leaving just the task of semantic validation to another program.

When you want to support presentation error as a verdict, also in variable output problems, the option whitespace-ok can be useful. This allows any non-empty sequence of whitespace (no newlines though) where the SPACE command is used, as well as leading and trailing whitespace on lines (when using the NEWLINE command). Please note that with this option enabled, whitespace matching is greedy, so the script code

INT(1,2) SPACE SPACE INT(1,2)

does not match 1__2 (where the two underscores represent spaces), because the first SPACE command already matches both, so the second cannot match anything.

Copyright & Licencing

Checktestdata is Copyright © 2008 - 2015 by the checktestdata developers and all respective contributors. The current checktestdata developers are Jeroen Bransen, Jaap Eldering, Jan Kuipers, and Tobias Werth; see the git commits for a complete list of contributors.

Checktestdata, including its documentation, is free software; you can redistribute it and/or modify it under the terms of the two-clause BSD license. See the file COPYING.

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 mailinglist [email protected]. You need to be subscribed before you can post. Information, subscription and archives are available at: https://www.domjudge.org/mailman/listinfo/domjudge-devel

Some developers and users of checktestdata linger on the IRC channel dedicated to DOMjudge on the Freenode network: server irc.freenode.net, channel #domjudge

checktestdata's People

Contributors

eldering avatar jbransen avatar meistert avatar pwerken avatar thijskh avatar tpolzer avatar ubergeek42 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.