Skip to content
(Lispex)2.0Specification · not released

Search documentation

Searches the English specification

Enter a question, symbol, diagnostic code, or command.

Contents

Search the specification
Lispex 2.0 · Library · II.9

II.9

Standard library

Use public procedures to inspect and construct immutable data. Guest library code and the native kernel share one resource contract.

Scope

Rule authors use public procedures to inspect and construct immutable data. Each procedure follows the Lispex 2.0 value, condition, and resource rules.

A public procedure is a callable binding supplied by the standard library. Its public name describes a language operation. Its implementation can use guest code or a native kernel operation.

These semantic examples use symbolic finite limits. Native, npm, and WASM plans remain not run until their 2.0 products and observation adapters are available.

Procedure contracts

A procedure contract names its argument count and domain. It defines the returned value and the first applicable condition. It also defines traversal order and the resource events needed for its work.

Procedures defines calls and internal values. Conditions defines catchable failures and terminal stops. Resources defines reservations and finite budgets.

A public name does not require a native handler. The procedure catalog fixes every public name. Its public alias list is empty. The number of public names and the number of native operations are separate quantities.

9.1 Public procedure contracts

Every public procedure follows its declared argument domain, result, failure, and evaluation order. The complete catalog fixes the exported names and their contracts. The standard library supplies data operations and guest procedure composition. Removed guest effects are unavailable.

Why

A procedure must keep its meaning when its implementation moves between guest code and the native kernel. Library access cannot introduce an external capability.

Reject guest output

lispex.example.v2.standard-library.guest-output-rejected · rev. 3

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (display input)))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "7"
      }
    }
  ],
  "operationUnderTest": "Resolve the removed guest output operation from the standard library.",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Diagnosticlibrary.reference
Outcome details
{
  "kind": "failure",
  "valueCount": 0,
  "diagnostic": {
    "phase": "resolve",
    "code": "library.reference",
    "data": {
      "name": "display",
      "reason": "removed-operation"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "guestIO": false,
  "canonicalOutcomeProduced": false,
  "evaluationReceiptEligible": false
}
Product invocation

Expected result

The source fails because the standard library supplies no guest output operation. No output action occurs. Product invocation awaits its 2.0 adapter.

The closed library contains no display binding and this source defines none. The calling application presents a returned datum. Resolution reports library.reference with removed-operation. The diagnostic catalog defines its fields.

9.2 Apply every library check in a fixed order

Complete operator and operand evaluation before procedure checks. Check the declared arity first. Then check argument domains from left to right. Finish all required structural checks for one argument before advancing to the next. Apply the row checks in their written order. Make-condition uses its separate constructor protocol.

Domain checkTraversal
LVisit the entire pair spine and its final tail
DL, CL, OLFinish the spine, then check element domains from the head
AFinish the spine, then check each entry pair and its complete Datum key in list order
DUse the Values depth-first Datum traversal
S, numeric, and scalar typesCheck the current value before the next argument

A constructor accepts internal Values wherever its table uses V. Portable-data checks occur only where a domain requires them. Proper-list checks finish before any callback. Datum equality validates the complete left operand before the complete right operand.

An invalid argument produces the declared language condition. A resource refusal can precede that condition only at an earlier required reservation. The first failure ends the procedure. Later argument checks, comparisons, callbacks, and allocations do not run after that failure.

Domain checks emit argument-check and their required traversal events. The row resource events describe the subsequent checks and result work. Derived procedure calls retain the events of their specified inner calls.

The resource event catalog defines event names, reservation points, and canonical sites. Numbers and Values select those events for their operation schedules. The library rows here apply the same event definitions.

Every event uses reservation before effect and the resource axis order. A refusal produces no partial result and refunds no committed work. Storage reuse and native fast paths preserve these semantic events.

The selected resource model supplies complete requirement vectors. Coefficients, allocation units, default finite limits, physical envelopes, and final native kernel membership retain their separate pending contracts.

Why

Pure procedures can still expose different first failures. Completing the declared checks fixes that choice before result work starts. Named resource events place expensive validation, arithmetic, text work, and callback results inside finite execution.

9.3 Use the complete public procedure catalog

The tables below define every public standard library procedure. Their argument domains, arities, results, failures, and resource events are normative. An unlisted standard library export is unavailable. The public alias list is empty. Source forms and user-defined procedures follow their own binding contracts. A host registry cannot add a public library procedure. This inventory does not select native kernel membership.

The tables use the domains below. Arity counts supplied arguments. A trailing plus in an arity admits every greater finite count.

DomainValues
VAny single internal value, including a procedure or Condition
DPortable Datum
SA Boolean, exact number, character, symbol, or empty list
BBoolean
NExact number
IExact integer
UExact nonnegative integer
OExact integer from zero through 255
CUnicode scalar character
TRaw scalar string
YRaw scalar symbol
PProcedure
RPair with arbitrary internal components
LFinite proper list with arbitrary internal elements
DLProper list whose elements are Datum
CLProper list whose elements are characters
OLProper list whose elements are octets
AProper list of pairs with Datum keys and arbitrary internal cdr values
FVector with arbitrary internal elements
XBytevector
QCondition

Scalar and Datum domains use the Values definitions. A vector or list may contain a procedure internally. That aggregate then fails the Datum predicate and portable boundary validation.

All constructors create immutable values. Constructors with a count require an explicit fill value. Empty construction still validates every supplied argument. Counts have no host word limit. Finite work and logical allocation govern construction.

Each listed procedure returns one value unless its row specifies an internal result sequence or no normal result. The values, apply, and call-with-values procedures can return any finite count of internal values.

Arithmetic uses exact numbers. Successful results are integers or reduced rationals. Arithmetic never preserves a display scale.

Variadic addition starts from zero. Variadic multiplication starts from one. Subtraction and division start from their first operand when more than one is supplied. Each proceeds from left to right. A unary division checks its sole operand as the divisor. A longer division checks every operand after the first as a divisor.

All numeric argument domains are checked before zero-divisor checks. The zero-divisor checks finish in argument order before arithmetic begins. An earlier zero, false comparison, or selected minimum does not skip a later argument check.

The remainder has the dividend sign when nonzero. Modulo has the divisor sign when nonzero. Both return zero as the integer zero. The gcd and lcm results are nonnegative. The power with exponent zero is one, including zero raised to zero. The expt catalog row defines the failure for a zero base with a negative exponent.

Quantize and the unary rounding procedures use the complete rounding grid, mode, and check order contracts.

The number->string procedure uses the canonical text forms below. Its arity is exactly one. It performs no rounding or locale formatting.

ValueText
Integer zero0
Positive integerASCII decimal digits with no leading zero
Negative integer- followed by the positive magnitude digits
Nonintegral rationalCanonical numerator text, /, and canonical positive denominator text

The rational form has a nonzero numerator and a denominator greater than one. Source decimal spelling never changes this text.

Indices count elements from zero. Strings count Unicode scalars. Bytevectors count octets. They use exact integer indices independent of host width.

Reference operations require an index below the length. List-tail also admits the length and returns the empty suffix. A slice admits endpoints from zero through the length. Its start is included and its end is excluded. Slice checks run after argument domains. They check start bounds, end bounds, then start order. A start greater than end produces domain.range with invalid-slice-order on the ending bound argument. Equal endpoints return an empty sequence of the same kind.

String-length, string-ref, and substring first scan the entire input in scalar order to establish its length. String-ref checks bounds after that scan, then scans from the start through its selected scalar. Substring checks both bounds and start order after the length scan. It next visits scalar indices from zero up to but excluding end. It copies indices from start up to but excluding end. Metadata length caches preserve these scan events.

Vector and bytevector length checks read their stored element count through sequence-step. An indexed call reads that count once for its bounds checks. A successful reference then visits its selected element. A successful slice visits its selected elements in ascending index order after allocation. Each slice endpoint must satisfy 0 <= endpoint <= length before checking start <= end.

Append accepts only proper lists. It returns a proper list even when given no arguments. Member validates its needle and every list element as Datum before comparing. Assoc validates every entry pair and Datum key before comparing. Missing matches return #f. Search uses structural equality and stops at the first matching element or key.

Raw string and symbol comparisons inspect exact scalar sequences. String order is lexicographic scalar order with the shorter equal prefix first. Character order is numeric scalar order. Every argument type is validated before a comparison can return false.

Each adjacent string or symbol comparison starts at scalar index zero. It inspects the left position before the right position. Raw comparisons emit text-scalar-scan for each scalar visited. A paired comparison emits compare-scalar and stops that pair at its first unequal scalar or its first sequence end. Sequence ends supply the shorter-prefix comparison. The next adjacent pair begins only when the required relation holds. Otherwise the procedure returns false. Folded comparisons use the same paired positions after all folding work. Their paired visits use compare-scalar.

Unicode operations apply the fixed Unicode 17.0.0 repertoire. The normalization and case algorithms supply their complete mappings. Folded comparisons transform all arguments before comparing adjacent results.

The UTF-8 conversion procedures preserve every scalar. The bytevector contains only UTF-8 text bytes. Encoding uses the shortest representation and adds no marker. Decoding retains U+FEFF even at the start. It rejects overlong forms, isolated continuation bytes, truncation, surrogates, and scalars above U+10FFFF. Unassigned scalars and noncharacters remain valid data.

The decoder scans from the start. Each byte check rejects as soon as the inspected prefix cannot begin a valid shortest UTF-8 scalar. This includes the second-byte bounds imposed by E0, ED, F0, and F4. The first such check produces domain.range with invalid-utf8 on the bytevector argument. Its detection site is that byte's sequence-step, even when an earlier byte began the sequence. If a required continuation is missing, the detecting visit uses the next required byte index at the input end. The diagnostic-payload event keeps that occurrence and path with its own role. The Condition retains its existing fields and carries no byte position. It never substitutes replacement text. These procedures run during evaluation and their domain failures are ordinary language conditions. A result appears only after the complete conversion succeeds.

The six condition procedures use the Condition catalog. That catalog defines their internal value, field schemas, constructor order, accessors, and raised occurrences. The public rows here select their signatures and resource events. The constructor applies the imported validation order after ordinary operand evaluation and its arity check. Resources defines each selected event and reservation point.

The following table defines type predicates.

ProcedureArityDomainsResultChecks and failuresResource events
boolean?1VBoolean for membership in the Boolean domainNone after the shared checksNone after the shared checks
number?1VBoolean for membership in the exact number domainNone after the shared checksNone after the shared checks
integer?1VBoolean for membership in the exact integer domainNone after the shared checksNone after the shared checks
pair?1VBoolean for membership in the pair domainNone after the shared checksNone after the shared checks
null?1VBoolean for membership in the empty list domainNone after the shared checksNone after the shared checks
symbol?1VBoolean for membership in the symbol domainNone after the shared checksNone after the shared checks
char?1VBoolean for membership in the character domainNone after the shared checksNone after the shared checks
string?1VBoolean for membership in the string domainNone after the shared checksNone after the shared checks
vector?1VBoolean for membership in the vector domainNone after the shared checksNone after the shared checks
bytevector?1VBoolean for membership in the bytevector domainNone after the shared checksNone after the shared checks
procedure?1VBoolean for membership in the procedure domainNone after the shared checksNone after the shared checks
scalar?1VBoolean for membership in the scalar domainNone after the shared checksNone after the shared checks
list?1VTrue for a proper list and false at the first nonpair tailNone after the shared checkslist-step along the spine through the final tail
datum?1VTrue for Datum and false at the first non-Datum componentNone after the shared checksdatum-validate in the Values traversal order

The following table defines booleans and equality.

ProcedureArityDomainsResultChecks and failuresResource events
not1VTrue exactly for #fNone after the shared checksNone after the shared checks
boolean=?2+B...True when every adjacent Boolean is equalNone after the shared checkscompare-scalar on adjacent arguments until the first false comparison
eq?2S, SScalar value equality under the Values ruleNone after the shared checkscompare-scalar
eqv?2S, SScalar value equality under the Values ruleNone after the shared checkscompare-scalar
equal?2D, DStructural equality under the Values ruleValidate the whole left Datum before the whole right Datumcompare-datum in the Values traversal order

The following table defines exact arithmetic.

ProcedureArityDomainsResultChecks and failuresResource events
+0+N...Left sum with identity zeroNone after the shared checksexact-arithmetic then rational-reduce for each declared result, then datum-allocate
*0+N...Left product with identity oneNone after the shared checksexact-arithmetic then rational-reduce for each declared result, then datum-allocate
-1+N...Unary negation or left subtraction from the first operandNone after the shared checksexact-arithmetic then rational-reduce for each declared result, then datum-allocate
/1+N...Unary reciprocal or left division from the first operandAfter every numeric domain check, reject zero divisors from left to rightexact-arithmetic then rational-reduce for each declared result, then datum-allocate
=2+N...True when each argument is equal to its successorNone after the shared checkscompare-scalar on adjacent arguments until the first false comparison
<2+N...True when each argument is less than its successorNone after the shared checkscompare-scalar on adjacent arguments until the first false comparison
>2+N...True when each argument is greater than its successorNone after the shared checkscompare-scalar on adjacent arguments until the first false comparison
<=2+N...True when each argument is no greater than its successorNone after the shared checkscompare-scalar on adjacent arguments until the first false comparison
>=2+N...True when each argument is no less than its successorNone after the shared checkscompare-scalar on adjacent arguments until the first false comparison
abs1NNonnegative magnitudeNone after the shared checksexact-arithmetic rational-reduce datum-allocate
min1+N...The least value with the first argument retained on a tieNone after the shared checkscompare-scalar against the running selected value from left to right
max1+N...The greatest value with the first argument retained on a tieNone after the shared checkscompare-scalar against the running selected value from left to right
numerator1NNumerator of the reduced value, including its signNone after the shared checksexact-arithmetic datum-allocate
denominator1NPositive reduced denominator, or one for an integerNone after the shared checksexact-arithmetic datum-allocate
quotient2I n, I dInteger n / d rounded toward zeroReject zero dexact-divide datum-allocate
remainder2I n, I dn - d * quotient(n, d)Reject zero dexact-divide exact-arithmetic datum-allocate
modulo2I n, I dn - d * floor(n / d)Reject zero dexact-divide exact-arithmetic datum-allocate
gcd0+I...Nonnegative greatest common divisor, with empty result zeroNone after the shared checksexact-arithmetic on the left reduction from zero, then datum-allocate
lcm0+I...Nonnegative least common multiple, with empty result one and any zero producing zeroNone after the shared checksexact-arithmetic on the left reduction from one, then datum-allocate
expt2N base, I exponentExact integer power, with exponent zero returning oneReject exact zero base with a negative exponent using domain.division-by-zero with argument 0exact-arithmetic rational-reduce datum-allocate
zero?1NTrue exactly when the input is equal to zeroNone after the shared checkscompare-scalar
positive?1NTrue exactly when the input is greater than zeroNone after the shared checkscompare-scalar
negative?1NTrue exactly when the input is less than zeroNone after the shared checkscompare-scalar
even?1ITrue exactly when the input is divisible by twoNone after the shared checksexact-divide
odd?1ITrue exactly when the input is not divisible by twoNone after the shared checksexact-divide
quantize3N, I, mode symbolExact selected decimal grid valueThe ordered checks in the Numbers rounding contractdecimal-scale exact-divide rounding-select rational-reduce datum-allocate
floor1NExact integer under the corresponding scale-zero modeThe unary checks in the Numbers rounding contractdecimal-scale exact-divide rounding-select rational-reduce datum-allocate
ceiling1NExact integer under the corresponding scale-zero modeThe unary checks in the Numbers rounding contractdecimal-scale exact-divide rounding-select rational-reduce datum-allocate
truncate1NExact integer under the corresponding scale-zero modeThe unary checks in the Numbers rounding contractdecimal-scale exact-divide rounding-select rational-reduce datum-allocate
number->string1NCanonical exact numeric textNone after the shared checksexact-arithmetic for decimal digits, then datum-allocate

The following table defines pairs and lists.

ProcedureArityDomainsResultChecks and failuresResource events
cons2V, VPair whose car and cdr are the two argumentsNone after the shared checksdatum-allocate
car1RFirst componentNone after the shared checkslist-step
cdr1RSecond componentNone after the shared checkslist-step
caar1V x(car (car x))car x then car of that result with each called operation retaining its own failure nameThe declared call, argument-check, and list-step events of both nested procedures
cadr1V x(car (cdr x))cdr x then car of that result with each called operation retaining its own failure nameThe declared call, argument-check, and list-step events of both nested procedures
cdar1V x(cdr (car x))car x then cdr of that result with each called operation retaining its own failure nameThe declared call, argument-check, and list-step events of both nested procedures
cddr1V x(cdr (cdr x))cdr x then cdr of that result with each called operation retaining its own failure nameThe declared call, argument-check, and list-step events of both nested procedures
list0+V...Proper list of arguments in their supplied orderNone after the shared checksdatum-allocate in argument order
make-list2U count, V fillProper list containing count copies of fillNone after the shared checkstraversal-state then datum-allocate for each result index in ascending order
length1LExact number of pairs counted by spine validationNone after the shared checksdatum-allocate
append0+L...Proper list formed by concatenating every list in argument orderNone after the shared checkslist-step and datum-allocate in argument and element order
reverse1LProper list with the elements in reverse orderNone after the shared checkslist-step from the head and datum-allocate for each new front pair
list-ref2L, I indexElement at the zero-based indexRequire 0 <= index < lengthlist-step for each cdr movement, then one for the selected car
list-tail2L, I indexSuffix after index elementsRequire 0 <= index <= lengthlist-step for each cdr movement to the selected suffix
member2D needle, DL haystackFirst matching suffix under equal?, or #fComplete both Datum domains before searchinglist-step then compare-datum in list order
assoc2D key, A entriesFirst pair with an equal? key, or #fValidate every pair and Datum key before searchinglist-step then compare-datum in entry order

Make-list completes both argument domains before construction, including when count is zero. For each result index i, it reserves one logical cursor position with traversal-state at result(0), element(i). It next reserves and creates that pair with datum-allocate at the same component path. Their extents are one retained position and two pair components. The next index starts only after that pair allocation succeeds. Count zero returns the empty list without either construction event. Counts remain exact mathematical integers.

List-ref and list-tail first complete the entire L domain, including its final tail. They next check the index domain and reserve a separate argument-check for its bounds. After successful bounds checks, each actual cdr movement emits list-step at the reached cdr path. List-ref then emits one list-step at the selected car path. List-tail returns the reached suffix directly. Index zero therefore adds no movement event for list-tail and only the car visit for list-ref. Neither operation adds a separate endpoint visit after this walk.

The following table defines list traversal.

ProcedureArityDomainsResultChecks and failuresResource events
map2+P, L...Proper list of one callback result per tupleAll list spines, equal lengths, callback arity, then one result per callbacktraversal-state callback-call result-check datum-allocate per ascending index
for-each2+P, L...One empty list after all callbacksAll list spines, equal lengths, then callback aritytraversal-state callback-call per ascending index, discarding all callback values
fold-left3+P, V seed, L...Final accumulator, or seed for empty listsAll list spines, equal lengths, callback arity, then one result per callbacktraversal-state callback-call result-check per ascending index
fold-right3+P, V seed, L...Final accumulator, or seed for empty listsAll list spines, equal lengths, callback arity, then one result per callbacktraversal-state before descending callback-call and result-check events
filter2P, LProper list of elements whose callback result is not #fWhole list spine, unary callback arity, then one result per callbacktraversal-state callback-call result-check and datum-allocate for each retained element
find2P, LFirst element whose callback result is not #f, or #fWhole list spine, unary callback arity, then one result per callbacktraversal-state callback-call result-check until the first true result
any2P, LFirst non-#f callback value, or #f for no match or an empty listWhole list spine, unary callback arity, then one result per callbacktraversal-state callback-call result-check until the first true result
every2P, LFirst #f, otherwise the last callback value, with #t for an empty listWhole list spine, unary callback arity, then one result per callbacktraversal-state callback-call result-check until the first false result

The following table defines vectors.

ProcedureArityDomainsResultChecks and failuresResource events
vector0+V...Vector of the arguments in orderNone after the shared checksdatum-allocate then sequence-step in result order
make-vector2U count, V fillVector containing count copies of fillNone after the shared checksdatum-allocate then sequence-step in result order
vector-length1FExact element countNone after the shared checkssequence-step datum-allocate
vector-ref2F, I indexElement at the zero-based indexRequire 0 <= index < lengthsequence-step
vector->list1FProper list of vector elements in orderNone after the shared checkssequence-step then datum-allocate per element
list->vector1LVector of list elements in orderNone after the shared checksdatum-allocate then list-step and sequence-step in order
vector-append0+F...Concatenated vector in argument and element orderNone after the shared checksLength sequence-step for every argument, complete result datum-allocate, then element sequence-step in argument and element order
vector-slice3F, I start, I endVector for the half-open rangeCheck start bounds, end bounds, then start <= enddatum-allocate then sequence-step in the selected range

Vector-append completes every argument domain before its length pass. In argument order it emits sequence-step at argument(i), field(length) before reading each stored length. It computes the exact total within those reserved steps. It then reserves and creates the complete result at result(0), with extent equal to that total. Only then does it visit the elements of each argument in ascending index order. Empty arguments retain their domain and length events but have no element visits. With no arguments, the only row event is datum-allocate at result(0) with extent zero. The bytevector-append row follows the same two passes with byte component paths.

The following table defines bytevectors and utf-8.

ProcedureArityDomainsResultChecks and failuresResource events
bytevector0+O...Bytevector of the octets in orderNone after the shared checksdatum-allocate then sequence-step in result order
make-bytevector2U count, O fillBytevector containing count copies of fillNone after the shared checksdatum-allocate then sequence-step in result order
bytevector-length1XExact octet countNone after the shared checkssequence-step datum-allocate
bytevector-u8-ref2X, I indexOctet at the zero-based index as an exact integerRequire 0 <= index < lengthsequence-step datum-allocate
bytevector->list1XProper list of octet integers in orderNone after the shared checksLength sequence-step, then byte sequence-step and one combined integer-and-pair datum-allocate per octet
list->bytevector1OLBytevector of the listed octets in orderNone after the shared checksdatum-allocate then list-step and sequence-step in order
bytevector-append0+X...Concatenated bytevector in argument and octet orderNone after the shared checksLength sequence-step for every argument, complete result datum-allocate, then byte sequence-step in argument and octet order
bytevector-slice3X, I start, I endBytevector for the half-open rangeCheck start bounds, end bounds, then start <= enddatum-allocate then sequence-step in the selected range
utf8->string1XString decoded with strict UTF-8Reject at the first byte or required end that makes the current UTF-8 prefix invalidByte sequence-step through each complete scalar, then one datum-allocate for that scalar. Finish with the required end visit
string->utf81TShortest UTF-8 bytes for the unchanged scalar sequenceNone after the shared checksOne text-scalar-scan per scalar, then one datum-allocate per encoded octet. Finish with the required end visit

Bytevector-append uses the length and element passes defined with vector-append. Its allocation extent is the exact total octet count. Its element visits use argument(i), byte(j). Empty arguments still participate in the length pass.

Bytevector->list emits sequence-step at argument(0), field(length) once after its domain check. It then visits each octet at argument(0), byte(i) in ascending index order. Each visit is followed by one datum-allocate at result(0), element(i). That event reserves the complete exact integer and pair together before creating either. Its extent is three, comprising one integer component and the pair's two components. The next byte is visited only after that combined event succeeds. A zero length returns the empty list after the length visit with no component allocation or extra end visit.

UTF-8 conversion uses sequential input visits through the required end. Decoding visits bytes at argument(0), byte(i). As soon as one complete valid scalar is known, datum-allocate at result(0), scalar(j) reserves that result component with extent one. It finishes that allocation before visiting the next byte. Encoding visits scalars at argument(0), field(scan), scalar(i). It then reserves each encoded octet separately at result(0), byte(j), with extent one, before visiting the next scalar. Output indices increase across the complete result.

A successful nonempty conversion visits its required input end after its last component allocation. It adds no final allocation event. An empty conversion first visits byte zero or scalar zero as its required end. It then emits exactly one datum-allocate at result(0) with extent zero for the empty aggregate. Each input visit reserves all decoding or encoding work and temporary storage for that visit. The first result allocation includes the aggregate header and storage required for that component. Every later allocation includes its complete component and growth requirements. These extents use the library reservation convention.

The following table defines strings and symbols.

ProcedureArityDomainsResultChecks and failuresResource events
string0+C...String of the supplied scalars in orderNone after the shared checksdatum-allocate then text-scalar-scan in result order
make-string2U count, C fillString containing count copies of the scalarNone after the shared checksdatum-allocate then text-scalar-scan in result order
string-length1TExact Unicode scalar countNone after the shared checkstext-scalar-scan datum-allocate
string-ref2T, I indexScalar at the zero-based scalar indexRequire 0 <= index < scalar lengthtext-scalar-scan in scalar order
substring3T, I start, I endString for the half-open scalar rangeCheck start bounds, end bounds, then start <= endtext-scalar-scan then datum-allocate
string-append0+T...Concatenated raw scalar sequences in argument orderNone after the shared checkstext-scalar-scan in argument order, then datum-allocate
string->list1TProper list of characters in scalar orderNone after the shared checkstext-scalar-scan then datum-allocate per character
list->string1CLString of the listed characters in orderNone after the shared checkslist-step then datum-allocate
string=?2+T...Boolean for adjacent equality under raw scalar lexicographic comparisonNone after the shared checkstext-scalar-scan and compare-scalar until the first false adjacent comparison
string<?2+T...Boolean for adjacent increasing order under raw scalar lexicographic comparisonNone after the shared checkstext-scalar-scan and compare-scalar until the first false adjacent comparison
string>?2+T...Boolean for adjacent decreasing order under raw scalar lexicographic comparisonNone after the shared checkstext-scalar-scan and compare-scalar until the first false adjacent comparison
string<=?2+T...Boolean for adjacent nondecreasing order under raw scalar lexicographic comparisonNone after the shared checkstext-scalar-scan and compare-scalar until the first false adjacent comparison
string>=?2+T...Boolean for adjacent nonincreasing order under raw scalar lexicographic comparisonNone after the shared checkstext-scalar-scan and compare-scalar until the first false adjacent comparison
string->symbol1TSymbol with exactly the same scalarsNone after the shared checkstext-scalar-scan datum-allocate
symbol->string1YString with exactly the same scalarsNone after the shared checkstext-scalar-scan datum-allocate
symbol=?2+Y...True when adjacent symbols have equal raw scalar sequencesNone after the shared checkstext-scalar-scan and compare-scalar until the first false adjacent comparison

The following table defines characters.

ProcedureArityDomainsResultChecks and failuresResource events
char=?2+C...Boolean for adjacent equality by numeric Unicode scalar valueNone after the shared checkscompare-scalar until the first false adjacent comparison
char<?2+C...Boolean for adjacent increasing order by numeric Unicode scalar valueNone after the shared checkscompare-scalar until the first false adjacent comparison
char>?2+C...Boolean for adjacent decreasing order by numeric Unicode scalar valueNone after the shared checkscompare-scalar until the first false adjacent comparison
char<=?2+C...Boolean for adjacent nondecreasing order by numeric Unicode scalar valueNone after the shared checkscompare-scalar until the first false adjacent comparison
char>=?2+C...Boolean for adjacent nonincreasing order by numeric Unicode scalar valueNone after the shared checkscompare-scalar until the first false adjacent comparison
char->integer1CExact Unicode scalar valueNone after the shared checksdatum-allocate
integer->char1ICharacter at that Unicode scalar valueRequire 0 <= value <= 1114111 and exclude 55296 <= value <= 57343datum-allocate

The following table defines unicode operations.

ProcedureArityDomainsResultChecks and failuresResource events
char-alphabetic?1CUnicode 17.0.0 Alphabetic BooleanNone after the shared checkstext-scalar-scan unicode-map
char-numeric?1CTrue exactly for Unicode 17.0.0 General_Category NdNone after the shared checkstext-scalar-scan unicode-map
char-whitespace?1CUnicode 17.0.0 White_Space BooleanNone after the shared checkstext-scalar-scan unicode-map
char-upper-case?1CUnicode 17.0.0 Uppercase BooleanNone after the shared checkstext-scalar-scan unicode-map
char-lower-case?1CUnicode 17.0.0 Lowercase BooleanNone after the shared checkstext-scalar-scan unicode-map
digit-value1CExact decimal digit zero through nine for Nd, otherwise #fNone after the shared checkstext-scalar-scan unicode-map
char-upcase1CSimple uppercase character under Unicode 17.0.0None after the shared checkstext-scalar-scan unicode-map
char-downcase1CSimple lowercase character under Unicode 17.0.0None after the shared checkstext-scalar-scan unicode-map
char-foldcase1CSimple non-Turkic folded character under Unicode 17.0.0None after the shared checkstext-scalar-scan unicode-map
string-upcase1TFull default uppercase string under Unicode 17.0.0None after the shared checkstext-scalar-scan unicode-map datum-allocate
string-downcase1TFull default lowercase string under Unicode 17.0.0None after the shared checkstext-scalar-scan unicode-map datum-allocate
string-foldcase1TFull non-Turkic folded string under Unicode 17.0.0None after the shared checkstext-scalar-scan unicode-map datum-allocate
string-normalize-nfc1TUnicode 17.0.0 NFC stringNone after the shared checkstext-scalar-scan unicode-normalize datum-allocate
string-normalize-nfd1TUnicode 17.0.0 NFD stringNone after the shared checkstext-scalar-scan unicode-normalize datum-allocate
string-normalize-nfkc1TUnicode 17.0.0 NFKC stringNone after the shared checkstext-scalar-scan unicode-normalize datum-allocate
string-normalize-nfkd1TUnicode 17.0.0 NFKD stringNone after the shared checkstext-scalar-scan unicode-normalize datum-allocate
char-ci=?2+C...Boolean for adjacent equality of simple-folded scalarsFold every argument from left to right before any comparisontext-scalar-scan unicode-map on every argument, then compare-scalar until the first false comparison
char-ci<?2+C...Boolean for adjacent increasing order of simple-folded scalarsFold every argument from left to right before any comparisontext-scalar-scan unicode-map on every argument, then compare-scalar until the first false comparison
char-ci>?2+C...Boolean for adjacent decreasing order of simple-folded scalarsFold every argument from left to right before any comparisontext-scalar-scan unicode-map on every argument, then compare-scalar until the first false comparison
char-ci<=?2+C...Boolean for adjacent nondecreasing order of simple-folded scalarsFold every argument from left to right before any comparisontext-scalar-scan unicode-map on every argument, then compare-scalar until the first false comparison
char-ci>=?2+C...Boolean for adjacent nonincreasing order of simple-folded scalarsFold every argument from left to right before any comparisontext-scalar-scan unicode-map on every argument, then compare-scalar until the first false comparison
string-ci=?2+T...Boolean for adjacent equality of full-folded scalar sequencesFold every argument from left to right before any comparisontext-scalar-scan unicode-map datum-allocate on every argument, then compare-scalar until the first false comparison
string-ci<?2+T...Boolean for adjacent increasing order of full-folded scalar sequencesFold every argument from left to right before any comparisontext-scalar-scan unicode-map datum-allocate on every argument, then compare-scalar until the first false comparison
string-ci>?2+T...Boolean for adjacent decreasing order of full-folded scalar sequencesFold every argument from left to right before any comparisontext-scalar-scan unicode-map datum-allocate on every argument, then compare-scalar until the first false comparison
string-ci<=?2+T...Boolean for adjacent nondecreasing order of full-folded scalar sequencesFold every argument from left to right before any comparisontext-scalar-scan unicode-map datum-allocate on every argument, then compare-scalar until the first false comparison
string-ci>=?2+T...Boolean for adjacent nonincreasing order of full-folded scalar sequencesFold every argument from left to right before any comparisontext-scalar-scan unicode-map datum-allocate on every argument, then compare-scalar until the first false comparison

The Unicode rows use the following complete reservation schedules.

A scalar property query or simple case mapping performs one scalar scan and one unicode-map. Its map extent is one. For digit-value, that map reserves the complete exact integer representation and value slot before creating the digit result. A nondecimal input returns #f within the same event. Neither result adds a datum-allocate event. Booleans and characters retain their declared scalar representation requirements.

Let n be the number of original input scalars. Full string mapping first scans all n scalars and the required end. It then maps the original scalars in ascending index order. Each unicode-map has extent n. The first map reserves one scratch buffer with capacity D times n scalars. D is 3 for uppercase, 2 for lowercase, and 3 for folding. That reservation succeeds before either scratch storage or the first mapped scalar is created. Later maps reuse that capacity. They reserve their own mapping work without another scratch allocation. An empty input performs its end scan and result allocation, with no map or mapping scratch reservation.

The map requirement includes exact bound calculation, table lookup, expansion, and retained scalar storage. These counts are mathematical integers. A host word width cannot add a domain limit or change the first failure.

After the complete original scalar scan and required end, each normalization call performs one unicode-normalize at argument(0). Its extent is the original scalar count n. D is 4 for NFC and NFD, and 18 for NFKC and NFKD. Its complete requirements cover two scalar buffers, each with capacity D times n, and 256 canonical-combining-class counters. Bound arithmetic, decomposition lookup, ordering, composition, and all intermediate storage belong to this reservation. It succeeds before transformation or scratch materialization starts.

Fully decompose the input under the selected form. Use stable counting order within each maximal nonstarter run. A scalar with combining class zero separates runs. Equal combining classes retain their original order. Compose NFC and NFKC in place under the Unicode blocking, exclusion, and Hangul rules. With decomposed length L and r runs of at least two nonstarters, ordering work has the structural bound O(1 + L + 256r). L is at most D times n and r is at most floor(L / 2). Reserve from n, D, and these upper bounds before decomposition; discovering actual L or r is transformation work. The selected model covers fixed workspace setup and every complete lookup, counter pass, scalar visit, and movement, including their coefficients. It cannot hide a recursive walk, comparison sort, or quadratic insertion pass outside the reservation.

The empty string still has one unicode-normalize with extent zero, followed by one datum-allocate with extent zero. The fixed workspace and empty-result requirements remain part of those reservations.

A completed string mapping or normalization reserves one datum-allocate before materializing its immutable result. Its extent is m, the actual number of output scalars. The complete requirements include the string header, value slot, and space for up to 4 times m UTF-8 octets. They also include encoding work and any temporary storage used for materialization. The extent remains m when input length, decomposition capacity, or UTF-8 octet length differs. Extent zero still reserves an empty string result. Refusal publishes no partial string and refunds no earlier charge.

All argument domain checks finish before folding or replacing any retained argument. Fold each argument in ascending argument order. Retain its completed folded value in the same logical operand-sequence position already reserved for that call. A character replacement belongs to its unicode-map. A string replacement belongs to its completed result allocation. This replacement changes no caller binding or immutable input value. It adds no argument-store or traversal-state event and requires no separate descriptor sequence. Every folded value remains available until comparison finishes or the call fails. Repeated references to the same input still perform each argument's full folding schedule and result reservation.

For a unary string transformation, the result allocation site is result(0). For a folded string comparison, the folded result of argument i is allocated at result(i) of the invoking comparison call. The site role is datum-allocate. All scans and maps continue to select the original argument(i) and its scalar positions.

After all folding and retention, each folded character pair performs one compare-scalar. For strings, each visited position performs one compare-scalar. Reserve before reading the left scalar or end, then the right scalar or end at that same position. Both reads belong to that event, including when the left sequence has ended. Only after both reads does the pair stop at unequal scalars or an end. No additional text-scalar-scan accompanies these folded reads. String comparison sites use field(compare), argument(i), scalar(j), where i is the left argument of the adjacent pair and j starts at zero for each pair. Character comparison selects field(compare), argument(i). The first false pair ends comparison after every argument has already been folded.

The original-input context rule in default case algorithms determines every Final_Sigma visit within its map requirements.

The following table defines procedure composition.

ProcedureArityDomainsResultChecks and failuresResource events
values0+V...The supplied values in order as an internal result sequenceNone after the shared checkstraversal-state for the result sequence
apply2+P, V..., LAll values returned by one call with prefix arguments followed by the final list elements. The target inherits this call's tail position under the tail-call ruleValidate the whole final list, then check the procedure accepts the assembled argument countlist-step traversal-state callback-call
call-with-values2P producer, P consumerAll values returned by the consumer. The producer is nontail and the consumer inherits this call's tail position under the tail-call ruleCheck the producer accepts zero arguments, call it, then check the consumer accepts its result countcallback-call for producer, traversal-state, then callback-call for consumer

The following table defines conditions.

ProcedureArityDomainsResultChecks and failuresResource events
make-condition2T code, field recordValidated immutable Condition without raising itUse the complete ordered condition-constructor protocolargument-check list-step text-scalar-scan compare-scalar datum-validate condition-construct
condition?1VTrue for a Condition and false for every other valueNone after the shared checksNone after the shared checks
condition-phase1QThe string evaluateNone after the shared checkscondition-inspect
condition-code1QThe exact stored code stringNone after the shared checkscondition-inspect
condition-data1QCanonical immutable string-keyed association-list DatumNone after the shared checkscondition-inspect
raise1QNo normal result. Raise a new occurrence at the current canonical siteNone after the shared checkscondition-raise

Why

A closed pure library exposes the data operations and procedure composition needed by rules. A host extension would leave behavior and resource accounting outside the language contract. The two scalar equality names keep their respective failure operation names. Equal successful results do not erase that observable distinction.

A zero base raised to a negative exponent requires division by zero. The failing argument is the base.

Library event rules fix per-component reservations and the first detecting visit. They preserve the full argument checks, exact mathematical indices, and complete event requirements. An implementation can change storage without changing these event boundaries.

Complete storage and work are assigned to the declared Unicode events. Original scalar counts, generated scalar counts, and typed result sites preserve reservation order across physical representations.

Resolve every public procedure binding

lispex.example.v2.standard-library.catalog-public-bindings · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (list
        (procedure? boolean?)
        (procedure? number?)
        (procedure? integer?)
        (procedure? pair?)
        (procedure? null?)
        (procedure? symbol?)
        (procedure? char?)
        (procedure? string?)
        (procedure? vector?)
        (procedure? bytevector?)
        (procedure? procedure?)
        (procedure? scalar?)
        (procedure? list?)
        (procedure? datum?)
        (procedure? not)
        (procedure? boolean=?)
        (procedure? eq?)
        (procedure? eqv?)
        (procedure? equal?)
        (procedure? +)
        (procedure? *)
        (procedure? -)
        (procedure? /)
        (procedure? =)
        (procedure? <)
        (procedure? >)
        (procedure? <=)
        (procedure? >=)
        (procedure? abs)
        (procedure? min)
        (procedure? max)
        (procedure? numerator)
        (procedure? denominator)
        (procedure? quotient)
        (procedure? remainder)
        (procedure? modulo)
        (procedure? gcd)
        (procedure? lcm)
        (procedure? expt)
        (procedure? zero?)
        (procedure? positive?)
        (procedure? negative?)
        (procedure? even?)
        (procedure? odd?)
        (procedure? quantize)
        (procedure? floor)
        (procedure? ceiling)
        (procedure? truncate)
        (procedure? number->string)
        (procedure? cons)
        (procedure? car)
        (procedure? cdr)
        (procedure? caar)
        (procedure? cadr)
        (procedure? cdar)
        (procedure? cddr)
        (procedure? list)
        (procedure? make-list)
        (procedure? length)
        (procedure? append)
        (procedure? reverse)
        (procedure? list-ref)
        (procedure? list-tail)
        (procedure? member)
        (procedure? assoc)
        (procedure? map)
        (procedure? for-each)
        (procedure? fold-left)
        (procedure? fold-right)
        (procedure? filter)
        (procedure? find)
        (procedure? any)
        (procedure? every)
        (procedure? vector)
        (procedure? make-vector)
        (procedure? vector-length)
        (procedure? vector-ref)
        (procedure? vector->list)
        (procedure? list->vector)
        (procedure? vector-append)
        (procedure? vector-slice)
        (procedure? bytevector)
        (procedure? make-bytevector)
        (procedure? bytevector-length)
        (procedure? bytevector-u8-ref)
        (procedure? bytevector->list)
        (procedure? list->bytevector)
        (procedure? bytevector-append)
        (procedure? bytevector-slice)
        (procedure? utf8->string)
        (procedure? string->utf8)
        (procedure? string)
        (procedure? make-string)
        (procedure? string-length)
        (procedure? string-ref)
        (procedure? substring)
        (procedure? string-append)
        (procedure? string->list)
        (procedure? list->string)
        (procedure? string=?)
        (procedure? string<?)
        (procedure? string>?)
        (procedure? string<=?)
        (procedure? string>=?)
        (procedure? string->symbol)
        (procedure? symbol->string)
        (procedure? symbol=?)
        (procedure? char=?)
        (procedure? char<?)
        (procedure? char>?)
        (procedure? char<=?)
        (procedure? char>=?)
        (procedure? char->integer)
        (procedure? integer->char)
        (procedure? char-alphabetic?)
        (procedure? char-numeric?)
        (procedure? char-whitespace?)
        (procedure? char-upper-case?)
        (procedure? char-lower-case?)
        (procedure? digit-value)
        (procedure? char-upcase)
        (procedure? char-downcase)
        (procedure? char-foldcase)
        (procedure? string-upcase)
        (procedure? string-downcase)
        (procedure? string-foldcase)
        (procedure? string-normalize-nfc)
        (procedure? string-normalize-nfd)
        (procedure? string-normalize-nfkc)
        (procedure? string-normalize-nfkd)
        (procedure? char-ci=?)
        (procedure? char-ci<?)
        (procedure? char-ci>?)
        (procedure? char-ci<=?)
        (procedure? char-ci>=?)
        (procedure? string-ci=?)
        (procedure? string-ci<?)
        (procedure? string-ci>?)
        (procedure? string-ci<=?)
        (procedure? string-ci>=?)
        (procedure? values)
        (procedure? apply)
        (procedure? call-with-values)
        (procedure? make-condition)
        (procedure? condition?)
        (procedure? condition-phase)
        (procedure? condition-code)
        (procedure? condition-data)
        (procedure? raise))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": []
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result(#t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t #t)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": [
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "publicProcedureNames": [
    "boolean?",
    "number?",
    "integer?",
    "pair?",
    "null?",
    "symbol?",
    "char?",
    "string?",
    "vector?",
    "bytevector?",
    "procedure?",
    "scalar?",
    "list?",
    "datum?",
    "not",
    "boolean=?",
    "eq?",
    "eqv?",
    "equal?",
    "+",
    "*",
    "-",
    "/",
    "=",
    "<",
    ">",
    "<=",
    ">=",
    "abs",
    "min",
    "max",
    "numerator",
    "denominator",
    "quotient",
    "remainder",
    "modulo",
    "gcd",
    "lcm",
    "expt",
    "zero?",
    "positive?",
    "negative?",
    "even?",
    "odd?",
    "quantize",
    "floor",
    "ceiling",
    "truncate",
    "number->string",
    "cons",
    "car",
    "cdr",
    "caar",
    "cadr",
    "cdar",
    "cddr",
    "list",
    "make-list",
    "length",
    "append",
    "reverse",
    "list-ref",
    "list-tail",
    "member",
    "assoc",
    "map",
    "for-each",
    "fold-left",
    "fold-right",
    "filter",
    "find",
    "any",
    "every",
    "vector",
    "make-vector",
    "vector-length",
    "vector-ref",
    "vector->list",
    "list->vector",
    "vector-append",
    "vector-slice",
    "bytevector",
    "make-bytevector",
    "bytevector-length",
    "bytevector-u8-ref",
    "bytevector->list",
    "list->bytevector",
    "bytevector-append",
    "bytevector-slice",
    "utf8->string",
    "string->utf8",
    "string",
    "make-string",
    "string-length",
    "string-ref",
    "substring",
    "string-append",
    "string->list",
    "list->string",
    "string=?",
    "string<?",
    "string>?",
    "string<=?",
    "string>=?",
    "string->symbol",
    "symbol->string",
    "symbol=?",
    "char=?",
    "char<?",
    "char>?",
    "char<=?",
    "char>=?",
    "char->integer",
    "integer->char",
    "char-alphabetic?",
    "char-numeric?",
    "char-whitespace?",
    "char-upper-case?",
    "char-lower-case?",
    "digit-value",
    "char-upcase",
    "char-downcase",
    "char-foldcase",
    "string-upcase",
    "string-downcase",
    "string-foldcase",
    "string-normalize-nfc",
    "string-normalize-nfd",
    "string-normalize-nfkc",
    "string-normalize-nfkd",
    "char-ci=?",
    "char-ci<?",
    "char-ci>?",
    "char-ci<=?",
    "char-ci>=?",
    "string-ci=?",
    "string-ci<?",
    "string-ci>?",
    "string-ci<=?",
    "string-ci>=?",
    "values",
    "apply",
    "call-with-values",
    "make-condition",
    "condition?",
    "condition-phase",
    "condition-code",
    "condition-data",
    "raise"
  ],
  "publicAliases": []
}
Product invocation

Expected result

Every listed export resolves to a procedure. The ordered result contains one true value for every catalog name. Product invocation awaits its 2.0 adapter.

The fixture follows the exact catalog order. It checks exported procedure availability without invoking the effect of raise or any callback.

Keep internal procedures in immutable aggregates

lispex.example.v2.standard-library.immutable-constructor-values · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (let ((f (lambda (x) x)))
        (list (procedure? (car (cons f 0)))
              (procedure? (vector-ref (vector f) 0))
              (procedure? (car (make-list 1 f)))
              (datum? (list f))
              (datum? (vector f))
              (list? (cons 1 2))
              (list? (make-list 0 f))))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": []
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result(#t #t #t #f #f #f #t)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": [
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": false
      },
      {
        "kind": "boolean",
        "value": false
      },
      {
        "kind": "boolean",
        "value": false
      },
      {
        "kind": "boolean",
        "value": true
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

Pair, list, and vector constructors retain internal procedures. Such aggregates fail Datum membership while remaining valid internal values. Product invocation awaits its 2.0 adapter.

Immutability and portability are separate properties. The final empty list is proper even though its unused fill value is a procedure.

Pairs and lists

Use the pair and list definitions when applying car. A nonempty proper list is a pair. The empty list is a distinct value.

The domain of car concerns its argument. A component returned inside a program can still be subject to the separate Datum boundary. Selecting a component does not make an internal procedure portable.

The call follows the application-order rule. Domain inspection and selection follow the reservation rule. A resource stop ends the request when a required reservation fails.

9.4 Select the first component of a pair

The procedure car accepts exactly one pair and returns its first component. The tail may be a pair, the empty list, or another value. An empty list or another nonpair produces a domain condition.

Why

Selecting one component needs a pair at the selected position. Requiring a proper list would reject pairs whose first component is available.

Select the first list element

lispex.example.v2.standard-library.car-proper-list · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (car input)))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": [
          {
            "kind": "integer",
            "value": "3"
          },
          {
            "kind": "integer",
            "value": "5"
          },
          {
            "kind": "integer",
            "value": "8"
          }
        ]
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result3
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "integer",
    "value": "3"
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

