Lispex 2.0 specification · not released · Tested product not run · Examples not run

<a id="lispex.page.v2.procedures"></a>

# Procedures

Procedure arguments, application, internal values, and the rule entry boundary.

Canonical: /v2.0/en/docs/language/procedures

Document revision: 2.0-draft-1. Content locale: en. Translation: current.

- language: `lispex`
- languageVersion: `2.0`

<a id="lispex.section.v2.procedures.scope"></a>

## Scope

This chapter covers procedure parameters and application. It also covers internal multiple values and the single input and result at a rule entry.

<a id="lispex.section.v2.procedures.parameters"></a>

## Fixed and rest parameters

A procedure is an internal callable value. A lambda expression creates a procedure whose body uses its lexical bindings. An argument is a value supplied to a call. A parameter is the binding that receives an argument.

A procedure may be passed to another procedure inside a rule. It is excluded from [Datum](/v2.0/en/docs/language/values#lispex.section.v2.values.datum), the portable data allowed at the external boundary. [Evaluation and bindings](/v2.0/en/docs/language/evaluation) defines lexical scope and immutable bindings.

<a id="lispex.rule.v2.procedures.fixed-parameters"></a>

### Match fixed parameters to arguments

A procedure with fixed parameters accepts exactly one argument for each parameter. It binds the argument values in parameter order for the body. Parameter names must be distinct. A count mismatch is a language failure and does not call the body.

**Why**

Each name in the body needs one unambiguous value. A count check prevents missing values and silently discarded arguments.

<a id="lispex.claim.v2.procedures.fixed-parameters"></a>

Claim: `lispex.claim.v2.procedures.fixed-parameters` · structural · coverage partial · verification not-run

- language: `lispex`
- languageVersion: `2.0`

```json
{
  "predicate": {
    "kind": "procedure-call",
    "parameters": "fixed"
  },
  "result": {
    "kind": "fixed-parameter-binding",
    "requiredArgumentCount": "parameter-count",
    "bindingOrder": "parameter-order",
    "duplicateNames": "rejected",
    "mismatch": "language-failure-before-body"
  },
  "pendingCases": [
    "Zero parameters, extra arguments, duplicate names, and interactions with earlier operand failures require additional cases.",
    "The native, npm, and WASM plans require execution on every supported engine and architecture. Resource boundaries require separate cases below, at, and above each limit."
  ]
}
```

<a id="lispex.example.v2.procedures.fixed-call"></a>

### Bind arguments in parameter order

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      ((lambda (a b) (- a b)) input 3)))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "10"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The procedure binds a to 10 and b to 3 and returns the exact integer 7. Product invocation awaits its 2.0 adapter."
}
```

Reversing the argument bindings would produce a different value. The plan checks the ordered result.

<a id="lispex.example.v2.procedures.fixed-count-failure"></a>

### Reject a missing argument

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      ((lambda (a b) (+ a b)) input)))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "10"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The call produces an arity failure because two arguments are required and one is supplied. Product invocation awaits its 2.0 adapter."
}
```

The procedure body is not evaluated after the argument count fails.

<a id="lispex.rule.v2.procedures.rest-parameters"></a>

### Collect remaining arguments in a list

A procedure may have fixed parameters followed by one rest parameter. The fixed prefix is required. The rest parameter receives a list of all remaining arguments in order. A lambda with only a rest parameter accepts any finite argument count, including zero. The rest list is immutable.

Rest pair allocation follows the Rest argument pair row in the [Resources site table](/v2.0/en/docs/language/resources#lispex.rule.v2.resources.event-catalog).

**Why**

Rest parameters support reusable guest procedures without exposing an implementation argument buffer or mutable state.

<a id="lispex.claim.v2.procedures.rest-parameters"></a>

Claim: `lispex.claim.v2.procedures.rest-parameters` · structural · coverage partial · verification not-run

- language: `lispex`
- languageVersion: `2.0`

```json
{
  "predicate": {
    "kind": "procedure-call",
    "parameters": "rest-or-fixed-prefix-and-rest"
  },
  "result": {
    "kind": "rest-parameter-binding",
    "minimumArgumentCount": "fixed-prefix-length",
    "restValue": "immutable-proper-list",
    "restOrder": "argument-order",
    "emptyRest": "empty-list"
  },
  "pendingCases": [
    "Too few arguments for a fixed prefix, large rest lists, and duplicate fixed or rest names require additional cases.",
    "The native, npm, and WASM plans require execution on every supported engine and architecture. Resource boundaries require separate cases below, at, and above each limit."
  ]
}
```

<a id="lispex.example.v2.procedures.rest-order"></a>

### Keep the remaining argument order

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      ((lambda (first . rest) rest) input 20 30)))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "10"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The rest parameter contains the exact integers 20 and 30 in that order. Product invocation awaits its 2.0 adapter."
}
```

The first argument is consumed by the fixed parameter. The returned rest list contains only the remaining arguments.

<a id="lispex.example.v2.procedures.empty-rest"></a>

### Collect zero arguments

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      ((lambda args args))))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The procedure returns one empty list datum. Product invocation awaits its 2.0 adapter."
}
```

