Перейти к содержимому
Топаз6.0 · До релиза
Загрузка →

Поиск в документации

Спецификация 6.0

Выберите результат стрелками и нажмите Enter, чтобы открыть его.

Введите имя API, номер диагностики, правило или тему проекта.

    Библиотека · std.lispex

    LispexReportField

    Carry a named presentation field in a host report.

    LispexReportField { name: string, value: string }
    Модуль
    std.lispex →
    Получатель
    Неприменимо
    Минимальное число аргументов
    0
    Максимальное число аргументов
    0

    Declaration and parameters

    Ссылка

    Доступность

    Включено по умолчанию · Нет

    Import std.lispex from an application package with a verified lock. Packages with [lispex] require --locked. Application profile topaz/lispex-decision-application/1 uses evaluator profile lispex/r7rs-rule-embedded-core/1. Application profile topaz/lispex-decision-application/2 uses evaluator profile lispex/r7rs-rule-current-profile-bounded/1.

    The generated-module resolver gate starts at language mode 5.18. Compatibility of this API with earlier released editions remains Pending. Target deployment conditions are native (native-only), web (web-isolated-workers), web-worker (web-isolated-workers). Runtime payload follows checker-reached rules. An empty reached-rule set includes no runtime payload. Application quotas are required. Lock-only packages do not receive these application modules.

    Получатель

    Ограничения параметров

    LispexBoundaryReport identifies the phase, a stable code, named presentation fields and a human readable message. LispexReportField names and values explain the host failure. They are diagnostic presentation rather than canonical guest condition parameters.

    source is Some of the exact source identity when that identity has been established and None otherwise. verified lists identities actually validated before refusal. It cannot contain a proposed program or request identity merely because the input claimed one.

    A source reading or normalization failure before a canonical program exists uses a source bound report. It may identify a source location through named fields. It has no fabricated canonical program site or completed evaluation receipt.

    Admission rejects unsupported contracts, missing components, identity mismatches, ambient imports and an insufficient physical execution envelope. Its report identifies the first failed check and relevant supplied component. A mismatch never selects a substitute component or smaller limits.

    Host budget reports retain the submitted finite limits and first exhausted host axis in their fields. Host scheduling and physical failures describe an attempt rather than a deterministic guest resource result.

    Messages, field presentation order, paths and local coordinates do not define canonical outcome identity. Programs branch on the phase and code under the selected report contract. Reading report fields performs no I/O or guest execution.

    No report accessor raises a second Lispex failure. Array fields follow collection value semantics. Reading a report does not retry its failed operation, consume a guest budget or authorize an external action.

    Результат

    Эффекты

    Ошибки

    Result and effects

    Ссылка

    Carry a named presentation field in a host report.

    The reports contract gives this operation one explicit input boundary and preserves the distinct result and failure cases.

    Related entries

    Ссылка

    std.lispex →

    Read structured reports without inventing outcomes

    Ссылка
    Правилоtopaz.stdlib.contract.lispex-reports.rule

    Read structured reports without inventing outcomes

    LispexBoundaryReport identifies the phase, a stable code, named presentation fields and a human readable message. LispexReportField names and values explain the host failure. They are diagnostic presentation rather than canonical guest condition parameters.

    source is Some of the exact source identity when that identity has been established and None otherwise. verified lists identities actually validated before refusal. It cannot contain a proposed program or request identity merely because the input claimed one.

    A source reading or normalization failure before a canonical program exists uses a source bound report. It may identify a source location through named fields. It has no fabricated canonical program site or completed evaluation receipt.

    Admission rejects unsupported contracts, missing components, identity mismatches, ambient imports and an insufficient physical execution envelope. Its report identifies the first failed check and relevant supplied component. A mismatch never selects a substitute component or smaller limits.

    Host budget reports retain the submitted finite limits and first exhausted host axis in their fields. Host scheduling and physical failures describe an attempt rather than a deterministic guest resource result.

    Messages, field presentation order, paths and local coordinates do not define canonical outcome identity. Programs branch on the phase and code under the selected report contract. Reading report fields performs no I/O or guest execution.

    No report accessor raises a second Lispex failure. Array fields follow collection value semantics. Reading a report does not retry its failed operation, consume a guest budget or authorize an external action.

    Причина

    A failed phase can establish some facts without completing the next phase. Keeping those verified facts separate from canonical outcomes prevents missing identities and host failures from becoming invented semantic evidence.

    Read verified report facts without a guest outcome

    Ссылка
    src/main.tpzRead verified report facts without a guest outcomeОткрыть песочницу →
    1. import std.bytes { Bytes }
    2. import std.lispex {
    3. LispexBoundaryReport,
    4. LispexIdentity,
    5. }
    6. function reason(report: LispexBoundaryReport) -> string {
    7. let verified: Array<LispexIdentity> = report.verified
    8. match (report.source) {
    9. case Some(source) => { let identity: LispexIdentity = source }
    10. case None() => {}
    11. }
    12. for field in (report.fields) {
    13. let name: string = field.name
    14. let value: string = field.value
    15. }
    16. return report.code
    17. }
    18. export function main(args: Array<string>, stdin: string) -> Result<int, string> {
    19. return Ok(0)
    20. }
    Ожидаемый выводКод завершения 0
    Нет стандартного вывода.
    $ topaz check --root . --locked --format json · Целевой продукт 5.21.3
    Ожидаемый результат

    Ожидаемый результат

    Проверка принимает программу. Код завершения 0.

    Use a verified Lispex application package supplied through TOPAZ_LISPEX_APPLICATION. This example specifies the Lispex 2.0 behavior. The product scope remains the public 5.21.3 observation scope.

    Меню

    Загрузка →