Documentation Menu · Answers, Verdicts & Diagnostics

Answers, Verdicts & Diagnostics

Understanding derived, default, fixed, chosen, free, monitor, and verdict rankings 2 > 1 > 3 > 0.

Reference entries for the kinds of line that Hector's answer to a program is made of. Each kind opens its line and says what kind of fact it carries. A section gives the meaning for the author, then the small program that prints the kind when the checker prints it. Verdicts rank 2 refused, 1 refuted, 3 unknown, 0 established; the exit code is the worst of them.

derived #

A derived line says that Hector worked a fact out from the rules of the program, and names the rule it came from after the arrow of the line. The author wrote no answer for it: the line shows what the rules already imply, such as which event makes a row enter a status and which status it may leave. Its scope is every reachable state, unless the line says otherwise. Read the derived lines first: a line that surprises the author means a rule says something other than the author meant.

answer/derived.hector
prints derived
-- but: un colis passe de Waiting à Shipped par un seul envoi du magasinier
Clerk
Parcel  weight: Mass
  status: Waiting | Shipped | Delivered
  -> Waiting on Receive by Clerk
  Waiting -> Shipped on Ship by Clerk
  Shipped -> Delivered on Deliver by Clerk
  show status to Clerk within 1 s

default #

A default line says that Hector took a documented default for a business decision the program did not write, such as what a repeated request means or how an answer from the world is held. Hector never takes such a decision in silence, so the line is printed for the author to read. Writing a different rule replaces the default, and the line then goes away. A default is a sound choice from the table of defaults, not a measurement: an author who disagrees writes the rule.

answer/default.hector
prints default
-- but: un paiement est décidé par la banque ; un envoi répété ne crée pas un second paiement
Bank
Customer  name: Text
Charge  payer: Customer, amount: Money
  status: Pending | Done | Refused
  card: Accepted | Declined by Bank on Give
  -> Pending on Give by payer
  Pending -> Done when card is Accepted
  Pending -> Refused when card is Declined
  show status, amount to Bank within 1 s

fixed #

A fixed line states a truth that was given to the program rather than deduced: a status that no transition leaves is terminal, and the line says so. It is the declaration itself, read back, so the author can check that the intention was written. Its scope is every reachable state, like derived. The line changes only when the declaration changes.

answer/fixed.hector
prints fixed
-- but: une commande livrée ne revient jamais en arrière
Clerk
Order
  status: Open | Delivered
  -> Open on Start by Clerk
  Open -> Delivered on Deliver by Clerk
  show status to Clerk within 1 s

chosen #

A chosen line is a realization decision: how Hector stores, computes or orders the program on the named machine, with the reason for it and what would make Hector change it. It is always printed, because every choice Hector makes on the author's behalf must be readable. Its scope is the machine and the load named in the line, not every state; any figure in it is a target until it is measured. Read the "changes when" part to learn the load at which the choice would be revised.

answer/chosen.hector
prints chosen
-- but: une commande et ses lignes, lues par un seul magasinier
Clerk
Order  total: Money
  status: Open | Shipped
  -> Open on Start by Clerk
  Open -> Shipped on Ship by Clerk
  show status, total to Clerk within 1 s

free #

A free line names what nobody observes, so Hector may choose it without changing any answer the author gets: a field written at birth and never read later, a storage layout, a number of threads. The tail of the line gives the reason, such as "nothing reads it later". An author who meant the value to be read adds the rule or the display that reads it, and the line then becomes a derived or disappears. A free choice is never a business decision, so it is never printed as a default.

answer/free.hector
prints free
-- but: le poids d'un colis n'est lu par aucune règle ni aucun affichage
Clerk
Parcel  weight: Mass, label: Text
  status: Waiting | Shipped
  -> Waiting on Receive by Clerk
  Waiting -> Shipped on Ship by Clerk
  show status to Clerk within 1 s

monitor #

A monitor line is a premise about the world that Hector watches, the one the author stated with assume: here, a level reading may be at most fifteen minutes old. While the premise holds, the values that depend on it are trusted; when it breaks, they become unknown instead of being read silently. The line says where the premise is checked, such as at each batch boundary. Hector never writes a premise for the author; it reports only the ones the author stated.

answer/monitor.hector
prints monitor
-- but: le niveau d'une cuve vient d'un capteur ; il ne vaut plus rien au-delà de 15 min
Clerk
Probe
Tank  level: Ratio by Probe
  -> on Watch by Clerk
  assume age(level) <= 15 min
  show level to Clerk within 1 s

why #

A why line gives the provenance of one value: the rules, events and answers that produced it, read back from the history. hector check does not print it. The line belongs to the command hector why <program> <Sort.member> <identity> (<history> | --generate [seed]), which asks about one row of one history. The command is run by the reference itself: see the entry why of the commands (hector doc --about why). hector check does not print a why line, so no @prints example exists for this kind.