A zero argument call can still return one datum. The empty rest list is distinct from zero returned values.

<a id="lispex.section.v2.procedures.application"></a>

## Application and apply

A call evaluates its operator and arguments in the order defined by [Evaluation and bindings](/v2.0/en/docs/language/evaluation#lispex.section.v2.evaluation.evaluation-order). The calling syntax does not change the procedure body or its lexical environment.

<a id="lispex.rule.v2.procedures.apply"></a>

### Expand a final argument list with apply

The apply procedure takes a procedure, any explicit arguments, and a final proper list. It places the list elements after the explicit arguments in their existing order. It calls the procedure with that combined argument sequence. A final value that is not a proper list produces a language failure before the called body runs.

The target call inherits this call's tail position under the [tail-call rule](/v2.0/en/docs/language/evaluation#lispex.rule.v2.evaluation.tail-calls).

**Why**

The caller can build an argument sequence as data while preserving ordinary application order and argument count checks.

<a id="lispex.claim.v2.procedures.apply"></a>

Claim: `lispex.claim.v2.procedures.apply` · structural · coverage partial · verification not-run

- language: `lispex`
- languageVersion: `2.0`

```json
{
  "predicate": {
    "kind": "apply-call",
    "finalArgument": "proper-list"
  },
  "result": {
    "kind": "expanded-application",
    "argumentSequence": "explicit-arguments-then-list-elements",
    "listOrder": "preserved",
    "improperFinalList": "language-failure-before-body"
  },
  "pendingCases": [
    "Empty final lists, non-procedure targets, target arity failures, and expansion resource limits require additional cases.",
    "The native, npm, and WASM plans require execution on every supported engine and architecture. Resource boundaries require separate cases below, at, and above each limit."
  ]
}
```

<a id="lispex.example.v2.procedures.apply-argument-order"></a>

### Append list elements to explicit arguments

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (apply (lambda (a b c) (list a b c)) input '(2 3))))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "1"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The rule returns the list of exact integers 1, 2, and 3 in that order. Product invocation awaits its 2.0 adapter."
}
```

The final list supplies two arguments. It is not passed as one additional list argument.

<a id="lispex.example.v2.procedures.apply-improper-list"></a>

### Reject an improper final list

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (apply (lambda args 9) '(1 . 2))))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The final list argument produces an apply domain failure and the target body is not called. Product invocation awaits its 2.0 adapter."
}
```

The target could otherwise return 9. The plan requires a failure before that result is produced.

<a id="lispex.rule.v2.procedures.closed-control"></a>

### Reject continuation and dynamic handler procedures

Procedure calls follow the [removed-control rule](/v2.0/en/docs/language/conditions#lispex.rule.v2.conditions.removed-control). Ordinary calls and recursion use the lexical control defined by [Evaluation and bindings](/v2.0/en/docs/language/evaluation) and [guard](/v2.0/en/docs/language/conditions#lispex.section.v2.conditions.lexical-guard).

**Why**

Removing captured control and dynamic cleanup keeps calls, failures, and resource termination within one bounded execution model.

<a id="lispex.claim.v2.procedures.closed-control"></a>

Claim: `lispex.claim.v2.procedures.closed-control` · rejection · coverage partial · verification not-run

- language: `lispex`
- languageVersion: `2.0`

```json
{
  "predicate": {
    "kind": "guest-control-surface",
    "excluded": [
      "call/cc",
      "dynamic-wind",
      "with-exception-handler",
      "raise-continuable"
    ]
  },
  "result": {
    "kind": "removed-control-rejection",
    "continuationCapture": false,
    "dynamicCleanup": false,
    "proceduralHandler": false,
    "continuableRaise": false
  },
  "pendingCases": [
    "Procedural handler and continuable raise spellings, aliases, and attempts through indirect application require additional rejection cases.",
    "The native, npm, and WASM plans require execution on every supported engine and architecture. Resource boundaries require separate cases below, at, and above each limit."
  ]
}
```

<a id="lispex.example.v2.procedures.callcc-rejected"></a>

### Reject a continuation capture attempt

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (call/cc (lambda (escape) (escape 7)))))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The request is rejected and the continuation escape does not return 7. Product invocation awaits its 2.0 adapter."
}
```

The example specifies rejection. It does not expose a restricted continuation as a supported alternative.

<a id="lispex.example.v2.procedures.dynamic-wind-rejected"></a>

### Reject a dynamic cleanup attempt

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (dynamic-wind
        (lambda () 1)
        (lambda () 7)
        (lambda () 2))))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The request is rejected and does not produce a result datum. Product invocation awaits its 2.0 adapter."
}
```

