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

문서 검색

명세 6.0

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

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

    라이브러리 · std.lispex.rules

    Generated rule factory

    Obtain the locked rule through the same bounded preparation or admission contract.

    {ruleName}(limits: LispexPreparationLimits) -> Result<PreparedLispexRule, LispexPreparationError>
    수신자
    해당 없음
    최소 인자 수
    1
    최대 인자 수
    1

    Declaration and parameters

    링크

    사용 조건

    기본 포함 · 아니요

    Import std.lispex.rules 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.

    수신자

    매개변수 제약

    std.lispex.rules exports one factory for each rule binding declared by the admitted application lock. The spelling is the exact Topaz identifier in that row. The placeholder ruleName is descriptive and is not a literal universal export.

    Reject missing, duplicate, invalid or colliding exported identifiers during package admission. Generated names do not depend on directory enumeration, source discovery, a network request or a mutable global registry.

    Each factory accepts one complete LispexPreparationLimits record and returns Result of PreparedLispexRule or LispexPreparationError. Validate limits before preparing source or validating transported bytes. The factory has no zero argument or unlimited path.

    The lock row fixes the source closure, root module, prepared artifact policy, evaluator and standard library identities, ABI, codec, language and Unicode contracts, profile and resource model. The root source declaration fixes the entry. A lock cannot override it. An installed mismatch refuses admission. Never silently replace a locked component.

    A row containing closed source follows prepare with its required root. A row containing a transported prepared representation follows admitPrepared. Both paths preserve the verified root and its declared entry, as well as the supplied preparation limits.

    Repeated calls may share an immutable rule handle. Sharing and caching preserve the verified canonical program identity and evaluation charges. Preparation reuse may change preparation work and acceptance under its supplied budget. Each later evaluate call starts with its own explicit evaluation limits.

    Factory failure preserves the same Source, Admission, Interrupted or EngineDefect case as the underlying operation. It creates no canonical evaluation outcome and no evaluation receipt. An unrelated unreached factory cannot alter a reached rule result.

    A returned rule is evaluated through std.lispex.evaluate or evaluateWithEvidence. The factory does not evaluate a hidden input, return a business decision or grant a second host callback path.

    A package example supplies a real verified lock through the product test fixture. Concrete generated names are package data. Their inventory is determined by that lock and is not an unresolved language behavior.

    결과

    The declared result type is Result<PreparedLispexRule, LispexPreparationError>.

    효과

    실패

    Result and effects

    링크

    Obtain the locked rule through the same bounded preparation or admission contract.

    Why

    링크

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

    Resolved contracts

    링크

    Related entries

    링크

    std.lispex.rules →

    Resolve generated factories through the admitted lock

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

    Resolve generated factories through the admitted lock

    std.lispex.rules exports one factory for each rule binding declared by the admitted application lock. The spelling is the exact Topaz identifier in that row. The placeholder ruleName is descriptive and is not a literal universal export.

    Reject missing, duplicate, invalid or colliding exported identifiers during package admission. Generated names do not depend on directory enumeration, source discovery, a network request or a mutable global registry.

    Each factory accepts one complete LispexPreparationLimits record and returns Result of PreparedLispexRule or LispexPreparationError. Validate limits before preparing source or validating transported bytes. The factory has no zero argument or unlimited path.

    The lock row fixes the source closure, root module, prepared artifact policy, evaluator and standard library identities, ABI, codec, language and Unicode contracts, profile and resource model. The root source declaration fixes the entry. A lock cannot override it. An installed mismatch refuses admission. Never silently replace a locked component.

    A row containing closed source follows prepare with its required root. A row containing a transported prepared representation follows admitPrepared. Both paths preserve the verified root and its declared entry, as well as the supplied preparation limits.

    Repeated calls may share an immutable rule handle. Sharing and caching preserve the verified canonical program identity and evaluation charges. Preparation reuse may change preparation work and acceptance under its supplied budget. Each later evaluate call starts with its own explicit evaluation limits.

    Factory failure preserves the same Source, Admission, Interrupted or EngineDefect case as the underlying operation. It creates no canonical evaluation outcome and no evaluation receipt. An unrelated unreached factory cannot alter a reached rule result.

    A returned rule is evaluated through std.lispex.evaluate or evaluateWithEvidence. The factory does not evaluate a hidden input, return a business decision or grant a second host callback path.

    A package example supplies a real verified lock through the product test fixture. Concrete generated names are package data. Their inventory is determined by that lock and is not an unresolved language behavior.

    이유

    A generated factory expresses the intention to select a deployment choice already fixed in a verified lock. prepare expresses the intention to submit a new closed bundle. Their shared result and execution contract preserve both intentions without two evaluator semantics.

    Use a factory name supplied by a verified lock

    링크
    src/main.tpzUse a factory name supplied by a verified lock플레이그라운드 열기 →
    1. import std.lispex { PreparedLispexRule, LispexPreparationError, LispexPreparationLimits }
    2. import std.lispex.rules { identity }
    3. function lockedRule(limits: LispexPreparationLimits) -> Result<PreparedLispexRule, LispexPreparationError> {
    4. return identity(limits)
    5. }
    6. export function main(args: Array<string>, stdin: string) -> Result<int, string> {
    7. return Ok(0)
    8. }
    기대 출력종료 코드 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. The supplied fixture lock must declare identity as the exported name of its closed identity rule. That name is fixture data rather than a universal module export.

    메뉴

    다운로드 →