why-not #

A why-not line says why a fact does not hold. An answer still awaited is never reported as false: the line names it as unknown and says what it waits for. hector check does not print it, and no command in the checker's main.rs prints it: the word appears in the checker source only in the list of kinds in answers.rs. The language sheet places it with the lines given on demand, so it is absent from a program's ordinary answer. So this section has no directive and no file yet.

what-if #

A what-if line replays a proposed change on the real history and says what would differ, so the author sees the effect before admitting the change. hector check does not print it. The nearest command is hector try <program> <proposed.hector> [<history>], which replays a proposal; this session did not confirm that try prints a what-if line. The sheet also gives it as an on-demand line, not as part of a program's answer. So this section has no directive and no file yet.

experiment #

An experiment line names a measurement that is missing: a figure the program cannot establish without running on a named machine and load. hector check does not print it yet. Today the unmeasured case is said as unknown 3 with the typed reason NotMeasured, which is covered under unknown. The sheet places the experiment line next to chosen, for the machine and load it names. So this section has no directive and no file yet.

refused #

A refused 2 line is a formal refusal: the input is invalid or an authority is missing, so nothing is written and no part of the program changes. It names a closed code, the node it concerns, and a fix that says how to repair it, such as writing next in place of a reassignment. Verdict 2 is the highest: when a refusal is present, the verdict of the whole program is 2, whatever the other lines say. A refusal is what a program written wrong receives, never the answer to a correct program.

answer/refused.hector
prints refused
-- but: un total se définit, il ne se réassigne pas
Clerk
Tally
  total = total + 1 EUR
  show total to Clerk within 1 s

refuted #

A refuted 1 line is a counter-example: a finite and minimal case in which a law or an example does not hold, given with the step that breaks it and replayable step by step. Verdict 1 ranks below a refusal and above an unknown claim. Here the law names a value that the world decides, and no event of the program can refuse to keep it, so the counter-example is the reason it cannot hold. The repair is written by the author: an assume that names the premise, or a rule that makes an event keep the law.

answer/refuted.hector
prints refuted
-- but: une loi qu'aucun événement du programme ne peut garder
Gate  status: Open | Shut
  verdict: Ok | Bad by Bank on Check
  -> Open on Make
  Open -> Shut on Close
  law verdict is Ok

unknown #

An unknown 3 line says that a claim is not established, and gives a typed reason: HoleOpen for a name with no value, AwaitingAnswer for an answer from the world still missing, NoMeasure for a termination not proved, NotMeasured for a figure not yet measured, or OutOfScope for a claim beyond its scope. Verdict 3 is not a failure of the program; it says what is missing, and the line names what to give. Here the expression uses a name the program defines nowhere, so the reason is HoleOpen and the line asks for a value for it. An unknown value is never read as false, and an unknown claim never turns into a refusal by itself.

answer/unknown.hector
prints unknown
-- but: une taxe dépend d'un taux que le programme ne donne pas
Clerk
Order  amount: Money
  tax = amount * rate
  show tax to Clerk within 1 s

already #

An already line says that Hector already derives a fact the author wrote, so the author may remove it from the program. The language sheet describes it as a line to remove; hector check does not print it, and no command of the checker prints it. The word appears in the checker source only in comments and local names. So this section has no directive and no file yet.


question #

A question names a missing business decision. The name beginning with ? identifies the hole in this program; it is not a diagnostic code. Use the reported shape and context to provide the decision, then check the program again.

SourceRead #

Hector could not read the source file supplied to check. The file may be missing, inaccessible, or not readable as UTF-8. Check the path, permissions, and encoding, then run hector check again with an existing source file.

Executable CLI Run
verdict 2
hector check SourceRead.missing.hector

NativeNotMeasured #

The comparison between the native image and the reference judge could not be completed, or a documented example could not be played natively. This is an unknown result, not a proof of agreement or disagreement. Read the accompanying reason and address the named limit before relying on native agreement. Here the recursive definition has no measure:

Executable CLI Run
verdict 3
hector check ../codes/NoMeasure.wrong.hector

JUDGE_PANIC #

The reference judge stopped with an internal error while checking the program. Its result is unknown, so native agreement is not established by that run. Keep the program and report the failure with the circumstances needed to reproduce it. No executable example that safely triggers this internal failure is included here.

CompilerFailure #

An internal compiler or example-checking failure interrupted the check. The result is unknown; it is not a refusal of the program or a proof of its behavior. Keep the program and report the failure with the circumstances needed to reproduce it. No executable example that safely triggers this internal failure is included here.

PremiseOutsideTheRun #

A premise cannot be watched by the run, or its temporal observation is not lowered. Hector reports that the premise is not monitored; the result does not establish that the premise holds. No executable example for this line is included here yet.