No cleanup procedure may create an additional guest execution path after a terminal resource stop.

See [Resource model numbers](/v2.0/en/docs/language/resources#lispex.pending.v2.resources.model-numbers).

<a id="lispex.section.v2.procedures.multiple-values"></a>

## Internal multiple values

<a id="lispex.rule.v2.procedures.internal-values"></a>

### Pass an internal value sequence to its receiver

The values procedure returns its arguments as an internal sequence of returned values. The sequence may contain zero, one, or several values. The call-with-values procedure calls its producer with no arguments and calls its consumer with the returned values in order. The consumer must accept that argument count.

The producer is outside tail position. The consumer inherits this call's tail position under the [tail-call rule](/v2.0/en/docs/language/evaluation#lispex.rule.v2.evaluation.tail-calls).

**Why**

A procedure can return several intermediate values without giving the host a second output channel. An explicit receiver determines how those values are used.

<a id="lispex.claim.v2.procedures.internal-values"></a>

Claim: `lispex.claim.v2.procedures.internal-values` · structural · coverage partial · verification not-run

- language: `lispex`
- languageVersion: `2.0`

```json
{
  "predicate": {
    "kind": "internal-multiple-values",
    "producer": "values-or-procedure"
  },
  "result": {
    "kind": "returned-value-sequence",
    "counts": "zero-one-or-many",
    "receiver": "call-with-values-consumer",
    "producerArgumentCount": 0,
    "consumerArguments": "returned-values-in-order",
    "portableContainer": false
  },
  "pendingCases": [
    "Receiver count mismatches, destructuring binding forms, and internal values carrying procedures require additional cases.",
    "The native, npm, and WASM plans require execution on every supported engine and architecture. Resource boundaries require separate cases below, at, and above each limit."
  ]
}
```

<a id="lispex.example.v2.procedures.receive-two-values"></a>

### Receive two internal values

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (call-with-values
        (lambda () (values 8 3))
        (lambda (a b) (- a b)))))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The consumer receives 8 and 3 in order and returns the exact integer 5. Product invocation awaits its 2.0 adapter."
}
```

The producer returns two internal values. The rule entry still returns exactly one datum.

<a id="lispex.example.v2.procedures.receive-zero-values"></a>

### Receive zero internal values

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (call-with-values
        (lambda () (values))
        (lambda () 7))))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The zero argument consumer returns the exact integer 7. Product invocation awaits its 2.0 adapter."
}
```

The producer returns no values. The consumer turns that internal result into one datum for the entry boundary.

<a id="lispex.rule.v2.procedures.single-value-contexts"></a>

### Require one value where one value is consumed

An operator position, an argument position, a conditional test, and a binding initializer each require one value. Producing zero or several values in one of those positions is a language failure. A receiver cannot silently choose one value or turn the sequence into a list.

**Why**

Silent selection would hide a producer mistake and make the receiving expression ambiguous. Explicit receivers preserve the intended value count.

<a id="lispex.claim.v2.procedures.single-value-contexts"></a>

Claim: `lispex.claim.v2.procedures.single-value-contexts` · rejection · coverage partial · verification not-run

- language: `lispex`
- languageVersion: `2.0`

