#
#   Imandra Inc.
#
#   speclogician/presentation/models/trace.py
# 

from __future__ import annotations

from typing import Literal
from pydantic import BaseModel


class TraceIMLValidityPM(BaseModel):
    iml_valid: str  # "unknown" | "valid" | "invalid"
    err: str | None = None


class TraceCorePM(BaseModel):
    art_id: str
    given: str
    when: str | None = None
    then: str | None = None
    time: str = ""
    iml_validity: TraceIMLValidityPM


class TestTracePM(BaseModel):
    kind: Literal["test_trace"] = "test_trace"
    core: TraceCorePM

    name: str
    filepath: str = ""
    language: str | None = None
    contents: str | None = None  # optional / heavy


class LogTracePM(BaseModel):
    kind: Literal["log_trace"] = "log_trace"
    core: TraceCorePM

    filename: str
    contents: str | None = None  # optional / heavy
