Diagnostics reference
What a FLANG_… code in the compiler's output means and how to fix the program. Codes are grouped by the stage of checking that reports them; the full alphabetical list is at the end of the page.
Every error line starts with a code:
$ flang check docs/examples/diagnostics/type.flang
модуль «Probe»: функций 1, из них с доказанным завершением 1; типов 0
FLANG_TYPE в файле docs/examples/diagnostics/type.flang, строка 6, столбец 3: функция «Удвоить» объявлена как число, а тело даёт строка
docs/examples/diagnostics/type.flang: не проверено — замечаний 1
$ echo $?
1
After the code come the file, the line, the column and a description. The last line is the result for the file; 1 is the exit code.
Messages are in Russian by default. With language = en in .flangrc or FLANG_LANG=en the code stays the same and the text is in English for the messages that have a translation.
Words on this page: a postcondition is an обеспечивает line; a precondition is a требует line; the kernel is the part of the compiler that proves postconditions for all inputs; a test is a пример block.
Exit codes of flang check
| Code | When |
|---|---|
0 | no errors |
1 | errors found |
2 | the command was called wrongly: unknown flag, no such file. Or there are no errors, but not everything was checked: for a program with processes or categories part of the rules of the declarations was not checked, and the output says so |
3 | with --proof or --strict, not everything is proved |
4 | part of the checks did not run (--fast) |
The table for all commands is in the Command reference.
Exit code 0 without flags does not mean the postconditions are proved. flang check checks parsing, types, termination and tests, and looks for a counterexample to every postcondition. A postcondition it could neither prove nor refute is not an error:
модуль «Core»
тотальная функция «Двойка»
принимает н: число
возвращает число
н умножить на 2
тотальная функция «Учтено»
принимает н: число
возвращает число
обеспечивает «не меньше двойки» результат не меньше («Двойка» от н)
(«Двойка» от н) плюс 1
$ flang check docs/examples/diagnostics/core.flang
модуль «Core»: функций 2, из них с доказанным завершением 2; типов 0
docs/examples/diagnostics/core.flang: проверено — доказано 0, проверено только на тестах 0, не доказано 1 (постусловий и утверждений 1)
не доказано: 1 — подробности: flang check docs/examples/diagnostics/core.flang --proof
With --proof the same file gives exit code 3 and a proof report:
$ flang check docs/examples/diagnostics/core.flang --proof
модуль «Core»: функций 2, завершение доказано у 2
постусловие «не меньше двойки» функции «Учтено» — не доказано
итог: постусловий и утверждений 1 — доказано 0, проверено только на тестах 0, не доказано 1
docs/examples/diagnostics/core.flang: доказано не всё — доказано 0, проверено только на тестах 0, не доказано 1, ложно 0 (постусловий и утверждений 1); независимая проверка повторила 0 из 0 — код возврата 3
подробный отчёт: flang check docs/examples/diagnostics/core.flang --proof --explain
$ echo $?
3
| Word in the report | What it means |
|---|---|
| доказано (proved) | true for all inputs |
| проверено только на тестах (only tested) | true on your examples; not proved for other inputs |
| не доказано (not proved) | there is neither a proof nor an example |
| ложно (false) | an input was found on which the postcondition is violated |
In CI use flang check --proof --strict: it exits with 0 only when everything is proved.
Parsing
| Code | What it means | What to do |
|---|---|---|
FLANG_LEX | a character or word could not be read: an unclosed quote, an unexpected character | close the quote, remove the character |
FLANG_PARSE | the words were read, but they do not form a construct | look at the line and column: usually a missing иначе branch, or a keyword where a name is expected |
FLANG_FILE_LANGUAGE | a keyword is written in a different writing language than the rest of the file; or a // surface: line names a language that does not exist; or the file has equally many keywords of two languages | write the word in the language of the file (the message names it) or name the language with a // surface: ru line at the top |
модуль «Probe»
тотальная функция «Удвоить»
принимает н: число
возвращает число
если н больше 0 то н умножить на 2
$ flang check docs/examples/diagnostics/parse.flang
FLANG_PARSE в файле docs/examples/diagnostics/parse.flang, строка 7, столбец 1: у 'если' нет ветки 'иначе'
docs/examples/diagnostics/parse.flang: не проверено — замечаний 1
$ echo $?
1
если … то … is an expression, so the иначе branch is required.
$ flang check docs/examples/diagnostics/lex.flang
FLANG_LEX в файле docs/examples/diagnostics/lex.flang, строка 5, столбец 3: не закрыта кавычка
docs/examples/diagnostics/lex.flang: не проверено — замечаний 1
$ echo $?
1
Loop, one-line header, class, interface
The compiler rewrites цикл, a one-line function header, класс and интерфейс into ordinary constructs. It rejects a wrongly written form before parsing.
| Code | What it means | What to do |
|---|---|---|
FLANG_SUGAR_LOOP | the loop has no в конце line; has neither для каждого nor пока; or a пока has no убывает or шагов не больше | add the missing line |
FLANG_SUGAR_HEADER | in the header возвращает comes before принимает, a word is repeated, or nothing follows a word | write … принимает … возвращает … |
FLANG_SUGAR_CLASS | a class line that is not a field, not всегда and not метод; or станет changes a field that does not exist | check the field name against the class declaration |
FLANG_SUGAR_INTERFACE | a class does not declare a required method of the interface, or declares it with a different header | add the method with the same header |
loop.flang:
модуль «Цикл»
тотальная функция «Сумма»
принимает числа: список число
возвращает число
цикл «Сложение»
для каждого х из числа
храним итог: число равным 0
дальше: итог станет итог плюс х
$ flang check loop.flang
FLANG_SUGAR_LOOP в файле loop.flang, строка 6, столбец 3: цикл «Сложение»: нет строки «в конце …»: цикл не говорит, что он отдаёт, когда кончается
loop.flang: не проверено — замечаний 1
The fix is a в конце итог line after the храним line. The messages of the other three codes:
FLANG_SUGAR_HEADER в файле header.flang, строка 3, столбец 1: в заголовке «возвращает» стоит раньше «принимает»; пишется «… принимает … возвращает …»
FLANG_SUGAR_CLASS в файле class.flang, строка 6, столбец 3: метод «Положить» класса «Счёт»: у класса «Счёт» нет поля «баланс», которое меняет «… станет …»
FLANG_SUGAR_INTERFACE в файле interface.flang, строка 6, столбец 1: класс «Квадрат» есть «Фигура», но не даёт метод «Площадь»
Names and imports
| Code | What it means | What to do |
|---|---|---|
FLANG_UNKNOWN_NAME | the name is not defined: no such function or variable | declare it, import the module, or fix the spelling |
FLANG_AMBIGUOUS_NAME | two imports give the same name | drop one import or narrow it with только |
FLANG_BAD_NAME | the name does not follow the rules for names | write function names in guillemets and parameters as plain words |
FLANG_NAME_TAKEN | the name is used by another declaration | pick another name |
FLANG_DUPLICATE_NAME | the name is declared twice: in one module or in two modules of one program. The second case also happens when a только list hides a helper function of the same name | remove the second declaration, add the helper to только, or rename |
FLANG_IMPORT_NOT_FOUND | the imported module was not found | check the module name and the path in из "…" |
FLANG_IMPORT_CYCLE | modules import each other in a circle | move the shared part into a third module |
FLANG_IMPORT_AMBIGUOUS | one name comes from two modules | narrow the import with только |
FLANG_IMPORT_NAME | the только list has a name the module does not declare | compare the list with the module's declarations |
модуль «Probe»
тотальная функция «Удвоить»
принимает н: число
возвращает число
«Утроить» от н
$ flang check docs/examples/diagnostics/unknown.flang
модуль «Probe»: функций 1, из них с доказанным завершением 0; типов 0
без доказанного завершения: «Удвоить»
FLANG_UNKNOWN_NAME в файле docs/examples/diagnostics/unknown.flang, строка 6, столбец 3: неизвестная функция «Утроить»
FLANG_NOT_TOTAL в файле docs/examples/diagnostics/unknown.flang, строка 6, столбец 3: тотальная функция «Удвоить» вызывает неизвестную функцию «Утроить»: завершение доказать нельзя
docs/examples/diagnostics/unknown.flang: не проверено — замечаний 2
$ echo $?
1
The second error, FLANG_NOT_TOTAL, follows from the first: termination of a call to an unknown function cannot be proved. It goes away with the first.
An operation written in the wrong order also gives FLANG_UNKNOWN_NAME, and the message shows the right form:
$ flang check docs/examples/diagnostics/operator-order.flang
FLANG_UNKNOWN_NAME в файле docs/examples/diagnostics/operator-order.flang, строка 10, столбец 3: имя «умножить» не связано: имя вводят 'принимает', 'пусть' или образец 'случай'; а действия языка ('плюс', 'минус', 'умножить на', 'делить на', 'остаток от') пишутся МЕЖДУ значениями — «3.14 умножить на р», а не «умножить 3.14 на р»
docs/examples/diagnostics/operator-order.flang: не проверено — замечаний 1
$ echo $?
1
Types
| Code | What it means | What to do |
|---|---|---|
FLANG_TYPE | the declared type differs from the type of the body or of an argument; or a function is declared twice | make the types agree; remove the second declaration |
FLANG_TYPE_ARGS | a built-in type such as число is given type arguments | remove the arguments |
FLANG_TYPE_PARAM | a type parameter is declared twice, has no name, or is named like an existing type | rename the parameter |
FLANG_APPLY | the call has the wrong number of arguments, or what is called is not a function | compare the call with the function header |
FLANG_BUILTIN_ARGS | a built-in operation got the wrong number of arguments | check the description of the operation |
FLANG_OVERFLOW | an operation on a fixed-width integer (u8 … i64) does not fit the type or divides by zero | write с переполнением where overflow is intended, or take a wider type |
FLANG_MATCH_NOT_EXHAUSTIVE | a разбор does not cover all cases | add the missing случай |
FLANG_MATCH_UNREACHABLE | a case is covered by an earlier one and never runs | remove it or move it up |
FLANG_SCALE | values of different scale are added or subtracted, for example сотых and тысячных | bring the values to one scale |
FLANG_INFINITY | an operation takes a value out of the range of its type: вес минус вес can become negative | declare the result as число |
FLANG_NOT_A_NUMBER | the result of an operation is always NaN: a remainder of division by zero, or zero divided by zero | fix the divisor |
FLANG_EXAMPLE | a test failed: the value differs from the expected one, the input of the test does not satisfy требует, or an input was found on which a postcondition is violated | fix the body, the expectation or the postcondition; remove a test whose input does not satisfy the precondition |
The first case of FLANG_TYPE is shown at the top of the page. The others:
$ flang check docs/examples/diagnostics/duplicate.flang
модуль «Probe»: функций 2, из них с доказанным завершением 2; типов 0
FLANG_TYPE в файле docs/examples/diagnostics/duplicate.flang, строка 8, столбец 1: функция «Удвоить» объявлена дважды
docs/examples/diagnostics/duplicate.flang: не проверено — замечаний 1
$ echo $?
1
$ flang check docs/examples/diagnostics/match.flang
модуль «Probe»: функций 1, из них с доказанным завершением 1; типов 0
FLANG_MATCH_NOT_EXHAUSTIVE в файле docs/examples/diagnostics/match.flang, строка 6, столбец 3: разбор списка не покрывает «пусто»
docs/examples/diagnostics/match.flang: не проверено — замечаний 1
$ echo $?
1
$ flang check docs/examples/diagnostics/example.flang
модуль «Probe»: функций 1, из них с доказанным завершением 1; типов 0
FLANG_EXAMPLE: пример «Двойка» функции «Удвоить»: значение не совпало с ожидаемым: ожидалось 5, получено 4
docs/examples/diagnostics/example.flang: не проверено — замечаний 1
$ echo $?
1
scale.flang:
модуль «Масштаб»
тотальная функция «Сложить»
принимает цена: сотых, доля: тысячных
возвращает число
цена плюс доля
FLANG_SCALE в файле scale.flang, строка 6, столбец 8: «add»: масштабы 2 и 3 разошлись: сотых и тысячных
infinity.flang:
модуль «Бесконечность»
тотальная функция «Разность весов»
принимает первый: вес, второй: вес
возвращает вес
первый минус второй
FLANG_INFINITY в файле infinity.flang, строка 6, столбец 10: «sub» над вес и вес выводит из отрезка [0, +∞]
FLANG_TYPE в файле infinity.flang, строка 6, столбец 10: функция «Разность весов» объявлена как вес, а тело даёт число
add and sub in the messages are the internal names of the operations плюс and минус.
Termination and limits
| Code | What it means | What to do |
|---|---|---|
FLANG_NOT_TOTAL | the function is declared тотальная, and its termination is not proved, or a builtin in its body may fail at run time (an error since 0.9.0, not a warning) | pass a PART of the argument to the recursive call (the tail of a list, a field of a variant), not a recomputed number; check the condition of the builtin before it with an if branch, a match pattern or a requires precondition, and if the function can really fail, drop the тотальная mark |
FLANG_MEASURE | the declared measure does not decrease | fix убывает or the call |
FLANG_RECURSION_LIMIT | evaluation used up the limit of steps or of call depth | raise --max-steps or --max-depth, or fix the recursion |
FLANG_STEP_LIMIT | the step limit was used up inside a test | raise --max-steps |
FLANG_BUDGET_EXHAUSTED | the step allowance of the run was used up | raise the allowance or make the task smaller |
FLANG_MEMORY | out of memory | make the data smaller |
FLANG_STOPPED | the run was stopped from outside | run again |
модуль «Probe»
тотальная функция «Считать»
принимает н: число
возвращает число
если н равно 0 то 0 иначе («Считать» от (н плюс 1))
$ flang check docs/examples/diagnostics/total.flang
модуль «Probe»: функций 1, из них с доказанным завершением 0; типов 0
без доказанного завершения: «Считать»
FLANG_NOT_TOTAL в файле docs/examples/diagnostics/total.flang, строка 6, столбец 30: тотальная функция «Считать»: рекурсивный вызов «Считать» не убывает — аргумент 1 («н» add 1) увеличивает параметр «н». Передавайте часть аргумента: хвост списка из образца «голова и хвост», поле варианта из образца, поле записи или элемент коллекции
docs/examples/diagnostics/total.flang: не проверено — замечаний 1
$ echo $?
1
н плюс 1 grows, so the compiler cannot show that the recursion ends. add in the message is the internal name of the operation плюс.
The step limit shows with a small --max-steps. flang run runs only proved programs; not everything in this file is proved, so --trust is added:
$ flang run docs/examples/diagnostics/recursion.flang --function "Вниз" --args '{"н":100}' --max-steps 5 --trust
на веру: доказанность не считалась — запуск по ключу --trust
FLANG_RECURSION_LIMIT: функция «Вниз» исчерпала лимит шагов (5) на глубине вызовов 1
$ echo $?
1
Postconditions and proofs
| Code | What it means | What to do |
|---|---|---|
FLANG_PROPERTY | a postcondition was violated at run time | either the postcondition or the body is wrong — look at the input on which it was violated |
FLANG_PRECONDITION | the input does not satisfy требует: an argument of flang run or the input of a test | pass an input that satisfies the precondition |
FLANG_PRECONDITION_CALL | a call did not establish the precondition of the called function; the same when a function with требует is passed as a value | check the condition before the call, narrow the argument type, or repeat требует on the calling function |
FLANG_BOUND_ON_NAN | a postcondition about order is false because of NaN | see below |
FLANG_UNPROVED | flang run or flang io did not run the program: something in it is not proved. Exit code 3 | prove the postconditions or run with --trust |
FLANG_PROOF | a declaration or a step of a proof was not read or was not accepted by the kernel | fix the step the message names |
FLANG_PROOF_NO_GOAL | the theorem proves nothing: there is no postcondition with this name | name the theorem exactly as the postcondition |
FLANG_PROOF_AMBIGUOUS | the theorem fits two postconditions at once | give the postconditions different names |
FLANG_PROOF_CLAIM_MISMATCH | the text after утверждаем differs from the postcondition | copy the text of the postcondition word for word |
FLANG_PROOF_DUPLICATE | two theorems prove one postcondition | keep one |
FLANG_PROOF_STEP | a step has no justification, or there are no steps at all | add по свойству «…», по примеру «…» or по предположению |
FLANG_PROOF_UNFINISHED | the proof is not finished | add следовательно доказано |
FLANG_PROOF_UNKNOWN_VAR | the statement has an undeclared name | declare it with дано |
FLANG_PROOF_VAR_TYPE | the type of a theorem variable differs from the type of the parameter | make дано agree with the function header |
FLANG_PROOF_INDUCTION_TYPE | induction over this type is not possible | do induction over a type with variants or over неотрицательное |
FLANG_PROOF_INDUCTION_CASES | not all cases of the induction are covered | add the missing случай |
FLANG_PROOF_INDUCTION_BRANCH | a case does not reach the goal | justify this case |
FLANG_PROOF_INDUCTION_STEP | the induction step does not reach the hypothesis | add по предположению and make both sides match exactly |
FLANG_PROOF_INDUCTION_DESCENT | the induction step goes down by something other than exactly one | go down by exactly one |
FLANG_INITIAL_FAILURE | no induction rule was built for the type | check that the type is declared with variants |
FLANG_UNCOVERED_FAILURE | an error case is not handled in a разбор | add a case for the error |
модуль «Probe»
тотальная функция «Удвоить»
принимает н: число
возвращает число
обеспечивает «удвоенное неотрицательно» если н не меньше 0 то (результат не меньше 0) иначе да
н умножить на 2
теорема «удвоенное неотрицательно»
дано н: число
утверждаем если н не меньше 0 то (результат не меньше 0) иначе да
следовательно доказано
$ flang check docs/examples/diagnostics/no-steps.flang
модуль «Probe»: функций 1, из них с доказанным завершением 1; типов 0
FLANG_PROOF_STEP: теорема «удвоенное неотрицательно»: ни одного шага
docs/examples/diagnostics/no-steps.flang: не проверено — замечаний 1
$ echo $?
1
$ flang check docs/examples/diagnostics/no-goal.flang
модуль «Probe»: функций 1, из них с доказанным завершением 1; типов 0
FLANG_PROOF_NO_GOAL в файле docs/examples/diagnostics/no-goal.flang, строка 8, столбец 1: теорема «удвоенное неотрицательно» ничего не закрывает: постусловия «удвоенное неотрицательно» нет ни у одной функции модуля. Теорема доказывает названное утверждение, а не утверждение вообще — назовите её так же, как постусловие, которое она закрывает
docs/examples/diagnostics/no-goal.flang: не проверено — замечаний 1
$ echo $?
1
$ flang check docs/examples/diagnostics/ambiguous.flang
модуль «Probe»: функций 2, из них с доказанным завершением 2; типов 0
FLANG_PROOF_AMBIGUOUS в файле docs/examples/diagnostics/ambiguous.flang, строка 15, столбец 1: теорема «неотрицательно» закрывала бы сразу 2 постусловия («Удвоить», «Утроить»), и выбрать нельзя. Дайте постусловиям разные имена
docs/examples/diagnostics/ambiguous.flang: не проверено — замечаний 1
$ echo $?
1
$ flang check docs/examples/diagnostics/mismatch.flang
модуль «Probe»: функций 1, из них с доказанным завершением 1; типов 0
FLANG_PROOF_CLAIM_MISMATCH в файле docs/examples/diagnostics/mismatch.flang, строка 11, столбец 3: теорема «неотрицательно» утверждает не то, что обещает функция «Удвоить»: утверждение теоремы и постусловие обязаны совпадать слово в слово. Ядро не решает, что два разных утверждения означают одно и то же
docs/examples/diagnostics/mismatch.flang: не проверено — замечаний 1
$ echo $?
1
Precondition
requires.flang:
модуль «Требование»
тотальная функция «Тот же»
принимает а: число
возвращает число
требует «вход неотрицателен» а не меньше 0
а
An argument that does not satisfy the precondition is rejected at run time:
$ flang run requires.flang --function 'Тот же' --args '{"а":-7}'
доказано: утверждений 0
FLANG_PRECONDITION: не выполнено требование «вход неотрицателен» функции «Тот же»
$ echo $?
1
A test with such an input is rejected by flang check already:
FLANG_EXAMPLE: пример «минус семь» функции «Тот же»: FLANG_PRECONDITION: не выполнено требование «вход неотрицателен» функции «Тот же»
A call «Тот же» от б from a function where nothing is known about б gives FLANG_PRECONDITION_CALL:
FLANG_PRECONDITION_CALL в файле call.flang, строка 12, столбец 3: вызов «Тот же» в функции «Проба» не снимает предусловие «вход неотрицателен»: …
A postcondition violated at run time
A postcondition the kernel did not prove is checked at run time. Running a program that is not proved needs --trust:
$ flang run docs/examples/diagnostics/property.flang --function "Половина" --args '{"н":0}' --trust
на веру: доказанность не считалась — запуск по ключу --trust
FLANG_PROPERTY: нарушено свойство «результат меньше довода» функции «Половина»
$ echo $?
1
FLANG_BOUND_ON_NAN: the type число contains NaN
The postcondition looks true, and the kernel answers with a counterexample:
модуль «Probe»
тотальная функция «Прибавить один»
принимает н: число
возвращает число
обеспечивает «результат больше довода» результат больше н
н плюс 1
$ flang check docs/examples/diagnostics/nan.flang
модуль «Probe»: функций 1, из них с доказанным завершением 1; типов 0
FLANG_BOUND_ON_NAN в файле docs/examples/diagnostics/nan.flang, строка 6, столбец 3: постусловие «результат больше довода» функции «Прибавить один» ЛОЖНО, и контрпример назван: «н» объявлен типом «число», а «не число» живёт в этом типе и стоит ВНЕ ПОРЯДКА — оно не больше и не меньше ничего, включая самоё себя. Тело собрано только из арифметики над «н», а всякая арифметическая операция «не число» переносит, значит результат есть «не число», и сравнение с ним ложно… Полный текст: тот же вызов с ключом --explain.
docs/examples/diagnostics/nan.flang: не проверено — замечаний 1
$ echo $?
1
The type число is a floating-point number, and it contains NaN ("not a number"). Any arithmetic on NaN gives NaN, and any comparison with NaN is false. So for NaN the postcondition does not hold. Three ways to fix it:
| Way | What to write | Who checks |
|---|---|---|
| narrow the argument type | принимает н: неотрицательное or целое | nobody: NaN is not in the type |
| add a precondition | требует «вход есть число» (н минус н) равен 0 | the calling function |
| exclude NaN in the postcondition itself | обеспечивает «…» не ((н минус н) равен 0) или (результат больше н) | nobody |
(н минус н) равен 0 is false only when н is NaN.
Laws of declared structures
These laws are not proved; they are checked on a finite set of values that you give. An error means a violation was found; there is always a counterexample.
| Code | Which law is violated |
|---|---|
FLANG_EQUALITY_NOT_REFLEXIVE | the declared equality is not reflexive |
FLANG_EQUALITY_NOT_SYMMETRIC | the equality is not symmetric |
FLANG_EQUALITY_NOT_TRANSITIVE | the equality is not transitive |
FLANG_EQUALITY_NOT_CONGRUENT | composition does not preserve equality |
FLANG_ORDER_NOT_REFLEXIVE | the order is not reflexive |
FLANG_ORDER_NOT_ANTISYMMETRIC | the order is not antisymmetric |
FLANG_ORDER_NOT_TRANSITIVE | the order is not transitive |
FLANG_CATEGORY_NOT_CLOSED | the category is not closed under composition |
FLANG_CATEGORY_NO_IDENTITY | an object has no identity morphism |
FLANG_CATEGORY_NOT_ASSOC | composition is not associative |
FLANG_COMPOSE_MISMATCH | the ends of a composition do not meet |
FLANG_MORPHISM_SHAPE | a morphism is declared wrongly |
FLANG_FUNCTOR_SQUARE | a functor square does not commute |
FLANG_FUNCTOR_OBJECT_MISSING | an arrow is mapped, but its end has no image |
FLANG_TRANSFORM_NOT_NATURAL | a naturality square does not commute |
FLANG_BIFUNCTOR_OBJECT_TWICE | the bifunctor maps one pair of objects twice |
FLANG_BIFUNCTOR_OBJECT_MISSING | a pair of arrows is mapped, but the pair of their ends has no image |
FLANG_BIFUNCTOR_ARROW_MISMATCH | the image of a pair of arrows is not declared or does not go between the images of the ends |
FLANG_BIFUNCTOR_IDENTITY | a pair of identities is mapped to an arrow that is not an identity |
FLANG_BIFUNCTOR_COMPOSITION | a pair of compositions is not mapped to the composition of the images of the parts |
FLANG_ISO_NOT_INVERSE | the two arrows are not inverse to each other |
FLANG_ISO_MISMATCH | an arrow of the isomorphism is not declared or does not go between its objects |
FLANG_ISO_IDENTITY_MISSING | an object of the isomorphism has no declared identity |
FLANG_EMBED_SHAPE | an embedding is declared wrongly |
FLANG_EMBED_NOT_INJECTIVE | the embedding maps different values to one |
FLANG_MONOID | the monoid declaration is incomplete |
FLANG_MONOID_ASSOC | the monoid operation is not associative |
FLANG_MONOID_IDENTITY | the identity element is not an identity |
FLANG_GROUP_INVERSE | the inverse element is not an inverse |
FLANG_MONAD | the monad declaration is incomplete |
FLANG_MONAD_ASSOC | bind is not associative |
FLANG_MONAD_LEFT_UNIT | the left unit law is violated |
FLANG_MONAD_RIGHT_UNIT | the right unit law is violated |
FLANG_NOT_COMMUTATIVE | the declared commutativity does not hold |
FLANG_NOT_DISTRIBUTIVE | distributivity does not hold |
FLANG_NOT_IDEMPOTENT | idempotence does not hold |
FLANG_NOT_MONOTONE | monotonicity does not hold |
FLANG_MEET_NAME_TAKEN | the name of the set is already taken |
FLANG_MEET_NO_UNIVERSE | the declared sets have no common enclosing set |
FLANG_MEET_SAME_SIDE | a set is intersected with itself |
FLANG_MEET_TWICE | one pair is declared twice |
Errors in the declarations of categories, transformations and properties themselves:
| Code | What it means |
|---|---|
FLANG_CATEGORY_ARROW_TWICE | an arrow of the category is named twice |
FLANG_CATEGORY_UNKNOWN_ARROW | an arrow is named that is not declared |
FLANG_CATEGORY_EQUALITY_SHAPE | the equality of an object is not a function of two arguments that returns признак |
FLANG_CATEGORY_EQUALITY_TWICE | the equality of one object is declared twice |
FLANG_CATEGORY_EQUALITY_OUTSIDE | an equality is declared for an object that no arrow of the category touches |
FLANG_CATEGORY_NAME | a declaration without names, or a name that is taken or repeated |
FLANG_CATEGORY_FORM | a line of a proof about arrows is written wrongly |
FLANG_CATEGORY_TYPE | the goal of a proof about arrows is not valid; the message names the reason |
FLANG_CATEGORY_STEP | a step of the chain of equalities was not accepted |
FLANG_CATEGORY_GOAL | the chain of equalities did not reach the right-hand side of the goal |
FLANG_TRANSFORM_SHAPE | a functor of the natural transformation is not declared, or its two functors do not go between the same categories |
FLANG_TRANSFORM_COMPONENT | an object has more than one component; a functor does not map the object of a component; the arrow of a component is not declared |
FLANG_TRANSFORM_NOT_TOTAL | an object has no component of the transformation |
FLANG_UNKNOWN_PROPERTY | a property with an unknown name is declared; the message lists the known ones |
FLANG_PROPERTY_NOT_JUDGED | a declared property was not checked; the message names the reason. Give examples or remove the declaration |
Plans and input/output
Errors of flang io. A plan returns an effect — a command for the host — as data, and the host carries it out. The host returns FLANG_IO_* codes to the plan in answer to an effect.
| Code | What it means | What to do |
|---|---|---|
FLANG_PLAN | the plan is declared wrongly | check the план declaration |
FLANG_UNKNOWN_PLAN | the file has no plan with this name | name an existing one: --plan 'Name', without guillemets |
FLANG_PLAN_UNSUPPORTED | code for plans is not generated for this target language | choose another target language or run with flang io |
FLANG_IO | the plan returned something that is not an effect, a step of the plan returned something that is not a continuation, or the host answered with something that is not a response | fix the type of the value the step of the plan returns |
FLANG_IO_DENIED | the permission was taken away by a flag (--no-read, --no-write, --no-net and others) | remove the flag |
FLANG_IO_NO_HOST | there is nothing to carry out the effect | run with flang io, not by evaluating a function |
FLANG_IO_UNKNOWN | the host does not know this effect | check the name of the effect |
FLANG_IO_NOT_WIRED | the effect is known, but this host does not carry it out | run the plan with flang io |
FLANG_IO_ORDER | the host expected a different effect: for example, the contents of a file instead of a write confirmation | fix the order of the steps of the plan |
FLANG_IO_LIMIT | the plan used up the limit on the number of effects | raise --max-orders |
FLANG_IO_PATH | the effect needs a non-empty path | pass a path |
FLANG_IO_READ | the file was not read | check the path and permissions |
FLANG_IO_WRITE | the write failed, for example the path is a directory | check the path and permissions |
FLANG_IO_LIST | the directory was not opened | check the path |
FLANG_IO_REMOVE | the file was not removed | check the path and permissions |
FLANG_IO_TEMPDIR | the temporary directory was not created | check FLANG_TMP and disk space |
FLANG_IO_NOT_TEXT | reading text met bytes that are not text | read as bytes |
FLANG_IO_OCTETS | the effect needs a list of bytes, but got another value or a number outside 0…255 | pass a list of bytes |
FLANG_IO_ENV | the effect that reads an environment variable has an empty name | pass the name of the variable |
FLANG_IO_ENTROPY | random bytes were requested in a run with --seed, or their count is outside 0…65536 | remove --seed or fix the count |
FLANG_IO_SPAWN | the process was not started | check the program name |
FLANG_IO_TIMEOUT | the started process printed nothing for longer than --timeout | raise --timeout |
FLANG_IO_FAILED | the plan ended with an error and named no code of its own | read the message text |
FLANG_IO_NOT_CHECKED | the plan ended with the outcome "not checked" and named no code of its own: there was nothing to check with. Exit code 3 | remove the cause named in the message and repeat |
FLANG_IO_NO_SCREEN | a screen effect was called without a terminal (output to a pipe, CI) | run in a terminal |
FLANG_IO_PLACE | a screen place is named that does not exist; there is one place, «экран» | name «экран» |
FLANG_IO_NET | a network effect was not carried out: an empty address, no connection, or the host cannot use the network | check the address and the network; run with flang io |
FLANG_IO_NO_TLS | the compiler was built without a TLS client, so an https address cannot be opened | take a build with the TLS client |
FLANG_IO_TLS_CERT | the certificate of the host failed the check: chain, validity period, name or signature | check the address; your own root certificates — --trust-roots <PEM file> |
FLANG_IO_TLS | another TLS failure | retry; check that the host supports TLS 1.3 |
FLANG_TLS_CHAIN, FLANG_TLS_EXPIRED, FLANG_TLS_NAME, FLANG_TLS_SIGNATURE | the cause inside FLANG_IO_TLS_CERT: certificate chain, validity period, host name, signature | the same as for FLANG_IO_TLS_CERT |
FLANG_TLS_ENGINE | the TLS client answered with something the host did not expect | report it: this is a fault of the tool |
FLANG_LOCK | the lock file is damaged or its checksum does not match | rebuild it with flang lock |
FLANG_PACKAGE | the package is damaged or there is no flang.package next to it | rebuild it with flang package |
FLANG_PRINT_REFUSED | the code generation plan did not generate the files; the message names the reason | remove the cause named in the message |
FLANG_PRINT_DIAGNOSTICS | the code generation plan found errors in the source files; they are listed in the message | fix the listed errors |
FLANG_EMPTY_ORDER | the code generation plan was given no files | pass the files |
Permissions are taken away one at a time; by default everything is allowed:
flang io план.flang --plan 'Разбор' --no-net --in-dir
Importing by a link
| Code | What it means | What to do |
|---|---|---|
FLANG_LINK_FETCH | the file at the link was not fetched, or the scheme of the link is neither https:// nor file:// | check the link |
FLANG_LINK_OFFLINE | the network is closed by the FLANG_OFFLINE variable, and the link is neither in the lock file nor in the cache | build with the network or bring a flang.lock |
FLANG_LINK_CHANGED | the file in the lock file or the cache does not match the recorded checksum | restore the lock file from git; details on the packages page |
Processes
| Code | What it means | What to do |
|---|---|---|
FLANG_PROCESS | the process is declared wrongly | check the declaration |
FLANG_UNKNOWN_PROCESS | a process names a handler or an initial function that the program does not have | fix the name |
FLANG_HANDLER_NOT_TOTAL | the handler of a process is not declared тотальная, and the process names no step allowance | declare the handler тотальная or name a step allowance |
FLANG_PROCESS_ACCEPTS | the process received a message it does not accept | add the kind of message to принимает |
FLANG_PROCESS_LIMIT | the limit on the number of processes was reached | raise the limit or start fewer |
FLANG_MAILBOX_FULL | the message queue of the process is full: the receiver falls behind | read more often or slow the sender down |
FLANG_LINK_DOWN | the link to a node or process broke | handle the break in the supervisor |
FLANG_HOTSWAP_REFUSED | replacing the code without stopping was rejected | make the new code compatible with the previous declarations |
Command line and internal errors
| Code | What it means | What to do |
|---|---|---|
FLANG_CLI | the command was called wrongly: unknown flag or missing argument | flang <command> --help |
FLANG_NEW | flang new did not create the package: the directory exists or the name is not allowed | another name or --force |
FLANG_INTERNAL | an error in the compiler itself | report it: this is a fault of the tool, not of your program |
FLANG_UNKNOWN | a generated program got an error without a code | report it: this is a fault of the tool |
FLANG_SELF_REPL_UNSUPPORTED | the interactive shell does not accept this construct, for example использует | put the code in a file and run flang check |
FLANG_FACTCHECK_NO_ANSWER | flang facts got no value for a call | add the value to the facts |
FLANG_FREESTANDING_UNSUPPORTED | emit --freestanding: the function cannot be translated to C without libc — it has strings, lists, fractional numbers or recursion | rewrite the function over the integers u8…u64, records and types with variants; details — C without libc |
$ flang check --неткого
flang check: непонятный ключ «--неткого»
$ echo $?
2
Environment variables with the same prefix
These names are settings, not errors. They get into the full table below because of the FLANG_ prefix. The main ones are described in the Command reference.
| Variables | What they concern |
|---|---|
FLANG_JOBS, FLANG_THREADS | the number of processes check uses for independent proofs; the number of threads for parallel evaluation |
FLANG_TMP | the directory for temporary files |
FLANG_LANG, FLANG_MESSAGE_DIR | the language of messages and the directory with their texts |
FLANG_MODULE_DIR, FLANG_MODULE_ROOT | where to look for modules; the directory above which the search does not go |
FLANG_RUNTIME_DIR, FLANG_FSPEC_TEMPLATE_DIR | runtime sources for emit; templates for flang new |
FLANG_UNPROVEN | what run and io do with a program that is not proved: refuse, warn, allow |
FLANG_CHECKER, FLANG_PROOF_CHECKER | the path to the independent checker program |
FLANG_OFFLINE | forbids the network when importing by a link |
FLANG_LISTEN_ADDRESS | the address on which a program accepts connections; 127.0.0.1 by default |
FLANG_HISTORY | the history file of the interactive shell; 0 or no turns recording off |
FLANG_BIN | the path to flang itself; the compiler sets it for the processes it starts |
FLANG_PROOF_CACHE, FLANG_PROOF_CACHE_AUDIT, FLANG_PROOF_CACHE_KEY, FLANG_PROOF_CACHE_RECHECK, FLANG_PROOF_CACHE_STATS | the proof cache |
FLANG_MEMO, FLANG_MEMO_AUDIT, FLANG_MEMO_BYTES, FLANG_MEMO_STATS | remembering results of the evaluator: switching on, cross-checking, memory limit, statistics |
FLANG_TICKS, FLANG_TICKS_OUT, FLANG_TIME_OUT, FLANG_WATCH, FLANG_WATCH_TICK, FLANG_PULSE, FLANG_PULSE_TICK, FLANG_KERNEL_STAGES | measuring steps and time while developing the compiler |
FLANG_STEPS occurs only in the compiler's own tests.
Every code of the compiler
The table is collected from the sources of the compiler and the runtime: it has every code they report. A dash in the third column means the message text is put together at the place of the error.
A FLANG_* code is part of the contract with programs that read the compiler's output: an editor, CI, a course. For each code the release it appeared in and a status are recorded: stable, new or removed.
| Code | Where in the compiler | Message |
|---|---|---|
FLANG_AMBIGUOUS_NAME | parser.flang | — |
FLANG_APPLY | interpret.flang, types.flang | — |
FLANG_BAD_NAME | conc.flang, failures.flang, flang_conc.c | — |
FLANG_BIFUNCTOR_ARROW_MISMATCH | compiler.flang | — |
FLANG_BIFUNCTOR_COMPOSITION | compiler.flang | — |
FLANG_BIFUNCTOR_IDENTITY | compiler.flang | — |
FLANG_BIFUNCTOR_OBJECT_MISSING | compiler.flang | — |
FLANG_BIFUNCTOR_OBJECT_TWICE | compiler.flang | — |
FLANG_BIN | flang_repl.c | — |
FLANG_BOUND_ON_NAN | obligations.flang | postcondition «{claim}» of function «{function}» is FALSE, and a counterexample is named: {reason} |
FLANG_BUDGET_EXHAUSTED | conc.flang, failures.flang, flang_conc.c | — |
FLANG_BUILTIN_ARGS | builtins.flang, failures.flang, interpret.flang, types.flang | — |
FLANG_CATEGORY_ARROW_TWICE | compiler.flang | — |
FLANG_CATEGORY_EQUALITY_OUTSIDE | compiler.flang | — |
FLANG_CATEGORY_EQUALITY_SHAPE | compiler.flang | — |
FLANG_CATEGORY_EQUALITY_TWICE | compiler.flang | — |
FLANG_CATEGORY_FORM | category-paths.flang | — |
FLANG_CATEGORY_GOAL | category-paths.flang | — |
FLANG_CATEGORY_NAME | category-paths.flang | — |
FLANG_CATEGORY_NOT_ASSOC | setoid.flang | — |
FLANG_CATEGORY_NOT_CLOSED | compiler.flang | — |
FLANG_CATEGORY_NO_IDENTITY | compiler.flang | — |
FLANG_CATEGORY_STEP | category-paths.flang | — |
FLANG_CATEGORY_TYPE | category-paths.flang | — |
FLANG_CATEGORY_UNKNOWN_ARROW | compiler.flang | — |
FLANG_CHECKER | flang_repl.c | — |
FLANG_CLI | cli.flang, repl.flang, flang_repl.c | — |
FLANG_COMPOSE_MISMATCH | compiler.flang | — |
FLANG_DUPLICATE_NAME | link.flang, sets.flang, flang_repl.c | in file {file}: function «{name}» is declared in two modules: {first} and {second} · function «{name}» is declared in two modules: {first} and {second} · in file {file}: type «{name}» is declared in two modules: {first} and {second} · type «{name}» is declared in two modules: {first} and {second} |
FLANG_EMBED_NOT_INJECTIVE | sets.flang | — |
FLANG_EMBED_SHAPE | sets.flang | — |
FLANG_EMPTY_ORDER | emit-from-source.flang | — |
FLANG_EQUALITY_NOT_CONGRUENT | setoid.flang | — |
FLANG_EQUALITY_NOT_REFLEXIVE | setoid.flang | — |
FLANG_EQUALITY_NOT_SYMMETRIC | setoid.flang | — |
FLANG_EQUALITY_NOT_TRANSITIVE | setoid.flang | — |
FLANG_EXAMPLE | compiler.flang | example «{example}» of function «{function}»: the value does not match the expected one: expected {wanted}, got {got} |
FLANG_FACTCHECK_NO_ANSWER | factcheck.flang | — |
FLANG_FILE_LANGUAGE | lexer.flang, parser.flang | — |
FLANG_FREESTANDING_UNSUPPORTED | c-without-libc.flang | — |
FLANG_FSPEC_TEMPLATE_DIR | flang_repl.c | — |
FLANG_FUNCTOR_OBJECT_MISSING | compiler.flang | — |
FLANG_FUNCTOR_SQUARE | functor.flang | — |
FLANG_GROUP_INVERSE | monoid.flang | — |
FLANG_HANDLER_NOT_TOTAL | processes.flang | — |
FLANG_HISTORY | flang_repl.c | — |
FLANG_HOTSWAP_REFUSED | hotswap.flang | — |
FLANG_IMPORT_AMBIGUOUS | link.flang, flang_repl.c | — |
FLANG_IMPORT_CYCLE | link.flang, flang_repl.c | — |
FLANG_IMPORT_NAME | link.flang, flang_repl.c | — |
FLANG_IMPORT_NOT_FOUND | link.flang, flang_repl.c | — |
FLANG_INFINITY | types.flang | — |
FLANG_INITIAL_FAILURE | failures.flang, processes.flang | — |
FLANG_INTERNAL | conc.flang, lsp.flang, flang_conc.c, flang_repl.c | — |
FLANG_IO | compiler.flang, flang_cli.c, flang_conc.c, flang_repl.c | — |
FLANG_IO_DENIED | flang_repl.c | — |
FLANG_IO_ENTROPY | flang_repl.c | — |
FLANG_IO_ENV | flang_cli.c, flang_repl.c | — |
FLANG_IO_FAILED | flang_cli.c, flang_repl.c | — |
FLANG_IO_LIMIT | flang_cli.c, flang_repl.c | — |
FLANG_IO_LIST | flang_cli.c, flang_repl.c | — |
FLANG_IO_NET | flang_conc.c, flang_repl.c | — |
FLANG_IO_NOT_CHECKED | flang_cli.c, flang_repl.c | — |
FLANG_IO_NOT_TEXT | flang_cli.c, flang_conc.c, flang_repl.c | — |
FLANG_IO_NOT_WIRED | flang_cli.c | — |
FLANG_IO_NO_HOST | conc.flang, flang_conc.c | — |
FLANG_IO_NO_SCREEN | flang_cli.c, flang_repl.c | — |
FLANG_IO_NO_TLS | flang_repl.c | — |
FLANG_IO_OCTETS | flang_cli.c, flang_conc.c, flang_repl.c | — |
FLANG_IO_ORDER | emit-from-source.flang | — |
FLANG_IO_PATH | flang_cli.c, flang_conc.c, flang_repl.c | — |
FLANG_IO_PLACE | flang_repl.c | — |
FLANG_IO_READ | flang_cli.c, flang_conc.c, flang_repl.c | — |
FLANG_IO_REMOVE | flang_cli.c, flang_conc.c, flang_repl.c | — |
FLANG_IO_SPAWN | flang_repl.c | — |
FLANG_IO_TEMPDIR | flang_cli.c, flang_conc.c, flang_repl.c | — |
FLANG_IO_TIMEOUT | flang_repl.c | — |
FLANG_IO_TLS | flang_repl.c | — |
FLANG_IO_TLS_CERT | flang_repl.c | — |
FLANG_IO_UNKNOWN | flang_conc.c, flang_repl.c | — |
FLANG_IO_WRITE | flang_cli.c, flang_conc.c, flang_repl.c | — |
FLANG_ISO_IDENTITY_MISSING | compiler.flang | — |
FLANG_ISO_MISMATCH | compiler.flang | — |
FLANG_ISO_NOT_INVERSE | iso.flang | — |
FLANG_JOBS | flang_runtime.c | — |
FLANG_KERNEL_STAGES | flang_repl.c | — |
FLANG_LANG | flang_repl.c | — |
FLANG_LEX | lexer.flang | — |
FLANG_LINK_CHANGED | flang_repl.c | — |
FLANG_LINK_DOWN | failures.flang | — |
FLANG_LINK_FETCH | flang_repl.c | — |
FLANG_LINK_OFFLINE | flang_repl.c | — |
FLANG_LISTEN_ADDRESS | flang_conc.c, flang_repl.c | — |
FLANG_LOCK | flang_repl.c | — |
FLANG_MAILBOX_FULL | conc.flang, failures.flang, flang_conc.c | — |
FLANG_MATCH_NOT_EXHAUSTIVE | interpret.flang, types.flang | the match on {subject} does not cover {cases} · a match without cases covers nothing |
FLANG_MATCH_UNREACHABLE | types.flang | — |
FLANG_MEASURE | defunc.flang, failures.flang | — |
FLANG_MEET_NAME_TAKEN | sets.flang | — |
FLANG_MEET_NO_UNIVERSE | sets.flang | — |
FLANG_MEET_SAME_SIDE | compiler.flang, sets.flang | — |
FLANG_MEET_TWICE | sets.flang | — |
FLANG_MEMO | flang_runtime.c | — |
FLANG_MEMORY | flang_cli.c, flang_repl.c | — |
FLANG_MEMO_AUDIT | flang_runtime.c | — |
FLANG_MEMO_BYTES | flang_runtime.c | — |
FLANG_MEMO_STATS | flang_runtime.c | — |
FLANG_MESSAGE_DIR | flang_repl.c | — |
FLANG_MODULE_DIR | flang_repl.c | — |
FLANG_MODULE_ROOT | flang_repl.c | — |
FLANG_MONAD | monad-expand.flang, monad.flang | — |
FLANG_MONAD_ASSOC | monad.flang | — |
FLANG_MONAD_LEFT_UNIT | monad.flang | — |
FLANG_MONAD_RIGHT_UNIT | monad.flang | — |
FLANG_MONOID | monoid.flang | — |
FLANG_MONOID_ASSOC | monoid.flang | — |
FLANG_MONOID_IDENTITY | monoid.flang | — |
FLANG_MORPHISM_SHAPE | compiler.flang | — |
FLANG_NAME_TAKEN | conc.flang, failures.flang, flang_conc.c | — |
FLANG_NEW | flang_repl.c | — |
FLANG_NOT_A_NUMBER | types.flang | — |
FLANG_NOT_COMMUTATIVE | commutative.flang | — |
FLANG_NOT_DISTRIBUTIVE | distributive.flang | — |
FLANG_NOT_IDEMPOTENT | idempotent.flang | — |
FLANG_NOT_MONOTONE | monotone.flang | — |
FLANG_NOT_TOTAL | totality.flang, types.flang | total function «{function}» calls an unknown function «{callee}»: termination cannot be proved · total function «{function}»: the recursive call «{callee}» does not decrease — argument {position} ({argument}) increases parameter «{parameter}». Pass a part of the argument: the tail of a list from the pattern «голова и хвост», a variant field from a pattern, a record field or an element of a collection |
FLANG_OFFLINE | flang_repl.c | — |
FLANG_ORDER_NOT_ANTISYMMETRIC | partialorder.flang | — |
FLANG_ORDER_NOT_REFLEXIVE | partialorder.flang | — |
FLANG_ORDER_NOT_TRANSITIVE | partialorder.flang | — |
FLANG_OVERFLOW | interpret.flang, types.flang | — |
FLANG_PACKAGE | flang_repl.c | — |
FLANG_PARSE | interpret.flang, parser.flang | 'если' has no 'иначе' branch · construct not parsed: unexpected '{word}' — this word is taken by the language and cannot be a name: write the name in guillemets («{word.quoted}») or rename it; and if the word got into the form by mistake, remove it |
FLANG_PLAN | io.flang | — |
FLANG_PLAN_UNSUPPORTED | compiler.flang | — |
FLANG_PRECONDITION | emit-c.flang, emit-csharp.flang, emit-elixir.flang, emit-java.flang, emit-js.flang, emit-python.flang, interpret.flang, parser.flang | — |
FLANG_PRECONDITION_CALL | proofterm.flang, types.flang | the call of «{callee}» in function «{function}» does not discharge precondition «{precondition}»: {reason} |
FLANG_PRINT_DIAGNOSTICS | emit-from-source.flang | — |
FLANG_PRINT_REFUSED | emit-from-source.flang | — |
FLANG_PROCESS | conc.flang, processes.flang, flang_conc.c | — |
FLANG_PROCESS_ACCEPTS | conc.flang, failures.flang, processes.flang | — |
FLANG_PROCESS_LIMIT | conc.flang, failures.flang, flang_conc.c | — |
FLANG_PROOF | compiler.flang, link.flang | — |
FLANG_PROOF_AMBIGUOUS | obligations.flang | — |
FLANG_PROOF_CACHE | flang_repl.c | — |
FLANG_PROOF_CACHE_AUDIT | flang_repl.c | — |
FLANG_PROOF_CACHE_KEY | flang_repl.c | — |
FLANG_PROOF_CACHE_RECHECK | flang_repl.c | — |
FLANG_PROOF_CACHE_STATS | flang_repl.c | — |
FLANG_PROOF_CHECKER | flang_repl.c | — |
FLANG_PROOF_CLAIM_MISMATCH | obligations.flang, proofterm.flang | — |
FLANG_PROOF_DUPLICATE | obligations.flang | — |
FLANG_PROOF_INDUCTION_BRANCH | proofterm.flang | step {step}, inductive case «{case}» of theorem «{theorem}»: {reason} · step {step}, base case «{case}» of theorem «{theorem}»: {reason} |
FLANG_PROOF_INDUCTION_CASES | proofterm.flang | — |
FLANG_PROOF_INDUCTION_DESCENT | proofterm.flang | — |
FLANG_PROOF_INDUCTION_STEP | proofterm.flang | step {step}, inductive case «{case}» of theorem «{theorem}»: {reason} · step {step}, base case «{case}» of theorem «{theorem}»: {reason} |
FLANG_PROOF_INDUCTION_TYPE | proofterm.flang | — |
FLANG_PROOF_NO_GOAL | obligations.flang | — |
FLANG_PROOF_STEP | proofterm.flang | step {step}, theorem «{theorem}»: {reason} |
FLANG_PROOF_UNFINISHED | obligations.flang | — |
FLANG_PROOF_UNKNOWN_VAR | obligations.flang, parser.flang, types.flang | — |
FLANG_PROOF_VAR_TYPE | obligations.flang | — |
FLANG_PROPERTY | compiler.flang, emit-c.flang, emit-csharp.flang, emit-elixir.flang, emit-java.flang, emit-js.flang, emit-python.flang, grid.flang, interpret.flang, parser.flang | property «{claim}» of function «{function}» is violated |
FLANG_PROPERTY_NOT_JUDGED | compiler.flang | — |
FLANG_PULSE | flang_runtime.c | — |
FLANG_PULSE_TICK | flang_runtime.c | — |
FLANG_RECURSION_LIMIT | compiler.flang, conc.flang, factcheck.flang, failures.flang, interpret.flang | — |
FLANG_RUNTIME_DIR | flang_repl.c | — |
FLANG_SCALE | types.flang | — |
FLANG_SELF_REPL_UNSUPPORTED | repl.flang | — |
FLANG_STEPS | compiler.flang | — |
FLANG_STEP_LIMIT | factcheck.flang | — |
FLANG_STOPPED | conc.flang, failures.flang, flang_conc.c | — |
FLANG_SUGAR_CLASS | sugar.flang | — |
FLANG_SUGAR_HEADER | sugar.flang | — |
FLANG_SUGAR_INTERFACE | sugar.flang | — |
FLANG_SUGAR_LOOP | sugar.flang | — |
FLANG_THREADS | flang_runtime.c | — |
FLANG_TICKS | flang_repl.c | — |
FLANG_TICKS_OUT | flang_runtime.c | — |
FLANG_TIME_OUT | flang_runtime.c | — |
FLANG_TLS_CHAIN | flang_repl.c | — |
FLANG_TLS_ENGINE | flang_repl.c | — |
FLANG_TLS_EXPIRED | flang_repl.c | — |
FLANG_TLS_NAME | flang_repl.c | — |
FLANG_TLS_SIGNATURE | flang_repl.c | — |
FLANG_TMP | flang_repl.c | — |
FLANG_TRANSFORM_COMPONENT | compiler.flang | — |
FLANG_TRANSFORM_NOT_NATURAL | setoid.flang | — |
FLANG_TRANSFORM_NOT_TOTAL | compiler.flang | — |
FLANG_TRANSFORM_SHAPE | compiler.flang | — |
FLANG_TYPE | interpret.flang, types.flang, flang_cli.c | {where} is declared to return {type.declared}, but its body gives {type.body} · {where} is declared twice · {where} has no body · argument «{parameter}» of function «{function}»: expected {type.wanted}, got {type.got} · {side} operand of «{operation}»: expected {type.wanted}, got {type.got} · the condition of «если» must be a flag, not {type} · the branches of «если» have different types: {type.then} and {type.else} · record «{record}» has no field «{field}» · record «{record}» requires field «{field}» ({type}) · field «{field}» is declared twice · function «{function}» takes {count} argument(s) ({parameters}), but is called with {given} · call of function «{function}»: argument «{parameter}»: {value} is outside {type} · {label} of function «{function}» does not give argument «{parameter}» · {label}: {value} is outside {type} · {label} does not match type {type} |
FLANG_TYPE_ARGS | types.flang | — |
FLANG_TYPE_PARAM | types.flang | — |
FLANG_UNCOVERED_FAILURE | failures.flang, processes.flang | — |
FLANG_UNKNOWN | flang_cli.c | — |
FLANG_UNKNOWN_NAME | compiler.flang, builtins.flang, conc.flang, interpret.flang, link.flang, parser.flang, sets.flang, types.flang, flang_repl.c | unknown function «{name}» · unknown type «{name}» · unknown record «{name}» · unknown variant «{name}» · unknown variant constructor «{name}» · function «{name}» is not found · the record has no field «{field}» · name «{name}» is not bound · name «{name}» is not bound: a name is introduced by 'принимает', 'пусть' or a 'случай' pattern; and the operations of the language ('плюс', 'минус', 'умножить на', 'делить на', 'остаток от') go BETWEEN values — «3.14 умножить на р», not «умножить 3.14 на р» |
FLANG_UNKNOWN_PLAN | compiler.flang, flang_cli.c | — |
FLANG_UNKNOWN_PROCESS | processes.flang | — |
FLANG_UNKNOWN_PROPERTY | compiler.flang | — |
FLANG_UNPROVED | compiler.flang | — |
FLANG_UNPROVEN | flang_repl.c | — |
FLANG_WATCH | flang_runtime.c | — |
FLANG_WATCH_TICK | flang_runtime.c | — |
Next: When it is not proved — how to read a rejected proof, and when the mistake is not yours.