```json
{
  "predicate": {
    "kind": "single-value-consumer",
    "contexts": [
      "operator",
      "argument",
      "conditional-test",
      "binding-initializer"
    ]
  },
  "result": {
    "kind": "value-count-check",
    "required": 1,
    "zeroOrMany": "language-failure",
    "implicitTruncation": false,
    "implicitListPacking": false
  },
  "pendingCases": [
    "Operator and conditional test mismatches, nested receivers, and competing failures require separate cases.",
    "The native, npm, and WASM plans require execution on every supported engine and architecture. Resource boundaries require separate cases below, at, and above each limit."
  ]
}
```

<a id="lispex.example.v2.procedures.argument-value-count"></a>

### Reject two values in one argument position

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (+ 1 (values 2 3))))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The second argument position produces a value count failure because it receives two values. Product invocation awaits its 2.0 adapter."
}
```

The addition receives neither a truncated argument nor an implicitly constructed list.

<a id="lispex.example.v2.procedures.initializer-value-count"></a>

### Reject zero values in a binding initializer

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (let ((x (values)))
        x)))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The binding initializer produces a value count failure because it receives zero values. Product invocation awaits its 2.0 adapter."
}
```

No arbitrary placeholder value is assigned to x.

See [Diagnostic catalog and reports](/v2.0/en/docs/diagnostics#lispex.rule.v2.cli-and-diagnostics.diagnostics.catalog).

<a id="lispex.section.v2.procedures.entry-syntax"></a>

## Entry declaration syntax

<a id="lispex.grammar.v2.procedures.entry-declaration"></a>

### EBNF · source · complete · transcribed

- language: `lispex`
- languageVersion: `2.0`

```ebnf
EntryClause = "(" "entry" Identifier ")" ;
```

Imported productions: known; Identifier.

Omitted productions: known; .

Identifier is defined by the [reader grammar](/v2.0/en/docs/language/source#lispex.grammar.v2.source.reader). The module grammar places this clause after the export clause and before definitions. The identifier names the public export. Its spelling is not a host selector. The [preparation diagnostic mapping](/v2.0/en/docs/diagnostics#lispex.rule.v2.cli-and-diagnostics.diagnostics.source-prepare-mapping) gives entry failures their catalog identities. The diagnostic phase does not change the prescribed check order.



<a id="lispex.section.v2.procedures.rule-entry"></a>

## Rule entry

The entry is the one procedure selected by the root module for an external rule request. Its input is an ordinary lexical argument. There is no reserved input global. A list containing several facts is still one [Datum](/v2.0/en/docs/language/values#lispex.section.v2.values.datum).

Source declarations select the entry. Each fixture names its root module in request.json as documentation notation. This notation does not define a public host schema or a CLI option. [Preparation and modules](/v2.0/en/docs/tools/prepare#lispex.section.v2.prepare.imports-and-exports) owns module and export syntax. [Profiles and value interchange](/v2.0/en/docs/profiles/) owns canonical input and result encoding.

<a id="lispex.rule.v2.procedures.entry-declaration"></a>

### Validate each declared entry

A module may have at most one entry declaration in the entry slot of the [module grammar](/v2.0/en/docs/tools/prepare#lispex.section.v2.prepare.imports-and-exports). Its identifier names a public export of that module. Preparation resolves the export to one lexical binding. It checks that export, the resolved lambda form, and the accepted argument count in that order. The binding initializer must be a lambda after definition shorthand is normalized. An imported or reexported binding follows the same check at its original declaration. The lambda must accept one argument. Preparation validates declarations in dependency modules too. It does not execute an initializer to discover an entry.

**Why**

A declared entry fixes the binding that the program exposes. Static checks prevent a factory or module initialization from choosing a different boundary. The same check applies to every submitted declaration.

<a id="lispex.claim.v2.procedures.entry-declaration"></a>

Claim: `lispex.claim.v2.procedures.entry-declaration` · structural · coverage partial · verification not-run

- language: `lispex`
- languageVersion: `2.0`

```json
{
  "predicate": {
    "kind": "source-entry-declaration",
    "source": "module-entry-clause"
  },
  "result": {
    "kind": "validated-source-entry",
    "maximumPerModule": 1,
    "nameDomain": "public-export",
    "validationOrder": [
      "export-resolution",
      "normalized-lambda",
      "accepts-one-argument"
    ],
    "target": "resolved-lexical-binding",
    "importedTarget": "original-declaration",
    "initializerExecution": false,
    "dependencyDeclarations": "validated",
    "acceptedParameters": [
      "fixed-unary",
      "bare-rest",
      "one-required-and-rest"
    ]
  },
  "pendingCases": [
    "Nested export renames and cross-module invalid declaration precedence need further cases. Every product, supported engine, architecture, and finite resource boundary needs direct execution."
  ]
}
```

<a id="lispex.rule.v2.procedures.entry-selection"></a>

### Select the declared root entry

A closed bundle selects one root module. After module validation, preparation requires exactly one entry declaration in that root. The prepared program retains the resolved target of that declaration. Evaluation performs the required module initialization and invokes only the selected root entry. A dependency entry declaration does not trigger a call. No export name is a default entry. A host or command selector names the root module and cannot replace its declared target with another export. The [host interface](/v2.0/en/docs/tools/embedding#lispex.rule.v2.embedding.typed-interface) and [command forms](/v2.0/en/docs/tools/run#lispex.rule.v2.cli-and-diagnostics.command-forms) own selector representations.

**Why**

Selecting the root fixes one program boundary before evaluation. Export additions and dependency entry declarations cannot silently change the procedure that receives the input.

<a id="lispex.claim.v2.procedures.entry-selection"></a>

Claim: `lispex.claim.v2.procedures.entry-selection` · structural · coverage partial · verification not-run

- language: `lispex`
- languageVersion: `2.0`

```json
{
  "predicate": {
    "kind": "closed-bundle-entry-selection",
    "source": "declared-root-module"
  },
  "result": {
    "kind": "single-source-selected-entry",
    "rootDeclarationCount": 1,
    "selectedTarget": "root-entry-resolved-binding",
    "selectionStoredIn": "prepared-program",
    "dependencyDeclarationsTriggerCalls": false,
    "defaultExport": false,
    "arbitraryExportSelector": false,
    "initialization": "before-selected-entry-on-every-evaluation"
  },
  "pendingCases": [
    "Alternative root modules and repeated evaluation need further cross-product cases. Every product, supported engine, architecture, and finite resource boundary needs direct execution."
  ]
}
```

<a id="lispex.rule.v2.procedures.entry-input"></a>

### Supply one input datum to the entry

An external rule request supplies exactly one Datum to one selected entry. The procedure receives the input through ordinary lexical parameter binding. An entry may have fixed or rest parameters when its accepted argument counts include one. A request with no argument or more than one argument is rejected. A caller supplies several facts by placing them inside one datum.

**Why**

One explicit input makes the request reproducible and gives every product the same boundary. The host does not fill missing arguments from hidden state.

An entry may use any parameter shape that accepts one argument.

<a id="lispex.claim.v2.procedures.entry-input"></a>

Claim: `lispex.claim.v2.procedures.entry-input` · boundary · coverage partial · verification not-run

- language: `lispex`
- languageVersion: `2.0`

```json
{
  "predicate": {
    "kind": "external-rule-call",
    "entryCount": 1
  },
  "result": {
    "kind": "single-datum-input",
    "suppliedArgumentCount": 1,
    "inputDomain": "Datum",
    "parameter": "ordinary-lexical-binding",
    "reservedInputGlobal": false,
    "entryParameterShape": "any-shape-accepting-one-argument"
  },
  "pendingCases": [
    "Non-Datum input and input channel limit boundaries need additional cases. Source selection and entry parameter admission are defined by the entry declaration and selection Rules.",
    "The native, npm, and WASM plans require execution on every supported engine and architecture. Resource boundaries require separate cases below, at, and above each limit."
  ]
}
```

<a id="lispex.example.v2.procedures.one-structured-input"></a>

### Pass several facts in one list datum

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (facts)
      (+ (car facts) (car (cdr facts)))))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": [
          {
            "kind": "integer",
            "value": "3"
          },
          {
            "kind": "integer",
            "value": "4"
          }
        ]
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The entry receives one list datum and returns the exact integer 7. Product invocation awaits its 2.0 adapter."
}
```

The parameter is named facts. The list contains two elements without creating a two argument external call.

<a id="lispex.example.v2.procedures.missing-entry-input"></a>

### Reject a request with no argument

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      input))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "suppliedArguments": []
    }
  ],
  "operationUnderTest": "Attempt an external call with zero supplied arguments. This is documentation notation for an invalid request.",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The external call is rejected because no argument was supplied. Product invocation awaits its 2.0 adapter."
}
```

An absent argument is distinct from a supplied empty list datum. The entry body does not receive an invented value.

<a id="lispex.example.v2.procedures.extra-entry-input"></a>

### Reject a request with two arguments

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      input))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "suppliedArguments": [
        {
          "kind": "integer",
          "value": "3"
        },
        {
          "kind": "integer",
          "value": "4"
        }
      ]
    }
  ],
  "operationUnderTest": "Attempt an external call with two supplied arguments. This is documentation notation for an invalid request.",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The external call is rejected because two arguments were supplied. Product invocation awaits its 2.0 adapter."
}
```

A product must not silently pack the two arguments into a list or drop an argument.

<a id="lispex.example.v2.procedures.rest-entry-input"></a>

### Call a rest entry with one input

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda arguments
      (car arguments)))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "7"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The entry receives one argument through its rest list and returns the exact integer 7. Product invocation awaits its 2.0 adapter."
}
```

