Testlib and Polygon Updates (June, 2015)

Правка en8, от fcspartakm, 2015-06-30 12:32:04

Hello, Codeforces!

Previously, my contribution to the development of Codeforces was limited only by rounds preparation (Codeforces Round 288 (Div. 2), Codeforces Round 293 (Div. 2), Codeforces Round 297 (Div. 2)). But 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.

Besides it in testlib/Polygon appeared additional functionality, which we called features. Often (usually it helpful for coordinator of preparing problems) required to check that tests cover different cases (patterns). For example in graph problem, probably, you have to be sure that you have tests with disconnected graphs and big trees. To guaranteed it now is enough to add in validator to the begining declaration of two feature support — addFeature("disconnected"); and addFeature("big-tree");. In the main part of validator after read graph you can check him on connectivity and if the graph is disconnected you may fix it by calling feature("disconnected");. Similary with tree: if graph is a big tree you may fix it by calling 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!

Теги codeforces, polygon, testlib, полигон

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en12 Английский fcspartakm 2015-06-30 14:23:45 30
ru32 Русский fcspartakm 2015-06-30 14:23:31 0 (опубликовано)
ru31 Русский fcspartakm 2015-06-30 14:23:12 30 (сохранено в черновиках)
ru30 Русский fcspartakm 2015-06-30 12:52:14 15 Мелкая правка: 'orces.\n\n![ ](h' -br/
en11 Английский fcspartakm 2015-06-30 12:51:57 228 Tiny change: '.\n\n[cut]\n\n![ ](h' -br/
ru29 Русский fcspartakm 2015-06-30 12:47:13 284
ru28 Русский fcspartakm 2015-06-30 12:42:33 0 (опубликовано)
en10 Английский fcspartakm 2015-06-30 12:42:21 77
ru27 Русский fcspartakm 2015-06-30 12:37:26 45
en9 Английский fcspartakm 2015-06-30 12:36:50 139
en8 Английский fcspartakm 2015-06-30 12:32:04 153
ru26 Русский fcspartakm 2015-06-30 12:17:58 131
en7 Английский fcspartakm 2015-06-29 19:28:58 61
en6 Английский fcspartakm 2015-06-29 19:28:15 10 Tiny change: 'om/4cbe16/тетстстс.png)\n\nI' -
ru25 Русский fcspartakm 2015-06-29 19:26:07 62
en5 Английский fcspartakm 2015-06-29 19:25:19 65
ru24 Русский fcspartakm 2015-06-29 19:24:58 71
en4 Английский fcspartakm 2015-06-29 19:23:53 1089
en3 Английский fcspartakm 2015-06-29 18:57:06 2096
en2 Английский fcspartakm 2015-06-29 17:46:39 451
en1 Английский fcspartakm 2015-06-29 17:35:14 4050 Initial revision for English translation
ru23 Русский fcspartakm 2015-06-29 15:28:43 263
ru22 Русский fcspartakm 2015-06-29 15:26:44 168
ru21 Русский fcspartakm 2015-06-29 15:25:59 167
ru20 Русский fcspartakm 2015-06-29 15:25:14 890
ru19 Русский fcspartakm 2015-06-29 15:16:29 39
ru18 Русский fcspartakm 2015-06-29 15:15:48 80
ru17 Русский fcspartakm 2015-06-29 15:14:52 58
ru16 Русский fcspartakm 2015-06-29 15:11:18 16
ru15 Русский fcspartakm 2015-06-29 15:10:48 6 Мелкая правка: 'нию, [Ace Redactor](http:' -> 'нию, [Ace Editor](http:'
ru14 Русский fcspartakm 2015-06-29 15:09:54 48
ru13 Русский fcspartakm 2015-06-29 14:44:32 1 Мелкая правка: 'estsetName --group "' -> 'estsetName" --group "'
ru12 Русский fcspartakm 2015-06-29 14:18:44 8 Мелкая правка: ' хорошего настроения' -> ' хорошего летнегнастроения'
ru11 Русский fcspartakm 2015-06-29 14:17:58 2 Мелкая правка: 'upName" ----testOver' -> 'upName" --testOver'
ru10 Русский fcspartakm 2015-06-29 14:17:38 187
ru9 Русский fcspartakm 2015-06-29 14:01:49 543
ru8 Русский fcspartakm 2015-06-29 13:56:37 2 Мелкая правка: 'мального и максимал' -> 'мального или максимал'
ru7 Русский fcspartakm 2015-06-29 13:56:16 14 Мелкая правка: 'титестсеты, чтобы избежать проблем с' -> 'титестсеты без проблем с'
ru6 Русский fcspartakm 2015-06-29 13:55:15 84
ru5 Русский fcspartakm 2015-06-29 13:53:07 986 Мелкая правка: 'человека. Например, ' -
ru4 Русский fcspartakm 2015-06-29 13:38:02 100 Мелкая правка: '`.\n\n\n\n' -
ru3 Русский fcspartakm 2015-06-29 13:37:09 322 Мелкая правка: 'et()`.\n\n![ ](http://codeforces.com/492b87/validator.png)\n\n' -> 'et()`.\n\n\n\n'
ru2 Русский fcspartakm 2015-06-29 13:20:48 550 Мелкая правка: 'та.\n\n2. ' -
ru1 Русский fcspartakm 2015-06-29 13:15:15 341 Первая редакция (сохранено в черновиках)