I.6
Procedures
Procedure arguments, application, internal values, and the rule entry boundary.
Scope
This chapter covers procedure parameters and application. It also covers internal multiple values and the single input and result at a rule entry.
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, the portable data allowed at the external boundary. Evaluation and bindings defines lexical scope and immutable bindings.
6.1 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.
Bind arguments in parameter order
lispex.example.v2.procedures.fixed-call · rev. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
((lambda (a b) (- a b)) input 3)))
)
Request and files
{
"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"
}
]
}
7Outcome details
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "7"
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
Reject a missing argument
lispex.example.v2.procedures.fixed-count-failure · rev. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
((lambda (a b) (+ a b)) input)))
)
Request and files
{
"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"
}
]
}
runtime.arityOutcome details
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.arity",
"data": {
"minimum": "2",
"maximum": "2",
"actual": "1"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
6.2 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.
Why
Rest parameters support reusable guest procedures without exposing an implementation argument buffer or mutable state.
Keep the remaining argument order
lispex.example.v2.procedures.rest-order · rev. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
((lambda (first . rest) rest) input 20 30)))
)
Request and files
{
"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"
}
]
}
(20 30)Outcome details
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "list",
"items": [
{
"kind": "integer",
"value": "20"
},
{
"kind": "integer",
"value": "30"
}
]
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
Collect zero arguments
lispex.example.v2.procedures.empty-rest · rev. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
((lambda args args))))
)
Request and files
{
"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"
}
]
}
()Outcome details
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "list",
"items": []
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
Application and apply
A call evaluates its operator and arguments in the order defined by Evaluation and bindings. The calling syntax does not change the procedure body or its lexical environment.
6.3 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.
Why
The caller can build an argument sequence as data while preserving ordinary application order and argument count checks.
Append list elements to explicit arguments
lispex.example.v2.procedures.apply-argument-order · rev. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(apply (lambda (a b c) (list a b c)) input '(2 3))))
)
Request and files
{
"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"
}
]
}
(1 2 3)Outcome details
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "list",
"items": [
{
"kind": "integer",
"value": "1"
},
{
"kind": "integer",
"value": "2"
},
{
"kind": "integer",
"value": "3"
}
]
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
Reject an improper final list
lispex.example.v2.procedures.apply-improper-list · rev. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(apply (lambda args 9) '(1 . 2))))
)
Request and files
{
"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"
}
]
}
domain.typeOutcome details
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "apply",
"argument": "1",
"path": [
{
"kind": "cdr"
}
],
"expected": "proper-list",
"actual": "integer"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
6.4 Reject continuation and dynamic handler procedures
Procedure calls follow the removed-control rule. Ordinary calls and recursion use the lexical control defined by Evaluation and bindings and guard.
Why
Removing captured control and dynamic cleanup keeps calls, failures, and resource termination within one bounded execution model.
Reject a continuation capture attempt
lispex.example.v2.procedures.callcc-rejected · rev. 4
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(call/cc (lambda (escape) (escape 7)))))
)
Request and files
{
"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"
}
]
}
library.referenceOutcome details
{
"kind": "failure",
"valueCount": 0,
"rejectedFeature": "call/cc",
"diagnostic": {
"phase": "resolve",
"code": "library.reference",
"data": {
"name": "call/cc",
"reason": "removed-operation"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Product invocation
Expected result
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.
Reject a dynamic cleanup attempt
lispex.example.v2.procedures.dynamic-wind-rejected · rev. 4
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(dynamic-wind
(lambda () 1)
(lambda () 7)
(lambda () 2))))
)
Request and files
{
"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"
}
]
}
library.referenceOutcome details
{
"kind": "failure",
"valueCount": 0,
"rejectedFeature": "dynamic-wind",
"diagnostic": {
"phase": "resolve",
"code": "library.reference",
"data": {
"name": "dynamic-wind",
"reason": "removed-operation"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Product invocation
Expected result
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.
Internal multiple values
6.5 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.
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.
Receive two internal values
lispex.example.v2.procedures.receive-two-values · rev. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(call-with-values
(lambda () (values 8 3))
(lambda (a b) (- a b)))))
)
Request and files
{
"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"
}
]
}
5Outcome details
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "5"
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
Receive zero internal values
lispex.example.v2.procedures.receive-zero-values · rev. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(call-with-values
(lambda () (values))
(lambda () 7))))
)
Request and files
{
"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"
}
]
}
7Outcome details
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "7"
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
6.6 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.
Reject two values in one argument position
lispex.example.v2.procedures.argument-value-count · rev. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(+ 1 (values 2 3))))
)
Request and files
{
"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"
}
]
}
runtime.value-countOutcome details
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.value-count",
"data": {
"expected": "1",
"actual": "2"
}
},
"context": "argument"
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
Reject zero values in a binding initializer
lispex.example.v2.procedures.initializer-value-count · rev. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(let ((x (values)))
x)))
)
Request and files
{
"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"
}
]
}
runtime.value-countOutcome details
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.value-count",
"data": {
"expected": "1",
"actual": "0"
}
},
"context": "binding-initializer"
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
Entry declaration syntax
EntryClause = "(" "entry" Identifier ")" ;
Identifier is defined by the reader grammar. 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 gives entry failures their catalog identities. The diagnostic phase does not change the prescribed check order.
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.
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 owns module and export syntax. Profiles and value interchange owns canonical input and result encoding.
6.7 Validate each declared entry
A module may have at most one entry declaration in the entry slot of the module grammar. 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.
6.8 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 and 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.
6.9 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.
Pass several facts in one list datum
lispex.example.v2.procedures.one-structured-input · rev. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (facts)
(+ (car facts) (car (cdr facts)))))
)
Request and files
{
"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"
}
]
}
7Outcome details
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "7"
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
Reject a request with no argument
lispex.example.v2.procedures.missing-entry-input · rev. 5
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
input))
)
Request and files
{
"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"
}
]
}
input.arityOutcome details
{
"kind": "failure",
"valueCount": 0,
"boundary": "entry-input",
"requiredArgumentCount": 1,
"receivedArgumentCount": 0,
"diagnostic": {
"phase": "admission",
"code": "input.arity",
"data": {
"expected": "1",
"actual": "0"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Product invocation
Expected result
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.
Reject a request with two arguments
lispex.example.v2.procedures.extra-entry-input · rev. 5
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
input))
)
Request and files
{
"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"
}
]
}
input.arityOutcome details
{
"kind": "failure",
"valueCount": 0,
"boundary": "entry-input",
"requiredArgumentCount": 1,
"receivedArgumentCount": 2,
"diagnostic": {
"phase": "admission",
"code": "input.arity",
"data": {
"expected": "1",
"actual": "2"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Product invocation
Expected result
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.
Call a rest entry with one input
lispex.example.v2.procedures.rest-entry-input · rev. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda arguments
(car arguments)))
)
Request and files
{
"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"
}
]
}
7Outcome details
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "7"
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
6.10 Return exactly one portable datum
A successful entry call returns exactly one Datum. Zero or several returned values cause a boundary failure. The portable-data rule 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.
Reject zero values at the external boundary
lispex.example.v2.procedures.zero-entry-values · rev. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(values)))
)
Request and files
{
"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"
}
]
}
value.boundaryOutcome details
{
"kind": "failure",
"valueCount": 0,
"boundary": "entry-result",
"requiredValueCount": 1,
"receivedValueCount": 0,
"diagnostic": {
"phase": "evaluate",
"code": "value.boundary",
"data": {
"reason": "count",
"count": "0",
"path": [],
"actual": false
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
Reject multiple values at the external boundary
lispex.example.v2.procedures.multiple-entry-values · rev. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(values input (+ input 1))))
)
Request and files
{
"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"
}
]
}
value.boundaryOutcome details
{
"kind": "failure",
"valueCount": 0,
"boundary": "entry-result",
"requiredValueCount": 1,
"receivedValueCount": 2,
"diagnostic": {
"phase": "evaluate",
"code": "value.boundary",
"data": {
"reason": "count",
"count": "2",
"path": [],
"actual": false
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
Reject a procedure result
lispex.example.v2.procedures.procedure-entry-result · rev. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(lambda (x) x)))
)
Request and files
{
"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"
}
]
}
value.boundaryOutcome details
{
"kind": "failure",
"valueCount": 0,
"boundary": "entry-result",
"required": "Datum",
"received": "procedure",
"diagnostic": {
"phase": "evaluate",
"code": "value.boundary",
"data": {
"reason": "non-datum",
"count": "1",
"path": [],
"actual": "procedure"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
Reject a procedure inside a result list
lispex.example.v2.procedures.nested-procedure-result · rev. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(list 1 (lambda (x) x))))
)
Request and files
{
"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"
}
]
}
value.boundaryOutcome details
{
"kind": "failure",
"valueCount": 0,
"boundary": "entry-result",
"required": "Datum",
"received": "procedure-containing-data",
"diagnostic": {
"phase": "evaluate",
"code": "value.boundary",
"data": {
"reason": "non-datum",
"count": "1",
"path": [
{
"kind": "cdr"
},
{
"kind": "car"
}
],
"actual": "procedure"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Product invocation
Expected result
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.
Select an explicitly renamed entry
lispex.example.v2.procedures.renamed-entry · rev. 1
(module main
(import)
(export (rename decide start) rule)
(entry start)
(define (decide input) input)
(define (rule input) 0)
)
Request and files
{
"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"
}
]
}
42Outcome details
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "42"
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"selectedEntry": {
"rootModule": "main",
"export": "start",
"binding": {
"module": "main",
"name": "decide"
}
},
"preparedProgramIssued": true,
"entryEvaluated": true
}Product invocation
Expected result
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.
Select an imported lexical procedure
lispex.example.v2.procedures.imported-entry · rev. 1
(module main
(import (helpers (rename pass imported-pass)))
(export (rename imported-pass start))
(entry start)
)
(module helpers
(import)
(export pass idle)
(entry idle)
(define pass (lambda (input) input))
(define idle (lambda (input) (idle input)))
)
Request and files
{
"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"
}
]
}
7Outcome details
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "7"
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"selectedEntry": {
"rootModule": "main",
"export": "start",
"binding": {
"module": "helpers",
"name": "pass"
}
},
"preparedProgramIssued": true,
"entryEvaluated": true,
"dependencyEntriesInvoked": []
}Product invocation
Expected result
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.
Accept one fixed parameter and rest
lispex.example.v2.procedures.dotted-rest-entry · rev. 1
(module main
(import)
(export decide)
(entry decide)
(define (decide input . rest) (null? rest))
)
Request and files
{
"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"
}
]
}
#tOutcome details
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "boolean",
"value": true
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"selectedEntry": {
"rootModule": "main",
"export": "decide",
"binding": {
"module": "main",
"name": "decide"
}
},
"preparedProgramIssued": true,
"entryEvaluated": true
}Product invocation
Expected result
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.
Reject an entry that is private
lispex.example.v2.procedures.missing-entry-export · rev. 2
(module main
(import)
(export spare)
(entry private)
(define private (lambda (input) input))
(define spare (lambda (input) input))
)
Request and files
{
"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"
}
]
}
entry.declarationOutcome details
{
"kind": "prepare-failure",
"stage": "resolve",
"valueCount": 0,
"module": "main",
"export": "private",
"diagnostic": {
"phase": "prepare",
"code": "entry.declaration",
"data": {
"reason": "unknown-entry"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"preparedProgramIssued": false,
"guestInitializationPerformed": false,
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Product invocation
Expected result
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.
Reject a constant as an entry
lispex.example.v2.procedures.nonprocedure-entry · rev. 2
(module main
(import)
(export rule)
(entry rule)
(define rule 42)
)
Request and files
{
"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"
}
]
}
entry.declarationOutcome details
{
"kind": "prepare-failure",
"stage": "resolve",
"valueCount": 0,
"module": "main",
"export": "rule",
"diagnostic": {
"phase": "prepare",
"code": "entry.declaration",
"data": {
"reason": "non-procedure"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"preparedProgramIssued": false,
"guestInitializationPerformed": false,
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Product invocation
Expected result
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.
Reject a procedure factory as an entry
lispex.example.v2.procedures.factory-entry · rev. 2
(module main
(import)
(export rule)
(entry rule)
(define rule ((lambda () (lambda (input) input))))
)
Request and files
{
"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"
}
]
}
entry.declarationOutcome details
{
"kind": "prepare-failure",
"stage": "resolve",
"valueCount": 0,
"module": "main",
"export": "rule",
"diagnostic": {
"phase": "prepare",
"code": "entry.declaration",
"data": {
"reason": "invalid-initializer"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"preparedProgramIssued": false,
"guestInitializationPerformed": false,
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Product invocation
Expected result
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.
Reject an entry with no parameters
lispex.example.v2.procedures.zero-parameter-entry · rev. 2
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda () 0))
)
Request and files
{
"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"
}
]
}
entry.declarationOutcome details
{
"kind": "prepare-failure",
"stage": "resolve",
"valueCount": 0,
"module": "main",
"export": "rule",
"acceptedArgumentCounts": "exactly-zero",
"diagnostic": {
"phase": "prepare",
"code": "entry.declaration",
"data": {
"reason": "arity"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"preparedProgramIssued": false,
"guestInitializationPerformed": false,
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Product invocation
Expected result
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.
Reject an entry requiring two arguments
lispex.example.v2.procedures.two-parameter-entry · rev. 2
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (a b) a))
)
Request and files
{
"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"
}
]
}
entry.declarationOutcome details
{
"kind": "prepare-failure",
"stage": "resolve",
"valueCount": 0,
"module": "main",
"export": "rule",
"acceptedArgumentCounts": "exactly-two",
"diagnostic": {
"phase": "prepare",
"code": "entry.declaration",
"data": {
"reason": "arity"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"preparedProgramIssued": false,
"guestInitializationPerformed": false,
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Product invocation
Expected result
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.
Reject an entry with two required parameters
lispex.example.v2.procedures.two-required-rest-entry · rev. 2
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (a b . rest) a))
)
Request and files
{
"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"
}
]
}
entry.declarationOutcome details
{
"kind": "prepare-failure",
"stage": "resolve",
"valueCount": 0,
"module": "main",
"export": "rule",
"acceptedArgumentCounts": "at-least-two",
"diagnostic": {
"phase": "prepare",
"code": "entry.declaration",
"data": {
"reason": "arity"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"preparedProgramIssued": false,
"guestInitializationPerformed": false,
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Product invocation
Expected result
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.
Validate a dependency entry before evaluation
lispex.example.v2.procedures.invalid-dependency-entry · rev. 2
(module main
(import (helpers pass))
(export rule)
(entry rule)
(define rule (lambda (input) (pass input)))
)
(module helpers
(import)
(export pass bad)
(entry bad)
(define pass (lambda (input) input))
(define bad (lambda (a b) a))
)
Request and files
{
"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"
}
]
}
entry.declarationOutcome details
{
"kind": "prepare-failure",
"stage": "resolve",
"valueCount": 0,
"module": "helpers",
"export": "bad",
"acceptedArgumentCounts": "exactly-two",
"diagnostic": {
"phase": "prepare",
"code": "entry.declaration",
"data": {
"reason": "arity"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"preparedProgramIssued": false,
"guestInitializationPerformed": false,
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Product invocation
Expected result
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.
Reject a repeated entry declaration
lispex.example.v2.procedures.duplicate-entry-declaration · rev. 3
(module main
(import)
(export rule)
(entry rule)
(entry rule)
(define rule (lambda (input) input))
)
Request and files
{
"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"
}
]
}
entry.declarationOutcome details
{
"kind": "prepare-failure",
"stage": "normalization",
"valueCount": 0,
"module": "main",
"declarationCount": 2,
"diagnostic": {
"phase": "prepare",
"code": "entry.declaration",
"data": {
"reason": "duplicate-entry"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"preparedProgramIssued": false,
"guestInitializationPerformed": false,
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Product invocation
Expected result
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.
Reject extra entry clause operands
lispex.example.v2.procedures.malformed-entry-declaration · rev. 3
(module main
(import)
(export rule)
(entry rule spare)
(define rule (lambda (input) input))
)
Request and files
{
"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"
}
]
}
syntax.formOutcome details
{
"kind": "prepare-failure",
"stage": "normalization",
"valueCount": 0,
"module": "main",
"diagnostic": {
"phase": "normalize",
"code": "syntax.form",
"data": {
"form": "entry",
"reason": "invalid-entry"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"preparedProgramIssued": false,
"guestInitializationPerformed": false,
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Product invocation
Expected result
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.
Require the root to declare its entry
lispex.example.v2.procedures.missing-root-entry · rev. 2
(module main
(import (helpers pass))
(export rule)
(define rule (lambda (input) (pass input)))
)
(module helpers
(import)
(export pass)
(entry pass)
(define pass (lambda (input) input))
)
Request and files
{
"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"
}
]
}
entry.declarationOutcome details
{
"kind": "prepare-failure",
"stage": "resolve",
"valueCount": 0,
"module": "main",
"diagnostic": {
"phase": "prepare",
"code": "entry.declaration",
"data": {
"reason": "missing-entry"
}
}
}Specification outcome. Product runs are pending the 2.0 adapter.
Semantic details
{
"preparedProgramIssued": false,
"guestInitializationPerformed": false,
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Product invocation
Expected result
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.