The external request still supplies one datum. The rest parameter changes the internal binding shape without allowing extra host arguments.

<a id="lispex.rule.v2.procedures.entry-result"></a>

### Return exactly one portable datum

A successful entry call returns exactly one [Datum](/v2.0/en/docs/language/values#lispex.section.v2.values.datum). Zero or several returned values cause a boundary failure. The [portable-data rule](/v2.0/en/docs/language/values#lispex.rule.v2.values.portable-datum) determines result membership. A failed boundary check returns no partial result.

**Why**

Internal procedures and multiple values cannot acquire host authority or become extra external outputs. One complete result gives replay a well defined outcome.

<a id="lispex.claim.v2.procedures.entry-result"></a>

Claim: `lispex.claim.v2.procedures.entry-result` · boundary · coverage partial · verification not-run

- language: `lispex`
- languageVersion: `2.0`

```json
{
  "predicate": {
    "kind": "external-rule-result",
    "source": "entry-return"
  },
  "result": {
    "kind": "single-datum-result",
    "requiredValueCount": 1,
    "resultDomain": "Datum",
    "nestedProcedures": "rejected",
    "partialResult": false
  },
  "pendingCases": [
    "Every portable datum type, deeper nonportable values, and result channel limit boundaries require additional cases.",
    "The native, npm, and WASM plans require execution on every supported engine and architecture. Resource boundaries require separate cases below, at, and above each limit."
  ]
}
```

<a id="lispex.example.v2.procedures.zero-entry-values"></a>

### Reject zero values at the external boundary

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (values)))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The entry result is rejected because the procedure returned zero values. Product invocation awaits its 2.0 adapter."
}
```

The host receives no successful result datum. It must not replace the missing result with an empty list or false.

<a id="lispex.example.v2.procedures.multiple-entry-values"></a>

### Reject multiple values at the external boundary

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (values input (+ input 1))))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "4"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The entry result is rejected because the procedure returned two values. Product invocation awaits its 2.0 adapter."
}
```