The rule returns the exact integer 3 as one result datum. Product invocation awaits its 2.0 adapter.

The nonempty list is a pair whose first component is 3. The rule returns that component without changing the input.

Select from an improper pair

lispex.example.v2.standard-library.car-dotted-pair · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (car input)))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "pair",
        "car": {
          "kind": "integer",
          "value": "3"
        },
        "cdr": {
          "kind": "integer",
          "value": "5"
        }
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result3
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "integer",
    "value": "3"
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

The rule returns the exact integer 3 from a pair whose tail is the exact integer 5. Product invocation awaits its 2.0 adapter.

The pair notation in request.json describes the value. It does not define canonical codec bytes. The tail does not need to be a list.

Reject an empty list

lispex.example.v2.standard-library.car-empty-list · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (car input)))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": []
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "car",
      "argument": "0",
      "path": [],
      "expected": "pair",
      "actual": "empty-list"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

The empty list produces a car domain condition and no result datum. Product invocation awaits its 2.0 adapter.

The required pair is absent. A zero result count describes failure and does not represent an empty returned value.

Reject a scalar argument

lispex.example.v2.standard-library.car-scalar · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (car input)))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "7"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "car",
      "argument": "0",
      "path": [],
      "expected": "pair",
      "actual": "integer"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

The exact integer 7 produces a car domain condition and no result datum. Product invocation awaits its 2.0 adapter.

The integer remains an integer. The call does not wrap it in a singleton list or supply an implicit pair.

Finish argument evaluation before arity checking

lispex.example.v2.standard-library.argument-before-arity · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (car input (car '()))))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": [
          {
            "kind": "integer",
            "value": "3"
          }
        ]
      }
    }
  ],
  "siteLabels": {
    "inner-car-argument": "The car call inside the second argument of the outer car call."
  },
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "car",
      "argument": "0",
      "path": [],
      "expected": "pair",
      "actual": "empty-list"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "firstFailureSite": "inner-car-argument",
  "outerCallEntered": false
}
Product invocation

Expected result

The inner car call fails on the empty list before the outer call can report an arity failure. Product invocation awaits its 2.0 adapter.

Evaluation first computes the arguments in their defined order. The inner call determines the first failure. The site label is documentation notation for its canonical program site.

See Diagnostic catalog and reports, Concrete command forms, Canonical codec bytes, Concrete entry declaration and admission, Typed calls and value encoding.

Validate searchable data before finding an early match

