본문으로 건너뛰기
토파즈6.0 · 출시 전
다운로드 →

문서 검색

명세 6.0

방향키로 결과를 고르고 Enter를 눌러 여세요.

API 이름, 진단 번호, 규칙 또는 프로젝트 주제를 입력하세요.

    라이브러리

    std.lispex.freshReplay

    Replay the complete same request and compare the full canonical outcome.

    freshReplay(rule: PreparedLispexRule, input: LispexValue, limits: LispexLimits, artifact: LispexConsumerArtifact, hostLimits: LispexHostLimits) -> Result<LispexEvaluation, LispexReplayError>
    수신자
    해당 없음
    최소 인자 수
    5
    최대 인자 수
    5

    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.

    수신자

    매개변수 제약

    freshReplay(rule, input, limits, artifact, hostLimits) returns Result<LispexEvaluation, LispexReplayError>. The prepared rule, canonical input, and complete evaluation limits supply the request to reproduce. The artifact supplies the retained portable receipt and any attached evidence. hostLimits bounds separate replay validation and comparison work.

    Replay first verifies that the required canonical program, selected entry, input, fixed semantics, resource model, and finite limits are available and supported. It reconstructs the candidate request under the recorded identity contract. It compares that request with the recorded request before guest evaluation.

    LispexReplayError.MissingRequest(report) identifies required request material that cannot be reconstructed or verified. No guest entry runs and no successful replay is reported. The adapter does not invent missing values, reuse current live facts, or substitute current defaults.

    LispexReplayError.RequestMismatch(report) reports a difference between the candidate and recorded semantic requests. Changed canonical input, program, semantics, model, or declared limits cause mismatch even when the program would return the same value. No guest entry runs after that mismatch is established.

    After the requests match and admission succeeds, replay performs a fresh evaluation with the supplied declared evaluation limits. It neither prepares a replacement program nor runs a modified request to obtain agreement. Prepared reuse and host cache state preserve the same normative evaluation events and charges.

    Replay compares the complete canonical settlements. A successful value must match the recorded value. A semantic failure must match its phase, code, typed parameters, and canonical site. A resource stop must additionally match the exhausted axis.

    Ok contains the fresh LispexEvaluation when the complete settlements agree. A reproduced SemanticFailure or LimitExhaustion is a successful replay comparison and remains that failure in the returned settlement. The adapter does not turn a reproduced failure into a Complete value.

    LispexReplayError.OutcomeMismatch(report, evaluation) records a completed fresh evaluation whose canonical settlement differs from the retained settlement. The error retains the fresh evaluation as typed data and the report identifies its difference from the recorded binding. Equal diagnostic messages or equal final values from different failure paths cannot suppress this error.

    LispexReplayError.AttemptFailed(error) preserves the admission, operational interruption, or engine defect returned by the fresh evaluation attempt. An incomplete attempt cannot be reported as either matching or different completed semantic outcomes.

    LispexReplayError.HostWorkRefused(report, observation) reports a host budget refusal during replay validation or comparison. The report records the failed stage. observation is None before a completed fresh evaluation exists and Some of that evaluation after completion. It does not imply that semantic comparison completed and never becomes guest LimitExhaustion.

    An admitted alternative engine artifact can replay the same semantic request. Engine bytes, source presentation, cache state, display locale, host paths, and execution timing do not enter canonical outcome comparison.

    Replay consumes captured input values. A changed live clock, exchange rate, random source, or host environment cannot alter the retained input. A caller that captures a new value submits a different semantic request.

    Replay does not authenticate an issuer, infer a trust policy, fetch keys, or authorize an external action. Attached evidence remains separately inspectable and authenticatable. Successful authentication does not bypass request reconstruction or settlement comparison.

    The concrete replay report and receipt encodings follow the selected versioned contracts. Missing or unsupported contract versions produce explicit failure. A historical record is compared only under its original supported meaning and is never silently rewritten into a Lispex 2.0 request.

    결과

    The declared result type is Result<LispexEvaluation, LispexReplayError>.

    효과

    실패

    Result and effects

    링크

    Replay the complete same request and compare the full canonical outcome.

    Why

    링크

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

    Related entries

    링크

    std.lispex →

    Replay a complete request and compare the whole outcome

    링크
    규칙topaz.stdlib.contract.lispex-replay.rule

    Replay a complete request and compare the whole outcome

    freshReplay(rule, input, limits, artifact, hostLimits) returns Result<LispexEvaluation, LispexReplayError>. The prepared rule, canonical input, and complete evaluation limits supply the request to reproduce. The artifact supplies the retained portable receipt and any attached evidence. hostLimits bounds separate replay validation and comparison work.

    Replay first verifies that the required canonical program, selected entry, input, fixed semantics, resource model, and finite limits are available and supported. It reconstructs the candidate request under the recorded identity contract. It compares that request with the recorded request before guest evaluation.

    LispexReplayError.MissingRequest(report) identifies required request material that cannot be reconstructed or verified. No guest entry runs and no successful replay is reported. The adapter does not invent missing values, reuse current live facts, or substitute current defaults.

    LispexReplayError.RequestMismatch(report) reports a difference between the candidate and recorded semantic requests. Changed canonical input, program, semantics, model, or declared limits cause mismatch even when the program would return the same value. No guest entry runs after that mismatch is established.

    After the requests match and admission succeeds, replay performs a fresh evaluation with the supplied declared evaluation limits. It neither prepares a replacement program nor runs a modified request to obtain agreement. Prepared reuse and host cache state preserve the same normative evaluation events and charges.

    Replay compares the complete canonical settlements. A successful value must match the recorded value. A semantic failure must match its phase, code, typed parameters, and canonical site. A resource stop must additionally match the exhausted axis.

    Ok contains the fresh LispexEvaluation when the complete settlements agree. A reproduced SemanticFailure or LimitExhaustion is a successful replay comparison and remains that failure in the returned settlement. The adapter does not turn a reproduced failure into a Complete value.

    LispexReplayError.OutcomeMismatch(report, evaluation) records a completed fresh evaluation whose canonical settlement differs from the retained settlement. The error retains the fresh evaluation as typed data and the report identifies its difference from the recorded binding. Equal diagnostic messages or equal final values from different failure paths cannot suppress this error.

    LispexReplayError.AttemptFailed(error) preserves the admission, operational interruption, or engine defect returned by the fresh evaluation attempt. An incomplete attempt cannot be reported as either matching or different completed semantic outcomes.

    LispexReplayError.HostWorkRefused(report, observation) reports a host budget refusal during replay validation or comparison. The report records the failed stage. observation is None before a completed fresh evaluation exists and Some of that evaluation after completion. It does not imply that semantic comparison completed and never becomes guest LimitExhaustion.

    An admitted alternative engine artifact can replay the same semantic request. Engine bytes, source presentation, cache state, display locale, host paths, and execution timing do not enter canonical outcome comparison.

    Replay consumes captured input values. A changed live clock, exchange rate, random source, or host environment cannot alter the retained input. A caller that captures a new value submits a different semantic request.

    Replay does not authenticate an issuer, infer a trust policy, fetch keys, or authorize an external action. Attached evidence remains separately inspectable and authenticatable. Successful authentication does not bypass request reconstruction or settlement comparison.

    The concrete replay report and receipt encodings follow the selected versioned contracts. Missing or unsupported contract versions produce explicit failure. A historical record is compared only under its original supported meaning and is never silently rewritten into a Lispex 2.0 request.

    이유

    Replay asks whether a complete recorded request produces the same canonical outcome. Artifact inspection asks whether retained data is structurally valid, and authentication asks who signed it. Keeping these operations distinct preserves their different intents even when all three succeed for one artifact.

    Replay the same input and declared limits

    링크
    src/main.tpzReplay the same input and declared limits플레이그라운드 열기 →
    1. import std.bytes { Bytes }
    2. import std.lispex {
    3. PreparedLispexRule,
    4. LispexValue,
    5. LispexLimits,
    6. LispexHostLimits,
    7. LispexConsumerArtifact,
    8. LispexEvaluation,
    9. LispexReplayError,
    10. freshReplay,
    11. }
    12. function reproduce(rule: PreparedLispexRule, input: LispexValue, limits: LispexLimits, artifact: LispexConsumerArtifact, host: LispexHostLimits) -> Result<LispexEvaluation, LispexReplayError> {
    13. return freshReplay(rule, input, limits, artifact, host)
    14. }
    15. function observation(error: LispexReplayError) -> Option<LispexEvaluation> {
    16. return match (error) {
    17. case OutcomeMismatch(report, evaluation) => Some(evaluation)
    18. case HostWorkRefused(report, observed) => observed
    19. case _ => None()
    20. }
    21. }
    22. export function main(args: Array<string>, stdin: string) -> Result<int, string> {
    23. return Ok(0)
    24. }
    기대 출력종료 코드 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.

    메뉴

    다운로드 →