Neither value is emitted as a successful external result.

<a id="lispex.example.v2.procedures.procedure-entry-result"></a>

### Reject a procedure result

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (lambda (x) x)))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The entry result is rejected because it is a procedure. Product invocation awaits its 2.0 adapter."
}
```

Returning one internal value satisfies the count requirement but does not satisfy the Datum requirement.

<a id="lispex.example.v2.procedures.nested-procedure-result"></a>

### Reject a procedure inside a result list

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (list 1 (lambda (x) x))))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to finish preparation checks",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The entry result is rejected because the list contains a procedure. Product invocation awaits its 2.0 adapter."
}
```

The Datum check applies to every contained value. The first list element is not returned as a partial result.

<a id="lispex.example.v2.procedures.renamed-entry"></a>

### Select an explicitly renamed entry

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export (rename decide start) rule)
  (entry start)
  (define (decide input) input)
  (define (rule input) 0)
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient for the stated checks",
    "evaluate": "finite values sufficient for the stated calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "42"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The declared public name start selects the local decide procedure and returns the input integer 42. Product invocation awaits its 2.0 adapter."
}
```

Definition shorthand normalizes to a lambda. The separate export named rule is not the entry.

<a id="lispex.example.v2.procedures.imported-entry"></a>

### Select an imported lexical procedure

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import (helpers (rename pass imported-pass)))
  (export (rename imported-pass start))
  (entry start)

)
```

File: `helpers.scm`