lispex.example.v2.standard-library.membership-validation · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (choice)
      (cond
        ((= choice 0) (member 2 '(1 2 3)))
        ((= choice 1) (member 9 '(1 2 3)))
        ((= choice 2) (assoc "x" (list (cons "a" 1) (cons "x" 2))))
        ((= choice 3) (assoc "none" (list (cons "a" 1) (cons "x" 2))))
        ((= choice 4) (member 1 (list 1 (lambda (x) x))))
        ((= choice 5) (assoc "x" (list (cons "x" 1) (cons (lambda (x) x) 2))))
        (else (member (lambda (x) x) (cons 1 2))))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "1"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "2"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "3"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "4"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "5"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "6"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result(2 3)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": [
      {
        "kind": "integer",
        "value": "2"
      },
      {
        "kind": "integer",
        "value": "3"
      }
    ]
  }
}
Result#f
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "boolean",
    "value": false
  }
}
Result("x" . 2)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "pair",
    "car": {
      "kind": "string",
      "value": "x"
    },
    "cdr": {
      "kind": "integer",
      "value": "2"
    }
  }
}
Result#f
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "boolean",
    "value": false
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "member",
      "argument": "1",
      "path": [
        {
          "kind": "cdr"
        },
        {
          "kind": "car"
        }
      ],
      "expected": "datum",
      "actual": "procedure"
    }
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "assoc",
      "argument": "1",
      "path": [
        {
          "kind": "cdr"
        },
        {
          "kind": "car"
        },
        {
          "kind": "car"
        }
      ],
      "expected": "datum",
      "actual": "procedure"
    }
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "member",
      "argument": "0",
      "path": [],
      "expected": "datum",
      "actual": "procedure"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "searchStarted": [
    true,
    true,
    true,
    true,
    false,
    false,
    false
  ]
}
Product invocation

Expected result

Missing matches return false. A procedure in a later searchable element or key fails validation before an earlier matching key can be returned. Product invocation awaits its 2.0 adapter.

Assoc requires portable keys while allowing arbitrary internal cdr values. The final request fails its needle before examining the improper list.

Reserve each constructed list position

lispex.example.v2.standard-library.make-list-event-traces · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (let ((result
              (make-list input 7)))
        result)))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ],
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the complete request unless a case selects a refusal"
  },
  "requests": [
    {
      "case": "two-pairs",
      "input": {
        "kind": "integer",
        "value": "2"
      }
    },
    {
      "case": "zero-count",
      "input": {
        "kind": "integer",
        "value": "0"
      }
    },
    {
      "case": "negative-count",
      "input": {
        "kind": "integer",
        "value": "-1"
      }
    },
    {
      "case": "large-count-first-pair-stop",
      "input": {
        "kind": "integer",
        "value": "340282366920938463463374607431768211456"
      },
      "resourceBoundary": {
        "event": "datum-allocate",
        "fixtureSite": "make-list-call",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "0"
          }
        ],
        "axis": "allocation",
        "earlierReservations": "succeed",
        "selectedReservation": "insufficient remaining allocation for the complete first pair",
        "otherAxes": "sufficient"
      }
    }
  ],
  "fixtureSites": {
    "make-list-call": "The make-list call in the initializer of result."
  },
  "traceScope": {
    "start": "callable-check after completed operator and operand evaluation",
    "end": "call-return or the committed first failure",
    "selectedCalls": "all mapped calls are in the initializer of result and are nontail",
    "otherRequestEvents": "retain their declared reservations outside this call trace"
  }
}
Event account · make-list
two-pairs · 2 7
make-list · two-pairs
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"make-list-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"make-list-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"make-list-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"make-list-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5argument-checkargument(1){"fixtureSite":"make-list-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
6traversal-stateresult(0) element(0){"fixtureSite":"make-list-call","role":"traversal-state","path":[{"kind":"result","index":"0"},{"kind":"element","index":"0"}]}1
7datum-allocateresult(0) element(0){"fixtureSite":"make-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"0"}]}2
8traversal-stateresult(0) element(1){"fixtureSite":"make-list-call","role":"traversal-state","path":[{"kind":"result","index":"0"},{"kind":"element","index":"1"}]}1
9datum-allocateresult(0) element(1){"fixtureSite":"make-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"1"}]}2
10call-returncall{"fixtureSite":"make-list-call","role":"call-return","path":[]}null
Result(7 7)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": [
      {
        "kind": "integer",
        "value": "7"
      },
      {
        "kind": "integer",
        "value": "7"
      }
    ]
  }
}
Trace details 1
{
  "case": "two-pairs",
  "operation": "make-list",
  "arguments": [
    {
      "kind": "integer",
      "value": "2"
    },
    {
      "kind": "integer",
      "value": "7"
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "make-list"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "U"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "V"
        },
        "status": "accepted"
      }
    },
    {
      "event": "traversal-state",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "traversal-state",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "cursor-position",
          "resultIndex": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "2",
        "inputs": {
          "shape": "pair",
          "resultIndex": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "traversal-state",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "traversal-state",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "cursor-position",
          "resultIndex": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": "2",
        "inputs": {
          "shape": "pair",
          "resultIndex": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "list",
      "items": [
        {
          "kind": "integer",
          "value": "7"
        },
        {
          "kind": "integer",
          "value": "7"
        }
      ]
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · make-list
zero-count · 0 7
make-list · zero-count
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"make-list-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"make-list-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"make-list-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"make-list-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5argument-checkargument(1){"fixtureSite":"make-list-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
6call-returncall{"fixtureSite":"make-list-call","role":"call-return","path":[]}null
Result()
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": []
  }
}
Trace details 2
{
  "case": "zero-count",
  "operation": "make-list",
  "arguments": [
    {
      "kind": "integer",
      "value": "0"
    },
    {
      "kind": "integer",
      "value": "7"
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "make-list"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "U"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "V"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "list",
      "items": []
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · make-list
negative-count · -1 7
make-list · negative-count
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"make-list-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"make-list-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"make-list-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"make-list-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5diagnostic-payloadargument(0){"fixtureSite":"make-list-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"0"}]}null
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "make-list",
      "argument": "0",
      "reason": "negative-count"
    }
  }
}
Trace details 3
{
  "case": "negative-count",
  "operation": "make-list",
  "arguments": [
    {
      "kind": "integer",
      "value": "-1"
    },
    {
      "kind": "integer",
      "value": "7"
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "make-list"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "U"
        },
        "status": "accepted"
      }
    },
    {
      "event": "diagnostic-payload",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "diagnostic-payload",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "condition": {
            "phase": "evaluate",
            "code": "domain.range",
            "data": {
              "operation": "make-list",
              "argument": "0",
              "reason": "negative-count"
            }
          },
          "codec": "the selected complete diagnostic codec"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "language-failure",
    "valueCount": 0,
    "condition": {
      "phase": "evaluate",
      "code": "domain.range",
      "data": {
        "operation": "make-list",
        "argument": "0",
        "reason": "negative-count"
      }
    }
  },
  "failureSite": {
    "fixtureSite": "make-list-call",
    "role": "argument-check",
    "path": [
      {
        "kind": "argument",
        "index": "0"
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · make-list
large-count-first-pair-stop · 340282366920938463463374607431768211456 7
make-list · large-count-first-pair-stop
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"make-list-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"make-list-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"make-list-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"make-list-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5argument-checkargument(1){"fixtureSite":"make-list-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
6traversal-stateresult(0) element(0){"fixtureSite":"make-list-call","role":"traversal-state","path":[{"kind":"result","index":"0"},{"kind":"element","index":"0"}]}1
7datum-allocateresult(0) element(0){"fixtureSite":"make-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"0"}]}2
Resultresource-stop · allocation
Outcome details
{
  "kind": "resource-stop",
  "valueCount": 0,
  "terminal": true,
  "axis": "allocation",
  "operation": "make-list",
  "event": "datum-allocate",
  "site": {
    "fixtureSite": "make-list-call",
    "role": "datum-allocate",
    "path": [
      {
        "kind": "result",
        "index": "0"
      },
      {
        "kind": "element",
        "index": "0"
      }
    ]
  },
  "diagnosticIdentity": {
    "phase": "evaluate",
    "code": "resource.exhausted"
  },
  "partialResult": false
}
Trace details 4
{
  "case": "large-count-first-pair-stop",
  "operation": "make-list",
  "arguments": [
    {
      "kind": "integer",
      "value": "340282366920938463463374607431768211456"
    },
    {
      "kind": "integer",
      "value": "7"
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "make-list"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "U"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "V"
        },
        "status": "accepted"
      }
    },
    {
      "event": "traversal-state",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "traversal-state",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "cursor-position",
          "resultIndex": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "2",
        "inputs": {
          "shape": "pair",
          "resultIndex": "0"
        },
        "status": "refused"
      }
    }
  ],
  "outcome": {
    "kind": "resource-stop",
    "valueCount": 0,
    "terminal": true,
    "axis": "allocation",
    "operation": "make-list",
    "event": "datum-allocate",
    "site": {
      "fixtureSite": "make-list-call",
      "role": "datum-allocate",
      "path": [
        {
          "kind": "result",
          "index": "0"
        },
        {
          "kind": "element",
          "index": "0"
        }
      ]
    },
    "diagnosticIdentity": {
      "phase": "evaluate",
      "code": "resource.exhausted"
    },
    "partialResult": false
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "outcomes": [
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "list",
        "items": [
          {
            "kind": "integer",
            "value": "7"
          },
          {
            "kind": "integer",
            "value": "7"
          }
        ]
      }
    },
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "list",
        "items": []
      }
    },
    {
      "kind": "language-failure",
      "valueCount": 0,
      "condition": {
        "phase": "evaluate",
        "code": "domain.range",
        "data": {
          "operation": "make-list",
          "argument": "0",
          "reason": "negative-count"
        }
      }
    },
    {
      "kind": "resource-stop",
      "valueCount": 0,
      "terminal": true,
      "axis": "allocation",
      "operation": "make-list",
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "make-list-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "0"
          }
        ]
      },
      "diagnosticIdentity": {
        "phase": "evaluate",
        "code": "resource.exhausted"
      },
      "partialResult": false
    }
  ]
}
Product invocation

Expected result

Make-list checks both arguments before repeating one cursor reservation and one pair reservation per result index. Zero count keeps both domain checks. A negative count fails first. A count above fixed host word widths reaches the selected first pair refusal with no new domain limit. Product invocation awaits its 2.0 adapter.

Make-list checks both arguments before repeating one cursor reservation and one pair reservation per result index. Zero count keeps both domain checks. A negative count fails first. A count above fixed host word widths reaches the selected first pair refusal with no new domain limit.

Each table gives the complete selected call trace from callable-check after operand evaluation through call-return or the committed failure. Every selected call is nontail. Input decoding, module initialization, operand evaluation, the enclosing let, and result encoding retain their own events in the complete request. The trace does not remove their charges.

The request maps each fixtureSite label to one call occurrence. Every row uses that occurrence and its event name as the site role. The path column gives its complete suffix. Extent counts created or retained semantic components. A dash means null, with the complete event reservation still required. Extent zero is an empty aggregate reservation, not a zero charge. The selected model supplies every complete requirement vector.

two-pairs uses make-list at make-list-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"make-list"}accepted
2arity-checkempty—{"suppliedArguments":"2"}accepted
3callempty—{"suppliedArguments":"2","tail":false}accepted
4argument-checkargument(0)—{"domain":"U"}accepted
5argument-checkargument(1)—{"domain":"V"}accepted
6traversal-stateresult(0), element(0)1{"shape":"cursor-position","resultIndex":"0"}accepted
7datum-allocateresult(0), element(0)2{"shape":"pair","resultIndex":"0"}accepted
8traversal-stateresult(0), element(1)1{"shape":"cursor-position","resultIndex":"1"}accepted
9datum-allocateresult(0), element(1)2{"shape":"pair","resultIndex":"1"}accepted
10call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"list","items":[{"kind":"integer","value":"7"},{"kind":"integer","value":"7"}]}}.

zero-count uses make-list at make-list-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"make-list"}accepted
2arity-checkempty—{"suppliedArguments":"2"}accepted
3callempty—{"suppliedArguments":"2","tail":false}accepted
4argument-checkargument(0)—{"domain":"U"}accepted
5argument-checkargument(1)—{"domain":"V"}accepted
6call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"list","items":[]}}.

negative-count uses make-list at make-list-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"make-list"}accepted
2arity-checkempty—{"suppliedArguments":"2"}accepted
3callempty—{"suppliedArguments":"2","tail":false}accepted
4argument-checkargument(0)—{"domain":"U"}accepted
5diagnostic-payloadargument(0)—{"condition":{"phase":"evaluate","code":"domain.range","data":{"operation":"make-list","argument":"0","reason":"negative-count"}},"codec":"the selected complete diagnostic codec"}accepted

The outcome is {"kind":"language-failure","valueCount":0,"condition":{"phase":"evaluate","code":"domain.range","data":{"operation":"make-list","argument":"0","reason":"negative-count"}}}. The detecting failure site has role argument-check and path argument(0).

large-count-first-pair-stop uses make-list at make-list-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"make-list"}accepted
2arity-checkempty—{"suppliedArguments":"2"}accepted
3callempty—{"suppliedArguments":"2","tail":false}accepted
4argument-checkargument(0)—{"domain":"U"}accepted
5argument-checkargument(1)—{"domain":"V"}accepted
6traversal-stateresult(0), element(0)1{"shape":"cursor-position","resultIndex":"0"}accepted
7datum-allocateresult(0), element(0)2{"shape":"pair","resultIndex":"0"}refused

