Глава 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 · ред. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(display input)))
)
Запрос и файлы
{
"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"
}
]
}
library.referenceПодробности результата
{
"kind": "failure",
"valueCount": 0,
"diagnostic": {
"phase": "resolve",
"code": "library.reference",
"data": {
"name": "display",
"reason": "removed-operation"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"guestIO": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Вызов продукта
Ожидаемый результат
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 check | Traversal |
|---|---|
L | Visit the entire pair spine and its final tail |
DL, CL, OL | Finish the spine, then check element domains from the head |
A | Finish the spine, then check each entry pair and its complete Datum key in list order |
D | Use the Values depth-first Datum traversal |
S, numeric, and scalar types | Check 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.
| Domain | Values |
|---|---|
V | Any single internal value, including a procedure or Condition |
D | Portable Datum |
S | A Boolean, exact number, character, symbol, or empty list |
B | Boolean |
N | Exact number |
I | Exact integer |
U | Exact nonnegative integer |
O | Exact integer from zero through 255 |
C | Unicode scalar character |
T | Raw scalar string |
Y | Raw scalar symbol |
P | Procedure |
R | Pair with arbitrary internal components |
L | Finite proper list with arbitrary internal elements |
DL | Proper list whose elements are Datum |
CL | Proper list whose elements are characters |
OL | Proper list whose elements are octets |
A | Proper list of pairs with Datum keys and arbitrary internal cdr values |
F | Vector with arbitrary internal elements |
X | Bytevector |
Q | Condition |
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.
| Value | Text |
|---|---|
| Integer zero | 0 |
| Positive integer | ASCII decimal digits with no leading zero |
| Negative integer | - followed by the positive magnitude digits |
| Nonintegral rational | Canonical 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.
| Procedure | Arity | Domains | Result | Checks and failures | Resource events |
|---|---|---|---|---|---|
boolean? | 1 | V | Boolean for membership in the Boolean domain | None after the shared checks | None after the shared checks |
number? | 1 | V | Boolean for membership in the exact number domain | None after the shared checks | None after the shared checks |
integer? | 1 | V | Boolean for membership in the exact integer domain | None after the shared checks | None after the shared checks |
pair? | 1 | V | Boolean for membership in the pair domain | None after the shared checks | None after the shared checks |
null? | 1 | V | Boolean for membership in the empty list domain | None after the shared checks | None after the shared checks |
symbol? | 1 | V | Boolean for membership in the symbol domain | None after the shared checks | None after the shared checks |
char? | 1 | V | Boolean for membership in the character domain | None after the shared checks | None after the shared checks |
string? | 1 | V | Boolean for membership in the string domain | None after the shared checks | None after the shared checks |
vector? | 1 | V | Boolean for membership in the vector domain | None after the shared checks | None after the shared checks |
bytevector? | 1 | V | Boolean for membership in the bytevector domain | None after the shared checks | None after the shared checks |
procedure? | 1 | V | Boolean for membership in the procedure domain | None after the shared checks | None after the shared checks |
scalar? | 1 | V | Boolean for membership in the scalar domain | None after the shared checks | None after the shared checks |
list? | 1 | V | True for a proper list and false at the first nonpair tail | None after the shared checks | list-step along the spine through the final tail |
datum? | 1 | V | True for Datum and false at the first non-Datum component | None after the shared checks | datum-validate in the Values traversal order |
The following table defines booleans and equality.
| Procedure | Arity | Domains | Result | Checks and failures | Resource events |
|---|---|---|---|---|---|
not | 1 | V | True exactly for #f | None after the shared checks | None after the shared checks |
boolean=? | 2+ | B... | True when every adjacent Boolean is equal | None after the shared checks | compare-scalar on adjacent arguments until the first false comparison |
eq? | 2 | S, S | Scalar value equality under the Values rule | None after the shared checks | compare-scalar |
eqv? | 2 | S, S | Scalar value equality under the Values rule | None after the shared checks | compare-scalar |
equal? | 2 | D, D | Structural equality under the Values rule | Validate the whole left Datum before the whole right Datum | compare-datum in the Values traversal order |
The following table defines exact arithmetic.
| Procedure | Arity | Domains | Result | Checks and failures | Resource events |
|---|---|---|---|---|---|
+ | 0+ | N... | Left sum with identity zero | None after the shared checks | exact-arithmetic then rational-reduce for each declared result, then datum-allocate |
* | 0+ | N... | Left product with identity one | None after the shared checks | exact-arithmetic then rational-reduce for each declared result, then datum-allocate |
- | 1+ | N... | Unary negation or left subtraction from the first operand | None after the shared checks | exact-arithmetic then rational-reduce for each declared result, then datum-allocate |
/ | 1+ | N... | Unary reciprocal or left division from the first operand | After every numeric domain check, reject zero divisors from left to right | exact-arithmetic then rational-reduce for each declared result, then datum-allocate |
= | 2+ | N... | True when each argument is equal to its successor | None after the shared checks | compare-scalar on adjacent arguments until the first false comparison |
< | 2+ | N... | True when each argument is less than its successor | None after the shared checks | compare-scalar on adjacent arguments until the first false comparison |
> | 2+ | N... | True when each argument is greater than its successor | None after the shared checks | compare-scalar on adjacent arguments until the first false comparison |
<= | 2+ | N... | True when each argument is no greater than its successor | None after the shared checks | compare-scalar on adjacent arguments until the first false comparison |
>= | 2+ | N... | True when each argument is no less than its successor | None after the shared checks | compare-scalar on adjacent arguments until the first false comparison |
abs | 1 | N | Nonnegative magnitude | None after the shared checks | exact-arithmetic rational-reduce datum-allocate |
min | 1+ | N... | The least value with the first argument retained on a tie | None after the shared checks | compare-scalar against the running selected value from left to right |
max | 1+ | N... | The greatest value with the first argument retained on a tie | None after the shared checks | compare-scalar against the running selected value from left to right |
numerator | 1 | N | Numerator of the reduced value, including its sign | None after the shared checks | exact-arithmetic datum-allocate |
denominator | 1 | N | Positive reduced denominator, or one for an integer | None after the shared checks | exact-arithmetic datum-allocate |
quotient | 2 | I n, I d | Integer n / d rounded toward zero | Reject zero d | exact-divide datum-allocate |
remainder | 2 | I n, I d | n - d * quotient(n, d) | Reject zero d | exact-divide exact-arithmetic datum-allocate |
modulo | 2 | I n, I d | n - d * floor(n / d) | Reject zero d | exact-divide exact-arithmetic datum-allocate |
gcd | 0+ | I... | Nonnegative greatest common divisor, with empty result zero | None after the shared checks | exact-arithmetic on the left reduction from zero, then datum-allocate |
lcm | 0+ | I... | Nonnegative least common multiple, with empty result one and any zero producing zero | None after the shared checks | exact-arithmetic on the left reduction from one, then datum-allocate |
expt | 2 | N base, I exponent | Exact integer power, with exponent zero returning one | Reject exact zero base with a negative exponent using domain.division-by-zero with argument 0 | exact-arithmetic rational-reduce datum-allocate |
zero? | 1 | N | True exactly when the input is equal to zero | None after the shared checks | compare-scalar |
positive? | 1 | N | True exactly when the input is greater than zero | None after the shared checks | compare-scalar |
negative? | 1 | N | True exactly when the input is less than zero | None after the shared checks | compare-scalar |
even? | 1 | I | True exactly when the input is divisible by two | None after the shared checks | exact-divide |
odd? | 1 | I | True exactly when the input is not divisible by two | None after the shared checks | exact-divide |
quantize | 3 | N, I, mode symbol | Exact selected decimal grid value | The ordered checks in the Numbers rounding contract | decimal-scale exact-divide rounding-select rational-reduce datum-allocate |
floor | 1 | N | Exact integer under the corresponding scale-zero mode | The unary checks in the Numbers rounding contract | decimal-scale exact-divide rounding-select rational-reduce datum-allocate |
ceiling | 1 | N | Exact integer under the corresponding scale-zero mode | The unary checks in the Numbers rounding contract | decimal-scale exact-divide rounding-select rational-reduce datum-allocate |
truncate | 1 | N | Exact integer under the corresponding scale-zero mode | The unary checks in the Numbers rounding contract | decimal-scale exact-divide rounding-select rational-reduce datum-allocate |
number->string | 1 | N | Canonical exact numeric text | None after the shared checks | exact-arithmetic for decimal digits, then datum-allocate |
The following table defines pairs and lists.
| Procedure | Arity | Domains | Result | Checks and failures | Resource events |
|---|---|---|---|---|---|
cons | 2 | V, V | Pair whose car and cdr are the two arguments | None after the shared checks | datum-allocate |
car | 1 | R | First component | None after the shared checks | list-step |
cdr | 1 | R | Second component | None after the shared checks | list-step |
caar | 1 | V x | (car (car x)) | car x then car of that result with each called operation retaining its own failure name | The declared call, argument-check, and list-step events of both nested procedures |
cadr | 1 | V x | (car (cdr x)) | cdr x then car of that result with each called operation retaining its own failure name | The declared call, argument-check, and list-step events of both nested procedures |
cdar | 1 | V x | (cdr (car x)) | car x then cdr of that result with each called operation retaining its own failure name | The declared call, argument-check, and list-step events of both nested procedures |
cddr | 1 | V x | (cdr (cdr x)) | cdr x then cdr of that result with each called operation retaining its own failure name | The declared call, argument-check, and list-step events of both nested procedures |
list | 0+ | V... | Proper list of arguments in their supplied order | None after the shared checks | datum-allocate in argument order |
make-list | 2 | U count, V fill | Proper list containing count copies of fill | None after the shared checks | traversal-state then datum-allocate for each result index in ascending order |
length | 1 | L | Exact number of pairs counted by spine validation | None after the shared checks | datum-allocate |
append | 0+ | L... | Proper list formed by concatenating every list in argument order | None after the shared checks | list-step and datum-allocate in argument and element order |
reverse | 1 | L | Proper list with the elements in reverse order | None after the shared checks | list-step from the head and datum-allocate for each new front pair |
list-ref | 2 | L, I index | Element at the zero-based index | Require 0 <= index < length | list-step for each cdr movement, then one for the selected car |
list-tail | 2 | L, I index | Suffix after index elements | Require 0 <= index <= length | list-step for each cdr movement to the selected suffix |
member | 2 | D needle, DL haystack | First matching suffix under equal?, or #f | Complete both Datum domains before searching | list-step then compare-datum in list order |
assoc | 2 | D key, A entries | First pair with an equal? key, or #f | Validate every pair and Datum key before searching | list-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.
| Procedure | Arity | Domains | Result | Checks and failures | Resource events |
|---|---|---|---|---|---|
map | 2+ | P, L... | Proper list of one callback result per tuple | All list spines, equal lengths, callback arity, then one result per callback | traversal-state callback-call result-check datum-allocate per ascending index |
for-each | 2+ | P, L... | One empty list after all callbacks | All list spines, equal lengths, then callback arity | traversal-state callback-call per ascending index, discarding all callback values |
fold-left | 3+ | P, V seed, L... | Final accumulator, or seed for empty lists | All list spines, equal lengths, callback arity, then one result per callback | traversal-state callback-call result-check per ascending index |
fold-right | 3+ | P, V seed, L... | Final accumulator, or seed for empty lists | All list spines, equal lengths, callback arity, then one result per callback | traversal-state before descending callback-call and result-check events |
filter | 2 | P, L | Proper list of elements whose callback result is not #f | Whole list spine, unary callback arity, then one result per callback | traversal-state callback-call result-check and datum-allocate for each retained element |
find | 2 | P, L | First element whose callback result is not #f, or #f | Whole list spine, unary callback arity, then one result per callback | traversal-state callback-call result-check until the first true result |
any | 2 | P, L | First non-#f callback value, or #f for no match or an empty list | Whole list spine, unary callback arity, then one result per callback | traversal-state callback-call result-check until the first true result |
every | 2 | P, L | First #f, otherwise the last callback value, with #t for an empty list | Whole list spine, unary callback arity, then one result per callback | traversal-state callback-call result-check until the first false result |
The following table defines vectors.
| Procedure | Arity | Domains | Result | Checks and failures | Resource events |
|---|---|---|---|---|---|
vector | 0+ | V... | Vector of the arguments in order | None after the shared checks | datum-allocate then sequence-step in result order |
make-vector | 2 | U count, V fill | Vector containing count copies of fill | None after the shared checks | datum-allocate then sequence-step in result order |
vector-length | 1 | F | Exact element count | None after the shared checks | sequence-step datum-allocate |
vector-ref | 2 | F, I index | Element at the zero-based index | Require 0 <= index < length | sequence-step |
vector->list | 1 | F | Proper list of vector elements in order | None after the shared checks | sequence-step then datum-allocate per element |
list->vector | 1 | L | Vector of list elements in order | None after the shared checks | datum-allocate then list-step and sequence-step in order |
vector-append | 0+ | F... | Concatenated vector in argument and element order | None after the shared checks | Length sequence-step for every argument, complete result datum-allocate, then element sequence-step in argument and element order |
vector-slice | 3 | F, I start, I end | Vector for the half-open range | Check start bounds, end bounds, then start <= end | datum-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.
| Procedure | Arity | Domains | Result | Checks and failures | Resource events |
|---|---|---|---|---|---|
bytevector | 0+ | O... | Bytevector of the octets in order | None after the shared checks | datum-allocate then sequence-step in result order |
make-bytevector | 2 | U count, O fill | Bytevector containing count copies of fill | None after the shared checks | datum-allocate then sequence-step in result order |
bytevector-length | 1 | X | Exact octet count | None after the shared checks | sequence-step datum-allocate |
bytevector-u8-ref | 2 | X, I index | Octet at the zero-based index as an exact integer | Require 0 <= index < length | sequence-step datum-allocate |
bytevector->list | 1 | X | Proper list of octet integers in order | None after the shared checks | Length sequence-step, then byte sequence-step and one combined integer-and-pair datum-allocate per octet |
list->bytevector | 1 | OL | Bytevector of the listed octets in order | None after the shared checks | datum-allocate then list-step and sequence-step in order |
bytevector-append | 0+ | X... | Concatenated bytevector in argument and octet order | None after the shared checks | Length sequence-step for every argument, complete result datum-allocate, then byte sequence-step in argument and octet order |
bytevector-slice | 3 | X, I start, I end | Bytevector for the half-open range | Check start bounds, end bounds, then start <= end | datum-allocate then sequence-step in the selected range |
utf8->string | 1 | X | String decoded with strict UTF-8 | Reject at the first byte or required end that makes the current UTF-8 prefix invalid | Byte sequence-step through each complete scalar, then one datum-allocate for that scalar. Finish with the required end visit |
string->utf8 | 1 | T | Shortest UTF-8 bytes for the unchanged scalar sequence | None after the shared checks | One 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.
| Procedure | Arity | Domains | Result | Checks and failures | Resource events |
|---|---|---|---|---|---|
string | 0+ | C... | String of the supplied scalars in order | None after the shared checks | datum-allocate then text-scalar-scan in result order |
make-string | 2 | U count, C fill | String containing count copies of the scalar | None after the shared checks | datum-allocate then text-scalar-scan in result order |
string-length | 1 | T | Exact Unicode scalar count | None after the shared checks | text-scalar-scan datum-allocate |
string-ref | 2 | T, I index | Scalar at the zero-based scalar index | Require 0 <= index < scalar length | text-scalar-scan in scalar order |
substring | 3 | T, I start, I end | String for the half-open scalar range | Check start bounds, end bounds, then start <= end | text-scalar-scan then datum-allocate |
string-append | 0+ | T... | Concatenated raw scalar sequences in argument order | None after the shared checks | text-scalar-scan in argument order, then datum-allocate |
string->list | 1 | T | Proper list of characters in scalar order | None after the shared checks | text-scalar-scan then datum-allocate per character |
list->string | 1 | CL | String of the listed characters in order | None after the shared checks | list-step then datum-allocate |
string=? | 2+ | T... | Boolean for adjacent equality under raw scalar lexicographic comparison | None after the shared checks | text-scalar-scan and compare-scalar until the first false adjacent comparison |
string<? | 2+ | T... | Boolean for adjacent increasing order under raw scalar lexicographic comparison | None after the shared checks | text-scalar-scan and compare-scalar until the first false adjacent comparison |
string>? | 2+ | T... | Boolean for adjacent decreasing order under raw scalar lexicographic comparison | None after the shared checks | text-scalar-scan and compare-scalar until the first false adjacent comparison |
string<=? | 2+ | T... | Boolean for adjacent nondecreasing order under raw scalar lexicographic comparison | None after the shared checks | text-scalar-scan and compare-scalar until the first false adjacent comparison |
string>=? | 2+ | T... | Boolean for adjacent nonincreasing order under raw scalar lexicographic comparison | None after the shared checks | text-scalar-scan and compare-scalar until the first false adjacent comparison |
string->symbol | 1 | T | Symbol with exactly the same scalars | None after the shared checks | text-scalar-scan datum-allocate |
symbol->string | 1 | Y | String with exactly the same scalars | None after the shared checks | text-scalar-scan datum-allocate |
symbol=? | 2+ | Y... | True when adjacent symbols have equal raw scalar sequences | None after the shared checks | text-scalar-scan and compare-scalar until the first false adjacent comparison |
The following table defines characters.
| Procedure | Arity | Domains | Result | Checks and failures | Resource events |
|---|---|---|---|---|---|
char=? | 2+ | C... | Boolean for adjacent equality by numeric Unicode scalar value | None after the shared checks | compare-scalar until the first false adjacent comparison |
char<? | 2+ | C... | Boolean for adjacent increasing order by numeric Unicode scalar value | None after the shared checks | compare-scalar until the first false adjacent comparison |
char>? | 2+ | C... | Boolean for adjacent decreasing order by numeric Unicode scalar value | None after the shared checks | compare-scalar until the first false adjacent comparison |
char<=? | 2+ | C... | Boolean for adjacent nondecreasing order by numeric Unicode scalar value | None after the shared checks | compare-scalar until the first false adjacent comparison |
char>=? | 2+ | C... | Boolean for adjacent nonincreasing order by numeric Unicode scalar value | None after the shared checks | compare-scalar until the first false adjacent comparison |
char->integer | 1 | C | Exact Unicode scalar value | None after the shared checks | datum-allocate |
integer->char | 1 | I | Character at that Unicode scalar value | Require 0 <= value <= 1114111 and exclude 55296 <= value <= 57343 | datum-allocate |
The following table defines unicode operations.
| Procedure | Arity | Domains | Result | Checks and failures | Resource events |
|---|---|---|---|---|---|
char-alphabetic? | 1 | C | Unicode 17.0.0 Alphabetic Boolean | None after the shared checks | text-scalar-scan unicode-map |
char-numeric? | 1 | C | True exactly for Unicode 17.0.0 General_Category Nd | None after the shared checks | text-scalar-scan unicode-map |
char-whitespace? | 1 | C | Unicode 17.0.0 White_Space Boolean | None after the shared checks | text-scalar-scan unicode-map |
char-upper-case? | 1 | C | Unicode 17.0.0 Uppercase Boolean | None after the shared checks | text-scalar-scan unicode-map |
char-lower-case? | 1 | C | Unicode 17.0.0 Lowercase Boolean | None after the shared checks | text-scalar-scan unicode-map |
digit-value | 1 | C | Exact decimal digit zero through nine for Nd, otherwise #f | None after the shared checks | text-scalar-scan unicode-map |
char-upcase | 1 | C | Simple uppercase character under Unicode 17.0.0 | None after the shared checks | text-scalar-scan unicode-map |
char-downcase | 1 | C | Simple lowercase character under Unicode 17.0.0 | None after the shared checks | text-scalar-scan unicode-map |
char-foldcase | 1 | C | Simple non-Turkic folded character under Unicode 17.0.0 | None after the shared checks | text-scalar-scan unicode-map |
string-upcase | 1 | T | Full default uppercase string under Unicode 17.0.0 | None after the shared checks | text-scalar-scan unicode-map datum-allocate |
string-downcase | 1 | T | Full default lowercase string under Unicode 17.0.0 | None after the shared checks | text-scalar-scan unicode-map datum-allocate |
string-foldcase | 1 | T | Full non-Turkic folded string under Unicode 17.0.0 | None after the shared checks | text-scalar-scan unicode-map datum-allocate |
string-normalize-nfc | 1 | T | Unicode 17.0.0 NFC string | None after the shared checks | text-scalar-scan unicode-normalize datum-allocate |
string-normalize-nfd | 1 | T | Unicode 17.0.0 NFD string | None after the shared checks | text-scalar-scan unicode-normalize datum-allocate |
string-normalize-nfkc | 1 | T | Unicode 17.0.0 NFKC string | None after the shared checks | text-scalar-scan unicode-normalize datum-allocate |
string-normalize-nfkd | 1 | T | Unicode 17.0.0 NFKD string | None after the shared checks | text-scalar-scan unicode-normalize datum-allocate |
char-ci=? | 2+ | C... | Boolean for adjacent equality of simple-folded scalars | Fold every argument from left to right before any comparison | text-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 scalars | Fold every argument from left to right before any comparison | text-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 scalars | Fold every argument from left to right before any comparison | text-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 scalars | Fold every argument from left to right before any comparison | text-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 scalars | Fold every argument from left to right before any comparison | text-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 sequences | Fold every argument from left to right before any comparison | text-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 sequences | Fold every argument from left to right before any comparison | text-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 sequences | Fold every argument from left to right before any comparison | text-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 sequences | Fold every argument from left to right before any comparison | text-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 sequences | Fold every argument from left to right before any comparison | text-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.
| Procedure | Arity | Domains | Result | Checks and failures | Resource events |
|---|---|---|---|---|---|
values | 0+ | V... | The supplied values in order as an internal result sequence | None after the shared checks | traversal-state for the result sequence |
apply | 2+ | P, V..., L | All 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 rule | Validate the whole final list, then check the procedure accepts the assembled argument count | list-step traversal-state callback-call |
call-with-values | 2 | P producer, P consumer | All values returned by the consumer. The producer is nontail and the consumer inherits this call's tail position under the tail-call rule | Check the producer accepts zero arguments, call it, then check the consumer accepts its result count | callback-call for producer, traversal-state, then callback-call for consumer |
The following table defines conditions.
| Procedure | Arity | Domains | Result | Checks and failures | Resource events |
|---|---|---|---|---|---|
make-condition | 2 | T code, field record | Validated immutable Condition without raising it | Use the complete ordered condition-constructor protocol | argument-check list-step text-scalar-scan compare-scalar datum-validate condition-construct |
condition? | 1 | V | True for a Condition and false for every other value | None after the shared checks | None after the shared checks |
condition-phase | 1 | Q | The string evaluate | None after the shared checks | condition-inspect |
condition-code | 1 | Q | The exact stored code string | None after the shared checks | condition-inspect |
condition-data | 1 | Q | Canonical immutable string-keyed association-list Datum | None after the shared checks | condition-inspect |
raise | 1 | Q | No normal result. Raise a new occurrence at the current canonical site | None after the shared checks | condition-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 · ред. 1
(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))))
)
Запрос и файлы
{
"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"
}
]
}
(#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)Подробности результата
{
"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
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"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": []
}Вызов продукта
Ожидаемый результат
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 · ред. 1
(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))))))
)
Запрос и файлы
{
"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"
}
]
}
(#t #t #t #f #f #f #t)Подробности результата
{
"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
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(car input)))
)
Запрос и файлы
{
"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"
}
]
}
3Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "3"
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(car input)))
)
Запрос и файлы
{
"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"
}
]
}
3Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "3"
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(car input)))
)
Запрос и файлы
{
"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"
}
]
}
domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "empty-list"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(car input)))
)
Запрос и файлы
{
"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"
}
]
}
domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "integer"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(car input (car '()))))
)
Запрос и файлы
{
"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"
}
]
}
domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "empty-list"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"firstFailureSite": "inner-car-argument",
"outerCallEntered": false
}Вызов продукта
Ожидаемый результат
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.
Validate searchable data before finding an early match
lispex.example.v2.standard-library.membership-validation · ред. 2
(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))))))
)
Запрос и файлы
{
"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"
}
]
}
(2 3)Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "list",
"items": [
{
"kind": "integer",
"value": "2"
},
{
"kind": "integer",
"value": "3"
}
]
}
}#fПодробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "boolean",
"value": false
}
}("x" . 2)Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "pair",
"car": {
"kind": "string",
"value": "x"
},
"cdr": {
"kind": "integer",
"value": "2"
}
}
}#fПодробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "boolean",
"value": false
}
}domain.typeПодробности результата
{
"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"
}
}
}domain.typeПодробности результата
{
"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"
}
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "member",
"argument": "0",
"path": [],
"expected": "datum",
"actual": "procedure"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"searchStarted": [
true,
true,
true,
true,
false,
false,
false
]
}Вызов продукта
Ожидаемый результат
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 · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(let ((result
(make-list input 7)))
result)))
)
Запрос и файлы
{
"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"
}
}
make-listtwo-pairs ·
2 7| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"make-list-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"make-list-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"make-list-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"make-list-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | argument-check | argument(1){"fixtureSite":"make-list-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 6 | traversal-state | result(0) element(0){"fixtureSite":"make-list-call","role":"traversal-state","path":[{"kind":"result","index":"0"},{"kind":"element","index":"0"}]} | 1 |
| 7 | datum-allocate | result(0) element(0){"fixtureSite":"make-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"0"}]} | 2 |
| 8 | traversal-state | result(0) element(1){"fixtureSite":"make-list-call","role":"traversal-state","path":[{"kind":"result","index":"0"},{"kind":"element","index":"1"}]} | 1 |
| 9 | datum-allocate | result(0) element(1){"fixtureSite":"make-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"1"}]} | 2 |
| 10 | call-return | call{"fixtureSite":"make-list-call","role":"call-return","path":[]} | null |
(7 7)Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "list",
"items": [
{
"kind": "integer",
"value": "7"
},
{
"kind": "integer",
"value": "7"
}
]
}
}Подробности трассы 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"
}
]
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
make-listzero-count ·
0 7| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"make-list-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"make-list-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"make-list-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"make-list-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | argument-check | argument(1){"fixtureSite":"make-list-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 6 | call-return | call{"fixtureSite":"make-list-call","role":"call-return","path":[]} | null |
()Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "list",
"items": []
}
}Подробности трассы 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": []
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
make-listnegative-count ·
-1 7| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"make-list-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"make-list-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"make-list-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"make-list-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | diagnostic-payload | argument(0){"fixtureSite":"make-list-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"0"}]} | null |
domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "make-list",
"argument": "0",
"reason": "negative-count"
}
}
}Подробности трассы 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"
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
make-listlarge-count-first-pair-stop ·
340282366920938463463374607431768211456 7| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"make-list-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"make-list-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"make-list-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"make-list-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | argument-check | argument(1){"fixtureSite":"make-list-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 6 | traversal-state | result(0) element(0){"fixtureSite":"make-list-call","role":"traversal-state","path":[{"kind":"result","index":"0"},{"kind":"element","index":"0"}]} | 1 |
| 7 | datum-allocate | result(0) element(0){"fixtureSite":"make-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"0"}]} | 2 |
resource-stop · allocationПодробности результата
{
"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
}Подробности трассы 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
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"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
}
]
}Вызов продукта
Ожидаемый результат
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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"make-list"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"2"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"2","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"U"} | accepted |
| 5 | argument-check | argument(1) | — | {"domain":"V"} | accepted |
| 6 | traversal-state | result(0), element(0) | 1 | {"shape":"cursor-position","resultIndex":"0"} | accepted |
| 7 | datum-allocate | result(0), element(0) | 2 | {"shape":"pair","resultIndex":"0"} | accepted |
| 8 | traversal-state | result(0), element(1) | 1 | {"shape":"cursor-position","resultIndex":"1"} | accepted |
| 9 | datum-allocate | result(0), element(1) | 2 | {"shape":"pair","resultIndex":"1"} | accepted |
| 10 | call-return | empty | — | {"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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"make-list"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"2"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"2","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"U"} | accepted |
| 5 | argument-check | argument(1) | — | {"domain":"V"} | accepted |
| 6 | call-return | empty | — | {"valueCount":"1"} | accepted |
The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"list","items":[]}}.
negative-count uses make-list at make-list-call.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"make-list"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"2"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"2","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"U"} | accepted |
| 5 | diagnostic-payload | argument(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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"make-list"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"2"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"2","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"U"} | accepted |
| 5 | argument-check | argument(1) | — | {"domain":"V"} | accepted |
| 6 | traversal-state | result(0), element(0) | 1 | {"shape":"cursor-position","resultIndex":"0"} | accepted |
| 7 | datum-allocate | result(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 · ред. 1
(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)))
)
Запрос и файлы
{
"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"
}
}
list-refref-one ·
(7 8) 1| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"ref-one-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"ref-one-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"ref-one-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"ref-one-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | list-step | argument(0){"fixtureSite":"ref-one-call","role":"list-step","path":[{"kind":"argument","index":"0"}]} | null |
| 6 | list-step | argument(0) {"kind":"cdr"}{"fixtureSite":"ref-one-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]} | null |
| 7 | list-step | argument(0) {"kind":"cdr"} {"kind":"cdr"}{"fixtureSite":"ref-one-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"},{"kind":"cdr"}]} | null |
| 8 | argument-check | argument(1){"fixtureSite":"ref-one-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 9 | argument-check | argument(1){"fixtureSite":"ref-one-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 10 | list-step | argument(0) {"kind":"cdr"}{"fixtureSite":"ref-one-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]} | null |
| 11 | list-step | argument(0) {"kind":"cdr"} {"kind":"car"}{"fixtureSite":"ref-one-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"},{"kind":"car"}]} | null |
| 12 | call-return | call{"fixtureSite":"ref-one-call","role":"call-return","path":[]} | null |
8Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "8"
}
}Подробности трассы 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"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
list-tailtail-zero ·
(7 8) 0| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"tail-zero-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"tail-zero-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"tail-zero-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"tail-zero-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | list-step | argument(0){"fixtureSite":"tail-zero-call","role":"list-step","path":[{"kind":"argument","index":"0"}]} | null |
| 6 | list-step | argument(0) {"kind":"cdr"}{"fixtureSite":"tail-zero-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]} | null |
| 7 | list-step | argument(0) {"kind":"cdr"} {"kind":"cdr"}{"fixtureSite":"tail-zero-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"},{"kind":"cdr"}]} | null |
| 8 | argument-check | argument(1){"fixtureSite":"tail-zero-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 9 | argument-check | argument(1){"fixtureSite":"tail-zero-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 10 | call-return | call{"fixtureSite":"tail-zero-call","role":"call-return","path":[]} | null |
(7 8)Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "list",
"items": [
{
"kind": "integer",
"value": "7"
},
{
"kind": "integer",
"value": "8"
}
]
}
}Подробности трассы 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"
}
]
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
list-tailtail-end ·
(7 8) 2| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"tail-end-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"tail-end-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"tail-end-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"tail-end-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | list-step | argument(0){"fixtureSite":"tail-end-call","role":"list-step","path":[{"kind":"argument","index":"0"}]} | null |
| 6 | list-step | argument(0) {"kind":"cdr"}{"fixtureSite":"tail-end-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]} | null |
| 7 | list-step | argument(0) {"kind":"cdr"} {"kind":"cdr"}{"fixtureSite":"tail-end-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"},{"kind":"cdr"}]} | null |
| 8 | argument-check | argument(1){"fixtureSite":"tail-end-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 9 | argument-check | argument(1){"fixtureSite":"tail-end-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 10 | list-step | argument(0) {"kind":"cdr"}{"fixtureSite":"tail-end-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]} | null |
| 11 | list-step | argument(0) {"kind":"cdr"} {"kind":"cdr"}{"fixtureSite":"tail-end-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"},{"kind":"cdr"}]} | null |
| 12 | call-return | call{"fixtureSite":"tail-end-call","role":"call-return","path":[]} | null |
()Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "list",
"items": []
}
}Подробности трассы 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": []
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
list-refref-end ·
(7 8) 2| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"ref-end-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"ref-end-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"ref-end-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"ref-end-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | list-step | argument(0){"fixtureSite":"ref-end-call","role":"list-step","path":[{"kind":"argument","index":"0"}]} | null |
| 6 | list-step | argument(0) {"kind":"cdr"}{"fixtureSite":"ref-end-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]} | null |
| 7 | list-step | argument(0) {"kind":"cdr"} {"kind":"cdr"}{"fixtureSite":"ref-end-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"},{"kind":"cdr"}]} | null |
| 8 | argument-check | argument(1){"fixtureSite":"ref-end-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 9 | argument-check | argument(1){"fixtureSite":"ref-end-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 10 | diagnostic-payload | argument(1){"fixtureSite":"ref-end-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"1"}]} | null |
domain.indexПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.index",
"data": {
"operation": "list-ref",
"argument": "1",
"index": "2",
"length": "2"
}
}
}Подробности трассы 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"
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
list-tailimproper-before-index ·
(7 . 8) 0| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"improper-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"improper-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"improper-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"improper-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | list-step | argument(0){"fixtureSite":"improper-call","role":"list-step","path":[{"kind":"argument","index":"0"}]} | null |
| 6 | list-step | argument(0) {"kind":"cdr"}{"fixtureSite":"improper-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]} | null |
| 7 | diagnostic-payload | argument(0) {"kind":"cdr"}{"fixtureSite":"improper-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]} | null |
domain.typeПодробности результата
{
"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"
}
}
}Подробности трассы 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"
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
list-refref-zero ·
(7 8) 0| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"ref-zero-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"ref-zero-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"ref-zero-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"ref-zero-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | list-step | argument(0){"fixtureSite":"ref-zero-call","role":"list-step","path":[{"kind":"argument","index":"0"}]} | null |
| 6 | list-step | argument(0) {"kind":"cdr"}{"fixtureSite":"ref-zero-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"}]} | null |
| 7 | list-step | argument(0) {"kind":"cdr"} {"kind":"cdr"}{"fixtureSite":"ref-zero-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"cdr"},{"kind":"cdr"}]} | null |
| 8 | argument-check | argument(1){"fixtureSite":"ref-zero-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 9 | argument-check | argument(1){"fixtureSite":"ref-zero-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 10 | list-step | argument(0) {"kind":"car"}{"fixtureSite":"ref-zero-call","role":"list-step","path":[{"kind":"argument","index":"0"},{"kind":"car"}]} | null |
| 11 | call-return | call{"fixtureSite":"ref-zero-call","role":"call-return","path":[]} | null |
7Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "7"
}
}Подробности трассы 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"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"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"
}
}
]
}Вызов продукта
Ожидаемый результат
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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"list-ref"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"2"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"2","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"L"} | accepted |
| 5 | list-step | argument(0) | — | {"spineValue":"pair"} | accepted |
| 6 | list-step | argument(0), cdr | — | {"spineValue":"pair"} | accepted |
| 7 | list-step | argument(0), cdr, cdr | — | {"spineValue":"empty-list"} | accepted |
| 8 | argument-check | argument(1) | — | {"domain":"I"} | accepted |
| 9 | argument-check | argument(1) | — | {"constraint":"0 <= index < length","index":"1","length":"2"} | accepted |
| 10 | list-step | argument(0), cdr | — | {"selectedComponent":"cdr"} | accepted |
| 11 | list-step | argument(0), cdr, car | — | {"selectedComponent":"car","value":{"kind":"integer","value":"8"}} | accepted |
| 12 | call-return | empty | — | {"valueCount":"1"} | accepted |
The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"integer","value":"8"}}.
tail-zero uses list-tail at tail-zero-call.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"list-tail"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"2"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"2","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"L"} | accepted |
| 5 | list-step | argument(0) | — | {"spineValue":"pair"} | accepted |
| 6 | list-step | argument(0), cdr | — | {"spineValue":"pair"} | accepted |
| 7 | list-step | argument(0), cdr, cdr | — | {"spineValue":"empty-list"} | accepted |
| 8 | argument-check | argument(1) | — | {"domain":"I"} | accepted |
| 9 | argument-check | argument(1) | — | {"constraint":"0 <= index <= length","index":"0","length":"2"} | accepted |
| 10 | call-return | empty | — | {"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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"list-tail"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"2"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"2","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"L"} | accepted |
| 5 | list-step | argument(0) | — | {"spineValue":"pair"} | accepted |
| 6 | list-step | argument(0), cdr | — | {"spineValue":"pair"} | accepted |
| 7 | list-step | argument(0), cdr, cdr | — | {"spineValue":"empty-list"} | accepted |
| 8 | argument-check | argument(1) | — | {"domain":"I"} | accepted |
| 9 | argument-check | argument(1) | — | {"constraint":"0 <= index <= length","index":"2","length":"2"} | accepted |
| 10 | list-step | argument(0), cdr | — | {"selectedComponent":"cdr"} | accepted |
| 11 | list-step | argument(0), cdr, cdr | — | {"selectedComponent":"cdr"} | accepted |
| 12 | call-return | empty | — | {"valueCount":"1"} | accepted |
The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"list","items":[]}}.
ref-end uses list-ref at ref-end-call.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"list-ref"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"2"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"2","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"L"} | accepted |
| 5 | list-step | argument(0) | — | {"spineValue":"pair"} | accepted |
| 6 | list-step | argument(0), cdr | — | {"spineValue":"pair"} | accepted |
| 7 | list-step | argument(0), cdr, cdr | — | {"spineValue":"empty-list"} | accepted |
| 8 | argument-check | argument(1) | — | {"domain":"I"} | accepted |
| 9 | argument-check | argument(1) | — | {"constraint":"0 <= index < length","index":"2","length":"2"} | accepted |
| 10 | diagnostic-payload | argument(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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"list-tail"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"2"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"2","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"L"} | accepted |
| 5 | list-step | argument(0) | — | {"spineValue":"pair"} | accepted |
| 6 | list-step | argument(0), cdr | — | {"spineValue":"integer","value":{"kind":"integer","value":"8"}} | accepted |
| 7 | diagnostic-payload | argument(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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"list-ref"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"2"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"2","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"L"} | accepted |
| 5 | list-step | argument(0) | — | {"spineValue":"pair"} | accepted |
| 6 | list-step | argument(0), cdr | — | {"spineValue":"pair"} | accepted |
| 7 | list-step | argument(0), cdr, cdr | — | {"spineValue":"empty-list"} | accepted |
| 8 | argument-check | argument(1) | — | {"domain":"I"} | accepted |
| 9 | argument-check | argument(1) | — | {"constraint":"0 <= index < length","index":"0","length":"2"} | accepted |
| 10 | list-step | argument(0), car | — | {"selectedComponent":"car","value":{"kind":"integer","value":"7"}} | accepted |
| 11 | call-return | empty | — | {"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 · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(+ 0.1 0.2)))
)
Запрос и файлы
{
"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"
}
]
}
3/10Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "rational",
"numerator": "3",
"denominator": "10"
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(equal? "é" "é")))
)
Запрос и файлы
{
"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"
}
]
}
#fПодробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "boolean",
"value": false
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 1
(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))))
)
Запрос и файлы
{
"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"
}
]
}
(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")Подробности результата
{
"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"
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 2
(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)))))
)
Запрос и файлы
{
"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"
}
]
}
domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "=",
"argument": "2",
"path": [],
"expected": "number",
"actual": "string"
}
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "/",
"argument": "2",
"path": [],
"expected": "number",
"actual": "string"
}
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "*",
"argument": "1",
"path": [],
"expected": "number",
"actual": "string"
}
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "string-ci=?",
"argument": "2",
"path": [],
"expected": "string",
"actual": "integer"
}
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "string<?",
"argument": "2",
"path": [],
"expected": "string",
"actual": "boolean"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 2
(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)))))
)
Запрос и файлы
{
"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"
}
]
}
domain.indexПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.index",
"data": {
"operation": "vector-ref",
"argument": "1",
"index": "2",
"length": "2"
}
}
}domain.indexПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.index",
"data": {
"operation": "vector-ref",
"argument": "1",
"index": "-1",
"length": "2"
}
}
}domain.indexПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.index",
"data": {
"operation": "vector-slice",
"argument": "1",
"index": "-1",
"length": "2"
}
}
}domain.indexПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.index",
"data": {
"operation": "vector-slice",
"argument": "2",
"index": "3",
"length": "2"
}
}
}domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "vector-slice",
"argument": "2",
"reason": "invalid-slice-order"
}
}
}#()Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "vector",
"items": []
}
}"😀"Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "string",
"value": "😀"
}
}""Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "string",
"value": ""
}
}domain.indexПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.index",
"data": {
"operation": "string-ref",
"argument": "1",
"index": "3",
"length": "3"
}
}
}()Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "list",
"items": []
}
}domain.indexПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.index",
"data": {
"operation": "list-ref",
"argument": "1",
"index": "2",
"length": "2"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 2
(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)))))
)
Запрос и файлы
{
"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"
}
]
}
domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "make-bytevector",
"argument": "1",
"reason": "invalid-byte"
}
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "make-string",
"argument": "1",
"path": [],
"expected": "character",
"actual": "string"
}
}
}domain.typeПодробности результата
{
"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"
}
}
}domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "list->bytevector",
"argument": "0",
"reason": "invalid-byte"
}
}
}domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "integer->char",
"argument": "0",
"reason": "invalid-scalar"
}
}
}domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "integer->char",
"argument": "0",
"reason": "invalid-scalar"
}
}
}1114111Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "1114111"
}
}domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "make-list",
"argument": "0",
"reason": "negative-count"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(if (bytevector? input)
(utf8->string input)
(string->utf8 input))))
)
Запрос и файлы
{
"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"
}
]
}
"Aé"Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "string",
"value": "Aé"
}
}"A"Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "string",
"value": "A"
}
}domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "utf8->string",
"argument": "0",
"reason": "invalid-utf8"
}
}
}domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "utf8->string",
"argument": "0",
"reason": "invalid-utf8"
}
}
}domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "utf8->string",
"argument": "0",
"reason": "invalid-utf8"
}
}
}""Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "string",
"value": ""
}
}#u8(65 195 169)Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "bytevector",
"bytes": [
65,
195,
169
]
}
}#u8(239 187 191 65)Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "bytevector",
"bytes": [
239,
187,
191,
65
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule (lambda (input) (expt 0 input))))
Запрос и файлы
{
"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"
}
}
]
}
domain.division-by-zeroПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.division-by-zero",
"data": {
"operation": "expt",
"argument": "0"
}
}
}domain.division-by-zeroПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.division-by-zero",
"data": {
"operation": "expt",
"argument": "0"
}
}
}1Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "1"
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 1
(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)))
)
Запрос и файлы
{
"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"
}
}
vector-appendvector-empty-middle ·
#(7) #() #(8 9)| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"vector-append-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"vector-append-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"vector-append-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"vector-append-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | argument-check | argument(1){"fixtureSite":"vector-append-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 6 | argument-check | argument(2){"fixtureSite":"vector-append-call","role":"argument-check","path":[{"kind":"argument","index":"2"}]} | null |
| 7 | sequence-step | argument(0) field(length){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"length"}]} | null |
| 8 | sequence-step | argument(1) field(length){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"1"},{"kind":"field","name":"length"}]} | null |
| 9 | sequence-step | argument(2) field(length){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"2"},{"kind":"field","name":"length"}]} | null |
| 10 | datum-allocate | result(0){"fixtureSite":"vector-append-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]} | 3 |
| 11 | sequence-step | argument(0) element(0){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"element","index":"0"}]} | null |
| 12 | sequence-step | argument(2) element(0){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"2"},{"kind":"element","index":"0"}]} | null |
| 13 | sequence-step | argument(2) element(1){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"2"},{"kind":"element","index":"1"}]} | null |
| 14 | call-return | call{"fixtureSite":"vector-append-call","role":"call-return","path":[]} | null |
#(7 8 9)Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "vector",
"items": [
{
"kind": "integer",
"value": "7"
},
{
"kind": "integer",
"value": "8"
},
{
"kind": "integer",
"value": "9"
}
]
}
}Подробности трассы 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"
}
]
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
bytevector-appendbytevector-empty-arguments ·
#u8() #u8(65) #u8() #u8(66)| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"bytevector-append-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"bytevector-append-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"bytevector-append-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"bytevector-append-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | argument-check | argument(1){"fixtureSite":"bytevector-append-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 6 | argument-check | argument(2){"fixtureSite":"bytevector-append-call","role":"argument-check","path":[{"kind":"argument","index":"2"}]} | null |
| 7 | argument-check | argument(3){"fixtureSite":"bytevector-append-call","role":"argument-check","path":[{"kind":"argument","index":"3"}]} | null |
| 8 | sequence-step | argument(0) field(length){"fixtureSite":"bytevector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"length"}]} | null |
| 9 | sequence-step | argument(1) field(length){"fixtureSite":"bytevector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"1"},{"kind":"field","name":"length"}]} | null |
| 10 | sequence-step | argument(2) field(length){"fixtureSite":"bytevector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"2"},{"kind":"field","name":"length"}]} | null |
| 11 | sequence-step | argument(3) field(length){"fixtureSite":"bytevector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"3"},{"kind":"field","name":"length"}]} | null |
| 12 | datum-allocate | result(0){"fixtureSite":"bytevector-append-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]} | 2 |
| 13 | sequence-step | argument(1) byte(0){"fixtureSite":"bytevector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"1"},{"kind":"byte","index":"0"}]} | null |
| 14 | sequence-step | argument(3) byte(0){"fixtureSite":"bytevector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"3"},{"kind":"byte","index":"0"}]} | null |
| 15 | call-return | call{"fixtureSite":"bytevector-append-call","role":"call-return","path":[]} | null |
#u8(65 66)Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "bytevector",
"bytes": [
65,
66
]
}
}Подробности трассы 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
]
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
vector-appendvector-no-arguments
| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"vector-no-arguments-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"vector-no-arguments-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"vector-no-arguments-call","role":"call","path":[]} | null |
| 4 | datum-allocate | result(0){"fixtureSite":"vector-no-arguments-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]} | 0 |
| 5 | call-return | call{"fixtureSite":"vector-no-arguments-call","role":"call-return","path":[]} | null |
#()Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "vector",
"items": []
}
}Подробности трассы 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": []
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
bytevector-appendbytevector-all-empty ·
#u8() #u8()| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"bytevector-all-empty-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"bytevector-all-empty-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"bytevector-all-empty-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"bytevector-all-empty-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | argument-check | argument(1){"fixtureSite":"bytevector-all-empty-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 6 | sequence-step | argument(0) field(length){"fixtureSite":"bytevector-all-empty-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"length"}]} | null |
| 7 | sequence-step | argument(1) field(length){"fixtureSite":"bytevector-all-empty-call","role":"sequence-step","path":[{"kind":"argument","index":"1"},{"kind":"field","name":"length"}]} | null |
| 8 | datum-allocate | result(0){"fixtureSite":"bytevector-all-empty-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]} | 0 |
| 9 | call-return | call{"fixtureSite":"bytevector-all-empty-call","role":"call-return","path":[]} | null |
#u8()Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "bytevector",
"bytes": []
}
}Подробности трассы 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": []
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
vector-appenddomain-before-lengths ·
#(7) 9| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"invalid-vector-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"invalid-vector-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"invalid-vector-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"invalid-vector-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | argument-check | argument(1){"fixtureSite":"invalid-vector-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 6 | diagnostic-payload | argument(1){"fixtureSite":"invalid-vector-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"1"}]} | null |
domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "vector-append",
"argument": "1",
"path": [],
"expected": "vector",
"actual": "integer"
}
}
}Подробности трассы 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"
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
bytevector-appendbytevector-no-arguments
| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"bytevector-no-arguments-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"bytevector-no-arguments-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"bytevector-no-arguments-call","role":"call","path":[]} | null |
| 4 | datum-allocate | result(0){"fixtureSite":"bytevector-no-arguments-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]} | 0 |
| 5 | call-return | call{"fixtureSite":"bytevector-no-arguments-call","role":"call-return","path":[]} | null |
#u8()Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "bytevector",
"bytes": []
}
}Подробности трассы 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": []
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
vector-appendresult-reservation-before-elements ·
#(7) #() #(8 9)| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"vector-append-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"vector-append-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"vector-append-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"vector-append-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | argument-check | argument(1){"fixtureSite":"vector-append-call","role":"argument-check","path":[{"kind":"argument","index":"1"}]} | null |
| 6 | argument-check | argument(2){"fixtureSite":"vector-append-call","role":"argument-check","path":[{"kind":"argument","index":"2"}]} | null |
| 7 | sequence-step | argument(0) field(length){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"length"}]} | null |
| 8 | sequence-step | argument(1) field(length){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"1"},{"kind":"field","name":"length"}]} | null |
| 9 | sequence-step | argument(2) field(length){"fixtureSite":"vector-append-call","role":"sequence-step","path":[{"kind":"argument","index":"2"},{"kind":"field","name":"length"}]} | null |
| 10 | datum-allocate | result(0){"fixtureSite":"vector-append-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]} | 3 |
resource-stop · allocationПодробности результата
{
"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
}Подробности трассы 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
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"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
}
]
}Вызов продукта
Ожидаемый результат
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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"vector-append"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"3"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"3","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"F"} | accepted |
| 5 | argument-check | argument(1) | — | {"domain":"F"} | accepted |
| 6 | argument-check | argument(2) | — | {"domain":"F"} | accepted |
| 7 | sequence-step | argument(0), field(length) | — | {"storedLength":"1"} | accepted |
| 8 | sequence-step | argument(1), field(length) | — | {"storedLength":"0"} | accepted |
| 9 | sequence-step | argument(2), field(length) | — | {"storedLength":"2"} | accepted |
| 10 | datum-allocate | result(0) | 3 | {"shape":"vector","elementCount":"3"} | accepted |
| 11 | sequence-step | argument(0), element(0) | — | {"value":{"kind":"integer","value":"7"}} | accepted |
| 12 | sequence-step | argument(2), element(0) | — | {"value":{"kind":"integer","value":"8"}} | accepted |
| 13 | sequence-step | argument(2), element(1) | — | {"value":{"kind":"integer","value":"9"}} | accepted |
| 14 | call-return | empty | — | {"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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"bytevector-append"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"4"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"4","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"X"} | accepted |
| 5 | argument-check | argument(1) | — | {"domain":"X"} | accepted |
| 6 | argument-check | argument(2) | — | {"domain":"X"} | accepted |
| 7 | argument-check | argument(3) | — | {"domain":"X"} | accepted |
| 8 | sequence-step | argument(0), field(length) | — | {"storedLength":"0"} | accepted |
| 9 | sequence-step | argument(1), field(length) | — | {"storedLength":"1"} | accepted |
| 10 | sequence-step | argument(2), field(length) | — | {"storedLength":"0"} | accepted |
| 11 | sequence-step | argument(3), field(length) | — | {"storedLength":"1"} | accepted |
| 12 | datum-allocate | result(0) | 2 | {"shape":"bytevector","octetCount":"2"} | accepted |
| 13 | sequence-step | argument(1), byte(0) | — | {"octet":"65"} | accepted |
| 14 | sequence-step | argument(3), byte(0) | — | {"octet":"66"} | accepted |
| 15 | call-return | empty | — | {"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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"vector-append"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"0"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"0","tail":false} | accepted |
| 4 | datum-allocate | result(0) | 0 | {"shape":"vector","elementCount":"0"} | accepted |
| 5 | call-return | empty | — | {"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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"bytevector-append"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"2"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"2","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"X"} | accepted |
| 5 | argument-check | argument(1) | — | {"domain":"X"} | accepted |
| 6 | sequence-step | argument(0), field(length) | — | {"storedLength":"0"} | accepted |
| 7 | sequence-step | argument(1), field(length) | — | {"storedLength":"0"} | accepted |
| 8 | datum-allocate | result(0) | 0 | {"shape":"bytevector","octetCount":"0"} | accepted |
| 9 | call-return | empty | — | {"valueCount":"1"} | accepted |
The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"bytevector","bytes":[]}}.
domain-before-lengths uses vector-append at invalid-vector-call.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"vector-append"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"2"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"2","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"F"} | accepted |
| 5 | argument-check | argument(1) | — | {"domain":"F"} | accepted |
| 6 | diagnostic-payload | argument(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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"bytevector-append"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"0"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"0","tail":false} | accepted |
| 4 | datum-allocate | result(0) | 0 | {"shape":"bytevector","octetCount":"0"} | accepted |
| 5 | call-return | empty | — | {"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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"vector-append"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"3"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"3","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"F"} | accepted |
| 5 | argument-check | argument(1) | — | {"domain":"F"} | accepted |
| 6 | argument-check | argument(2) | — | {"domain":"F"} | accepted |
| 7 | sequence-step | argument(0), field(length) | — | {"storedLength":"1"} | accepted |
| 8 | sequence-step | argument(1), field(length) | — | {"storedLength":"0"} | accepted |
| 9 | sequence-step | argument(2), field(length) | — | {"storedLength":"2"} | accepted |
| 10 | datum-allocate | result(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 · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(let ((result
(utf8->string input)))
result)))
)
Запрос и файлы
{
"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"
}
}
utf8->stringinvalid-middle-byte ·
#u8(65 225 128 65)| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"decode-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"decode-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | sequence-step | argument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]} | null |
| 6 | datum-allocate | result(0) scalar(0){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"scalar","index":"0"}]} | 1 |
| 7 | sequence-step | argument(0) byte(1){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"1"}]} | null |
| 8 | sequence-step | argument(0) byte(2){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"2"}]} | null |
| 9 | sequence-step | argument(0) byte(3){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"3"}]} | null |
| 10 | diagnostic-payload | argument(0) byte(3){"fixtureSite":"decode-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"3"}]} | null |
domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "utf8->string",
"argument": "0",
"reason": "invalid-utf8"
}
}
}Подробности трассы 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"
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
utf8->stringtruncated-after-prefix ·
#u8(65 225 128)| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"decode-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"decode-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | sequence-step | argument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]} | null |
| 6 | datum-allocate | result(0) scalar(0){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"scalar","index":"0"}]} | 1 |
| 7 | sequence-step | argument(0) byte(1){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"1"}]} | null |
| 8 | sequence-step | argument(0) byte(2){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"2"}]} | null |
| 9 | sequence-step | argument(0) byte(3){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"3"}]} | null |
| 10 | diagnostic-payload | argument(0) byte(3){"fixtureSite":"decode-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"3"}]} | null |
domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "utf8->string",
"argument": "0",
"reason": "invalid-utf8"
}
}
}Подробности трассы 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"
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
utf8->stringinvalid-second-byte ·
#u8(65 226 40 161)| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"decode-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"decode-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | sequence-step | argument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]} | null |
| 6 | datum-allocate | result(0) scalar(0){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"scalar","index":"0"}]} | 1 |
| 7 | sequence-step | argument(0) byte(1){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"1"}]} | null |
| 8 | sequence-step | argument(0) byte(2){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"2"}]} | null |
| 9 | diagnostic-payload | argument(0) byte(2){"fixtureSite":"decode-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"2"}]} | null |
domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "utf8->string",
"argument": "0",
"reason": "invalid-utf8"
}
}
}Подробности трассы 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"
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
utf8->stringsurrogate-prefix ·
#u8(65 237 160 128)| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"decode-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"decode-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | sequence-step | argument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]} | null |
| 6 | datum-allocate | result(0) scalar(0){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"scalar","index":"0"}]} | 1 |
| 7 | sequence-step | argument(0) byte(1){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"1"}]} | null |
| 8 | sequence-step | argument(0) byte(2){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"2"}]} | null |
| 9 | diagnostic-payload | argument(0) byte(2){"fixtureSite":"decode-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"2"}]} | null |
domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "utf8->string",
"argument": "0",
"reason": "invalid-utf8"
}
}
}Подробности трассы 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"
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
utf8->stringinvalid-leading-byte ·
#u8(192 175)| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"decode-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"decode-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | sequence-step | argument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]} | null |
| 6 | diagnostic-payload | argument(0) byte(0){"fixtureSite":"decode-call","role":"diagnostic-payload","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]} | null |
domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "utf8->string",
"argument": "0",
"reason": "invalid-utf8"
}
}
}Подробности трассы 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"
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"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"
}
}
}
]
}Вызов продукта
Ожидаемый результат
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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"utf8->string"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"1"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"1","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"X"} | accepted |
| 5 | sequence-step | argument(0), byte(0) | — | {"octet":"65"} | accepted |
| 6 | datum-allocate | result(0), scalar(0) | 1 | {"shape":"string-scalar","scalar":"U+0041","resultIndex":"0"} | accepted |
| 7 | sequence-step | argument(0), byte(1) | — | {"octet":"225"} | accepted |
| 8 | sequence-step | argument(0), byte(2) | — | {"octet":"128"} | accepted |
| 9 | sequence-step | argument(0), byte(3) | — | {"octet":"65"} | accepted |
| 10 | diagnostic-payload | argument(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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"utf8->string"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"1"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"1","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"X"} | accepted |
| 5 | sequence-step | argument(0), byte(0) | — | {"octet":"65"} | accepted |
| 6 | datum-allocate | result(0), scalar(0) | 1 | {"shape":"string-scalar","scalar":"U+0041","resultIndex":"0"} | accepted |
| 7 | sequence-step | argument(0), byte(1) | — | {"octet":"225"} | accepted |
| 8 | sequence-step | argument(0), byte(2) | — | {"octet":"128"} | accepted |
| 9 | sequence-step | argument(0), byte(3) | — | {"requiredEnd":"3","continuationRequired":true} | accepted |
| 10 | diagnostic-payload | argument(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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"utf8->string"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"1"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"1","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"X"} | accepted |
| 5 | sequence-step | argument(0), byte(0) | — | {"octet":"65"} | accepted |
| 6 | datum-allocate | result(0), scalar(0) | 1 | {"shape":"string-scalar","scalar":"U+0041","resultIndex":"0"} | accepted |
| 7 | sequence-step | argument(0), byte(1) | — | {"octet":"226"} | accepted |
| 8 | sequence-step | argument(0), byte(2) | — | {"octet":"40"} | accepted |
| 9 | diagnostic-payload | argument(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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"utf8->string"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"1"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"1","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"X"} | accepted |
| 5 | sequence-step | argument(0), byte(0) | — | {"octet":"65"} | accepted |
| 6 | datum-allocate | result(0), scalar(0) | 1 | {"shape":"string-scalar","scalar":"U+0041","resultIndex":"0"} | accepted |
| 7 | sequence-step | argument(0), byte(1) | — | {"octet":"237"} | accepted |
| 8 | sequence-step | argument(0), byte(2) | — | {"octet":"160"} | accepted |
| 9 | diagnostic-payload | argument(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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"utf8->string"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"1"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"1","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"X"} | accepted |
| 5 | sequence-step | argument(0), byte(0) | — | {"octet":"192"} | accepted |
| 6 | diagnostic-payload | argument(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 · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(let ((result
(if (bytevector? input)
(utf8->string input)
(string->utf8 input))))
result)))
)
Запрос и файлы
{
"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"
}
}
utf8->stringdecode-two-scalars ·
#u8(65 195 169)| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"decode-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"decode-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | sequence-step | argument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]} | null |
| 6 | datum-allocate | result(0) scalar(0){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"scalar","index":"0"}]} | 1 |
| 7 | sequence-step | argument(0) byte(1){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"1"}]} | null |
| 8 | sequence-step | argument(0) byte(2){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"2"}]} | null |
| 9 | datum-allocate | result(0) scalar(1){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"scalar","index":"1"}]} | 1 |
| 10 | sequence-step | argument(0) byte(3){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"3"}]} | null |
| 11 | call-return | call{"fixtureSite":"decode-call","role":"call-return","path":[]} | null |
"Aé"Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "string",
"value": "Aé"
}
}Подробности трассы 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é"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
string->utf8encode-three-octets ·
"Aé"| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"encode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"encode-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"encode-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"encode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | text-scalar-scan | argument(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 |
| 6 | datum-allocate | result(0) byte(0){"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"byte","index":"0"}]} | 1 |
| 7 | text-scalar-scan | argument(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 |
| 8 | datum-allocate | result(0) byte(1){"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"byte","index":"1"}]} | 1 |
| 9 | datum-allocate | result(0) byte(2){"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"byte","index":"2"}]} | 1 |
| 10 | text-scalar-scan | argument(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 |
| 11 | call-return | call{"fixtureSite":"encode-call","role":"call-return","path":[]} | null |
#u8(65 195 169)Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "bytevector",
"bytes": [
65,
195,
169
]
}
}Подробности трассы 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
]
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
utf8->stringempty-bytevector ·
#u8()| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"decode-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"decode-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | sequence-step | argument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]} | null |
| 6 | datum-allocate | result(0){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]} | 0 |
| 7 | call-return | call{"fixtureSite":"decode-call","role":"call-return","path":[]} | null |
""Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "string",
"value": ""
}
}Подробности трассы 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": ""
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
string->utf8empty-string ·
""| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"encode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"encode-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"encode-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"encode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | text-scalar-scan | argument(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 |
| 6 | datum-allocate | result(0){"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]} | 0 |
| 7 | call-return | call{"fixtureSite":"encode-call","role":"call-return","path":[]} | null |
#u8()Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "bytevector",
"bytes": []
}
}Подробности трассы 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": []
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
utf8->stringempty-result-reservation-stop ·
#u8()| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"decode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"decode-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"decode-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"decode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | sequence-step | argument(0) byte(0){"fixtureSite":"decode-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]} | null |
| 6 | datum-allocate | result(0){"fixtureSite":"decode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"}]} | 0 |
resource-stop · allocationПодробности результата
{
"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
}Подробности трассы 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
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
string->utf8last-octet-reservation-stop ·
"Aé"| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"encode-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"encode-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"encode-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"encode-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | text-scalar-scan | argument(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 |
| 6 | datum-allocate | result(0) byte(0){"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"byte","index":"0"}]} | 1 |
| 7 | text-scalar-scan | argument(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 |
| 8 | datum-allocate | result(0) byte(1){"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"byte","index":"1"}]} | 1 |
| 9 | datum-allocate | result(0) byte(2){"fixtureSite":"encode-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"byte","index":"2"}]} | 1 |
resource-stop · allocationПодробности результата
{
"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
}Подробности трассы 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
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"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
}
]
}Вызов продукта
Ожидаемый результат
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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"utf8->string"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"1"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"1","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"X"} | accepted |
| 5 | sequence-step | argument(0), byte(0) | — | {"octet":"65"} | accepted |
| 6 | datum-allocate | result(0), scalar(0) | 1 | {"shape":"string-scalar","scalar":"U+0041","resultIndex":"0"} | accepted |
| 7 | sequence-step | argument(0), byte(1) | — | {"octet":"195"} | accepted |
| 8 | sequence-step | argument(0), byte(2) | — | {"octet":"169"} | accepted |
| 9 | datum-allocate | result(0), scalar(1) | 1 | {"shape":"string-scalar","scalar":"U+00E9","resultIndex":"1"} | accepted |
| 10 | sequence-step | argument(0), byte(3) | — | {"requiredEnd":"3","continuationRequired":false} | accepted |
| 11 | call-return | empty | — | {"valueCount":"1"} | accepted |
The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"string","value":"Aé"}}.
encode-three-octets uses string->utf8 at encode-call.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"string->utf8"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"1"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"1","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"T"} | accepted |
| 5 | text-scalar-scan | argument(0), field(scan), scalar(0) | — | {"scalar":"U+0041"} | accepted |
| 6 | datum-allocate | result(0), byte(0) | 1 | {"shape":"bytevector-octet","octet":"65","resultIndex":"0"} | accepted |
| 7 | text-scalar-scan | argument(0), field(scan), scalar(1) | — | {"scalar":"U+00E9"} | accepted |
| 8 | datum-allocate | result(0), byte(1) | 1 | {"shape":"bytevector-octet","octet":"195","resultIndex":"1"} | accepted |
| 9 | datum-allocate | result(0), byte(2) | 1 | {"shape":"bytevector-octet","octet":"169","resultIndex":"2"} | accepted |
| 10 | text-scalar-scan | argument(0), field(scan), scalar(2) | — | {"requiredEnd":"2"} | accepted |
| 11 | call-return | empty | — | {"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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"utf8->string"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"1"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"1","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"X"} | accepted |
| 5 | sequence-step | argument(0), byte(0) | — | {"requiredEnd":"0","continuationRequired":false} | accepted |
| 6 | datum-allocate | result(0) | 0 | {"shape":"string","scalarCount":"0"} | accepted |
| 7 | call-return | empty | — | {"valueCount":"1"} | accepted |
The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"string","value":""}}.
empty-string uses string->utf8 at encode-call.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"string->utf8"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"1"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"1","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"T"} | accepted |
| 5 | text-scalar-scan | argument(0), field(scan), scalar(0) | — | {"requiredEnd":"0"} | accepted |
| 6 | datum-allocate | result(0) | 0 | {"shape":"bytevector","octetCount":"0"} | accepted |
| 7 | call-return | empty | — | {"valueCount":"1"} | accepted |
The outcome is {"kind":"value","valueCount":1,"datum":{"kind":"bytevector","bytes":[]}}.
empty-result-reservation-stop uses utf8->string at decode-call.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"utf8->string"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"1"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"1","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"X"} | accepted |
| 5 | sequence-step | argument(0), byte(0) | — | {"requiredEnd":"0","continuationRequired":false} | accepted |
| 6 | datum-allocate | result(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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"string->utf8"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"1"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"1","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"T"} | accepted |
| 5 | text-scalar-scan | argument(0), field(scan), scalar(0) | — | {"scalar":"U+0041"} | accepted |
| 6 | datum-allocate | result(0), byte(0) | 1 | {"shape":"bytevector-octet","octet":"65","resultIndex":"0"} | accepted |
| 7 | text-scalar-scan | argument(0), field(scan), scalar(1) | — | {"scalar":"U+00E9"} | accepted |
| 8 | datum-allocate | result(0), byte(1) | 1 | {"shape":"bytevector-octet","octet":"195","resultIndex":"1"} | accepted |
| 9 | datum-allocate | result(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 · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(let ((result
(bytevector->list input)))
result)))
)
Запрос и файлы
{
"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"
}
}
bytevector->listtwo-octets ·
#u8(65 255)| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"bytevector-list-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"bytevector-list-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"bytevector-list-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"bytevector-list-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | sequence-step | argument(0) field(length){"fixtureSite":"bytevector-list-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"length"}]} | null |
| 6 | sequence-step | argument(0) byte(0){"fixtureSite":"bytevector-list-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]} | null |
| 7 | datum-allocate | result(0) element(0){"fixtureSite":"bytevector-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"0"}]} | 3 |
| 8 | sequence-step | argument(0) byte(1){"fixtureSite":"bytevector-list-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"1"}]} | null |
| 9 | datum-allocate | result(0) element(1){"fixtureSite":"bytevector-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"1"}]} | 3 |
| 10 | call-return | call{"fixtureSite":"bytevector-list-call","role":"call-return","path":[]} | null |
(65 255)Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "list",
"items": [
{
"kind": "integer",
"value": "65"
},
{
"kind": "integer",
"value": "255"
}
]
}
}Подробности трассы 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"
}
]
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
bytevector->listempty-bytevector ·
#u8()| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"bytevector-list-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"bytevector-list-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"bytevector-list-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"bytevector-list-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | sequence-step | argument(0) field(length){"fixtureSite":"bytevector-list-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"length"}]} | null |
| 6 | call-return | call{"fixtureSite":"bytevector-list-call","role":"call-return","path":[]} | null |
()Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "list",
"items": []
}
}Подробности трассы 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": []
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
bytevector->listsecond-composite-reservation-stop ·
#u8(65 255)| № | Событие | Место | Размер |
|---|---|---|---|
| 1 | callable-check | field(operator){"fixtureSite":"bytevector-list-call","role":"callable-check","path":[{"kind":"field","name":"operator"}]} | null |
| 2 | arity-check | call{"fixtureSite":"bytevector-list-call","role":"arity-check","path":[]} | null |
| 3 | call | call{"fixtureSite":"bytevector-list-call","role":"call","path":[]} | null |
| 4 | argument-check | argument(0){"fixtureSite":"bytevector-list-call","role":"argument-check","path":[{"kind":"argument","index":"0"}]} | null |
| 5 | sequence-step | argument(0) field(length){"fixtureSite":"bytevector-list-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"field","name":"length"}]} | null |
| 6 | sequence-step | argument(0) byte(0){"fixtureSite":"bytevector-list-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"0"}]} | null |
| 7 | datum-allocate | result(0) element(0){"fixtureSite":"bytevector-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"0"}]} | 3 |
| 8 | sequence-step | argument(0) byte(1){"fixtureSite":"bytevector-list-call","role":"sequence-step","path":[{"kind":"argument","index":"0"},{"kind":"byte","index":"1"}]} | null |
| 9 | datum-allocate | result(0) element(1){"fixtureSite":"bytevector-list-call","role":"datum-allocate","path":[{"kind":"result","index":"0"},{"kind":"element","index":"1"}]} | 3 |
resource-stop · allocationПодробности результата
{
"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
}Подробности трассы 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
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"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
}
]
}Вызов продукта
Ожидаемый результат
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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"bytevector->list"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"1"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"1","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"X"} | accepted |
| 5 | sequence-step | argument(0), field(length) | — | {"storedLength":"2"} | accepted |
| 6 | sequence-step | argument(0), byte(0) | — | {"octet":"65"} | accepted |
| 7 | datum-allocate | result(0), element(0) | 3 | {"shape":"octet-integer-and-pair","integer":{"kind":"integer","value":"65"},"pairComponents":"2"} | accepted |
| 8 | sequence-step | argument(0), byte(1) | — | {"octet":"255"} | accepted |
| 9 | datum-allocate | result(0), element(1) | 3 | {"shape":"octet-integer-and-pair","integer":{"kind":"integer","value":"255"},"pairComponents":"2"} | accepted |
| 10 | call-return | empty | — | {"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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"bytevector->list"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"1"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"1","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"X"} | accepted |
| 5 | sequence-step | argument(0), field(length) | — | {"storedLength":"0"} | accepted |
| 6 | call-return | empty | — | {"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.
| Order | Event | Site path | Extent | Reservation input | Reservation |
|---|---|---|---|---|---|
| 1 | callable-check | field(operator) | — | {"procedure":"bytevector->list"} | accepted |
| 2 | arity-check | empty | — | {"suppliedArguments":"1"} | accepted |
| 3 | call | empty | — | {"suppliedArguments":"1","tail":false} | accepted |
| 4 | argument-check | argument(0) | — | {"domain":"X"} | accepted |
| 5 | sequence-step | argument(0), field(length) | — | {"storedLength":"2"} | accepted |
| 6 | sequence-step | argument(0), byte(0) | — | {"octet":"65"} | accepted |
| 7 | datum-allocate | result(0), element(0) | 3 | {"shape":"octet-integer-and-pair","integer":{"kind":"integer","value":"65"},"pairComponents":"2"} | accepted |
| 8 | sequence-step | argument(0), byte(1) | — | {"octet":"255"} | accepted |
| 9 | datum-allocate | result(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 · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(map (lambda (item) (+ item 1)) input)))
)
Запрос и файлы
{
"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"
}
]
}
(2 3 4)Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "list",
"items": [
{
"kind": "integer",
"value": "2"
},
{
"kind": "integer",
"value": "3"
},
{
"kind": "integer",
"value": "4"
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(map (lambda (item) (car item)) input)))
)
Запрос и файлы
{
"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"
}
]
}
domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "map",
"argument": "1",
"path": [
{
"kind": "cdr"
}
],
"expected": "proper-list",
"actual": "integer"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"callbackInvocations": 0
}Вызов продукта
Ожидаемый результат
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 · ред. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(map (lambda (item) (car item)) input)))
)
Запрос и файлы
{
"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"
}
]
}
domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "empty-list"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"callbackInvocations": 1,
"failedInputPosition": 0
}Вызов продукта
Ожидаемый результат
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 form | Callback form | Required callback results | Empty result |
|---|---|---|---|
(map p xs1 ... xsm) | (p x1 ... xm) | One | Empty list |
(for-each p xs1 ... xsm) | (p x1 ... xm) | Any finite count, discarded | Empty list |
(fold-left p seed xs1 ... xsm) | (p accumulator x1 ... xm) | One | Seed |
(fold-right p seed xs1 ... xsm) | (p x1 ... xm accumulator) | One | Seed |
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 · ред. 1
(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) '()))))
)
Запрос и файлы
{
"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"
}
]
}
((-109 -218) (11 22) ())Подробности результата
{
"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": []
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 2
(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))))))
)
Запрос и файлы
{
"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"
}
]
}
domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "map",
"argument": "0",
"path": [],
"expected": "procedure",
"actual": "integer"
}
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "map",
"argument": "2",
"path": [
{
"kind": "cdr"
}
],
"expected": "proper-list",
"actual": "integer"
}
}
}domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "map",
"argument": "2",
"reason": "unequal-lengths"
}
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "map",
"argument": "3",
"path": [
{
"kind": "cdr"
}
],
"expected": "proper-list",
"actual": "integer"
}
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "filter",
"argument": "1",
"path": [
{
"kind": "cdr"
}
],
"expected": "proper-list",
"actual": "integer"
}
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "any",
"argument": "1",
"path": [
{
"kind": "cdr"
}
],
"expected": "proper-list",
"actual": "integer"
}
}
}domain.rangeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.range",
"data": {
"operation": "fold-right",
"argument": "3",
"reason": "unequal-lengths"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"callbackInvocations": [
0,
0,
0,
0,
0,
0,
0
]
}Вызов продукта
Ожидаемый результат
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 · ред. 2
(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) '())))))
)
Запрос и файлы
{
"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"
}
]
}
runtime.arityПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.arity",
"data": {
"minimum": "2",
"maximum": "2",
"actual": "1"
}
}
}runtime.arityПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.arity",
"data": {
"minimum": "2",
"maximum": "2",
"actual": "1"
}
}
}runtime.arityПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.arity",
"data": {
"minimum": "1",
"maximum": "1",
"actual": "2"
}
}
}runtime.arityПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.arity",
"data": {
"minimum": "1",
"maximum": "1",
"actual": "2"
}
}
}runtime.arityПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.arity",
"data": {
"minimum": "0",
"maximum": "0",
"actual": "1"
}
}
}runtime.arityПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.arity",
"data": {
"minimum": "0",
"maximum": "0",
"actual": "1"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"callbackInvocations": [
0,
0,
0,
0,
0,
0
]
}Вызов продукта
Ожидаемый результат
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 · ред. 1
(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 '()))))
)
Запрос и файлы
{
"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"
}
]
}
(-108 -189 7 9 42 99)Подробности результата
{
"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"
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 2
(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))))))
)
Запрос и файлы
{
"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"
}
]
}
runtime.value-countПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.value-count",
"data": {
"expected": "1",
"actual": "2"
}
}
}runtime.value-countПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.value-count",
"data": {
"expected": "1",
"actual": "0"
}
}
}runtime.value-countПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.value-count",
"data": {
"expected": "1",
"actual": "0"
}
}
}runtime.value-countПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.value-count",
"data": {
"expected": "1",
"actual": "2"
}
}
}()Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "list",
"items": []
}
}()Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "list",
"items": []
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"callbackInvocations": [
1,
1,
1,
1,
2,
2
]
}Вызов продукта
Ожидаемый результат
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 · ред. 1
(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)))))
)
Запрос и файлы
{
"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"
}
]
}
((1 3) 9 "hit" 3 #f #t #f)Подробности результата
{
"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
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 2
(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))))))
)
Запрос и файлы
{
"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"
}
]
}
7Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "7"
}
}5Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "5"
}
}9Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "9"
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "call-with-values",
"argument": "1",
"path": [],
"expected": "procedure",
"actual": "integer"
}
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "apply",
"argument": "2",
"path": [
{
"kind": "cdr"
}
],
"expected": "proper-list",
"actual": "integer"
}
}
}runtime.arityПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.arity",
"data": {
"minimum": "1",
"maximum": "1",
"actual": "0"
}
}
}runtime.arityПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "runtime.arity",
"data": {
"minimum": "2",
"maximum": "2",
"actual": "0"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 1
(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)))))
)
Запрос и файлы
{
"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"
}
]
}
(#t #f #f "evaluate" "domain.application" (("data" . (1 2)) ("tag" . "sample")))Подробности результата
{
"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"
}
}
]
}
]
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(map (lambda (x) (if (= x 1) x (car '()))) '(1 2))))
)
Запрос и файлы
{
"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"
}
]
}
resource-stop · allocationПодробности результата
{
"kind": "resource-stop",
"valueCount": 0,
"terminal": true,
"axis": "allocation",
"operation": "map",
"event": "datum-allocate",
"resultIndex": 0,
"diagnosticIdentity": {
"phase": "evaluate",
"code": "resource.exhausted"
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"callbackInvocations": 1,
"partialResult": false,
"returnedControl": true
}Вызов продукта
Ожидаемый результат
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 · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(let ((car (lambda (item) 99)))
(caar input))))
)
Запрос и файлы
{
"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"
}
]
}
3Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "3"
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Вызов продукта
Ожидаемый результат
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 · ред. 1
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(caar input)))
)
Запрос и файлы
{
"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"
}
]
}
3Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "3"
}
}3Подробности результата
{
"kind": "value",
"valueCount": 1,
"datum": {
"kind": "integer",
"value": "3"
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"comparison": {
"canonicalOutcomeEqual": true,
"evaluationChargesEqual": true
}
}Вызов продукта
Ожидаемый результат
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.
| Class | Required behavior |
|---|---|
| Fixed | Reserve a fixed bound before a fixed amount of work. Input growth cannot hide additional work. |
| Precharged | Establish and reserve the complete charge before the operation effect. Determining the charge also uses metered work. |
| Incremental | Reserve each defined increment before performing it. Preserve the specified increment and failure order. |
| GuestCalling | Account for native work and invoke guest procedures through the common evaluator and budget. |
| Deferred | Reject 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 · ред. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(car input)))
)
Запрос и файлы
{
"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"
}
]
}
{"kind":"admission-failure","valueCount":0,"diagnosticIdentity":{"phase":"admission","code":"product.unsupported"},"primitiveClassification":{"required":"one-explicit-class","received":"missing-class"}}Подробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnosticIdentity": {
"phase": "admission",
"code": "product.unsupported"
},
"primitiveClassification": {
"required": "one-explicit-class",
"received": "missing-class"
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Вызов продукта
Ожидаемый результат
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 · ред. 3
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(car input)))
)
Запрос и файлы
{
"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"
}
]
}
{"kind":"admission-failure","valueCount":0,"diagnosticIdentity":{"phase":"admission","code":"product.unsupported"},"primitiveClassification":{"required":"admitted-class","received":"Deferred"}}Подробности результата
{
"kind": "admission-failure",
"valueCount": 0,
"diagnosticIdentity": {
"phase": "admission",
"code": "product.unsupported"
},
"primitiveClassification": {
"required": "admitted-class",
"received": "Deferred"
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"entryEvaluated": false,
"canonicalOutcomeProduced": false,
"evaluationReceiptEligible": false
}Вызов продукта
Ожидаемый результат
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 · ред. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(caar input)))
)
Запрос и файлы
{
"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"
}
]
}
domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "integer"
}
}
}domain.typeПодробности результата
{
"kind": "language-failure",
"valueCount": 0,
"condition": {
"phase": "evaluate",
"code": "domain.type",
"data": {
"operation": "car",
"argument": "0",
"path": [],
"expected": "pair",
"actual": "integer"
}
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"comparison": {
"canonicalOutcomeEqual": true,
"firstFailureEqual": true,
"canonicalSiteEqual": true,
"evaluationChargesEqual": true
}
}Вызов продукта
Ожидаемый результат
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 · ред. 2
(module main
(import)
(export rule)
(entry rule)
(define rule
(lambda (input)
(caar input)))
)
Запрос и файлы
{
"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"
}
]
}
resource-stop · workПодробности результата
{
"kind": "resource-stop",
"valueCount": 0,
"terminal": true,
"axis": "work",
"diagnosticIdentity": {
"phase": "evaluate",
"code": "resource.exhausted"
}
}resource-stop · workПодробности результата
{
"kind": "resource-stop",
"valueCount": 0,
"terminal": true,
"axis": "work",
"diagnosticIdentity": {
"phase": "evaluate",
"code": "resource.exhausted"
}
}Результат по спецификации. Запуски продукта ожидают адаптера 2.0.
Подробности семантики
{
"comparison": {
"canonicalOutcomeEqual": true,
"firstExhaustedAxisEqual": true,
"canonicalSiteEqual": true,
"evaluationChargesEqual": true
},
"returnedControl": true
}Вызов продукта
Ожидаемый результат
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.