check your code
Check your code
Write what your C code must do, send a commit, and read each answer.
On this page
Before you check
Only C code is checked. The commit needs a .c file and a build file (Makefile, makefile, GNUmakefile, CMakeLists.txt, meson.build, *.mk, *.cmake). You also need a seat, which holds your credits. No seat? Ask the Ruhub team.
What gets sent
Only the commit's C, build and text files: names ending in .c, .h, .md, .txt, .mk, .cmake, and the build files. Other files stay in the repo.
| Topic | Detail |
|---|---|
| Left out | Dot folders and files. |
| Must be plain text | A link, a binary file, or two names that differ only in letter case stop the send. |
| The list | The page lists each file with size and sha256. That list is what is checked. |
| Files in one send | 1,000 |
| One file | 1 MB |
| All files together | 16 MB |
| All files packed (compressed) | 4 MB |
Write properties
A property says what your code must do. Write one per line in Properties to check, one per line
. Up to 20 lines, 500 characters each, 4,000 in all. Write the properties in English.
| Property | Good? | Why |
|---|---|---|
| ring_push returns -1 when the buffer is full and leaves the buffer unchanged. | Good | Names a function and its behaviour. |
| ring_pop never reads outside the buffer. | Good | Names a function and what it never does. |
| When the buffer is empty, a successful ring_push(x) is followed by a ring_pop that returns x. | Good | Links two functions. |
| The ring buffer works. | Bad | Names no function and no behaviour. |
| ring_push is fast. | Bad | Speed is not a statement about results. |
Send
- Open Check properties of a commit (you need to be signed in), or press
Check properties
on a commit or a change. - Pick the
Repository
, theBranch or tag
and theCommit
. - Write your properties.
- Press
Send for checking
. Nothing is sent before.
No reply? Check the run list before you send again. Refusals: Reference.
Read a result
Runs are in the Runs
tab. Open one for a row per property. Only Proved
counts.
| Answer | Meaning |
|---|---|
| Proved | The only answer that counts. |
| Disproved | A case where the property fails. Evidence links it. |
| Not settled | The check could not decide. |
| Not checked, so not counted as proved | A result exists but fails a condition of a claim. |
| Working | Still on this property. |
| Not one of your stated properties | Added by the check, labelled added during checking. Never counted. |
| No answer yet | The run is open and this property has no result yet. |
| No answer: the run ended without one | The run ended and this property never got a result. |
| Point | Detail |
|---|---|
| It says | For the stated property, on these exact files (by sha256), at that commit, under the assumptions listed under the answer. |
| It also needs | A run that ended Finished or Finished with errors, and the same sha256 in the stored package, the run manifest and what you sent. |
| Two sentences | Holds only for this specification and these inputs. Assumes the code is built with gcc on Linux x86-64, and holds only when the function returns. |
| It does not say | That the program does what you meant overall, that the function returns (partial correctness), or anything about other properties, files, commits, compilers or platforms. |
Watch out
Read the assumptions under each answer before you rely on it.
| State | Meaning |
|---|---|
| Queued | Waiting for its turn. |
| Starting soon | Let in. Waiting to be picked up. |
| Sending for checking | Being handed over. Cancel is not offered yet. |
| Checking whether the run started | No answer to the hand-over yet. |
| Accepted for checking | Checking has started. |
| Running | Checking is in progress. |
| Waiting for an answer | Paused until it can run again. Cancel is not offered. |
| Canceling | A cancel is on its way. |
| Finished | Done. Results are stored. |
| Finished with errors | Done with errors. Stored results show. Run again is offered. |
| Stopped at the compute limit | Hit its compute limit. Results are kept. |
| Failed | The run failed. The page says how. |
| Stopped after 7 days | Did not finish in time. |
| Stopped: verification became unavailable | Checking became unavailable for your account during the run. |
| Canceled | You canceled it. |
| Not started: out of credits | Never started. Nothing is checked. |
| What happens | What you see |
|---|---|
| Compute limit | Results are kept, but none count as proved. |
| No result stored | Failed, with a sentence ending Nothing counts as proved. |
| Not finished in 7 days | Stopped after 7 days |
The Code tab counts claims, never a percentage: N of M stated properties proved.
| Download | What it holds |
|---|---|
| Result | everything the check returned |
| Run manifest | the sha256 of each stored file |
| Checked source | the files sent |
| Source manifest | the sha256 of each source file |
| To check a file | Compare its sha256 with a manifest. |
| A Disproved case | A file in the result, at the path in Evidence. |
Cancel, run again and credits
| When | What happens |
|---|---|
| What a credit is | Not money. Ruhub shows no price. |
Credits left | A whole percentage of your seat, from 0 to 100. |
| Cancel run | Offered while a run is Queued, Starting soon, Accepted for checking or Running. |
| Run again | Offered once a run ended any way except Finished. A new run checks the same commit and the same files. The old run stays as it is. |
| A run starts | Credits are set aside. |
| Canceled before checking started | They come back. |
| Canceled after | Canceling it does not give back the credits it used. |
| Run again | Credits are spent once the new run starts checking, even if you cancel it. |
| A send refused for lack of credits | Not charged. |
Checked against Ruhub on .