The outcome is {"kind":"resource-stop","valueCount":0,"terminal":true,"axis":"allocation","operation":"make-list","event":"datum-allocate","site":{"fixtureSite":"make-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"0"}]},"diagnosticIdentity":{"phase":"evaluate","code":"resource.exhausted"},"partialResult":false}.

Visit only the selected list components

lispex.example.v2.standard-library.list-index-event-traces · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (let ((result
              (cond
                ((= input 0) (list-ref '(7 8) 1))
                ((= input 1) (list-tail '(7 8) 0))
                ((= input 2) (list-tail '(7 8) 2))
                ((= input 3) (list-ref '(7 8) 2))
                ((= input 4) (list-tail '(7 . 8) 0))
                (else (list-ref '(7 8) 0)))))
        result)))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ],
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the complete request unless a case selects a refusal"
  },
  "requests": [
    {
      "case": "ref-one",
      "input": {
        "kind": "integer",
        "value": "0"
      }
    },
    {
      "case": "tail-zero",
      "input": {
        "kind": "integer",
        "value": "1"
      }
    },
    {
      "case": "tail-end",
      "input": {
        "kind": "integer",
        "value": "2"
      }
    },
    {
      "case": "ref-end",
      "input": {
        "kind": "integer",
        "value": "3"
      }
    },
    {
      "case": "improper-before-index",
      "input": {
        "kind": "integer",
        "value": "4"
      }
    },
    {
      "case": "ref-zero",
      "input": {
        "kind": "integer",
        "value": "5"
      }
    }
  ],
  "fixtureSites": {
    "ref-one-call": "The list-ref call with literal index 1 in the result initializer.",
    "tail-zero-call": "The list-tail call on '(7 8) with literal index 0 in the result initializer.",
    "tail-end-call": "The list-tail call with literal index 2 in the result initializer.",
    "ref-end-call": "The list-ref call with literal index 2 in the result initializer.",
    "improper-call": "The list-tail call on '(7 . 8) in the result initializer.",
    "ref-zero-call": "The list-ref call with literal index 0 in the result initializer."
  },
  "traceScope": {
    "start": "callable-check after completed operator and operand evaluation",
    "end": "call-return or the committed first failure",
    "selectedCalls": "all mapped calls are in the initializer of result and are nontail",
    "otherRequestEvents": "retain their declared reservations outside this call trace"
  }
}
Event account · list-ref
ref-one · (7 8) 1
list-ref · ref-one
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"ref-one-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"ref-one-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"ref-one-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"ref-one-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5list-stepargument(0){"fixtureSite":"ref-one-call","role":"list-step","path":[{"kind":"argument","index":"0"}]}null
6list-stepargument(0) {"kind":"cdr"}{"fixtureSite":"ref-one-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]}null
7list-stepargument(0) {"kind":"cdr"} {"kind":"cdr"}{"fixtureSite":"ref-one-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"},{"kind":"cdr"}]}null
8argument-checkargument(1){"fixtureSite":"ref-one-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
9argument-checkargument(1){"fixtureSite":"ref-one-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
10list-stepargument(0) {"kind":"cdr"}{"fixtureSite":"ref-one-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]}null
11list-stepargument(0) {"kind":"cdr"} {"kind":"car"}{"fixtureSite":"ref-one-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"},{"kind":"car"}]}null
12call-returncall{"fixtureSite":"ref-one-call","role":"call-return","path":[]}null
Result8
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "integer",
    "value": "8"
  }
}
Trace details 1
{
  "case": "ref-one",
  "operation": "list-ref",
  "arguments": [
    {
      "kind": "list",
      "items": [
        {
          "kind": "integer",
          "value": "7"
        },
        {
          "kind": "integer",
          "value": "8"
        }
      ]
    },
    {
      "kind": "integer",
      "value": "1"
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "ref-one-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "list-ref"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "ref-one-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "ref-one-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "ref-one-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "L"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "ref-one-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "pair"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "ref-one-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "pair"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "ref-one-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "empty-list"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "ref-one-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "I"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "ref-one-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "constraint": "0 <= index < length",
          "index": "1",
          "length": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "ref-one-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "selectedComponent": "cdr"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "ref-one-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          },
          {
            "kind": "car"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "selectedComponent": "car",
          "value": {
            "kind": "integer",
            "value": "8"
          }
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "ref-one-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "integer",
      "value": "8"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · list-tail
tail-zero · (7 8) 0
list-tail · tail-zero
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"tail-zero-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"tail-zero-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"tail-zero-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"tail-zero-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5list-stepargument(0){"fixtureSite":"tail-zero-call","role":"list-step","path":[{"kind":"argument","index":"0"}]}null
6list-stepargument(0) {"kind":"cdr"}{"fixtureSite":"tail-zero-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]}null
7list-stepargument(0) {"kind":"cdr"} {"kind":"cdr"}{"fixtureSite":"tail-zero-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"},{"kind":"cdr"}]}null
8argument-checkargument(1){"fixtureSite":"tail-zero-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
9argument-checkargument(1){"fixtureSite":"tail-zero-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
10call-returncall{"fixtureSite":"tail-zero-call","role":"call-return","path":[]}null
Result(7 8)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": [
      {
        "kind": "integer",
        "value": "7"
      },
      {
        "kind": "integer",
        "value": "8"
      }
    ]
  }
}
Trace details 2
{
  "case": "tail-zero",
  "operation": "list-tail",
  "arguments": [
    {
      "kind": "list",
      "items": [
        {
          "kind": "integer",
          "value": "7"
        },
        {
          "kind": "integer",
          "value": "8"
        }
      ]
    },
    {
      "kind": "integer",
      "value": "0"
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "tail-zero-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "list-tail"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "tail-zero-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "tail-zero-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "tail-zero-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "L"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "tail-zero-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "pair"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "tail-zero-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "pair"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "tail-zero-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "empty-list"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "tail-zero-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "I"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "tail-zero-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "constraint": "0 <= index <= length",
          "index": "0",
          "length": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "tail-zero-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "list",
      "items": [
        {
          "kind": "integer",
          "value": "7"
        },
        {
          "kind": "integer",
          "value": "8"
        }
      ]
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · list-tail
tail-end · (7 8) 2
list-tail · tail-end
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"tail-end-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"tail-end-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"tail-end-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"tail-end-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5list-stepargument(0){"fixtureSite":"tail-end-call","role":"list-step","path":[{"kind":"argument","index":"0"}]}null
6list-stepargument(0) {"kind":"cdr"}{"fixtureSite":"tail-end-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]}null
7list-stepargument(0) {"kind":"cdr"} {"kind":"cdr"}{"fixtureSite":"tail-end-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"},{"kind":"cdr"}]}null
8argument-checkargument(1){"fixtureSite":"tail-end-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
9argument-checkargument(1){"fixtureSite":"tail-end-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
10list-stepargument(0) {"kind":"cdr"}{"fixtureSite":"tail-end-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]}null
11list-stepargument(0) {"kind":"cdr"} {"kind":"cdr"}{"fixtureSite":"tail-end-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"},{"kind":"cdr"}]}null
12call-returncall{"fixtureSite":"tail-end-call","role":"call-return","path":[]}null
Result()
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": []
  }
}
Trace details 3
{
  "case": "tail-end",
  "operation": "list-tail",
  "arguments": [
    {
      "kind": "list",
      "items": [
        {
          "kind": "integer",
          "value": "7"
        },
        {
          "kind": "integer",
          "value": "8"
        }
      ]
    },
    {
      "kind": "integer",
      "value": "2"
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "tail-end-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "list-tail"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "tail-end-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "tail-end-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "tail-end-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "L"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "tail-end-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "pair"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "tail-end-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "pair"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "tail-end-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "empty-list"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "tail-end-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "I"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "tail-end-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "constraint": "0 <= index <= length",
          "index": "2",
          "length": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "tail-end-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "selectedComponent": "cdr"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "tail-end-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "selectedComponent": "cdr"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "tail-end-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "list",
      "items": []
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · list-ref
ref-end · (7 8) 2
list-ref · ref-end
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"ref-end-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"ref-end-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"ref-end-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"ref-end-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5list-stepargument(0){"fixtureSite":"ref-end-call","role":"list-step","path":[{"kind":"argument","index":"0"}]}null
6list-stepargument(0) {"kind":"cdr"}{"fixtureSite":"ref-end-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]}null
7list-stepargument(0) {"kind":"cdr"} {"kind":"cdr"}{"fixtureSite":"ref-end-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"},{"kind":"cdr"}]}null
8argument-checkargument(1){"fixtureSite":"ref-end-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
9argument-checkargument(1){"fixtureSite":"ref-end-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
10diagnostic-payloadargument(1){"fixtureSite":"ref-end-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"1"}]}null
Conditiondomain.index
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.index",
    "data": {
      "operation": "list-ref",
      "argument": "1",
      "index": "2",
      "length": "2"
    }
  }
}
Trace details 4
{
  "case": "ref-end",
  "operation": "list-ref",
  "arguments": [
    {
      "kind": "list",
      "items": [
        {
          "kind": "integer",
          "value": "7"
        },
        {
          "kind": "integer",
          "value": "8"
        }
      ]
    },
    {
      "kind": "integer",
      "value": "2"
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "ref-end-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "list-ref"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "ref-end-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "ref-end-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "ref-end-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "L"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "ref-end-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "pair"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "ref-end-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "pair"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "ref-end-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "empty-list"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "ref-end-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "I"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "ref-end-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "constraint": "0 <= index < length",
          "index": "2",
          "length": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "diagnostic-payload",
      "site": {
        "fixtureSite": "ref-end-call",
        "role": "diagnostic-payload",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "condition": {
            "phase": "evaluate",
            "code": "domain.index",
            "data": {
              "operation": "list-ref",
              "argument": "1",
              "index": "2",
              "length": "2"
            }
          },
          "codec": "the selected complete diagnostic codec"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "language-failure",
    "valueCount": 0,
    "condition": {
      "phase": "evaluate",
      "code": "domain.index",
      "data": {
        "operation": "list-ref",
        "argument": "1",
        "index": "2",
        "length": "2"
      }
    }
  },
  "failureSite": {
    "fixtureSite": "ref-end-call",
    "role": "argument-check",
    "path": [
      {
        "kind": "argument",
        "index": "1"
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · list-tail
improper-before-index · (7 . 8) 0
list-tail · improper-before-index
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"improper-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"improper-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"improper-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"improper-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5list-stepargument(0){"fixtureSite":"improper-call","role":"list-step","path":[{"kind":"argument","index":"0"}]}null
6list-stepargument(0) {"kind":"cdr"}{"fixtureSite":"improper-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]}null
7diagnostic-payloadargument(0) {"kind":"cdr"}{"fixtureSite":"improper-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]}null
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "list-tail",
      "argument": "0",
      "path": [
        {
          "kind": "cdr"
        }
      ],
      "expected": "proper-list",
      "actual": "integer"
    }
  }
}
Trace details 5
{
  "case": "improper-before-index",
  "operation": "list-tail",
  "arguments": [
    {
      "kind": "pair",
      "car": {
        "kind": "integer",
        "value": "7"
      },
      "cdr": {
        "kind": "integer",
        "value": "8"
      }
    },
    {
      "kind": "integer",
      "value": "0"
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "improper-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "list-tail"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "improper-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "improper-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "improper-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "L"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "improper-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "pair"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "improper-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "integer",
          "value": {
            "kind": "integer",
            "value": "8"
          }
        },
        "status": "accepted"
      }
    },
    {
      "event": "diagnostic-payload",
      "site": {
        "fixtureSite": "improper-call",
        "role": "diagnostic-payload",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "condition": {
            "phase": "evaluate",
            "code": "domain.type",
            "data": {
              "operation": "list-tail",
              "argument": "0",
              "path": [
                {
                  "kind": "cdr"
                }
              ],
              "expected": "proper-list",
              "actual": "integer"
            }
          },
          "codec": "the selected complete diagnostic codec"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "language-failure",
    "valueCount": 0,
    "condition": {
      "phase": "evaluate",
      "code": "domain.type",
      "data": {
        "operation": "list-tail",
        "argument": "0",
        "path": [
          {
            "kind": "cdr"
          }
        ],
        "expected": "proper-list",
        "actual": "integer"
      }
    }
  },
  "failureSite": {
    "fixtureSite": "improper-call",
    "role": "list-step",
    "path": [
      {
        "kind": "argument",
        "index": "0"
      },
      {
        "kind": "cdr"
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · list-ref
ref-zero · (7 8) 0
list-ref · ref-zero
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"ref-zero-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"ref-zero-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"ref-zero-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"ref-zero-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5list-stepargument(0){"fixtureSite":"ref-zero-call","role":"list-step","path":[{"kind":"argument","index":"0"}]}null
6list-stepargument(0) {"kind":"cdr"}{"fixtureSite":"ref-zero-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]}null
7list-stepargument(0) {"kind":"cdr"} {"kind":"cdr"}{"fixtureSite":"ref-zero-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"},{"kind":"cdr"}]}null
8argument-checkargument(1){"fixtureSite":"ref-zero-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
9argument-checkargument(1){"fixtureSite":"ref-zero-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
10list-stepargument(0) {"kind":"car"}{"fixtureSite":"ref-zero-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"car"}]}null
11call-returncall{"fixtureSite":"ref-zero-call","role":"call-return","path":[]}null
Result7
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "integer",
    "value": "7"
  }
}
Trace details 6
{
  "case": "ref-zero",
  "operation": "list-ref",
  "arguments": [
    {
      "kind": "list",
      "items": [
        {
          "kind": "integer",
          "value": "7"
        },
        {
          "kind": "integer",
          "value": "8"
        }
      ]
    },
    {
      "kind": "integer",
      "value": "0"
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "ref-zero-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "list-ref"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "ref-zero-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "ref-zero-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "ref-zero-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "L"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "ref-zero-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "pair"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "ref-zero-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "pair"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "ref-zero-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "cdr"
          },
          {
            "kind": "cdr"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "spineValue": "empty-list"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "ref-zero-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "I"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "ref-zero-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "constraint": "0 <= index < length",
          "index": "0",
          "length": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "list-step",
      "site": {
        "fixtureSite": "ref-zero-call",
        "role": "list-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "car"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "selectedComponent": "car",
          "value": {
            "kind": "integer",
            "value": "7"
          }
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "ref-zero-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "integer",
      "value": "7"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "outcomes": [
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "integer",
        "value": "8"
      }
    },
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "list",
        "items": [
          {
            "kind": "integer",
            "value": "7"
          },
          {
            "kind": "integer",
            "value": "8"
          }
        ]
      }
    },
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "list",
        "items": []
      }
    },
    {
      "kind": "language-failure",
      "valueCount": 0,
      "condition": {
        "phase": "evaluate",
        "code": "domain.index",
        "data": {
          "operation": "list-ref",
          "argument": "1",
          "index": "2",
          "length": "2"
        }
      }
    },
    {
      "kind": "language-failure",
      "valueCount": 0,
      "condition": {
        "phase": "evaluate",
        "code": "domain.type",
        "data": {
          "operation": "list-tail",
          "argument": "0",
          "path": [
            {
              "kind": "cdr"
            }
          ],
          "expected": "proper-list",
          "actual": "integer"
        }
      }
    },
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "integer",
        "value": "7"
      }
    }
  ]
}
Product invocation

Expected result

List access validates the entire spine before the index and its bounds. Each cdr movement is a separate later visit. List-ref also visits the selected car. List-tail zero makes no later movement. An improper tail fails before checking the index. Product invocation awaits its 2.0 adapter.

List access validates the entire spine before the index and its bounds. Each cdr movement is a separate later visit. List-ref also visits the selected car. List-tail zero makes no later movement. An improper tail fails before checking the index.

Each table gives the complete selected call trace from callable-check after operand evaluation through call-return or the committed failure. Every selected call is nontail. Input decoding, module initialization, operand evaluation, the enclosing let, and result encoding retain their own events in the complete request. The trace does not remove their charges.

The request maps each fixtureSite label to one call occurrence. Every row uses that occurrence and its event name as the site role. The path column gives its complete suffix. Extent counts created or retained semantic components. A dash means null, with the complete event reservation still required. Extent zero is an empty aggregate reservation, not a zero charge. The selected model supplies every complete requirement vector.

ref-one uses list-ref at ref-one-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"list-ref"}accepted
2arity-checkempty—{"suppliedArguments":"2"}accepted
3callempty—{"suppliedArguments":"2","tail":false}accepted
4argument-checkargument(0)—{"domain":"L"}accepted
5list-stepargument(0)—{"spineValue":"pair"}accepted
6list-stepargument(0), cdr—{"spineValue":"pair"}accepted
7list-stepargument(0), cdr, cdr—{"spineValue":"empty-list"}accepted
8argument-checkargument(1)—{"domain":"I"}accepted
9argument-checkargument(1)—{"constraint":"0 <= index < length","index":"1","length":"2"}accepted
10list-stepargument(0), cdr—{"selectedComponent":"cdr"}accepted
11list-stepargument(0), cdr, car—{"selectedComponent":"car","value":{"kind":"integer","value":"8"}}accepted
12call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"integer","value":"8"}}.

tail-zero uses list-tail at tail-zero-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"list-tail"}accepted
2arity-checkempty—{"suppliedArguments":"2"}accepted
3callempty—{"suppliedArguments":"2","tail":false}accepted
4argument-checkargument(0)—{"domain":"L"}accepted
5list-stepargument(0)—{"spineValue":"pair"}accepted
6list-stepargument(0), cdr—{"spineValue":"pair"}accepted
7list-stepargument(0), cdr, cdr—{"spineValue":"empty-list"}accepted
8argument-checkargument(1)—{"domain":"I"}accepted
9argument-checkargument(1)—{"constraint":"0 <= index <= length","index":"0","length":"2"}accepted
10call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"list","items":[{"kind":"integer","value":"7"},{"kind":"integer","value":"8"}]}}.

tail-end uses list-tail at tail-end-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"list-tail"}accepted
2arity-checkempty—{"suppliedArguments":"2"}accepted
3callempty—{"suppliedArguments":"2","tail":false}accepted
4argument-checkargument(0)—{"domain":"L"}accepted
5list-stepargument(0)—{"spineValue":"pair"}accepted
6list-stepargument(0), cdr—{"spineValue":"pair"}accepted
7list-stepargument(0), cdr, cdr—{"spineValue":"empty-list"}accepted
8argument-checkargument(1)—{"domain":"I"}accepted
9argument-checkargument(1)—{"constraint":"0 <= index <= length","index":"2","length":"2"}accepted
10list-stepargument(0), cdr—{"selectedComponent":"cdr"}accepted
11list-stepargument(0), cdr, cdr—{"selectedComponent":"cdr"}accepted
12call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"list","items":[]}}.

ref-end uses list-ref at ref-end-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"list-ref"}accepted
2arity-checkempty—{"suppliedArguments":"2"}accepted
3callempty—{"suppliedArguments":"2","tail":false}accepted
4argument-checkargument(0)—{"domain":"L"}accepted
5list-stepargument(0)—{"spineValue":"pair"}accepted
6list-stepargument(0), cdr—{"spineValue":"pair"}accepted
7list-stepargument(0), cdr, cdr—{"spineValue":"empty-list"}accepted
8argument-checkargument(1)—{"domain":"I"}accepted
9argument-checkargument(1)—{"constraint":"0 <= index < length","index":"2","length":"2"}accepted
10diagnostic-payloadargument(1)—{"condition":{"phase":"evaluate","code":"domain.index","data":{"operation":"list-ref","argument":"1","index":"2","length":"2"}},"codec":"the selected complete diagnostic codec"}accepted

The outcome is {"kind":"language-failure","valueCount":0,"condition":{"phase":"evaluate","code":"domain.index","data":{"operation":"list-ref","argument":"1","index":"2","length":"2"}}}. The detecting failure site has role argument-check and path argument(1).

improper-before-index uses list-tail at improper-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"list-tail"}accepted
2arity-checkempty—{"suppliedArguments":"2"}accepted
3callempty—{"suppliedArguments":"2","tail":false}accepted
4argument-checkargument(0)—{"domain":"L"}accepted
5list-stepargument(0)—{"spineValue":"pair"}accepted
6list-stepargument(0), cdr—{"spineValue":"integer","value":{"kind":"integer","value":"8"}}accepted
7diagnostic-payloadargument(0), cdr—{"condition":{"phase":"evaluate","code":"domain.type","data":{"operation":"list-tail","argument":"0","path":[{"kind":"cdr"}],"expected":"proper-list","actual":"integer"}},"codec":"the selected complete diagnostic codec"}accepted

The outcome is {"kind":"language-failure","valueCount":0,"condition":{"phase":"evaluate","code":"domain.type","data":{"operation":"list-tail","argument":"0","path":[{"kind":"cdr"}],"expected":"proper-list","actual":"integer"}}}. The detecting failure site has role list-step and path argument(0), cdr.

ref-zero uses list-ref at ref-zero-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"list-ref"}accepted
2arity-checkempty—{"suppliedArguments":"2"}accepted
3callempty—{"suppliedArguments":"2","tail":false}accepted
4argument-checkargument(0)—{"domain":"L"}accepted
5list-stepargument(0)—{"spineValue":"pair"}accepted
6list-stepargument(0), cdr—{"spineValue":"pair"}accepted
7list-stepargument(0), cdr, cdr—{"spineValue":"empty-list"}accepted
8argument-checkargument(1)—{"domain":"I"}accepted
9argument-checkargument(1)—{"constraint":"0 <= index < length","index":"0","length":"2"}accepted
10list-stepargument(0), car—{"selectedComponent":"car","value":{"kind":"integer","value":"7"}}accepted
11call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"integer","value":"7"}}.

Numbers and text

Exact numbers defines integers, rationals, decimal notation, scale, and rounding. Values and text defines equality and Unicode text. Public procedures use those definitions.

The native kernel can implement the arithmetic and text leaves needed by guest code. Work for large arithmetic, text traversal, and encoding remains subject to the common resource model.

9.5 Use the exact numeric contract

Numeric library procedures apply the exact arithmetic, decimal value, and explicit rounding rules.

Why

A library call must preserve the chosen value across products and architectures. An implicit host floating conversion would change that value.

Add exact decimal values

lispex.example.v2.standard-library.exact-decimal-sum · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (+ 0.1 0.2)))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result3/10
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "rational",
    "numerator": "3",
    "denominator": "10"
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

The sum is the exact rational 3 divided by 10. Product invocation awaits its 2.0 adapter.

Both literals denote exact numbers. The rational notation describes the value and leaves the canonical wire representation to value interchange.

9.6 Use the specified text semantics

Text library procedures apply the raw Unicode rule. A declared text transformation uses the exact version and operation specified there.

Why

Implicit normalization can merge different input values. A host Unicode library cannot silently select a different language result.

Keep different scalar sequences distinct

lispex.example.v2.standard-library.raw-scalar-text · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (equal? "é" "é")))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result#f
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "boolean",
    "value": false
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

The comparison returns false because the two strings contain different scalar sequences. Product invocation awaits its 2.0 adapter.

The first string contains U+00E9. The second contains U+0065 followed by U+0301. Their display can look alike while their values remain different.

Calculate exact integer and rational library results

lispex.example.v2.standard-library.numeric-catalog-results · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (list (+) (*) (gcd) (lcm)
            (quotient -7 3) (remainder -7 3) (modulo -7 3)
            (quotient 7 -3) (remainder 7 -3) (modulo 7 -3)
            (gcd -12 0) (lcm 6 -15)
            (expt 2/3 -2) (expt -2 3) (expt 0 0)
            (abs -5/4) (numerator -5/4) (denominator -5/4)
            (number->string 1.50) (number->string -5/4) (number->string 0))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": []
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result(0 1 0 1 -2 -1 2 -2 1 -2 12 30 9/4 -8 1 5/4 -5 4 "3/2" "-5/4" "0")
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": [
      {
        "kind": "integer",
        "value": "0"
      },
      {
        "kind": "integer",
        "value": "1"
      },
      {
        "kind": "integer",
        "value": "0"
      },
      {
        "kind": "integer",
        "value": "1"
      },
      {
        "kind": "integer",
        "value": "-2"
      },
      {
        "kind": "integer",
        "value": "-1"
      },
      {
        "kind": "integer",
        "value": "2"
      },
      {
        "kind": "integer",
        "value": "-2"
      },
      {
        "kind": "integer",
        "value": "1"
      },
      {
        "kind": "integer",
        "value": "-2"
      },
      {
        "kind": "integer",
        "value": "12"
      },
      {
        "kind": "integer",
        "value": "30"
      },
      {
        "kind": "rational",
        "numerator": "9",
        "denominator": "4"
      },
      {
        "kind": "integer",
        "value": "-8"
      },
      {
        "kind": "integer",
        "value": "1"
      },
      {
        "kind": "rational",
        "numerator": "5",
        "denominator": "4"
      },
      {
        "kind": "integer",
        "value": "-5"
      },
      {
        "kind": "integer",
        "value": "4"
      },
      {
        "kind": "string",
        "value": "3/2"
      },
      {
        "kind": "string",
        "value": "-5/4"
      },
      {
        "kind": "string",
        "value": "0"
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

The signed integer operations follow their declared quotient and remainder rules. Numeric text uses canonical exact values. Product invocation awaits its 2.0 adapter.

The examples include both divisor signs, empty reductions, negative exponents, zero to the zero power, and a decimal source spelling.

Validate later arguments before an early numeric or text result

lispex.example.v2.standard-library.comparison-domain-order · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (choice)
      (cond
        ((= choice 0) (= 1 2 "bad"))
        ((= choice 1) (/ 10 0 "bad"))
        ((= choice 2) (* 0 "bad"))
        ((= choice 3) (string-ci=? "a" "b" 7))
        (else (string<? "z" "a" #f)))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "1"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "2"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "3"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "4"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "=",
      "argument": "2",
      "path": [],
      "expected": "number",
      "actual": "string"
    }
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "/",
      "argument": "2",
      "path": [],
      "expected": "number",
      "actual": "string"
    }
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "*",
      "argument": "1",
      "path": [],
      "expected": "number",
      "actual": "string"
    }
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "string-ci=?",
      "argument": "2",
      "path": [],
      "expected": "string",
      "actual": "integer"
    }
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "string<?",
      "argument": "2",
      "path": [],
      "expected": "string",
      "actual": "boolean"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

Each later invalid argument fails before a false comparison, zero-divisor check, or zero product can supply another outcome. Product invocation awaits its 2.0 adapter.

All numeric and text argument domains are checked in source argument order. Folded comparison does no Unicode work before those checks finish.

Check exact indices and half-open ranges

lispex.example.v2.standard-library.sequence-range-order · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (choice)
      (cond
        ((= choice 0) (vector-ref (vector 1 2) 2))
        ((= choice 1) (vector-ref (vector 1 2) -1))
        ((= choice 2) (vector-slice (vector 1 2) -1 3))
        ((= choice 3) (vector-slice (vector 1 2) 0 3))
        ((= choice 4) (vector-slice (vector 1 2) 2 1))
        ((= choice 5) (vector-slice (vector 1 2) 2 2))
        ((= choice 6) (substring "A😀B" 1 2))
        ((= choice 7) (substring "A😀B" 3 3))
        ((= choice 8) (string-ref "A😀B" 3))
        ((= choice 9) (list-tail '(1 2) 2))
        (else (list-ref '(1 2) 2)))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "1"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "2"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "3"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "4"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "5"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "6"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "7"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "8"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "9"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "10"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Conditiondomain.index
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.index",
    "data": {
      "operation": "vector-ref",
      "argument": "1",
      "index": "2",
      "length": "2"
    }
  }
}
Conditiondomain.index
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.index",
    "data": {
      "operation": "vector-ref",
      "argument": "1",
      "index": "-1",
      "length": "2"
    }
  }
}
Conditiondomain.index
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.index",
    "data": {
      "operation": "vector-slice",
      "argument": "1",
      "index": "-1",
      "length": "2"
    }
  }
}
Conditiondomain.index
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.index",
    "data": {
      "operation": "vector-slice",
      "argument": "2",
      "index": "3",
      "length": "2"
    }
  }
}
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "vector-slice",
      "argument": "2",
      "reason": "invalid-slice-order"
    }
  }
}
Result#()
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "vector",
    "items": []
  }
}
Result"😀"
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "string",
    "value": "😀"
  }
}
Result""
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "string",
    "value": ""
  }
}
Conditiondomain.index
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.index",
    "data": {
      "operation": "string-ref",
      "argument": "1",
      "index": "3",
      "length": "3"
    }
  }
}
Result()
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": []
  }
}
Conditiondomain.index
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.index",
    "data": {
      "operation": "list-ref",
      "argument": "1",
      "index": "2",
      "length": "2"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

Start bounds precede end bounds and slice ordering. String positions count scalars. An empty suffix or slice is a valid result. Product invocation awaits its 2.0 adapter.

The non-BMP character occupies one string position. List-tail admits the length while list-ref and string-ref do not.

Validate element domains even for empty construction

lispex.example.v2.standard-library.sequence-element-domains · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (choice)
      (cond
        ((= choice 0) (make-bytevector 0 256))
        ((= choice 1) (make-string 0 "x"))
        ((= choice 2) (list->string (list (integer->char 65) 1)))
        ((= choice 3) (list->bytevector '(1 -1)))
        ((= choice 4) (integer->char 55296))
        ((= choice 5) (integer->char 1114112))
        ((= choice 6) (char->integer (integer->char 1114111)))
        (else (make-list -1 0)))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "1"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "2"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "3"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "4"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "5"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "6"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "7"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "make-bytevector",
      "argument": "1",
      "reason": "invalid-byte"
    }
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "make-string",
      "argument": "1",
      "path": [],
      "expected": "character",
      "actual": "string"
    }
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "list->string",
      "argument": "0",
      "path": [
        {
          "kind": "cdr"
        },
        {
          "kind": "car"
        }
      ],
      "expected": "character",
      "actual": "integer"
    }
  }
}
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "list->bytevector",
      "argument": "0",
      "reason": "invalid-byte"
    }
  }
}
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "integer->char",
      "argument": "0",
      "reason": "invalid-scalar"
    }
  }
}
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "integer->char",
      "argument": "0",
      "reason": "invalid-scalar"
    }
  }
}
Result1114111
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "integer",
    "value": "1114111"
  }
}
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "make-list",
      "argument": "0",
      "reason": "negative-count"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

Empty output sizes do not skip fill validation. Octet and scalar ranges reject invalid values before construction. Product invocation awaits its 2.0 adapter.

The scalar upper bound is a valid character even though it is a noncharacter. Range constants describe values and do not set resource limits.

Preserve text and reject malformed UTF-8

lispex.example.v2.standard-library.utf8-conversion · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (if (bytevector? input)
          (utf8->string input)
          (string->utf8 input))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "bytevector",
        "bytes": [
          65,
          195,
          169
        ]
      }
    },
    {
      "input": {
        "kind": "bytevector",
        "bytes": [
          239,
          187,
          191,
          65
        ]
      }
    },
    {
      "input": {
        "kind": "bytevector",
        "bytes": [
          192,
          175
        ]
      }
    },
    {
      "input": {
        "kind": "bytevector",
        "bytes": [
          65,
          237,
          160,
          128
        ]
      }
    },
    {
      "input": {
        "kind": "bytevector",
        "bytes": [
          240,
          159
        ]
      }
    },
    {
      "input": {
        "kind": "bytevector",
        "bytes": [
          239,
          191,
          191
        ]
      }
    },
    {
      "input": {
        "kind": "string",
        "value": "Aé"
      }
    },
    {
      "input": {
        "kind": "string",
        "value": "A"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result"Aé"
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "string",
    "value": "Aé"
  }
}
Result"A"
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "string",
    "value": "A"
  }
}
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "utf8->string",
      "argument": "0",
      "reason": "invalid-utf8"
    }
  }
}
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "utf8->string",
      "argument": "0",
      "reason": "invalid-utf8"
    }
  }
}
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "utf8->string",
      "argument": "0",
      "reason": "invalid-utf8"
    }
  }
}
Result"￿"
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "string",
    "value": "￿"
  }
}
Result#u8(65 195 169)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "bytevector",
    "bytes": [
      65,
      195,
      169
    ]
  }
}
Result#u8(239 187 191 65)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "bytevector",
    "bytes": [
      239,
      187,
      191,
      65
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

Valid conversion preserves raw scalars and U+FEFF. Overlong, surrogate, and truncated sequences fail at the first invalid sequence. Product invocation awaits its 2.0 adapter.

Encoding adds no marker. A noncharacter remains valid Unicode scalar data. Conversion failures are ordinary evaluation conditions.

Report a zero base for negative powers

lispex.example.v2.standard-library.expt-zero-negative · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule (lambda (input) (expt 0 input))))
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ],
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for each complete request and its result or diagnostic encoding"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "-1"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "-2"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    }
  ]
}
Specification outcome
Conditiondomain.division-by-zero
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.division-by-zero",
    "data": {
      "operation": "expt",
      "argument": "0"
    }
  }
}
Conditiondomain.division-by-zero
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.division-by-zero",
    "data": {
      "operation": "expt",
      "argument": "0"
    }
  }
}
Result1
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "integer",
    "value": "1"
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

Negative exponents report domain.division-by-zero for base argument zero. Exponent zero returns 1. Product invocation awaits its 2.0 adapter.

The exponent zero case uses the existing integer power contract. The negative cases use the zero base as the divisor of a reciprocal. Each request has sufficient finite resources.

Read all lengths before append allocation

