Giter Site home page Giter Site logo

ragnargrootkoerkamp / bapctools Goto Github PK

View Code? Open in Web Editor NEW
47.0 47.0 18.0 9.62 MB

Tools for developing ICPC-style programming contest problems.

License: GNU General Public License v3.0

Python 73.03% C++ 14.53% TeX 6.77% Shell 1.41% Dockerfile 0.16% Lua 0.04% C 2.43% Java 0.89% Kotlin 0.03% Asymptote 0.02% Ruby 0.03% Prolog 0.22% CUE 0.46%
competitive-programming domjudge icpc programming-contest-judge programming-contests

bapctools's People

Contributors

brokkelkamp avatar chrisgdt avatar eldering avatar hex539 avatar jbransen avatar ludopulles avatar mpsijm avatar mzuenni avatar obiwac avatar ragnargrootkoerkamp avatar thorehusfeldt avatar timonknigge avatar useredsa avatar vmcj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bapctools's Issues

Use user+kernel time instead of walltime.

This is actually rather annoying because it can only be obtained via os.wait4(pid, 0), which doesn't handle timeouts.

The subprocess module doesn't seem to have this functionality.

Also, rusage isn't supported on Windows.

Test result cache

To speed up evals, we could cache (hash of submission, hash of testcase) pairs and do a lookup there instead of rerunning the code.

Fix submodule problem

Currently the BAPCtools repo must be a git submodule of the contest repo in order to make the validation.h symlinks work. It would be nice if we could circumvent this requirement.

Possible solutions:

  • Make each validation.h a copy. This is problematic if bugs are found.
  • Remove the symlink, and add the headers directory to the paths the compiler searches for header files. Small drawback is that it won't be possible to compile the IO validators without the BAPCtools, and the validators will need to be included when exporting to DJ/kattis.

Add memory limit option

We should limit memory usage so that we can test such RTE solutions nicely without freezing the system.

Investigate twig

It's nicer to use a well defined library than using manual string replace commands in latex template files.

New-problem should fill config files

The new-problem subcommand should (interactively) ask for required configuration values:

  • Problem name
  • Problem author
  • Validation type (custom/default)

Furthermore, the source and source_url fields should be extracted from a contest-level configuration file.

add support for VIVA

Hi, my favorite input format validator is VIVA which for many problems allows very concise input format validators that meet Kattis/problemtools standards. In many cases, it entirely eliminates the need for additional input validation before the problem can be approved.
In Kattis problemtools, it recognizes the presence of .viva files in the input_format_validator directory, e.g. here

Consider using it/adding support for it.

Fuzz testing from manual generator

Given a custom generator for testcases, it would be cool if we could automatically could create a lot of testcases with random parameters within some bounds, and then only keep the ones that make AC solutions disagree/many WA solutions fail.

Read languages.yaml

We should support a contest-local or git-repo-local languages.yaml like problemtools' global config

`data/bad` Validators tests

Files in data/bad can be used to test the validators.

The plan is to implement the following:

A single data/bad/test.in should fail at least one input validator.

A triple data/bad/test.{in,ans,out} should pass all input validators and should fail at least one output validator, where the .ans is OK, but .out is bad. If only one of .ans and .out is given, it will be assumed that a .ans is not needed to validate a .out and the single file will be used both as .ans and .out.

This can easily be changed when this is standardised in the problemarchive format. See also Kattis/problemtools#51 and Kattis/problemtools#86

Project settings

bt problem should only copy relevant things.
Project wide settings can opt out of:

  • .ctd validator
  • .viva validator
  • custom c++ validator

Add visualizer support

Proposal:

Add {input,output}_visualizer/ directory in the root of the problem directory (next to generators/).

Different types of visualizers:

  • input only visualizer: called as <visualizer> testcase.in or <visualizer> < testcase.in
  • input+output visualizer: called as <visualizer> testcase.in testcase.ans or <visualizer> <testcase.in <testcase.ans.

There is at most one visualizer of each type, and the entire input_visualizer is treated as a single program (similar to a validator or generator program).

The latter form of piping both the input and output into stdin is useful for Asymptote.

update docs

Docs should be updated now that there are some new features.

Also put things in order of how often they're used, instead of usage order

Add 'contest' mode

Teams should be able to run this is contest mode:

  • start a contest and write config to a file: #problems, duration of contest
  • run code on samples, print output -> wrapper around test
  • run code on all data, recording AC/WA and submission time
  • print contest stats: solve times, penalty, problems solved
  • optionally: end contest and print final stats.

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.