interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / gpu / runtime / check / cfacts-check.om

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