lispex.example.v2.standard-library.sequence-append-event-traces · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (let ((result
              (cond
                ((= input 0) (vector-append (vector 7) (vector) (vector 8 9)))
                ((= input 1) (bytevector-append (bytevector) (bytevector 65) (bytevector) (bytevector 66)))
                ((= input 2) (vector-append))
                ((= input 3) (bytevector-append (bytevector) (bytevector)))
                ((= input 4) (vector-append (vector 7) 9))
                (else (bytevector-append)))))
        result)))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ],
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the complete request unless a case selects a refusal"
  },
  "requests": [
    {
      "case": "vector-empty-middle",
      "input": {
        "kind": "integer",
        "value": "0"
      }
    },
    {
      "case": "bytevector-empty-arguments",
      "input": {
        "kind": "integer",
        "value": "1"
      }
    },
    {
      "case": "vector-no-arguments",
      "input": {
        "kind": "integer",
        "value": "2"
      }
    },
    {
      "case": "bytevector-all-empty",
      "input": {
        "kind": "integer",
        "value": "3"
      }
    },
    {
      "case": "domain-before-lengths",
      "input": {
        "kind": "integer",
        "value": "4"
      }
    },
    {
      "case": "bytevector-no-arguments",
      "input": {
        "kind": "integer",
        "value": "5"
      }
    },
    {
      "case": "result-reservation-before-elements",
      "input": {
        "kind": "integer",
        "value": "0"
      },
      "resourceBoundary": {
        "event": "datum-allocate",
        "fixtureSite": "vector-append-call",
        "path": [
          {
            "kind": "result",
            "index": "0"
          }
        ],
        "axis": "allocation",
        "earlierReservations": "succeed through every length visit",
        "selectedReservation": "insufficient remaining allocation for the complete result vector",
        "otherAxes": "sufficient"
      }
    }
  ],
  "fixtureSites": {
    "vector-append-call": "The vector-append call with three vector arguments in the result initializer.",
    "bytevector-append-call": "The bytevector-append call with four bytevector arguments in the result initializer.",
    "vector-no-arguments-call": "The vector-append call with no arguments in the result initializer.",
    "bytevector-all-empty-call": "The bytevector-append call with two empty bytevectors in the result initializer.",
    "invalid-vector-call": "The vector-append call with integer 9 as its second argument in the result initializer.",
    "bytevector-no-arguments-call": "The bytevector-append call with no arguments in the result initializer."
  },
  "traceScope": {
    "start": "callable-check after completed operator and operand evaluation",
    "end": "call-return or the committed first failure",
    "selectedCalls": "all mapped calls are in the initializer of result and are nontail",
    "otherRequestEvents": "retain their declared reservations outside this call trace"
  }
}
Event account · vector-append
vector-empty-middle · #(7) #() #(8 9)
vector-append · vector-empty-middle
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"vector-append-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"vector-append-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"vector-append-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"vector-append-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5argument-checkargument(1){"fixtureSite":"vector-append-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
6argument-checkargument(2){"fixtureSite":"vector-append-call","role":"argument-check","path":[{"kind":"argument","index":"2"}]}null
7sequence-stepargument(0) field(length){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"length"}]}null
8sequence-stepargument(1) field(length){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"1"},{"kind":"field","name":"length"}]}null
9sequence-stepargument(2) field(length){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"2"},{"kind":"field","name":"length"}]}null
10datum-allocateresult(0){"fixtureSite":"vector-append-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]}3
11sequence-stepargument(0) element(0){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"element","index":"0"}]}null
12sequence-stepargument(2) element(0){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"2"},{"kind":"element","index":"0"}]}null
13sequence-stepargument(2) element(1){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"2"},{"kind":"element","index":"1"}]}null
14call-returncall{"fixtureSite":"vector-append-call","role":"call-return","path":[]}null
Result#(7 8 9)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "vector",
    "items": [
      {
        "kind": "integer",
        "value": "7"
      },
      {
        "kind": "integer",
        "value": "8"
      },
      {
        "kind": "integer",
        "value": "9"
      }
    ]
  }
}
Trace details 1
{
  "case": "vector-empty-middle",
  "operation": "vector-append",
  "arguments": [
    {
      "kind": "vector",
      "items": [
        {
          "kind": "integer",
          "value": "7"
        }
      ]
    },
    {
      "kind": "vector",
      "items": []
    },
    {
      "kind": "vector",
      "items": [
        {
          "kind": "integer",
          "value": "8"
        },
        {
          "kind": "integer",
          "value": "9"
        }
      ]
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "vector-append"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "3"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "3",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "F"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "F"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "2"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "F"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "2"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "3",
        "inputs": {
          "shape": "vector",
          "elementCount": "3"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "value": {
            "kind": "integer",
            "value": "7"
          }
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "2"
          },
          {
            "kind": "element",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "value": {
            "kind": "integer",
            "value": "8"
          }
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "2"
          },
          {
            "kind": "element",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "value": {
            "kind": "integer",
            "value": "9"
          }
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "vector",
      "items": [
        {
          "kind": "integer",
          "value": "7"
        },
        {
          "kind": "integer",
          "value": "8"
        },
        {
          "kind": "integer",
          "value": "9"
        }
      ]
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · bytevector-append
bytevector-empty-arguments · #u8() #u8(65) #u8() #u8(66)
bytevector-append · bytevector-empty-arguments
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"bytevector-append-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"bytevector-append-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"bytevector-append-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"bytevector-append-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5argument-checkargument(1){"fixtureSite":"bytevector-append-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
6argument-checkargument(2){"fixtureSite":"bytevector-append-call","role":"argument-check","path":[{"kind":"argument","index":"2"}]}null
7argument-checkargument(3){"fixtureSite":"bytevector-append-call","role":"argument-check","path":[{"kind":"argument","index":"3"}]}null
8sequence-stepargument(0) field(length){"fixtureSite":"bytevector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"length"}]}null
9sequence-stepargument(1) field(length){"fixtureSite":"bytevector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"1"},{"kind":"field","name":"length"}]}null
10sequence-stepargument(2) field(length){"fixtureSite":"bytevector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"2"},{"kind":"field","name":"length"}]}null
11sequence-stepargument(3) field(length){"fixtureSite":"bytevector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"3"},{"kind":"field","name":"length"}]}null
12datum-allocateresult(0){"fixtureSite":"bytevector-append-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]}2
13sequence-stepargument(1) byte(0){"fixtureSite":"bytevector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"1"},{"kind":"byte","index":"0"}]}null
14sequence-stepargument(3) byte(0){"fixtureSite":"bytevector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"3"},{"kind":"byte","index":"0"}]}null
15call-returncall{"fixtureSite":"bytevector-append-call","role":"call-return","path":[]}null
Result#u8(65 66)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "bytevector",
    "bytes": [
      65,
      66
    ]
  }
}
Trace details 2
{
  "case": "bytevector-empty-arguments",
  "operation": "bytevector-append",
  "arguments": [
    {
      "kind": "bytevector",
      "bytes": []
    },
    {
      "kind": "bytevector",
      "bytes": [
        65
      ]
    },
    {
      "kind": "bytevector",
      "bytes": []
    },
    {
      "kind": "bytevector",
      "bytes": [
        66
      ]
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "bytevector-append"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "4"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "4",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "2"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "3"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "2"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "3"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "2",
        "inputs": {
          "shape": "bytevector",
          "octetCount": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "65"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "3"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "66"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "bytevector-append-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "bytevector",
      "bytes": [
        65,
        66
      ]
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · vector-append
vector-no-arguments
vector-append · vector-no-arguments
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"vector-no-arguments-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"vector-no-arguments-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"vector-no-arguments-call","role":"call","path":[]}null
4datum-allocateresult(0){"fixtureSite":"vector-no-arguments-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]}0
5call-returncall{"fixtureSite":"vector-no-arguments-call","role":"call-return","path":[]}null
Result#()
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "vector",
    "items": []
  }
}
Trace details 3
{
  "case": "vector-no-arguments",
  "operation": "vector-append",
  "arguments": [],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "vector-no-arguments-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "vector-append"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "vector-no-arguments-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "vector-no-arguments-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "0",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "vector-no-arguments-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "0",
        "inputs": {
          "shape": "vector",
          "elementCount": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "vector-no-arguments-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "vector",
      "items": []
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · bytevector-append
bytevector-all-empty · #u8() #u8()
bytevector-append · bytevector-all-empty
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"bytevector-all-empty-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"bytevector-all-empty-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"bytevector-all-empty-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"bytevector-all-empty-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5argument-checkargument(1){"fixtureSite":"bytevector-all-empty-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
6sequence-stepargument(0) field(length){"fixtureSite":"bytevector-all-empty-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"length"}]}null
7sequence-stepargument(1) field(length){"fixtureSite":"bytevector-all-empty-call","role":"sequence-step","path":[{"kind":"argument","index":"1"},{"kind":"field","name":"length"}]}null
8datum-allocateresult(0){"fixtureSite":"bytevector-all-empty-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]}0
9call-returncall{"fixtureSite":"bytevector-all-empty-call","role":"call-return","path":[]}null
Result#u8()
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "bytevector",
    "bytes": []
  }
}
Trace details 4
{
  "case": "bytevector-all-empty",
  "operation": "bytevector-append",
  "arguments": [
    {
      "kind": "bytevector",
      "bytes": []
    },
    {
      "kind": "bytevector",
      "bytes": []
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "bytevector-all-empty-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "bytevector-append"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "bytevector-all-empty-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "bytevector-all-empty-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "bytevector-all-empty-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "bytevector-all-empty-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-all-empty-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-all-empty-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "bytevector-all-empty-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "0",
        "inputs": {
          "shape": "bytevector",
          "octetCount": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "bytevector-all-empty-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "bytevector",
      "bytes": []
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · vector-append
domain-before-lengths · #(7) 9
vector-append · domain-before-lengths
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"invalid-vector-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"invalid-vector-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"invalid-vector-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"invalid-vector-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5argument-checkargument(1){"fixtureSite":"invalid-vector-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
6diagnostic-payloadargument(1){"fixtureSite":"invalid-vector-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"1"}]}null
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "vector-append",
      "argument": "1",
      "path": [],
      "expected": "vector",
      "actual": "integer"
    }
  }
}
Trace details 5
{
  "case": "domain-before-lengths",
  "operation": "vector-append",
  "arguments": [
    {
      "kind": "vector",
      "items": [
        {
          "kind": "integer",
          "value": "7"
        }
      ]
    },
    {
      "kind": "integer",
      "value": "9"
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "invalid-vector-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "vector-append"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "invalid-vector-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "invalid-vector-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "2",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "invalid-vector-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "F"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "invalid-vector-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "F"
        },
        "status": "accepted"
      }
    },
    {
      "event": "diagnostic-payload",
      "site": {
        "fixtureSite": "invalid-vector-call",
        "role": "diagnostic-payload",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "condition": {
            "phase": "evaluate",
            "code": "domain.type",
            "data": {
              "operation": "vector-append",
              "argument": "1",
              "path": [],
              "expected": "vector",
              "actual": "integer"
            }
          },
          "codec": "the selected complete diagnostic codec"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "language-failure",
    "valueCount": 0,
    "condition": {
      "phase": "evaluate",
      "code": "domain.type",
      "data": {
        "operation": "vector-append",
        "argument": "1",
        "path": [],
        "expected": "vector",
        "actual": "integer"
      }
    }
  },
  "failureSite": {
    "fixtureSite": "invalid-vector-call",
    "role": "argument-check",
    "path": [
      {
        "kind": "argument",
        "index": "1"
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · bytevector-append
bytevector-no-arguments
bytevector-append · bytevector-no-arguments
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"bytevector-no-arguments-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"bytevector-no-arguments-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"bytevector-no-arguments-call","role":"call","path":[]}null
4datum-allocateresult(0){"fixtureSite":"bytevector-no-arguments-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]}0
5call-returncall{"fixtureSite":"bytevector-no-arguments-call","role":"call-return","path":[]}null
Result#u8()
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "bytevector",
    "bytes": []
  }
}
Trace details 6
{
  "case": "bytevector-no-arguments",
  "operation": "bytevector-append",
  "arguments": [],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "bytevector-no-arguments-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "bytevector-append"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "bytevector-no-arguments-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "bytevector-no-arguments-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "0",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "bytevector-no-arguments-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "0",
        "inputs": {
          "shape": "bytevector",
          "octetCount": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "bytevector-no-arguments-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "bytevector",
      "bytes": []
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · vector-append
result-reservation-before-elements · #(7) #() #(8 9)
vector-append · result-reservation-before-elements
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"vector-append-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"vector-append-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"vector-append-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"vector-append-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5argument-checkargument(1){"fixtureSite":"vector-append-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]}null
6argument-checkargument(2){"fixtureSite":"vector-append-call","role":"argument-check","path":[{"kind":"argument","index":"2"}]}null
7sequence-stepargument(0) field(length){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"length"}]}null
8sequence-stepargument(1) field(length){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"1"},{"kind":"field","name":"length"}]}null
9sequence-stepargument(2) field(length){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"2"},{"kind":"field","name":"length"}]}null
10datum-allocateresult(0){"fixtureSite":"vector-append-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]}3
Resultresource-stop · allocation
Outcome details
{
  "kind": "resource-stop",
  "valueCount": 0,
  "terminal": true,
  "axis": "allocation",
  "operation": "vector-append",
  "event": "datum-allocate",
  "site": {
    "fixtureSite": "vector-append-call",
    "role": "datum-allocate",
    "path": [
      {
        "kind": "result",
        "index": "0"
      }
    ]
  },
  "diagnosticIdentity": {
    "phase": "evaluate",
    "code": "resource.exhausted"
  },
  "partialResult": false
}
Trace details 7
{
  "case": "result-reservation-before-elements",
  "operation": "vector-append",
  "arguments": [
    {
      "kind": "vector",
      "items": [
        {
          "kind": "integer",
          "value": "7"
        }
      ]
    },
    {
      "kind": "vector",
      "items": []
    },
    {
      "kind": "vector",
      "items": [
        {
          "kind": "integer",
          "value": "8"
        },
        {
          "kind": "integer",
          "value": "9"
        }
      ]
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "vector-append"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "3"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "3",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "F"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "F"
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "2"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "F"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "1"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "2"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "3",
        "inputs": {
          "shape": "vector",
          "elementCount": "3"
        },
        "status": "refused"
      }
    }
  ],
  "outcome": {
    "kind": "resource-stop",
    "valueCount": 0,
    "terminal": true,
    "axis": "allocation",
    "operation": "vector-append",
    "event": "datum-allocate",
    "site": {
      "fixtureSite": "vector-append-call",
      "role": "datum-allocate",
      "path": [
        {
          "kind": "result",
          "index": "0"
        }
      ]
    },
    "diagnosticIdentity": {
      "phase": "evaluate",
      "code": "resource.exhausted"
    },
    "partialResult": false
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "outcomes": [
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "vector",
        "items": [
          {
            "kind": "integer",
            "value": "7"
          },
          {
            "kind": "integer",
            "value": "8"
          },
          {
            "kind": "integer",
            "value": "9"
          }
        ]
      }
    },
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "bytevector",
        "bytes": [
          65,
          66
        ]
      }
    },
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "vector",
        "items": []
      }
    },
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "bytevector",
        "bytes": []
      }
    },
    {
      "kind": "language-failure",
      "valueCount": 0,
      "condition": {
        "phase": "evaluate",
        "code": "domain.type",
        "data": {
          "operation": "vector-append",
          "argument": "1",
          "path": [],
          "expected": "vector",
          "actual": "integer"
        }
      }
    },
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "bytevector",
        "bytes": []
      }
    },
    {
      "kind": "resource-stop",
      "valueCount": 0,
      "terminal": true,
      "axis": "allocation",
      "operation": "vector-append",
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "vector-append-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          }
        ]
      },
      "diagnosticIdentity": {
        "phase": "evaluate",
        "code": "resource.exhausted"
      },
      "partialResult": false
    }
  ]
}
Product invocation

Expected result

Vector and bytevector append finish all argument domains, visit every stored length, reserve the complete result, and then visit input elements. Empty arguments keep their length visits. A later domain failure precedes every length visit. Refusing the complete result reservation prevents all element visits. Product invocation awaits its 2.0 adapter.

Vector and bytevector append finish all argument domains, visit every stored length, reserve the complete result, and then visit input elements. Empty arguments keep their length visits. A later domain failure precedes every length visit. Refusing the complete result reservation prevents all element visits.

Each table gives the complete selected call trace from callable-check after operand evaluation through call-return or the committed failure. Every selected call is nontail. Input decoding, module initialization, operand evaluation, the enclosing let, and result encoding retain their own events in the complete request. The trace does not remove their charges.

The request maps each fixtureSite label to one call occurrence. Every row uses that occurrence and its event name as the site role. The path column gives its complete suffix. Extent counts created or retained semantic components. A dash means null, with the complete event reservation still required. Extent zero is an empty aggregate reservation, not a zero charge. The selected model supplies every complete requirement vector.

vector-empty-middle uses vector-append at vector-append-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"vector-append"}accepted
2arity-checkempty—{"suppliedArguments":"3"}accepted
3callempty—{"suppliedArguments":"3","tail":false}accepted
4argument-checkargument(0)—{"domain":"F"}accepted
5argument-checkargument(1)—{"domain":"F"}accepted
6argument-checkargument(2)—{"domain":"F"}accepted
7sequence-stepargument(0), field(length)—{"storedLength":"1"}accepted
8sequence-stepargument(1), field(length)—{"storedLength":"0"}accepted
9sequence-stepargument(2), field(length)—{"storedLength":"2"}accepted
10datum-allocateresult(0)3{"shape":"vector","elementCount":"3"}accepted
11sequence-stepargument(0), element(0)—{"value":{"kind":"integer","value":"7"}}accepted
12sequence-stepargument(2), element(0)—{"value":{"kind":"integer","value":"8"}}accepted
13sequence-stepargument(2), element(1)—{"value":{"kind":"integer","value":"9"}}accepted
14call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"vector","items":[{"kind":"integer","value":"7"},{"kind":"integer","value":"8"},{"kind":"integer","value":"9"}]}}.

bytevector-empty-arguments uses bytevector-append at bytevector-append-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"bytevector-append"}accepted
2arity-checkempty—{"suppliedArguments":"4"}accepted
3callempty—{"suppliedArguments":"4","tail":false}accepted
4argument-checkargument(0)—{"domain":"X"}accepted
5argument-checkargument(1)—{"domain":"X"}accepted
6argument-checkargument(2)—{"domain":"X"}accepted
7argument-checkargument(3)—{"domain":"X"}accepted
8sequence-stepargument(0), field(length)—{"storedLength":"0"}accepted
9sequence-stepargument(1), field(length)—{"storedLength":"1"}accepted
10sequence-stepargument(2), field(length)—{"storedLength":"0"}accepted
11sequence-stepargument(3), field(length)—{"storedLength":"1"}accepted
12datum-allocateresult(0)2{"shape":"bytevector","octetCount":"2"}accepted
13sequence-stepargument(1), byte(0)—{"octet":"65"}accepted
14sequence-stepargument(3), byte(0)—{"octet":"66"}accepted
15call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"bytevector","bytes":[65,66]}}.

vector-no-arguments uses vector-append at vector-no-arguments-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"vector-append"}accepted
2arity-checkempty—{"suppliedArguments":"0"}accepted
3callempty—{"suppliedArguments":"0","tail":false}accepted
4datum-allocateresult(0)0{"shape":"vector","elementCount":"0"}accepted
5call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"vector","items":[]}}.

bytevector-all-empty uses bytevector-append at bytevector-all-empty-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"bytevector-append"}accepted
2arity-checkempty—{"suppliedArguments":"2"}accepted
3callempty—{"suppliedArguments":"2","tail":false}accepted
4argument-checkargument(0)—{"domain":"X"}accepted
5argument-checkargument(1)—{"domain":"X"}accepted
6sequence-stepargument(0), field(length)—{"storedLength":"0"}accepted
7sequence-stepargument(1), field(length)—{"storedLength":"0"}accepted
8datum-allocateresult(0)0{"shape":"bytevector","octetCount":"0"}accepted
9call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"bytevector","bytes":[]}}.

domain-before-lengths uses vector-append at invalid-vector-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"vector-append"}accepted
2arity-checkempty—{"suppliedArguments":"2"}accepted
3callempty—{"suppliedArguments":"2","tail":false}accepted
4argument-checkargument(0)—{"domain":"F"}accepted
5argument-checkargument(1)—{"domain":"F"}accepted
6diagnostic-payloadargument(1)—{"condition":{"phase":"evaluate","code":"domain.type","data":{"operation":"vector-append","argument":"1","path":[],"expected":"vector","actual":"integer"}},"codec":"the selected complete diagnostic codec"}accepted

The outcome is {"kind":"language-failure","valueCount":0,"condition":{"phase":"evaluate","code":"domain.type","data":{"operation":"vector-append","argument":"1","path":[],"expected":"vector","actual":"integer"}}}. The detecting failure site has role argument-check and path argument(1).

bytevector-no-arguments uses bytevector-append at bytevector-no-arguments-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"bytevector-append"}accepted
2arity-checkempty—{"suppliedArguments":"0"}accepted
3callempty—{"suppliedArguments":"0","tail":false}accepted
4datum-allocateresult(0)0{"shape":"bytevector","octetCount":"0"}accepted
5call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"bytevector","bytes":[]}}.

result-reservation-before-elements uses vector-append at vector-append-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"vector-append"}accepted
2arity-checkempty—{"suppliedArguments":"3"}accepted
3callempty—{"suppliedArguments":"3","tail":false}accepted
4argument-checkargument(0)—{"domain":"F"}accepted
5argument-checkargument(1)—{"domain":"F"}accepted
6argument-checkargument(2)—{"domain":"F"}accepted
7sequence-stepargument(0), field(length)—{"storedLength":"1"}accepted
8sequence-stepargument(1), field(length)—{"storedLength":"0"}accepted
9sequence-stepargument(2), field(length)—{"storedLength":"2"}accepted
10datum-allocateresult(0)3{"shape":"vector","elementCount":"3"}refused

