Published package / CLIR
doctrine.vote_methods
v0.1.0Перевод голосов в места и в победителя: словарь способов подсчёта
A package can be printed as a standalone module in a general-purpose language that answers without the rules engine: an answer and its status, with no proof, hashes or canonical document. Everything on this page comes from the generation plan built with the index; the gallery computes nothing of its own.
Generation plan
The plan builds: the package can be printed as a module.
- plan format
- law-backend-plan/0.7
- capabilities
- base layer only
Checked against package scenarios
Not checked: the package scenarios have not been run against generated modules. A plan that builds does not yet show that the answers coincide.
Target languages
bslcsdarterlexgojavaktluaphppyrbrsscalaswiftts
./law dev backend corpus/clir/doctrine-vote-methods.lawir.json --target ts --target py --target go --out DIR
Module interface
Questions are public relations with a producing rule; inputs are the facts a question reads. Function names follow the language: ask_… in Python, ask.… in TypeScript, Ask… in Go.
Questions · 2
| Name | Parameters | Meaning | Reads | Sources |
|---|---|---|---|---|
| elected | text, text | вариант объявлен избранным в этом подсчётеRU-KZ | holds_seat_number | VOTE_METHODS_MODEL |
| prefers | text, text, text | бюллетень предпочитает первый вариант второмуRU-KZ | ballot_ranks | VOTE_METHODS_MODEL |
Inputs · 2
| Name | Parameters | Meaning |
|---|---|---|
| ballot_ranks | text, text, dec | бюллетень ставит вариант на эту позицию; первая позиция — самая предпочитаемаяRU-KZ |
| holds_seat_number | text, text, dec | вариант получает в этом подсчёте своё k-е местоRU-KZ |