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 / tests / model / world_explore.h
| 1 | /* SPDX-License-Identifier: Apache-2.0 |
| 2 | * Copyright 2026 Drake Stapleton (AIEN / aien-dev) |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /* Exhaustive breadth-first exploration of the lifecycle model. */ |
| 18 | #ifndef WORLD_EXPLORE_H |
| 19 | #define WORLD_EXPLORE_H |
| 20 | #include "world_model.h" |
| 21 | |
| 22 | #define WX_MAX_TRACE 64 |
| 23 | typedef struct { |
| 24 | uint64_t states, transitions; |
| 25 | uint32_t viol_seen; /* OR of every violation bit */ |
| 26 | int trace_len[5]; /* shortest counterexample per bit */ |
| 27 | WmOp trace[5][WX_MAX_TRACE]; |
| 28 | int truncated; /* state table full: not exhaustive */ |
| 29 | } WxResult; |
| 30 | |
| 31 | /* Bit index 0..4 for V_* bits. */ |
| 32 | int wx_bit_index(uint32_t bit); |
| 33 | int wx_explore(const WmProfile *p, WxResult *res); |
| 34 | void wx_print_trace(const WmOp *t, int n); |
| 35 | #endif |