The outcome is {"kind":"resource-stop","valueCount":0,"terminal":true,"axis":"allocation","operation":"vector-append","event":"datum-allocate","site":{"fixtureSite":"vector-append-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]},"diagnosticIdentity":{"phase":"evaluate","code":"resource.exhausted"},"partialResult":false}.

Keep the first invalid UTF-8 byte site

lispex.example.v2.standard-library.utf8-failure-event-traces · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (let ((result
              (utf8->string input)))
        result)))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ],
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the complete request unless a case selects a refusal"
  },
  "requests": [
    {
      "case": "invalid-middle-byte",
      "input": {
        "kind": "bytevector",
        "bytes": [
          65,
          225,
          128,
          65
        ]
      }
    },
    {
      "case": "truncated-after-prefix",
      "input": {
        "kind": "bytevector",
        "bytes": [
          65,
          225,
          128
        ]
      }
    },
    {
      "case": "invalid-second-byte",
      "input": {
        "kind": "bytevector",
        "bytes": [
          65,
          226,
          40,
          161
        ]
      }
    },
    {
      "case": "surrogate-prefix",
      "input": {
        "kind": "bytevector",
        "bytes": [
          65,
          237,
          160,
          128
        ]
      }
    },
    {
      "case": "invalid-leading-byte",
      "input": {
        "kind": "bytevector",
        "bytes": [
          192,
          175
        ]
      }
    }
  ],
  "fixtureSites": {
    "decode-call": "The utf8->string call in the initializer of result."
  },
  "traceScope": {
    "start": "callable-check after completed operator and operand evaluation",
    "end": "call-return or the committed first failure",
    "selectedCalls": "all mapped calls are in the initializer of result and are nontail",
    "otherRequestEvents": "retain their declared reservations outside this call trace"
  }
}
Event account · utf8->string
invalid-middle-byte · #u8(65 225 128 65)
utf8->string · invalid-middle-byte
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"decode-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"decode-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5sequence-stepargument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]}null
6datum-allocateresult(0) scalar(0){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"scalar","index":"0"}]}1
7sequence-stepargument(0) byte(1){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"1"}]}null
8sequence-stepargument(0) byte(2){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"2"}]}null
9sequence-stepargument(0) byte(3){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"3"}]}null
10diagnostic-payloadargument(0) byte(3){"fixtureSite":"decode-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"3"}]}null
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "utf8->string",
      "argument": "0",
      "reason": "invalid-utf8"
    }
  }
}
Trace details 1
{
  "case": "invalid-middle-byte",
  "operation": "utf8->string",
  "arguments": [
    {
      "kind": "bytevector",
      "bytes": [
        65,
        225,
        128,
        65
      ]
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "utf8->string"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "decode-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "65"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "decode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "scalar",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "string-scalar",
          "scalar": "U+0041",
          "resultIndex": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "225"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "2"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "128"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "3"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "65"
        },
        "status": "accepted"
      }
    },
    {
      "event": "diagnostic-payload",
      "site": {
        "fixtureSite": "decode-call",
        "role": "diagnostic-payload",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "3"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "condition": {
            "phase": "evaluate",
            "code": "domain.range",
            "data": {
              "operation": "utf8->string",
              "argument": "0",
              "reason": "invalid-utf8"
            }
          },
          "codec": "the selected complete diagnostic codec"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "language-failure",
    "valueCount": 0,
    "condition": {
      "phase": "evaluate",
      "code": "domain.range",
      "data": {
        "operation": "utf8->string",
        "argument": "0",
        "reason": "invalid-utf8"
      }
    }
  },
  "failureSite": {
    "fixtureSite": "decode-call",
    "role": "sequence-step",
    "path": [
      {
        "kind": "argument",
        "index": "0"
      },
      {
        "kind": "byte",
        "index": "3"
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · utf8->string
truncated-after-prefix · #u8(65 225 128)
utf8->string · truncated-after-prefix
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"decode-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"decode-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5sequence-stepargument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]}null
6datum-allocateresult(0) scalar(0){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"scalar","index":"0"}]}1
7sequence-stepargument(0) byte(1){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"1"}]}null
8sequence-stepargument(0) byte(2){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"2"}]}null
9sequence-stepargument(0) byte(3){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"3"}]}null
10diagnostic-payloadargument(0) byte(3){"fixtureSite":"decode-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"3"}]}null
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "utf8->string",
      "argument": "0",
      "reason": "invalid-utf8"
    }
  }
}
Trace details 2
{
  "case": "truncated-after-prefix",
  "operation": "utf8->string",
  "arguments": [
    {
      "kind": "bytevector",
      "bytes": [
        65,
        225,
        128
      ]
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "utf8->string"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "decode-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "65"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "decode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "scalar",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "string-scalar",
          "scalar": "U+0041",
          "resultIndex": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "225"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "2"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "128"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "3"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "requiredEnd": "3",
          "continuationRequired": true
        },
        "status": "accepted"
      }
    },
    {
      "event": "diagnostic-payload",
      "site": {
        "fixtureSite": "decode-call",
        "role": "diagnostic-payload",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "3"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "condition": {
            "phase": "evaluate",
            "code": "domain.range",
            "data": {
              "operation": "utf8->string",
              "argument": "0",
              "reason": "invalid-utf8"
            }
          },
          "codec": "the selected complete diagnostic codec"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "language-failure",
    "valueCount": 0,
    "condition": {
      "phase": "evaluate",
      "code": "domain.range",
      "data": {
        "operation": "utf8->string",
        "argument": "0",
        "reason": "invalid-utf8"
      }
    }
  },
  "failureSite": {
    "fixtureSite": "decode-call",
    "role": "sequence-step",
    "path": [
      {
        "kind": "argument",
        "index": "0"
      },
      {
        "kind": "byte",
        "index": "3"
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · utf8->string
invalid-second-byte · #u8(65 226 40 161)
utf8->string · invalid-second-byte
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"decode-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"decode-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5sequence-stepargument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]}null
6datum-allocateresult(0) scalar(0){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"scalar","index":"0"}]}1
7sequence-stepargument(0) byte(1){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"1"}]}null
8sequence-stepargument(0) byte(2){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"2"}]}null
9diagnostic-payloadargument(0) byte(2){"fixtureSite":"decode-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"2"}]}null
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "utf8->string",
      "argument": "0",
      "reason": "invalid-utf8"
    }
  }
}
Trace details 3
{
  "case": "invalid-second-byte",
  "operation": "utf8->string",
  "arguments": [
    {
      "kind": "bytevector",
      "bytes": [
        65,
        226,
        40,
        161
      ]
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "utf8->string"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "decode-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "65"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "decode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "scalar",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "string-scalar",
          "scalar": "U+0041",
          "resultIndex": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "226"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "2"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "40"
        },
        "status": "accepted"
      }
    },
    {
      "event": "diagnostic-payload",
      "site": {
        "fixtureSite": "decode-call",
        "role": "diagnostic-payload",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "2"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "condition": {
            "phase": "evaluate",
            "code": "domain.range",
            "data": {
              "operation": "utf8->string",
              "argument": "0",
              "reason": "invalid-utf8"
            }
          },
          "codec": "the selected complete diagnostic codec"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "language-failure",
    "valueCount": 0,
    "condition": {
      "phase": "evaluate",
      "code": "domain.range",
      "data": {
        "operation": "utf8->string",
        "argument": "0",
        "reason": "invalid-utf8"
      }
    }
  },
  "failureSite": {
    "fixtureSite": "decode-call",
    "role": "sequence-step",
    "path": [
      {
        "kind": "argument",
        "index": "0"
      },
      {
        "kind": "byte",
        "index": "2"
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · utf8->string
surrogate-prefix · #u8(65 237 160 128)
utf8->string · surrogate-prefix
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"decode-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"decode-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5sequence-stepargument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]}null
6datum-allocateresult(0) scalar(0){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"scalar","index":"0"}]}1
7sequence-stepargument(0) byte(1){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"1"}]}null
8sequence-stepargument(0) byte(2){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"2"}]}null
9diagnostic-payloadargument(0) byte(2){"fixtureSite":"decode-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"2"}]}null
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "utf8->string",
      "argument": "0",
      "reason": "invalid-utf8"
    }
  }
}
Trace details 4
{
  "case": "surrogate-prefix",
  "operation": "utf8->string",
  "arguments": [
    {
      "kind": "bytevector",
      "bytes": [
        65,
        237,
        160,
        128
      ]
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "utf8->string"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "decode-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "65"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "decode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "scalar",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "string-scalar",
          "scalar": "U+0041",
          "resultIndex": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "237"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "2"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "160"
        },
        "status": "accepted"
      }
    },
    {
      "event": "diagnostic-payload",
      "site": {
        "fixtureSite": "decode-call",
        "role": "diagnostic-payload",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "2"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "condition": {
            "phase": "evaluate",
            "code": "domain.range",
            "data": {
              "operation": "utf8->string",
              "argument": "0",
              "reason": "invalid-utf8"
            }
          },
          "codec": "the selected complete diagnostic codec"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "language-failure",
    "valueCount": 0,
    "condition": {
      "phase": "evaluate",
      "code": "domain.range",
      "data": {
        "operation": "utf8->string",
        "argument": "0",
        "reason": "invalid-utf8"
      }
    }
  },
  "failureSite": {
    "fixtureSite": "decode-call",
    "role": "sequence-step",
    "path": [
      {
        "kind": "argument",
        "index": "0"
      },
      {
        "kind": "byte",
        "index": "2"
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · utf8->string
invalid-leading-byte · #u8(192 175)
utf8->string · invalid-leading-byte
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"decode-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"decode-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5sequence-stepargument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]}null
6diagnostic-payloadargument(0) byte(0){"fixtureSite":"decode-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]}null
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "utf8->string",
      "argument": "0",
      "reason": "invalid-utf8"
    }
  }
}
Trace details 5
{
  "case": "invalid-leading-byte",
  "operation": "utf8->string",
  "arguments": [
    {
      "kind": "bytevector",
      "bytes": [
        192,
        175
      ]
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "utf8->string"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "decode-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "192"
        },
        "status": "accepted"
      }
    },
    {
      "event": "diagnostic-payload",
      "site": {
        "fixtureSite": "decode-call",
        "role": "diagnostic-payload",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "condition": {
            "phase": "evaluate",
            "code": "domain.range",
            "data": {
              "operation": "utf8->string",
              "argument": "0",
              "reason": "invalid-utf8"
            }
          },
          "codec": "the selected complete diagnostic codec"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "language-failure",
    "valueCount": 0,
    "condition": {
      "phase": "evaluate",
      "code": "domain.range",
      "data": {
        "operation": "utf8->string",
        "argument": "0",
        "reason": "invalid-utf8"
      }
    }
  },
  "failureSite": {
    "fixtureSite": "decode-call",
    "role": "sequence-step",
    "path": [
      {
        "kind": "argument",
        "index": "0"
      },
      {
        "kind": "byte",
        "index": "0"
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "outcomes": [
    {
      "kind": "language-failure",
      "valueCount": 0,
      "condition": {
        "phase": "evaluate",
        "code": "domain.range",
        "data": {
          "operation": "utf8->string",
          "argument": "0",
          "reason": "invalid-utf8"
        }
      }
    },
    {
      "kind": "language-failure",
      "valueCount": 0,
      "condition": {
        "phase": "evaluate",
        "code": "domain.range",
        "data": {
          "operation": "utf8->string",
          "argument": "0",
          "reason": "invalid-utf8"
        }
      }
    },
    {
      "kind": "language-failure",
      "valueCount": 0,
      "condition": {
        "phase": "evaluate",
        "code": "domain.range",
        "data": {
          "operation": "utf8->string",
          "argument": "0",
          "reason": "invalid-utf8"
        }
      }
    },
    {
      "kind": "language-failure",
      "valueCount": 0,
      "condition": {
        "phase": "evaluate",
        "code": "domain.range",
        "data": {
          "operation": "utf8->string",
          "argument": "0",
          "reason": "invalid-utf8"
        }
      }
    },
    {
      "kind": "language-failure",
      "valueCount": 0,
      "condition": {
        "phase": "evaluate",
        "code": "domain.range",
        "data": {
          "operation": "utf8->string",
          "argument": "0",
          "reason": "invalid-utf8"
        }
      }
    }
  ]
}
Product invocation

Expected result

The decoder stops at the byte that first makes its prefix invalid. A missing continuation is detected at the required input end. A preceding valid A has already reserved its scalar. Its charge remains after failure. The Condition has no position field, and no partial string is returned. Product invocation awaits its 2.0 adapter.

The decoder stops at the byte that first makes its prefix invalid. A missing continuation is detected at the required input end. A preceding valid A has already reserved its scalar. Its charge remains after failure. The Condition has no position field, and no partial string is returned.

Each table gives the complete selected call trace from callable-check after operand evaluation through call-return or the committed failure. Every selected call is nontail. Input decoding, module initialization, operand evaluation, the enclosing let, and result encoding retain their own events in the complete request. The trace does not remove their charges.

The request maps each fixtureSite label to one call occurrence. Every row uses that occurrence and its event name as the site role. The path column gives its complete suffix. Extent counts created or retained semantic components. A dash means null, with the complete event reservation still required. Extent zero is an empty aggregate reservation, not a zero charge. The selected model supplies every complete requirement vector.

invalid-middle-byte uses utf8->string at decode-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"utf8->string"}accepted
2arity-checkempty—{"suppliedArguments":"1"}accepted
3callempty—{"suppliedArguments":"1","tail":false}accepted
4argument-checkargument(0)—{"domain":"X"}accepted
5sequence-stepargument(0), byte(0)—{"octet":"65"}accepted
6datum-allocateresult(0), scalar(0)1{"shape":"string-scalar","scalar":"U+0041","resultIndex":"0"}accepted
7sequence-stepargument(0), byte(1)—{"octet":"225"}accepted
8sequence-stepargument(0), byte(2)—{"octet":"128"}accepted
9sequence-stepargument(0), byte(3)—{"octet":"65"}accepted
10diagnostic-payloadargument(0), byte(3)—{"condition":{"phase":"evaluate","code":"domain.range","data":{"operation":"utf8->string","argument":"0","reason":"invalid-utf8"}},"codec":"the selected complete diagnostic codec"}accepted

The outcome is {"kind":"language-failure","valueCount":0,"condition":{"phase":"evaluate","code":"domain.range","data":{"operation":"utf8->string","argument":"0","reason":"invalid-utf8"}}}. The detecting failure site has role sequence-step and path argument(0), byte(3).

truncated-after-prefix uses utf8->string at decode-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"utf8->string"}accepted
2arity-checkempty—{"suppliedArguments":"1"}accepted
3callempty—{"suppliedArguments":"1","tail":false}accepted
4argument-checkargument(0)—{"domain":"X"}accepted
5sequence-stepargument(0), byte(0)—{"octet":"65"}accepted
6datum-allocateresult(0), scalar(0)1{"shape":"string-scalar","scalar":"U+0041","resultIndex":"0"}accepted
7sequence-stepargument(0), byte(1)—{"octet":"225"}accepted
8sequence-stepargument(0), byte(2)—{"octet":"128"}accepted
9sequence-stepargument(0), byte(3)—{"requiredEnd":"3","continuationRequired":true}accepted
10diagnostic-payloadargument(0), byte(3)—{"condition":{"phase":"evaluate","code":"domain.range","data":{"operation":"utf8->string","argument":"0","reason":"invalid-utf8"}},"codec":"the selected complete diagnostic codec"}accepted

The outcome is {"kind":"language-failure","valueCount":0,"condition":{"phase":"evaluate","code":"domain.range","data":{"operation":"utf8->string","argument":"0","reason":"invalid-utf8"}}}. The detecting failure site has role sequence-step and path argument(0), byte(3).

invalid-second-byte uses utf8->string at decode-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"utf8->string"}accepted
2arity-checkempty—{"suppliedArguments":"1"}accepted
3callempty—{"suppliedArguments":"1","tail":false}accepted
4argument-checkargument(0)—{"domain":"X"}accepted
5sequence-stepargument(0), byte(0)—{"octet":"65"}accepted
6datum-allocateresult(0), scalar(0)1{"shape":"string-scalar","scalar":"U+0041","resultIndex":"0"}accepted
7sequence-stepargument(0), byte(1)—{"octet":"226"}accepted
8sequence-stepargument(0), byte(2)—{"octet":"40"}accepted
9diagnostic-payloadargument(0), byte(2)—{"condition":{"phase":"evaluate","code":"domain.range","data":{"operation":"utf8->string","argument":"0","reason":"invalid-utf8"}},"codec":"the selected complete diagnostic codec"}accepted

The outcome is {"kind":"language-failure","valueCount":0,"condition":{"phase":"evaluate","code":"domain.range","data":{"operation":"utf8->string","argument":"0","reason":"invalid-utf8"}}}. The detecting failure site has role sequence-step and path argument(0), byte(2).

surrogate-prefix uses utf8->string at decode-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"utf8->string"}accepted
2arity-checkempty—{"suppliedArguments":"1"}accepted
3callempty—{"suppliedArguments":"1","tail":false}accepted
4argument-checkargument(0)—{"domain":"X"}accepted
5sequence-stepargument(0), byte(0)—{"octet":"65"}accepted
6datum-allocateresult(0), scalar(0)1{"shape":"string-scalar","scalar":"U+0041","resultIndex":"0"}accepted
7sequence-stepargument(0), byte(1)—{"octet":"237"}accepted
8sequence-stepargument(0), byte(2)—{"octet":"160"}accepted
9diagnostic-payloadargument(0), byte(2)—{"condition":{"phase":"evaluate","code":"domain.range","data":{"operation":"utf8->string","argument":"0","reason":"invalid-utf8"}},"codec":"the selected complete diagnostic codec"}accepted

The outcome is {"kind":"language-failure","valueCount":0,"condition":{"phase":"evaluate","code":"domain.range","data":{"operation":"utf8->string","argument":"0","reason":"invalid-utf8"}}}. The detecting failure site has role sequence-step and path argument(0), byte(2).

invalid-leading-byte uses utf8->string at decode-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"utf8->string"}accepted
2arity-checkempty—{"suppliedArguments":"1"}accepted
3callempty—{"suppliedArguments":"1","tail":false}accepted
4argument-checkargument(0)—{"domain":"X"}accepted
5sequence-stepargument(0), byte(0)—{"octet":"192"}accepted
6diagnostic-payloadargument(0), byte(0)—{"condition":{"phase":"evaluate","code":"domain.range","data":{"operation":"utf8->string","argument":"0","reason":"invalid-utf8"}},"codec":"the selected complete diagnostic codec"}accepted

The outcome is {"kind":"language-failure","valueCount":0,"condition":{"phase":"evaluate","code":"domain.range","data":{"operation":"utf8->string","argument":"0","reason":"invalid-utf8"}}}. The detecting failure site has role sequence-step and path argument(0), byte(0).

Reserve each UTF-8 result component

lispex.example.v2.standard-library.utf8-allocation-event-traces · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (let ((result
              (if (bytevector? input)
                  (utf8->string input)
                  (string->utf8 input))))
        result)))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ],
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the complete request unless a case selects a refusal"
  },
  "requests": [
    {
      "case": "decode-two-scalars",
      "input": {
        "kind": "bytevector",
        "bytes": [
          65,
          195,
          169
        ]
      }
    },
    {
      "case": "encode-three-octets",
      "input": {
        "kind": "string",
        "value": "Aé"
      }
    },
    {
      "case": "empty-bytevector",
      "input": {
        "kind": "bytevector",
        "bytes": []
      }
    },
    {
      "case": "empty-string",
      "input": {
        "kind": "string",
        "value": ""
      }
    },
    {
      "case": "empty-result-reservation-stop",
      "input": {
        "kind": "bytevector",
        "bytes": []
      },
      "resourceBoundary": {
        "event": "datum-allocate",
        "fixtureSite": "decode-call",
        "path": [
          {
            "kind": "result",
            "index": "0"
          }
        ],
        "axis": "allocation",
        "earlierReservations": "succeed through the required empty input end",
        "selectedReservation": "insufficient remaining allocation for the complete empty string aggregate",
        "otherAxes": "sufficient"
      }
    },
    {
      "case": "last-octet-reservation-stop",
      "input": {
        "kind": "string",
        "value": "Aé"
      },
      "resourceBoundary": {
        "event": "datum-allocate",
        "fixtureSite": "encode-call",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "2"
          }
        ],
        "axis": "allocation",
        "earlierReservations": "succeed including the first two output octets",
        "selectedReservation": "insufficient remaining allocation for the final output octet",
        "otherAxes": "sufficient"
      }
    }
  ],
  "fixtureSites": {
    "decode-call": "The utf8->string call in the result initializer.",
    "encode-call": "The string->utf8 call in the result initializer."
  },
  "traceScope": {
    "start": "callable-check after completed operator and operand evaluation",
    "end": "call-return or the committed first failure",
    "selectedCalls": "all mapped calls are in the initializer of result and are nontail",
    "otherRequestEvents": "retain their declared reservations outside this call trace"
  }
}
Event account · utf8->string
decode-two-scalars · #u8(65 195 169)
utf8->string · decode-two-scalars
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"decode-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"decode-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5sequence-stepargument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]}null
6datum-allocateresult(0) scalar(0){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"scalar","index":"0"}]}1
7sequence-stepargument(0) byte(1){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"1"}]}null
8sequence-stepargument(0) byte(2){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"2"}]}null
9datum-allocateresult(0) scalar(1){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"scalar","index":"1"}]}1
10sequence-stepargument(0) byte(3){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"3"}]}null
11call-returncall{"fixtureSite":"decode-call","role":"call-return","path":[]}null
Result"Aé"
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "string",
    "value": "Aé"
  }
}
Trace details 1
{
  "case": "decode-two-scalars",
  "operation": "utf8->string",
  "arguments": [
    {
      "kind": "bytevector",
      "bytes": [
        65,
        195,
        169
      ]
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "utf8->string"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "decode-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "65"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "decode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "scalar",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "string-scalar",
          "scalar": "U+0041",
          "resultIndex": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "195"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "2"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "169"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "decode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "scalar",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "string-scalar",
          "scalar": "U+00E9",
          "resultIndex": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "3"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "requiredEnd": "3",
          "continuationRequired": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "decode-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "string",
      "value": "Aé"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · string->utf8
encode-three-octets · "Aé"
string->utf8 · encode-three-octets
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"encode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"encode-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"encode-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"encode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5text-scalar-scanargument(0) field(scan) scalar(0){"fixtureSite":"encode-call","role":"text-scalar-scan","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"scan"},{"kind":"scalar","index":"0"}]}null
6datum-allocateresult(0) byte(0){"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"byte","index":"0"}]}1
7text-scalar-scanargument(0) field(scan) scalar(1){"fixtureSite":"encode-call","role":"text-scalar-scan","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"scan"},{"kind":"scalar","index":"1"}]}null
8datum-allocateresult(0) byte(1){"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"byte","index":"1"}]}1
9datum-allocateresult(0) byte(2){"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"byte","index":"2"}]}1
10text-scalar-scanargument(0) field(scan) scalar(2){"fixtureSite":"encode-call","role":"text-scalar-scan","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"scan"},{"kind":"scalar","index":"2"}]}null
11call-returncall{"fixtureSite":"encode-call","role":"call-return","path":[]}null
Result#u8(65 195 169)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "bytevector",
    "bytes": [
      65,
      195,
      169
    ]
  }
}
Trace details 2
{
  "case": "encode-three-octets",
  "operation": "string->utf8",
  "arguments": [
    {
      "kind": "string",
      "value": "Aé"
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "encode-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "string->utf8"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "encode-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "encode-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "encode-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "T"
        },
        "status": "accepted"
      }
    },
    {
      "event": "text-scalar-scan",
      "site": {
        "fixtureSite": "encode-call",
        "role": "text-scalar-scan",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "field",
            "name": "scan"
          },
          {
            "kind": "scalar",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "scalar": "U+0041"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "encode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "bytevector-octet",
          "octet": "65",
          "resultIndex": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "text-scalar-scan",
      "site": {
        "fixtureSite": "encode-call",
        "role": "text-scalar-scan",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "field",
            "name": "scan"
          },
          {
            "kind": "scalar",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "scalar": "U+00E9"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "encode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "bytevector-octet",
          "octet": "195",
          "resultIndex": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "encode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "2"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "bytevector-octet",
          "octet": "169",
          "resultIndex": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "text-scalar-scan",
      "site": {
        "fixtureSite": "encode-call",
        "role": "text-scalar-scan",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "field",
            "name": "scan"
          },
          {
            "kind": "scalar",
            "index": "2"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "requiredEnd": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "encode-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "bytevector",
      "bytes": [
        65,
        195,
        169
      ]
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · utf8->string
empty-bytevector · #u8()
utf8->string · empty-bytevector
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"decode-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"decode-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5sequence-stepargument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]}null
6datum-allocateresult(0){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]}0
7call-returncall{"fixtureSite":"decode-call","role":"call-return","path":[]}null
Result""
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "string",
    "value": ""
  }
}
Trace details 3
{
  "case": "empty-bytevector",
  "operation": "utf8->string",
  "arguments": [
    {
      "kind": "bytevector",
      "bytes": []
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "utf8->string"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "decode-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "requiredEnd": "0",
          "continuationRequired": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "decode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "0",
        "inputs": {
          "shape": "string",
          "scalarCount": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "decode-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "string",
      "value": ""
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · string->utf8
empty-string · ""
string->utf8 · empty-string
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"encode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"encode-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"encode-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"encode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5text-scalar-scanargument(0) field(scan) scalar(0){"fixtureSite":"encode-call","role":"text-scalar-scan","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"scan"},{"kind":"scalar","index":"0"}]}null
6datum-allocateresult(0){"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]}0
7call-returncall{"fixtureSite":"encode-call","role":"call-return","path":[]}null
Result#u8()
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "bytevector",
    "bytes": []
  }
}
Trace details 4
{
  "case": "empty-string",
  "operation": "string->utf8",
  "arguments": [
    {
      "kind": "string",
      "value": ""
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "encode-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "string->utf8"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "encode-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "encode-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "encode-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "T"
        },
        "status": "accepted"
      }
    },
    {
      "event": "text-scalar-scan",
      "site": {
        "fixtureSite": "encode-call",
        "role": "text-scalar-scan",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "field",
            "name": "scan"
          },
          {
            "kind": "scalar",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "requiredEnd": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "encode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "0",
        "inputs": {
          "shape": "bytevector",
          "octetCount": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "encode-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "bytevector",
      "bytes": []
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · utf8->string
empty-result-reservation-stop · #u8()
utf8->string · empty-result-reservation-stop
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"decode-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"decode-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5sequence-stepargument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]}null
6datum-allocateresult(0){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]}0
Resultresource-stop · allocation
Outcome details
{
  "kind": "resource-stop",
  "valueCount": 0,
  "terminal": true,
  "axis": "allocation",
  "operation": "utf8->string",
  "event": "datum-allocate",
  "site": {
    "fixtureSite": "decode-call",
    "role": "datum-allocate",
    "path": [
      {
        "kind": "result",
        "index": "0"
      }
    ]
  },
  "diagnosticIdentity": {
    "phase": "evaluate",
    "code": "resource.exhausted"
  },
  "partialResult": false
}
Trace details 5
{
  "case": "empty-result-reservation-stop",
  "operation": "utf8->string",
  "arguments": [
    {
      "kind": "bytevector",
      "bytes": []
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "utf8->string"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "decode-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "decode-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "decode-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "requiredEnd": "0",
          "continuationRequired": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "decode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "0",
        "inputs": {
          "shape": "string",
          "scalarCount": "0"
        },
        "status": "refused"
      }
    }
  ],
  "outcome": {
    "kind": "resource-stop",
    "valueCount": 0,
    "terminal": true,
    "axis": "allocation",
    "operation": "utf8->string",
    "event": "datum-allocate",
    "site": {
      "fixtureSite": "decode-call",
      "role": "datum-allocate",
      "path": [
        {
          "kind": "result",
          "index": "0"
        }
      ]
    },
    "diagnosticIdentity": {
      "phase": "evaluate",
      "code": "resource.exhausted"
    },
    "partialResult": false
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · string->utf8
last-octet-reservation-stop · "Aé"
string->utf8 · last-octet-reservation-stop
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"encode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"encode-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"encode-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"encode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5text-scalar-scanargument(0) field(scan) scalar(0){"fixtureSite":"encode-call","role":"text-scalar-scan","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"scan"},{"kind":"scalar","index":"0"}]}null
6datum-allocateresult(0) byte(0){"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"byte","index":"0"}]}1
7text-scalar-scanargument(0) field(scan) scalar(1){"fixtureSite":"encode-call","role":"text-scalar-scan","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"scan"},{"kind":"scalar","index":"1"}]}null
8datum-allocateresult(0) byte(1){"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"byte","index":"1"}]}1
9datum-allocateresult(0) byte(2){"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"byte","index":"2"}]}1
Resultresource-stop · allocation
Outcome details
{
  "kind": "resource-stop",
  "valueCount": 0,
  "terminal": true,
  "axis": "allocation",
  "operation": "string->utf8",
  "event": "datum-allocate",
  "site": {
    "fixtureSite": "encode-call",
    "role": "datum-allocate",
    "path": [
      {
        "kind": "result",
        "index": "0"
      },
      {
        "kind": "byte",
        "index": "2"
      }
    ]
  },
  "diagnosticIdentity": {
    "phase": "evaluate",
    "code": "resource.exhausted"
  },
  "partialResult": false
}
Trace details 6
{
  "case": "last-octet-reservation-stop",
  "operation": "string->utf8",
  "arguments": [
    {
      "kind": "string",
      "value": "Aé"
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "encode-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "string->utf8"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "encode-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "encode-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "encode-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "T"
        },
        "status": "accepted"
      }
    },
    {
      "event": "text-scalar-scan",
      "site": {
        "fixtureSite": "encode-call",
        "role": "text-scalar-scan",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "field",
            "name": "scan"
          },
          {
            "kind": "scalar",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "scalar": "U+0041"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "encode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "bytevector-octet",
          "octet": "65",
          "resultIndex": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "text-scalar-scan",
      "site": {
        "fixtureSite": "encode-call",
        "role": "text-scalar-scan",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "field",
            "name": "scan"
          },
          {
            "kind": "scalar",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "scalar": "U+00E9"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "encode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "bytevector-octet",
          "octet": "195",
          "resultIndex": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "encode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "2"
          }
        ]
      },
      "reservation": {
        "extent": "1",
        "inputs": {
          "shape": "bytevector-octet",
          "octet": "169",
          "resultIndex": "2"
        },
        "status": "refused"
      }
    }
  ],
  "outcome": {
    "kind": "resource-stop",
    "valueCount": 0,
    "terminal": true,
    "axis": "allocation",
    "operation": "string->utf8",
    "event": "datum-allocate",
    "site": {
      "fixtureSite": "encode-call",
      "role": "datum-allocate",
      "path": [
        {
          "kind": "result",
          "index": "0"
        },
        {
          "kind": "byte",
          "index": "2"
        }
      ]
    },
    "diagnosticIdentity": {
      "phase": "evaluate",
      "code": "resource.exhausted"
    },
    "partialResult": false
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "outcomes": [
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "string",
        "value": "Aé"
      }
    },
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "bytevector",
        "bytes": [
          65,
          195,
          169
        ]
      }
    },
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "string",
        "value": ""
      }
    },
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "bytevector",
        "bytes": []
      }
    },
    {
      "kind": "resource-stop",
      "valueCount": 0,
      "terminal": true,
      "axis": "allocation",
      "operation": "utf8->string",
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "decode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          }
        ]
      },
      "diagnosticIdentity": {
        "phase": "evaluate",
        "code": "resource.exhausted"
      },
      "partialResult": false
    },
    {
      "kind": "resource-stop",
      "valueCount": 0,
      "terminal": true,
      "axis": "allocation",
      "operation": "string->utf8",
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "encode-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "2"
          }
        ]
      },
      "diagnosticIdentity": {
        "phase": "evaluate",
        "code": "resource.exhausted"
      },
      "partialResult": false
    }
  ]
}
Product invocation

Expected result

U+0041 encodes as octet 65. U+00E9 encodes as octets 195 and 169. Decoding therefore allocates two scalars while encoding allocates three octets. Empty conversion visits its required end before one extent-zero aggregate reservation. A refused component returns no partial result and refunds no earlier allocation. Product invocation awaits its 2.0 adapter.

U+0041 encodes as octet 65. U+00E9 encodes as octets 195 and 169. Decoding therefore allocates two scalars while encoding allocates three octets. Empty conversion visits its required end before one extent-zero aggregate reservation. A refused component returns no partial result and refunds no earlier allocation.

Each table gives the complete selected call trace from callable-check after operand evaluation through call-return or the committed failure. Every selected call is nontail. Input decoding, module initialization, operand evaluation, the enclosing let, and result encoding retain their own events in the complete request. The trace does not remove their charges.

The request maps each fixtureSite label to one call occurrence. Every row uses that occurrence and its event name as the site role. The path column gives its complete suffix. Extent counts created or retained semantic components. A dash means null, with the complete event reservation still required. Extent zero is an empty aggregate reservation, not a zero charge. The selected model supplies every complete requirement vector.

decode-two-scalars uses utf8->string at decode-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"utf8->string"}accepted
2arity-checkempty—{"suppliedArguments":"1"}accepted
3callempty—{"suppliedArguments":"1","tail":false}accepted
4argument-checkargument(0)—{"domain":"X"}accepted
5sequence-stepargument(0), byte(0)—{"octet":"65"}accepted
6datum-allocateresult(0), scalar(0)1{"shape":"string-scalar","scalar":"U+0041","resultIndex":"0"}accepted
7sequence-stepargument(0), byte(1)—{"octet":"195"}accepted
8sequence-stepargument(0), byte(2)—{"octet":"169"}accepted
9datum-allocateresult(0), scalar(1)1{"shape":"string-scalar","scalar":"U+00E9","resultIndex":"1"}accepted
10sequence-stepargument(0), byte(3)—{"requiredEnd":"3","continuationRequired":false}accepted
11call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"string","value":"Aé"}}.