```lispex
(module helpers
  (import)
  (export pass idle)
  (entry idle)
  (define pass (lambda (input) input))
  (define idle (lambda (input) (idle input)))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient for the stated checks",
    "evaluate": "finite values sufficient for the stated calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "7"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    },
    {
      "name": "helpers",
      "source": "helpers.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The root reexports pass from helpers as start and returns the input integer 7. The valid dependency entry idle is not invoked. Product invocation awaits its 2.0 adapter."
}
```

The imported procedure keeps the binding from helpers. The dependency entry would recurse if called. It is validated but never selected by the root.

<a id="lispex.example.v2.procedures.dotted-rest-entry"></a>

### Accept one fixed parameter and rest

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export decide)
  (entry decide)
  (define (decide input . rest) (null? rest))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient for the stated checks",
    "evaluate": "finite values sufficient for the stated calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "7"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "The entry receives one argument and its rest list is empty. It returns true. Product invocation awaits its 2.0 adapter."
}
```

The existing fixed and bare rest entry cases cover the other accepted shapes. The external request still supplies exactly one datum.

<a id="lispex.example.v2.procedures.missing-entry-export"></a>

### Reject an entry that is private

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export spare)
  (entry private)
  (define private (lambda (input) input))
  (define spare (lambda (input) input))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient for the stated checks",
    "evaluate": "finite values sufficient for the stated calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "Preparation rejects private because it is not an export of main. It does not select another visible procedure. Product invocation awaits its 2.0 adapter."
}
```

A local procedure must be exported before its public name can appear in an entry declaration.

<a id="lispex.example.v2.procedures.nonprocedure-entry"></a>

### Reject a constant as an entry

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule 42)
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient for the stated checks",
    "evaluate": "finite values sufficient for the stated calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "Preparation rejects the exported constant because its initializer is not a lambda. Product invocation awaits its 2.0 adapter."
}
```

The constant has a portable value. The entry declaration still requires a procedure binding with a statically known parameter shape.

<a id="lispex.example.v2.procedures.factory-entry"></a>

### Reject a procedure factory as an entry

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule ((lambda () (lambda (input) input))))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient for the stated checks",
    "evaluate": "finite values sufficient for the stated calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "Preparation rejects the application initializer even though evaluating it could produce a unary procedure. No factory runs. Product invocation awaits its 2.0 adapter."
}
```

The lambda check examines the binding initializer after definition shorthand is normalized. It does not evaluate the initializer or accept its predicted result.

<a id="lispex.example.v2.procedures.zero-parameter-entry"></a>

### Reject an entry with no parameters

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule (lambda () 0))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient for the stated checks",
    "evaluate": "finite values sufficient for the stated calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "Preparation rejects the declared entry because its parameter shape cannot accept one argument. Product invocation awaits its 2.0 adapter."
}
```

This is a static failure of the declared entry. An ordinary internal call still uses the runtime arity rule.

<a id="lispex.example.v2.procedures.two-parameter-entry"></a>

### Reject an entry requiring two arguments

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule (lambda (a b) a))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient for the stated checks",
    "evaluate": "finite values sufficient for the stated calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "Preparation rejects the declared entry because its parameter shape cannot accept one argument. Product invocation awaits its 2.0 adapter."
}
```

This is a static failure of the declared entry. An ordinary internal call still uses the runtime arity rule.

<a id="lispex.example.v2.procedures.two-required-rest-entry"></a>

### Reject an entry with two required parameters

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule (lambda (a b . rest) a))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient for the stated checks",
    "evaluate": "finite values sufficient for the stated calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "Preparation rejects the declared entry because its parameter shape cannot accept one argument. Product invocation awaits its 2.0 adapter."
}
```

This is a static failure of the declared entry. An ordinary internal call still uses the runtime arity rule.

<a id="lispex.example.v2.procedures.invalid-dependency-entry"></a>

### Validate a dependency entry before evaluation

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import (helpers pass))
  (export rule)
  (entry rule)
  (define rule (lambda (input) (pass input)))
)
```

File: `helpers.scm`

```lispex
(module helpers
  (import)
  (export pass bad)
  (entry bad)
  (define pass (lambda (input) input))
  (define bad (lambda (a b) a))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient for the stated checks",
    "evaluate": "finite values sufficient for the stated calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "7"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    },
    {
      "name": "helpers",
      "source": "helpers.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "Preparation rejects the two-argument entry in helpers even though main would call only its exported pass procedure. Product invocation awaits its 2.0 adapter."
}
```

