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 / nvidia / checks / lib-om2.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note gpu/nvidia/checks/lib-om2.om: what lib.om offers a check composed in an OM-2 program (one whose first unit |
| 3 | note starts with om2): words that take a text, which OM-1 cannot pass (no unsized view). Composed after lib.om. |
| 4 | note field i is the text t |
| 5 | fn ckis i ulong t view uchar * to bool |
| 6 | if ge i get ck_n 2 |
| 7 | ret false |
| 8 | end |
| 9 | if ne cklen i len t |
| 10 | ret false |
| 11 | end |
| 12 | for j ulong len t bound 4096 |
| 13 | if ne ckch i j ulong get t j |
| 14 | ret false |
| 15 | end |
| 16 | end |
| 17 | ret true |
| 18 | end |