encode-three-octets uses string->utf8 at encode-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"string->utf8"}accepted
2arity-checkempty—{"suppliedArguments":"1"}accepted
3callempty—{"suppliedArguments":"1","tail":false}accepted
4argument-checkargument(0)—{"domain":"T"}accepted
5text-scalar-scanargument(0), field(scan), scalar(0)—{"scalar":"U+0041"}accepted
6datum-allocateresult(0), byte(0)1{"shape":"bytevector-octet","octet":"65","resultIndex":"0"}accepted
7text-scalar-scanargument(0), field(scan), scalar(1)—{"scalar":"U+00E9"}accepted
8datum-allocateresult(0), byte(1)1{"shape":"bytevector-octet","octet":"195","resultIndex":"1"}accepted
9datum-allocateresult(0), byte(2)1{"shape":"bytevector-octet","octet":"169","resultIndex":"2"}accepted
10text-scalar-scanargument(0), field(scan), scalar(2)—{"requiredEnd":"2"}accepted
11call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"bytevector","bytes":[65,195,169]}}.

empty-bytevector uses utf8->string at decode-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"utf8->string"}accepted
2arity-checkempty—{"suppliedArguments":"1"}accepted
3callempty—{"suppliedArguments":"1","tail":false}accepted
4argument-checkargument(0)—{"domain":"X"}accepted
5sequence-stepargument(0), byte(0)—{"requiredEnd":"0","continuationRequired":false}accepted
6datum-allocateresult(0)0{"shape":"string","scalarCount":"0"}accepted
7call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"string","value":""}}.

empty-string uses string->utf8 at encode-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"string->utf8"}accepted
2arity-checkempty—{"suppliedArguments":"1"}accepted
3callempty—{"suppliedArguments":"1","tail":false}accepted
4argument-checkargument(0)—{"domain":"T"}accepted
5text-scalar-scanargument(0), field(scan), scalar(0)—{"requiredEnd":"0"}accepted
6datum-allocateresult(0)0{"shape":"bytevector","octetCount":"0"}accepted
7call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"bytevector","bytes":[]}}.

empty-result-reservation-stop uses utf8->string at decode-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"utf8->string"}accepted
2arity-checkempty—{"suppliedArguments":"1"}accepted
3callempty—{"suppliedArguments":"1","tail":false}accepted
4argument-checkargument(0)—{"domain":"X"}accepted
5sequence-stepargument(0), byte(0)—{"requiredEnd":"0","continuationRequired":false}accepted
6datum-allocateresult(0)0{"shape":"string","scalarCount":"0"}refused

The outcome is {"kind":"resource-stop","valueCount":0,"terminal":true,"axis":"allocation","operation":"utf8->string","event":"datum-allocate","site":{"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]},"diagnosticIdentity":{"phase":"evaluate","code":"resource.exhausted"},"partialResult":false}.

last-octet-reservation-stop uses string->utf8 at encode-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"string->utf8"}accepted
2arity-checkempty—{"suppliedArguments":"1"}accepted
3callempty—{"suppliedArguments":"1","tail":false}accepted
4argument-checkargument(0)—{"domain":"T"}accepted
5text-scalar-scanargument(0), field(scan), scalar(0)—{"scalar":"U+0041"}accepted
6datum-allocateresult(0), byte(0)1{"shape":"bytevector-octet","octet":"65","resultIndex":"0"}accepted
7text-scalar-scanargument(0), field(scan), scalar(1)—{"scalar":"U+00E9"}accepted
8datum-allocateresult(0), byte(1)1{"shape":"bytevector-octet","octet":"195","resultIndex":"1"}accepted
9datum-allocateresult(0), byte(2)1{"shape":"bytevector-octet","octet":"169","resultIndex":"2"}refused

The outcome is {"kind":"resource-stop","valueCount":0,"terminal":true,"axis":"allocation","operation":"string->utf8","event":"datum-allocate","site":{"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"byte","index":"2"}]},"diagnosticIdentity":{"phase":"evaluate","code":"resource.exhausted"},"partialResult":false}.

Reserve each octet integer and pair together

lispex.example.v2.standard-library.bytevector-list-event-traces · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (let ((result
              (bytevector->list input)))
        result)))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ],
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the complete request unless a case selects a refusal"
  },
  "requests": [
    {
      "case": "two-octets",
      "input": {
        "kind": "bytevector",
        "bytes": [
          65,
          255
        ]
      }
    },
    {
      "case": "empty-bytevector",
      "input": {
        "kind": "bytevector",
        "bytes": []
      }
    },
    {
      "case": "second-composite-reservation-stop",
      "input": {
        "kind": "bytevector",
        "bytes": [
          65,
          255
        ]
      },
      "resourceBoundary": {
        "event": "datum-allocate",
        "fixtureSite": "bytevector-list-call",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "1"
          }
        ],
        "axis": "allocation",
        "earlierReservations": "succeed including the first integer and pair",
        "selectedReservation": "insufficient remaining allocation for the complete second integer and pair",
        "otherAxes": "sufficient"
      }
    }
  ],
  "fixtureSites": {
    "bytevector-list-call": "The bytevector->list call in the initializer of result."
  },
  "traceScope": {
    "start": "callable-check after completed operator and operand evaluation",
    "end": "call-return or the committed first failure",
    "selectedCalls": "all mapped calls are in the initializer of result and are nontail",
    "otherRequestEvents": "retain their declared reservations outside this call trace"
  }
}
Event account · bytevector->list
two-octets · #u8(65 255)
bytevector->list · two-octets
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"bytevector-list-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"bytevector-list-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"bytevector-list-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"bytevector-list-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5sequence-stepargument(0) field(length){"fixtureSite":"bytevector-list-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"length"}]}null
6sequence-stepargument(0) byte(0){"fixtureSite":"bytevector-list-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]}null
7datum-allocateresult(0) element(0){"fixtureSite":"bytevector-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"0"}]}3
8sequence-stepargument(0) byte(1){"fixtureSite":"bytevector-list-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"1"}]}null
9datum-allocateresult(0) element(1){"fixtureSite":"bytevector-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"1"}]}3
10call-returncall{"fixtureSite":"bytevector-list-call","role":"call-return","path":[]}null
Result(65 255)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": [
      {
        "kind": "integer",
        "value": "65"
      },
      {
        "kind": "integer",
        "value": "255"
      }
    ]
  }
}
Trace details 1
{
  "case": "two-octets",
  "operation": "bytevector->list",
  "arguments": [
    {
      "kind": "bytevector",
      "bytes": [
        65,
        255
      ]
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "bytevector->list"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "65"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "3",
        "inputs": {
          "shape": "octet-integer-and-pair",
          "integer": {
            "kind": "integer",
            "value": "65"
          },
          "pairComponents": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "255"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": "3",
        "inputs": {
          "shape": "octet-integer-and-pair",
          "integer": {
            "kind": "integer",
            "value": "255"
          },
          "pairComponents": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "list",
      "items": [
        {
          "kind": "integer",
          "value": "65"
        },
        {
          "kind": "integer",
          "value": "255"
        }
      ]
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · bytevector->list
empty-bytevector · #u8()
bytevector->list · empty-bytevector
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"bytevector-list-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"bytevector-list-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"bytevector-list-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"bytevector-list-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5sequence-stepargument(0) field(length){"fixtureSite":"bytevector-list-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"length"}]}null
6call-returncall{"fixtureSite":"bytevector-list-call","role":"call-return","path":[]}null
Result()
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": []
  }
}
Trace details 2
{
  "case": "empty-bytevector",
  "operation": "bytevector->list",
  "arguments": [
    {
      "kind": "bytevector",
      "bytes": []
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "bytevector->list"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "0"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call-return",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "call-return",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "valueCount": "1"
        },
        "status": "accepted"
      }
    }
  ],
  "outcome": {
    "kind": "value",
    "valueCount": 1,
    "datum": {
      "kind": "list",
      "items": []
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Event account · bytevector->list
second-composite-reservation-stop · #u8(65 255)
bytevector->list · second-composite-reservation-stop
№EventSiteExtent
1callable-checkfield(operator){"fixtureSite":"bytevector-list-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]}null
2arity-checkcall{"fixtureSite":"bytevector-list-call","role":"arity-check","path":[]}null
3callcall{"fixtureSite":"bytevector-list-call","role":"call","path":[]}null
4argument-checkargument(0){"fixtureSite":"bytevector-list-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]}null
5sequence-stepargument(0) field(length){"fixtureSite":"bytevector-list-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"length"}]}null
6sequence-stepargument(0) byte(0){"fixtureSite":"bytevector-list-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]}null
7datum-allocateresult(0) element(0){"fixtureSite":"bytevector-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"0"}]}3
8sequence-stepargument(0) byte(1){"fixtureSite":"bytevector-list-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"1"}]}null
9datum-allocateresult(0) element(1){"fixtureSite":"bytevector-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"1"}]}3
Resultresource-stop · allocation
Outcome details
{
  "kind": "resource-stop",
  "valueCount": 0,
  "terminal": true,
  "axis": "allocation",
  "operation": "bytevector->list",
  "event": "datum-allocate",
  "site": {
    "fixtureSite": "bytevector-list-call",
    "role": "datum-allocate",
    "path": [
      {
        "kind": "result",
        "index": "0"
      },
      {
        "kind": "element",
        "index": "1"
      }
    ]
  },
  "diagnosticIdentity": {
    "phase": "evaluate",
    "code": "resource.exhausted"
  },
  "partialResult": false
}
Trace details 3
{
  "case": "second-composite-reservation-stop",
  "operation": "bytevector->list",
  "arguments": [
    {
      "kind": "bytevector",
      "bytes": [
        65,
        255
      ]
    }
  ],
  "events": [
    {
      "event": "callable-check",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "callable-check",
        "path": [
          {
            "kind": "field",
            "name": "operator"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "procedure": "bytevector->list"
        },
        "status": "accepted"
      }
    },
    {
      "event": "arity-check",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "arity-check",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1"
        },
        "status": "accepted"
      }
    },
    {
      "event": "call",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "call",
        "path": []
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "suppliedArguments": "1",
          "tail": false
        },
        "status": "accepted"
      }
    },
    {
      "event": "argument-check",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "argument-check",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "domain": "X"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "field",
            "name": "length"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "storedLength": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "65"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "0"
          }
        ]
      },
      "reservation": {
        "extent": "3",
        "inputs": {
          "shape": "octet-integer-and-pair",
          "integer": {
            "kind": "integer",
            "value": "65"
          },
          "pairComponents": "2"
        },
        "status": "accepted"
      }
    },
    {
      "event": "sequence-step",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "sequence-step",
        "path": [
          {
            "kind": "argument",
            "index": "0"
          },
          {
            "kind": "byte",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": null,
        "inputs": {
          "octet": "255"
        },
        "status": "accepted"
      }
    },
    {
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "1"
          }
        ]
      },
      "reservation": {
        "extent": "3",
        "inputs": {
          "shape": "octet-integer-and-pair",
          "integer": {
            "kind": "integer",
            "value": "255"
          },
          "pairComponents": "2"
        },
        "status": "refused"
      }
    }
  ],
  "outcome": {
    "kind": "resource-stop",
    "valueCount": 0,
    "terminal": true,
    "axis": "allocation",
    "operation": "bytevector->list",
    "event": "datum-allocate",
    "site": {
      "fixtureSite": "bytevector-list-call",
      "role": "datum-allocate",
      "path": [
        {
          "kind": "result",
          "index": "0"
        },
        {
          "kind": "element",
          "index": "1"
        }
      ]
    },
    "diagnosticIdentity": {
      "phase": "evaluate",
      "code": "resource.exhausted"
    },
    "partialResult": false
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "outcomes": [
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "list",
        "items": [
          {
            "kind": "integer",
            "value": "65"
          },
          {
            "kind": "integer",
            "value": "255"
          }
        ]
      }
    },
    {
      "kind": "value",
      "valueCount": 1,
      "datum": {
        "kind": "list",
        "items": []
      }
    },
    {
      "kind": "resource-stop",
      "valueCount": 0,
      "terminal": true,
      "axis": "allocation",
      "operation": "bytevector->list",
      "event": "datum-allocate",
      "site": {
        "fixtureSite": "bytevector-list-call",
        "role": "datum-allocate",
        "path": [
          {
            "kind": "result",
            "index": "0"
          },
          {
            "kind": "element",
            "index": "1"
          }
        ]
      },
      "diagnosticIdentity": {
        "phase": "evaluate",
        "code": "resource.exhausted"
      },
      "partialResult": false
    }
  ]
}
Product invocation

Expected result

Bytevector->list reads the stored length once. Each byte visit is followed by one extent-three reservation for its exact integer and pair together. The second refused reservation creates neither of its components. The first reservation remains charged. Empty input returns the empty list after the length visit without an allocation or extra end visit. Product invocation awaits its 2.0 adapter.

Bytevector->list reads the stored length once. Each byte visit is followed by one extent-three reservation for its exact integer and pair together. The second refused reservation creates neither of its components. The first reservation remains charged. Empty input returns the empty list after the length visit without an allocation or extra end visit.

Each table gives the complete selected call trace from callable-check after operand evaluation through call-return or the committed failure. Every selected call is nontail. Input decoding, module initialization, operand evaluation, the enclosing let, and result encoding retain their own events in the complete request. The trace does not remove their charges.

The request maps each fixtureSite label to one call occurrence. Every row uses that occurrence and its event name as the site role. The path column gives its complete suffix. Extent counts created or retained semantic components. A dash means null, with the complete event reservation still required. Extent zero is an empty aggregate reservation, not a zero charge. The selected model supplies every complete requirement vector.

two-octets uses bytevector->list at bytevector-list-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"bytevector->list"}accepted
2arity-checkempty—{"suppliedArguments":"1"}accepted
3callempty—{"suppliedArguments":"1","tail":false}accepted
4argument-checkargument(0)—{"domain":"X"}accepted
5sequence-stepargument(0), field(length)—{"storedLength":"2"}accepted
6sequence-stepargument(0), byte(0)—{"octet":"65"}accepted
7datum-allocateresult(0), element(0)3{"shape":"octet-integer-and-pair","integer":{"kind":"integer","value":"65"},"pairComponents":"2"}accepted
8sequence-stepargument(0), byte(1)—{"octet":"255"}accepted
9datum-allocateresult(0), element(1)3{"shape":"octet-integer-and-pair","integer":{"kind":"integer","value":"255"},"pairComponents":"2"}accepted
10call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"list","items":[{"kind":"integer","value":"65"},{"kind":"integer","value":"255"}]}}.

empty-bytevector uses bytevector->list at bytevector-list-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"bytevector->list"}accepted
2arity-checkempty—{"suppliedArguments":"1"}accepted
3callempty—{"suppliedArguments":"1","tail":false}accepted
4argument-checkargument(0)—{"domain":"X"}accepted
5sequence-stepargument(0), field(length)—{"storedLength":"0"}accepted
6call-returnempty—{"valueCount":"1"}accepted

The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"list","items":[]}}.

second-composite-reservation-stop uses bytevector->list at bytevector-list-call.

OrderEventSite pathExtentReservation inputReservation
1callable-checkfield(operator)—{"procedure":"bytevector->list"}accepted
2arity-checkempty—{"suppliedArguments":"1"}accepted
3callempty—{"suppliedArguments":"1","tail":false}accepted
4argument-checkargument(0)—{"domain":"X"}accepted
5sequence-stepargument(0), field(length)—{"storedLength":"2"}accepted
6sequence-stepargument(0), byte(0)—{"octet":"65"}accepted
7datum-allocateresult(0), element(0)3{"shape":"octet-integer-and-pair","integer":{"kind":"integer","value":"65"},"pairComponents":"2"}accepted
8sequence-stepargument(0), byte(1)—{"octet":"255"}accepted
9datum-allocateresult(0), element(1)3{"shape":"octet-integer-and-pair","integer":{"kind":"integer","value":"255"},"pairComponents":"2"}refused

The outcome is {"kind":"resource-stop","valueCount":0,"terminal":true,"axis":"allocation","operation":"bytevector->list","event":"datum-allocate","site":{"fixtureSite":"bytevector-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"1"}]},"diagnosticIdentity":{"phase":"evaluate","code":"resource.exhausted"},"partialResult":false}.

Higher-order procedures

A guest callback is a Lispex procedure supplied to another Lispex procedure. It executes with the same evaluation limits. Procedures defines its argument and value rules.

List validation, traversal, callback invocation, and result construction each contribute their required resource events. A library implementation preserves their specified order when it moves traversal into guest code.

Internal hash iteration cannot choose the visible order of results or failures. Operations on mapped records follow the canonical key order defined in Values and text.

9.7 Validate lists before ordered callbacks

A traversal that requires a proper list validates that list before invoking its first guest callback. The list traversal protocol fixes all list signatures, length checks, callback arities, and result counts. Map invokes callbacks from the first element toward the tail. Fold-right invokes them from the tail toward the first element. The first failure ends the traversal.

Why

A malformed tail must not lose to a callback that should never run. A fixed callback order determines which condition and resource stop occurs first.

Map a proper list

lispex.example.v2.standard-library.map-values · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (map (lambda (item) (+ item 1)) input)))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": [
          {
            "kind": "integer",
            "value": "1"
          },
          {
            "kind": "integer",
            "value": "2"
          },
          {
            "kind": "integer",
            "value": "3"
          }
        ]
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result(2 3 4)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": [
      {
        "kind": "integer",
        "value": "2"
      },
      {
        "kind": "integer",
        "value": "3"
      },
      {
        "kind": "integer",
        "value": "4"
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

The rule returns the list of exact integers 2, 3, and 4 in that order. Product invocation awaits its 2.0 adapter.

The map call validates the input list and constructs its result from callback values in input order. Callbacks and construction use the same evaluation budget.

Reject a malformed tail before callbacks

lispex.example.v2.standard-library.map-improper-list · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (map (lambda (item) (car item)) input)))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "pair",
        "car": {
          "kind": "list",
          "items": []
        },
        "cdr": {
          "kind": "integer",
          "value": "7"
        }
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "map",
      "argument": "1",
      "path": [
        {
          "kind": "cdr"
        }
      ],
      "expected": "proper-list",
      "actual": "integer"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "callbackInvocations": 0
}
Product invocation

Expected result

The improper list produces a map domain condition. The callback is never invoked. Product invocation awaits its 2.0 adapter.

Calling car on the first element would fail. The list validation failure occurs earlier because the tail is an integer. Finite limits permit the full domain check.

Keep the first callback failure

lispex.example.v2.standard-library.map-first-failure · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (map (lambda (item) (car item)) input)))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": [
          {
            "kind": "list",
            "items": []
          },
          {
            "kind": "integer",
            "value": "7"
          }
        ]
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "car",
      "argument": "0",
      "path": [],
      "expected": "pair",
      "actual": "empty-list"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "callbackInvocations": 1,
  "failedInputPosition": 0
}
Product invocation

Expected result

The first callback fails on the empty list. The second callback is never invoked. Product invocation awaits its 2.0 adapter.

The outer list is proper. Its first element is an empty list and its second element is an integer. Reversing callback order would produce a different domain condition.

9.8 Validate complete list tuples before callbacks

Map and for-each accept a procedure followed by one or more proper lists. Folds also require an explicit seed. The callback signatures and empty results are fixed below.

Procedure formCallback formRequired callback resultsEmpty result
(map p xs1 ... xsm)(p x1 ... xm)OneEmpty list
(for-each p xs1 ... xsm)(p x1 ... xm)Any finite count, discardedEmpty list
(fold-left p seed xs1 ... xsm)(p accumulator x1 ... xm)OneSeed
(fold-right p seed xs1 ... xsm)(p x1 ... xm accumulator)OneSeed

Each tuple takes one element from every list in list argument order. After the procedure domain check, validate every list spine completely from left to right. Then compare list lengths against the first list in argument order. The first mismatch produces domain.range with unequal-lengths. No list is truncated.

After equal lengths are established, check that the callback accepts the required argument count. This check also runs for empty lists. It precedes the first callback. Fixed and rest procedures use the same accepted-arity rule from Procedures.

Map, for-each, and fold-left invoke callbacks in ascending element order. Fold-right invokes them in descending element order. Each fold uses the previous callback result as its next accumulator. The seed starts that sequence. A wrong callback result count is a runtime.value-count condition at result-check.

Map checks one callback result and allocates its result pair before advancing to the next tuple. That allocation can stop evaluation before a later callback failure. For-each discards every callback result sequence and returns one empty list after completion. It produces no guest output.

Fold-right reserves its logical traversal state before its first callback. The state follows list argument and ascending index order. Callback execution then proceeds from the last index toward the first. Host stack size cannot change that order or introduce another recursion bound.

Filter, find, any, and every accept exactly one procedure and one proper list. They validate the whole list and unary callback arity before invoking a callback. Every callback must return one value. Only #f is false.

Filter retains the original elements for true results in their original order. It allocates each retained result pair before continuing. Find returns the first matching element. Any returns the first true callback value. Every returns the first false value or the last true callback value. Any returns #f for an empty list. Every returns #t for an empty list.

