omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / gpu / runtime / check / cfacts-check.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note gpu/runtime/check/cfacts-check.om: the gate's check of gpu/runtime/cfacts.om. Run from the repository root |
| 3 | note with no arguments, it reads the two test inputs listed, with their sha256, in |
| 4 | note gpu/runtime/check/cfacts-fixture.sha256.txt (C text exercising each rule of cfacts.om: comments and literals, |
| 5 | note extern "C", pending regions under #if, #elif, #else, #ifdef, #ifndef, a define standing for a pending flag, |
| 6 | note a define cycle, unknown conditions, a continued directive, calls into Omega and to a device word through |
| 7 | note the same-file and the any-file rule) and gpu/runtime/cudapp-ident.txt and gpu/runtime/devwords.txt, and |
| 8 | note writes the facts; the gate compares them with gpu/runtime/check/cfacts.expect.txt. |
| 9 | text cfx_list "gpu/runtime/check/cfacts-fixture.sha256.txt" |
| 10 | fn main to int |
| 11 | put cf_root 0 46 |
| 12 | put cf_n 21 1 |
| 13 | for i ulong len cf_dflt |
| 14 | put cf_dir i get cf_dflt i |
| 15 | end |
| 16 | put cf_n 1 len cf_dflt |
| 17 | pclr |
| 18 | pt cfx_list |
| 19 | tload 4 |
| 20 | pdir cf_fid |
| 21 | tload 6 |
| 22 | pdir cf_fdev |
| 23 | tload 8 |
| 24 | cfrun true |
| 25 | ret 0 |
| 26 | end |