Hello, Codeforces!
A month ago, I joined the wonderful Codeforces team led by Mike Mirzayanov (MikeMirzayanov). Traditionally, to understand all the niceties of this project, my work begun from Polygon system. I would like to tell you about its changes.
To edit the files in Polygon now used Ace Editor. It has a nice looking syntax highlighting and autocompletion (you have to press Ctrl + Space). Soon planned to implement this editor in Codeforces.
Unfortunately, Ace Editor not support scrolling text on the smartphones and the tablets. Because of that on them left the old text editor.
On the validator, checker and interactor pages appeared button View Source. When you press this button you can see the source code file. It is convenient because now you can see the source code of standart checkers.
In Testlib library useful changes have been made too, which also work in Polygon. Now you can specify in validator different restrictions for different testsets and for different test groups. To register validator you need to use registerValidation(argc, argv);
, and methods validator.group()
and validator.testset()
appeared in validator.
To check test by validator from command line using testset and group you need to write command val.exe --testset "testsetName" --group "groupName" < testFile
.
This changes useful, for example, for preparing school problems where allocated different test groups. Also this changes will allow to use in Codeforces round multitestsets, prohibiting use such tests in hacking attempts.
It becomes easier to check cover of different cases by tests. It is supporting in Polygon in tab Invocation.
If in validator you indicated variable name (this function ignores variable which contains digits in their names), then if you have no tests, in which this variable reaches minimal or maximal values, after perform Invocation, you wil get warning about it.
Кроме того в testlib/Polygon появилась дополнительная функциональность, которую мы назвали features. Зачастую (обычно координатору подготовки задач) требуется удостовериться, что тесты покрывают тот или иной случай (паттерны). Например, в задаче на графы, вероятно, надо быть уверенным, что есть тесты с несвязными графами и большими деревьями. Для того, чтобы гарантировать это теперь достаточно добавить в валидатор в начале декларацию поддержки двух фич addFeature("unconnected");
и addFeature("big-tree");
. В основной части валидатора, после считывания графа можно проверить правда ли он несвязный, и если несвязный, то зафиксировать этот факт вызовом feature("unconnected");
. Аналогично с деревом: если граф — большое дерево, то вызвать feature("big-tree");
.
When you startup invocation Polygon will alert you, if there is declarated feature, which did not met in tests. In out examples it will say, that tests does not contains disconnected graph and big trees.
Introduction the Features will be useful for a person, who check ready problem or ready contest. But we think that also it will be very helpful for problem writers.
Validator output information about achieving extreme variable values and about features, if you add to call validator in command line parameter --testOverviewLogFileName log.txt
. Polygon reads and parses exactly this logs to show warnings for you.
Soon you will get new and new improvements! I wish to all good summer mood!