These procedures stop at the first failure. Find, any, and every may stop callbacks at their stated result. That early result never skips initial proper-list or callback-arity checks.

Why

Rejecting unequal lengths prevents a rule from silently dropping input data. Complete list validation fixes failure priority before guest code runs. Explicit accumulator positions and callback order make folds reproducible. Checking callback arity on empty input keeps the accepted call contract independent of list length.

Pass each list tuple in argument order

lispex.example.v2.standard-library.multi-list-map · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (list (map (lambda (a b c) (- a b c)) '(1 2) '(10 20) '(100 200))
            (map + '(1 2) '(10 20))
            (map (lambda (x) x) '()))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": []
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result((-109 -218) (11 22) ())
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": [
      {
        "kind": "list",
        "items": [
          {
            "kind": "integer",
            "value": "-109"
          },
          {
            "kind": "integer",
            "value": "-218"
          }
        ]
      },
      {
        "kind": "list",
        "items": [
          {
            "kind": "integer",
            "value": "11"
          },
          {
            "kind": "integer",
            "value": "22"
          }
        ]
      },
      {
        "kind": "list",
        "items": []
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

Map passes one element from each list in supplied list order. A valid unary callback with an empty list returns the empty list. Product invocation awaits its 2.0 adapter.

The three-list subtraction exposes argument order. The variadic addition procedure also satisfies the required callback arity.

Finish every list shape before callback checks

lispex.example.v2.standard-library.traversal-validation-order · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (choice)
      (cond
        ((= choice 0) (map 0 (cons 1 2)))
        ((= choice 1) (map (lambda (a b) (car '())) '(1) (cons 2 3)))
        ((= choice 2) (map (lambda (x) (car '())) '(1 2) '(3)))
        ((= choice 3) (map (lambda (a b c) 0) '() '(1) (cons 2 3)))
        ((= choice 4) (filter (lambda (x) #t) (cons 1 2)))
        ((= choice 5) (any (lambda (x) #t) (cons 1 2)))
        (else (fold-right (lambda (a b acc) (car '())) 0 '() '(1))))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "1"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "2"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "3"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "4"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "5"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "6"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "map",
      "argument": "0",
      "path": [],
      "expected": "procedure",
      "actual": "integer"
    }
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "map",
      "argument": "2",
      "path": [
        {
          "kind": "cdr"
        }
      ],
      "expected": "proper-list",
      "actual": "integer"
    }
  }
}
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "map",
      "argument": "2",
      "reason": "unequal-lengths"
    }
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "map",
      "argument": "3",
      "path": [
        {
          "kind": "cdr"
        }
      ],
      "expected": "proper-list",
      "actual": "integer"
    }
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "filter",
      "argument": "1",
      "path": [
        {
          "kind": "cdr"
        }
      ],
      "expected": "proper-list",
      "actual": "integer"
    }
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "any",
      "argument": "1",
      "path": [
        {
          "kind": "cdr"
        }
      ],
      "expected": "proper-list",
      "actual": "integer"
    }
  }
}
Conditiondomain.range
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.range",
    "data": {
      "operation": "fold-right",
      "argument": "3",
      "reason": "unequal-lengths"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "callbackInvocations": [
    0,
    0,
    0,
    0,
    0,
    0,
    0
  ]
}
Product invocation

Expected result

The procedure domain precedes list validation. Later improper lists precede length mismatches, callback arity, and callback execution. Product invocation awaits its 2.0 adapter.

A true first predicate result cannot hide an improper tail. The list-length failure precedes the wrong callback arity in the third request.

Check callback arity even for empty lists

lispex.example.v2.standard-library.empty-callback-arity · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (choice)
      (cond
        ((= choice 0) (map (lambda (a b) a) '()))
        ((= choice 1) (for-each (lambda (a b) a) '()))
        ((= choice 2) (fold-left (lambda (x) x) 0 '()))
        ((= choice 3) (fold-right (lambda (x) x) 0 '()))
        ((= choice 4) (filter (lambda () #t) '()))
        (else (every (lambda () #t) '())))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "1"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "2"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "3"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "4"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "5"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Conditionruntime.arity
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "runtime.arity",
    "data": {
      "minimum": "2",
      "maximum": "2",
      "actual": "1"
    }
  }
}
Conditionruntime.arity
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "runtime.arity",
    "data": {
      "minimum": "2",
      "maximum": "2",
      "actual": "1"
    }
  }
}
Conditionruntime.arity
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "runtime.arity",
    "data": {
      "minimum": "1",
      "maximum": "1",
      "actual": "2"
    }
  }
}
Conditionruntime.arity
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "runtime.arity",
    "data": {
      "minimum": "1",
      "maximum": "1",
      "actual": "2"
    }
  }
}
Conditionruntime.arity
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "runtime.arity",
    "data": {
      "minimum": "0",
      "maximum": "0",
      "actual": "1"
    }
  }
}
Conditionruntime.arity
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "runtime.arity",
    "data": {
      "minimum": "0",
      "maximum": "0",
      "actual": "1"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "callbackInvocations": [
    0,
    0,
    0,
    0,
    0,
    0
  ]
}
Product invocation

Expected result

Every request fails its callback arity check before any callback can run. Product invocation awaits its 2.0 adapter.

Empty input changes the result only after callback admission succeeds. A fold callback receives its accumulator as well as each list element.

Fix fold direction and accumulator position

lispex.example.v2.standard-library.fold-directions · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (list (fold-left (lambda (acc a b) (+ (* acc 10) (- a b))) 0 '(1 2) '(10 20))
            (fold-right (lambda (a b acc) (+ (- a b) (* 10 acc))) 0 '(1 2) '(10 20))
            (fold-left - 10 '(1 2))
            (fold-right - 10 '(1 2))
            (fold-left (lambda (acc x) (+ acc x)) 42 '())
            (fold-right (lambda (x acc) (+ x acc)) 99 '()))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": []
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result(-108 -189 7 9 42 99)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": [
      {
        "kind": "integer",
        "value": "-108"
      },
      {
        "kind": "integer",
        "value": "-189"
      },
      {
        "kind": "integer",
        "value": "7"
      },
      {
        "kind": "integer",
        "value": "9"
      },
      {
        "kind": "integer",
        "value": "42"
      },
      {
        "kind": "integer",
        "value": "99"
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

The two-list folds return minus 108 and minus 189. Single-list subtraction returns seven and nine. Empty folds return their seeds. Product invocation awaits its 2.0 adapter.

The weighted calculation exposes both callback direction and accumulator position. None of these operations assumes a commutative callback.

Require one result where the traversal consumes one value

lispex.example.v2.standard-library.callback-results · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (choice)
      (cond
        ((= choice 0) (map (lambda (x) (values x x)) '(1 2)))
        ((= choice 1) (map (lambda (x) (values)) '(1 2)))
        ((= choice 2) (filter (lambda (x) (values)) '(1)))
        ((= choice 3) (fold-left (lambda (acc x) (values acc x)) 0 '(1)))
        ((= choice 4) (for-each (lambda (x) (values x x)) '(1 2)))
        (else (for-each (lambda (x) (values)) '(1 2))))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "1"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "2"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "3"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "4"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "5"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Conditionruntime.value-count
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "runtime.value-count",
    "data": {
      "expected": "1",
      "actual": "2"
    }
  }
}
Conditionruntime.value-count
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "runtime.value-count",
    "data": {
      "expected": "1",
      "actual": "0"
    }
  }
}
Conditionruntime.value-count
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "runtime.value-count",
    "data": {
      "expected": "1",
      "actual": "0"
    }
  }
}
Conditionruntime.value-count
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "runtime.value-count",
    "data": {
      "expected": "1",
      "actual": "2"
    }
  }
}
Result()
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": []
  }
}
Result()
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": []
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "callbackInvocations": [
    1,
    1,
    1,
    1,
    2,
    2
  ]
}
Product invocation

Expected result

Map, filter, and fold-left reject the first wrong callback result count. For-each accepts and discards both multiple and zero callback values. Product invocation awaits its 2.0 adapter.

For-each returns one empty list after both calls. It does not return an unspecified value or produce guest output.

Use only false as a false predicate result

lispex.example.v2.standard-library.list-predicate-results · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (list (filter (lambda (x) (if (= x 2) #f 0)) '(1 2 3))
            (find (lambda (x) 0) '(9 8))
            (any (lambda (x) (if (= x 2) "hit" #f)) '(1 2 3))
            (every (lambda (x) x) '(1 2 3))
            (any (lambda (x) (car '())) '())
            (every (lambda (x) (car '())) '())
            (every (lambda (x) (if (= x 2) #f x)) '(1 2 3)))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": []
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result((1 3) 9 "hit" 3 #f #t #f)
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": [
      {
        "kind": "list",
        "items": [
          {
            "kind": "integer",
            "value": "1"
          },
          {
            "kind": "integer",
            "value": "3"
          }
        ]
      },
      {
        "kind": "integer",
        "value": "9"
      },
      {
        "kind": "string",
        "value": "hit"
      },
      {
        "kind": "integer",
        "value": "3"
      },
      {
        "kind": "boolean",
        "value": false
      },
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": false
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

Zero is true for predicate use. Any and every preserve their selected callback values. Empty any is false and empty every is true. Product invocation awaits its 2.0 adapter.

The empty cases use valid unary callbacks whose bodies would fail if called. Filter keeps original elements in their original order.

Compose argument lists and internal value sequences

lispex.example.v2.standard-library.composition-results · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (choice)
      (cond
        ((= choice 0) (apply - 10 '(1 2)))
        ((= choice 1) (call-with-values (lambda () (apply values '(2 3))) (lambda (a b) (+ a b))))
        ((= choice 2) (call-with-values (lambda () (values)) (lambda () 9)))
        ((= choice 3) (call-with-values (lambda () (car '())) 0))
        ((= choice 4) (apply (lambda (x) x) 1 (cons 2 3)))
        ((= choice 5) (call-with-values (lambda (x) x) (lambda () 0)))
        (else (call-with-values (lambda () (values)) (lambda (a b) a))))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "integer",
        "value": "0"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "1"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "2"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "3"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "4"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "5"
      }
    },
    {
      "input": {
        "kind": "integer",
        "value": "6"
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result7
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "integer",
    "value": "7"
  }
}
Result5
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "integer",
    "value": "5"
  }
}
Result9
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "integer",
    "value": "9"
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "call-with-values",
      "argument": "1",
      "path": [],
      "expected": "procedure",
      "actual": "integer"
    }
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "apply",
      "argument": "2",
      "path": [
        {
          "kind": "cdr"
        }
      ],
      "expected": "proper-list",
      "actual": "integer"
    }
  }
}
Conditionruntime.arity
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "runtime.arity",
    "data": {
      "minimum": "1",
      "maximum": "1",
      "actual": "0"
    }
  }
}
Conditionruntime.arity
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "runtime.arity",
    "data": {
      "minimum": "2",
      "maximum": "2",
      "actual": "0"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

Apply preserves prefix and final-list order. Call-with-values transfers every producer value and checks consumer arity only after production. Product invocation awaits its 2.0 adapter.

The invalid consumer type fails before the producer body. A malformed final apply list fails before callback arity is considered.

Inspect a Condition through its public procedures

lispex.example.v2.standard-library.condition-procedures · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (let ((c (make-condition "domain.application"
                           (list (cons "tag" "sample") (cons "data" '(1 2))))))
        (list (condition? c) (condition? 1) (datum? c)
              (condition-phase c) (condition-code c) (condition-data c)))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values sufficient for the stated finite operations"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": []
      }
    }
  ],
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result(#t #f #f "evaluate" "domain.application" (("data" . (1 2)) ("tag" . "sample")))
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "list",
    "items": [
      {
        "kind": "boolean",
        "value": true
      },
      {
        "kind": "boolean",
        "value": false
      },
      {
        "kind": "boolean",
        "value": false
      },
      {
        "kind": "string",
        "value": "evaluate"
      },
      {
        "kind": "string",
        "value": "domain.application"
      },
      {
        "kind": "list",
        "items": [
          {
            "kind": "pair",
            "car": {
              "kind": "string",
              "value": "data"
            },
            "cdr": {
              "kind": "list",
              "items": [
                {
                  "kind": "integer",
                  "value": "1"
                },
                {
                  "kind": "integer",
                  "value": "2"
                }
              ]
            }
          },
          {
            "kind": "pair",
            "car": {
              "kind": "string",
              "value": "tag"
            },
            "cdr": {
              "kind": "string",
              "value": "sample"
            }
          }
        ]
      }
    ]
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

The constructed Condition is internal data. Its accessors return the fixed phase, code, and canonical portable field record. Product invocation awaits its 2.0 adapter.

Field order is data then tag even though construction supplied tag first. This example applies the condition catalog.

Allocate a mapped pair before the next callback

lispex.example.v2.standard-library.map-allocation-boundary · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (map (lambda (x) (if (= x 1) x (car '()))) '(1 2))))
)
Request and files
request.json
{
  "notation": "documentation-request",
  "source": "source.scm",
  "semantics": {
    "language": "Lispex 2.0",
    "standardLibrary": "one fixed library identity",
    "unicode": "Unicode 17.0.0",
    "resourceModel": "one fixed finite resource model"
  },
  "limits": {
    "prepare": "finite values sufficient to prepare this source",
    "evaluate": "finite values that admit the first callback and result check but refuse its map result-pair allocation"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": []
      }
    }
  ],
  "resourceBoundary": {
    "event": "datum-allocate",
    "operation": "map",
    "resultIndex": 0,
    "axis": "logical-allocation",
    "earlierReservations": "succeed",
    "selectedReservation": "insufficient remaining capacity"
  },
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Resultresource-stop · allocation
Outcome details
{
  "kind": "resource-stop",
  "valueCount": 0,
  "terminal": true,
  "axis": "allocation",
  "operation": "map",
  "event": "datum-allocate",
  "resultIndex": 0,
  "diagnosticIdentity": {
    "phase": "evaluate",
    "code": "resource.exhausted"
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "callbackInvocations": 1,
  "partialResult": false,
  "returnedControl": true
}
Product invocation

Expected result

The first result-pair reservation stops map before the second callback can produce its car condition. Product invocation awaits its 2.0 adapter.

The resource boundary names an event and an axis. It selects no coefficient, allocation unit, or default limit value.

Native kernel

The native kernel is the set of host operations needed by the prepared language and library. Derived operations use ordinary guest code. The kernel can provide value access and construction, exact arithmetic leaves, Unicode operations, and codec work. Its final membership remains pending.

The prepared bundle fixes library source and verified code under one library identity. Preparation and modules defines resolution and cache validation. Identity, receipt, replay defines the corresponding identities.

A primitive classification selects its accounting method. It does not replace tests of the operation paths.

9.9 Prepare closed guest library code

Derived library procedures run as ordinary Lispex code in the prepared bundle. Preparation resolves their library references lexically and binds the fixed library identity to the program. User bindings do not replace those resolved references. Reused library preparation follows the cache-preservation rule.

Why

Guest code inherits the common call, branch, allocation, and callback events. Fixed lexical references preserve library meaning when a user shadows a public name.

Keep library references closed

lispex.example.v2.standard-library.closed-library-binding · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (let ((car (lambda (item) 99)))
        (caar input))))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": [
          {
            "kind": "list",
            "items": [
              {
                "kind": "integer",
                "value": "3"
              },
              {
                "kind": "integer",
                "value": "5"
              }
            ]
          },
          {
            "kind": "integer",
            "value": "8"
          }
        ]
      }
    }
  ],
  "libraryContract": "The prepared caar binding selects the first component of the first component with lexical library references.",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result3
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "integer",
    "value": "3"
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Product invocation

Expected result

The rule returns the exact integer 3. The local car binding does not change the car references inside caar. Product invocation awaits its 2.0 adapter.

The fixed library defines caar by two pair selections. Its resolved references retain the library car binding. The local binding belongs to the rule source.

Keep library evaluation charges across caches

lispex.example.v2.standard-library.library-cache · rev. 1

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (caar input)))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": [
          {
            "kind": "list",
            "items": [
              {
                "kind": "integer",
                "value": "3"
              }
            ]
          }
        ]
      }
    },
    {
      "input": {
        "kind": "list",
        "items": [
          {
            "kind": "list",
            "items": [
              {
                "kind": "integer",
                "value": "3"
              }
            ]
          }
        ]
      }
    }
  ],
  "executionContexts": [
    "cold preparation cache",
    "warm preparation cache"
  ],
  "comparison": "Keep the complete semantic request fixed while changing preparation cache state.",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result3
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "integer",
    "value": "3"
  }
}
Result3
Outcome details
{
  "kind": "value",
  "valueCount": 1,
  "datum": {
    "kind": "integer",
    "value": "3"
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "comparison": {
    "canonicalOutcomeEqual": true,
    "evaluationChargesEqual": true
  }
}
Product invocation

Expected result

Both requests return the exact integer 3 with equal evaluation charges and canonical outcomes. Product invocation awaits its 2.0 adapter.

Both contexts use the same canonical program, library identity, input, and finite limits. Preparing library code can use a cache without changing evaluation.

9.10 Classify every native operation explicitly

Every native primitive has exactly one declared class. The classes are Fixed, Precharged, Incremental, GuestCalling, and Deferred. A missing class has no default. An unresolved class or a required Deferred operation prevents admission before evaluation.

Why

Every native path performs host work that needs an explicit accounting method. Rejecting an unaccounted operation closes a route around finite execution.

ClassRequired behavior
FixedReserve a fixed bound before a fixed amount of work. Input growth cannot hide additional work.
PrechargedEstablish and reserve the complete charge before the operation effect. Determining the charge also uses metered work.
IncrementalReserve each defined increment before performing it. Preserve the specified increment and failure order.
GuestCallingAccount for native work and invoke guest procedures through the common evaluator and budget.
DeferredReject a request that requires the operation before evaluation.

Large integer arithmetic, structural traversal, and complete encoding depend on input size. Their classification accounts for that growth. A Fixed label cannot make variable host work constant.

Reject a missing primitive classification

lispex.example.v2.standard-library.missing-primitive-class · rev. 3

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (car input)))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": [
          {
            "kind": "integer",
            "value": "3"
          }
        ]
      }
    }
  ],
  "productSetup": {
    "operation": "one native primitive required by the prepared car binding",
    "classification": "missing"
  },
  "operationUnderTest": "Admit the prepared request against the deliberately incomplete primitive registry.",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result{"kind":"admission-failure","valueCount":0,"diagnosticIdentity":{"phase":"admission","code":"product.unsupported"},"primitiveClassification":{"required":"one-explicit-class","received":"missing-class"}}
Outcome details
{
  "kind": "admission-failure",
  "valueCount": 0,
  "diagnosticIdentity": {
    "phase": "admission",
    "code": "product.unsupported"
  },
  "primitiveClassification": {
    "required": "one-explicit-class",
    "received": "missing-class"
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "entryEvaluated": false,
  "canonicalOutcomeProduced": false,
  "evaluationReceiptEligible": false
}
Product invocation

Expected result

Admission rejects the required unclassified primitive before the entry is evaluated. Product invocation awaits its 2.0 adapter.

The product plan removes the classification for a native operation required by the prepared library. This product setup is documentation notation and is not a guest API.

Reject a required Deferred primitive

lispex.example.v2.standard-library.deferred-primitive · rev. 3

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (car input)))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": [
          {
            "kind": "integer",
            "value": "3"
          }
        ]
      }
    }
  ],
  "productSetup": {
    "operation": "one native primitive required by the prepared car binding",
    "classification": "Deferred"
  },
  "operationUnderTest": "Admit the prepared request against a registry with the required operation deferred.",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Result{"kind":"admission-failure","valueCount":0,"diagnosticIdentity":{"phase":"admission","code":"product.unsupported"},"primitiveClassification":{"required":"admitted-class","received":"Deferred"}}
Outcome details
{
  "kind": "admission-failure",
  "valueCount": 0,
  "diagnosticIdentity": {
    "phase": "admission",
    "code": "product.unsupported"
  },
  "primitiveClassification": {
    "required": "admitted-class",
    "received": "Deferred"
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "entryEvaluated": false,
  "canonicalOutcomeProduced": false,
  "evaluationReceiptEligible": false
}
Product invocation

Expected result

Admission rejects the required Deferred primitive before the entry is evaluated. Product invocation awaits its 2.0 adapter.

The test product marks a required native operation Deferred. A product cannot silently assign it Fixed or substitute an engine with different semantics.

9.11 Preserve library events through optimization

Native library fast paths and compiler optimizations apply the event-preservation rule. Storage sharing follows the logical-allocation rule.

Why

Equal results alone do not preserve a request near a finite limit. Moving a reservation can change whether a domain failure or resource stop happens first.

Preserve a library domain failure

lispex.example.v2.standard-library.optimized-domain-failure · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (caar input)))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": "finite values sufficient for the stated finite calculation"
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": [
          {
            "kind": "integer",
            "value": "7"
          }
        ]
      }
    },
    {
      "input": {
        "kind": "list",
        "items": [
          {
            "kind": "integer",
            "value": "7"
          }
        ]
      }
    }
  ],
  "executionContexts": [
    "ordinary guest execution",
    "candidate native fast path or compiler optimization"
  ],
  "libraryContract": "The prepared caar binding selects the first component of the first component.",
  "comparison": "Preserve the canonical site of the failing second pair selection.",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "car",
      "argument": "0",
      "path": [],
      "expected": "pair",
      "actual": "integer"
    }
  }
}
Conditiondomain.type
Outcome details
{
  "kind": "language-failure",
  "valueCount": 0,
  "condition": {
    "phase": "evaluate",
    "code": "domain.type",
    "data": {
      "operation": "car",
      "argument": "0",
      "path": [],
      "expected": "pair",
      "actual": "integer"
    }
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "comparison": {
    "canonicalOutcomeEqual": true,
    "firstFailureEqual": true,
    "canonicalSiteEqual": true,
    "evaluationChargesEqual": true
  }
}
Product invocation

Expected result

Both contexts fail when the outer car in caar receives the exact integer 7. The first failure and canonical site agree. Product invocation awaits its 2.0 adapter.

The first selection succeeds and yields 7. The next selection requires a pair. Both contexts use the same canonical library program and sufficient finite limits.

Preserve the first library resource stop

lispex.example.v2.standard-library.optimized-work-stop · rev. 2

source.scm
(module main
  (import)
  (export rule)
  (entry rule)
  (define rule
    (lambda (input)
      (caar input)))
)
Request and files
request.json
{
  "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 prepare this source",
    "evaluate": {
      "work": "the accumulated work immediately before the designated positive work reservation",
      "otherAxes": "finite values sufficient for this request"
    }
  },
  "requests": [
    {
      "input": {
        "kind": "list",
        "items": [
          {
            "kind": "list",
            "items": [
              {
                "kind": "integer",
                "value": "3"
              }
            ]
          }
        ]
      }
    },
    {
      "input": {
        "kind": "list",
        "items": [
          {
            "kind": "list",
            "items": [
              {
                "kind": "integer",
                "value": "3"
              }
            ]
          }
        ]
      }
    }
  ],
  "executionContexts": [
    "ordinary guest execution",
    "candidate native fast path or compiler optimization"
  ],
  "designatedReservation": "The next required work reservation at the selected canonical site in the fixed caar library body.",
  "comparison": "Use the same canonical program and limits. Both contexts must stop at the designated reservation.",
  "rootModule": "main",
  "moduleSources": [
    {
      "name": "main",
      "source": "source.scm"
    }
  ]
}
Specification outcome
Resultresource-stop · work
Outcome details
{
  "kind": "resource-stop",
  "valueCount": 0,
  "terminal": true,
  "axis": "work",
  "diagnosticIdentity": {
    "phase": "evaluate",
    "code": "resource.exhausted"
  }
}
Resultresource-stop · work
Outcome details
{
  "kind": "resource-stop",
  "valueCount": 0,
  "terminal": true,
  "axis": "work",
  "diagnosticIdentity": {
    "phase": "evaluate",
    "code": "resource.exhausted"
  }
}

Specification outcome. Product runs are pending the 2.0 adapter.

Semantic details
{
  "comparison": {
    "canonicalOutcomeEqual": true,
    "firstExhaustedAxisEqual": true,
    "canonicalSiteEqual": true,
    "evaluationChargesEqual": true
  },
  "returnedControl": true
}
Product invocation

Expected result

Both contexts stop on the work axis at the designated library reservation. The canonical stop site and evaluation charges agree. Product invocation awaits its 2.0 adapter.

The request uses a symbolic work boundary at a designated library reservation. Every other axis has sufficient finite capacity. The concrete budget awaits the 2.0 tariff.

Related chapters

Values and text

Exact numbers

Procedures

Conditions

Resources

Preparation and modules

Profiles and value interchange

First rule