A dependency declaration is part of the submitted source contract. Being unselected does not exempt it from validation.

<a id="lispex.example.v2.procedures.duplicate-entry-declaration"></a>

### Reject a repeated entry declaration

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule)
  (entry rule)
  (define rule (lambda (input) input))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient for the stated checks",
    "evaluate": "finite values sufficient for the stated calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "Normalization rejects the second entry declaration before any guest initialization. Product invocation awaits its 2.0 adapter."
}
```

Repeating the same public name still violates the one-declaration rule.

<a id="lispex.example.v2.procedures.malformed-entry-declaration"></a>

### Reject extra entry clause operands

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import)
  (export rule)
  (entry rule spare)
  (define rule (lambda (input) input))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient for the stated checks",
    "evaluate": "finite values sufficient for the stated calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "Normalization rejects the entry clause because it contains two names instead of one. Product invocation awaits its 2.0 adapter."
}
```

The whole module is read before the clause is checked against EntryClause.

<a id="lispex.example.v2.procedures.missing-root-entry"></a>

### Require the root to declare its entry

Mode: illustrative. Stage: semantic-request. Verification: not-run.

- language: `lispex`
- languageVersion: `2.0`

File: `source.scm`

```lispex
(module main
  (import (helpers pass))
  (export rule)
  (define rule (lambda (input) (pass input)))
)
```

File: `helpers.scm`

```lispex
(module helpers
  (import)
  (export pass)
  (entry pass)
  (define pass (lambda (input) input))
)
```

File: `request.json`

```lispex
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "one fixed Unicode semantics version",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient for the stated checks",
    "evaluate": "finite values sufficient for the stated calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "7"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    },
    {
      "name": "helpers",
      "source": "helpers.scm"
    }
  ]
}
```

Fixture inputs and environment:

```json
{
  "entry": "source.scm",
  "argv": [],
  "stdin": "",
  "cwd": ".",
  "environment": [],
  "wrapper": null,
  "packageRef": null,
  "lockRef": null,
  "generatedBindingRefs": {
    "knowledgeState": "not-applicable",
    "values": []
  }
}
```

#### Expected result

```json
{
  "status": "unspecified",
  "reason": "Preparation rejects main because it has no entry declaration. The export named rule and the dependency entry are not defaults. Product invocation awaits its 2.0 adapter."
}
```

The request selects main as its root. A valid entry declaration in helpers does not choose an entry for main.

<a id="lispex.section.v2.procedures.related"></a>

## Related chapters

[Values and text](/v2.0/en/docs/language/values)

[Evaluation and bindings](/v2.0/en/docs/language/evaluation)

[Conditions](/v2.0/en/docs/language/conditions)

[First rule](/v2.0/en/docs/tour/first-rule)

<a id="lispex.pending.v2.resources.model-numbers"></a>

### Pending · Resource model numbers

The 2.0 tariff coefficients, logical allocation units, bit-size accounting, detailed frame accounting, finite defaults, representation limits, and physical memory envelopes remain open. This includes preparation, calls, values, exact arithmetic, equality, text, record conversion, and canonical encoding.

Profile host budget coefficients and defaults remain separate from language preparation and evaluation budgets. Trace capacity, reservation sizes, and host memory requirements retain their separate reporting scope. Each budget retains its own identity and accounting boundary.

Implementation and attack tests must support these choices. [Resource event declarations](/v2.0/en/docs/language/resources#lispex.rule.v2.resources.event-catalog) and [native kernel membership](/v2.0/en/docs/library#lispex.pending.v2.standard-library.kernel-and-cost-model) remain separate contracts.

<a id="lispex.pending.v2.standard-library.kernel-and-cost-model"></a>

### Pending · Native kernel membership

The final native kernel list and count remain open. Implementation and product attack tests must support these choices. [Tariff coefficients, allocation units, finite defaults, and physical envelopes](/v2.0/en/docs/language/resources#lispex.pending.v2.resources.model-numbers) are tracked once with the resource numbers.

## Related

[Values and text](/v2.0/en/docs/language/values)

[Evaluation and bindings](/v2.0/en/docs/language/evaluation)

[Conditions](/v2.0/en/docs/language/conditions)

[First rule](/v2.0/en/docs/tour/first-rule)
