499def nativeObservedBuildProgramWithIdentitySource =
500 (lambda unrestricted source : (family NativeTelemetryIdentitySource) .
501 (lambda unrestricted requestedBytes : Nat .
502 (lambda unrestricted requestedSlots : Nat .
503 (lambda unrestricted plan : (family TelemetryRoutedPolicyPlan) .
504 (lambda unrestricted sink : (family NativePhysicalOperand) .
505 (lambda unrestricted directory : (family NativePhysicalOperand) .
506 (lambda unrestricted identity : Bytes .
507 (lambda unrestricted steps : (family NativeObservedSteps) .
508 (let unrestricted applicationBytes =
509 (nativeObservedCandidateBytes requestedBytes)
510 in
511 (let unrestricted applicationSlots =
512 (nativeObservedCandidateSlots requestedSlots)
513 in
514 (eliminate
515 TelemetryRoutedPolicyPlan
516 (lambda unrestricted current : (family TelemetryRoutedPolicyPlan) .
517 (family NativeObservedProgramResult))
518 plan
519 (branch
520 TelemetryRoutedPolicyReady
521 policy
522 sites
523 drain
524 .
525 (eliminate
526 TelemetryDispatchPlan
527 (lambda unrestricted current : (family TelemetryDispatchPlan) .
528 (family NativeObservedProgramResult))
529 drain
530 (branch
531 TelemetryDispatchReady
532 oc
533 rc
534 ordinaryRoutes
535 reservedRoutes
536 ordinary
537 reserved
538 descriptors
539 bound
540 .
541 (let unrestricted arena =
542 (telemetryRoutedPolicyArenaBytes
543 applicationBytes
544 oc
545 rc
546 ordinary
547 reserved
548 bound)
549 in
550 (aosChoose
551 (family NativeObservedProgramResult)
552 (naturalAnd
553 (naturalEqual requestedBytes applicationBytes)
554 (naturalAnd
555 (naturalEqual requestedSlots applicationSlots)
556 (naturalAnd
557 (naturalLessOrEqual arena nativeObservedAddressMaximum)
558 (telemetryRoutedPolicyArenaCertificate
559 applicationBytes
560 oc
561 rc
562 ordinary
563 reserved
564 bound))))
565 (aosChoose
566 (family NativeObservedProgramResult)
567 (naturalAnd
568 (nativePhysicalOperandScopeAdmission
569 applicationBytes
570 applicationSlots
571 0
572 sink)
573 (naturalAnd
574 (nativePhysicalOperandScopeAdmission
575 applicationBytes
576 applicationSlots
577 0
578 directory)
579 (naturalAnd
580 (nativeTelemetryIdentitySourceAdmission applicationBytes applicationSlots source)
581 (nativeObservedStepsAdmission
582 applicationBytes
583 applicationSlots
584 plan
585 steps))))
586 (let unrestricted commands =
587 (nativeTelemetryRoutedPolicyInitializeWithIdentity
588 (nativeTelemetryInitializeIdentityFrom source (nativeObservedWorkSlot applicationSlots))
589 applicationBytes
590 plan
591 (nativeObservedCaptureSlot applicationSlots)
592 identity
593 (nativeLaunchRecipeAssertEqual
594 (nativeLaunchRecipeSlotValue
595 (nativeObservedCaptureSlot applicationSlots))
596 (nativeLaunchRecipeImmediate 0)
597 (nativeTelemetryFailureIdentity
598 b"telemetry:initialization-refused")
599 (nativeObservedLowerSteps
600 applicationBytes
601 applicationSlots
602 plan
603 sink
604 directory
605 identity
606 steps)))
607 in
608 (let unrestricted program =
609 (constructor
610 NativePhysicalProgram
611 NativePhysicalProgramValue
612 (modelWord64FromNaturalTruncated arena)
613 (modelWord64FromNaturalTruncated
614 (succ (nativeObservedRetrySlot applicationSlots)))
615 commands
616 (eliminate
617 NativePhysicalCounts
618 (lambda unrestricted current : (family NativePhysicalCounts) .
619 Nat)
620 (nativePhysicalCommandsCounts commands)
621 (branch
622 NativePhysicalCountsValue
623 count
624 syscalls
625 copies
626 routines
627 polls
628 appends
629 assertions
630 halts
631 payload
632 .
633 count))
634 identity
635 0)
636 in
637 (eliminate
638 NativePhysicalProgramValidation
639 (lambda unrestricted current : (family NativePhysicalProgramValidation) .
640 (family NativeObservedProgramResult))
641 (nativePhysicalValidateProgram program)
642 (branch
643 NativePhysicalProgramValidated
644 checkedProgram
645 validationTelemetry
646 .
647 (constructor
648 NativeObservedProgramResult
649 NativeObservedProgramReady
650 checkedProgram))
651 (branch
652 NativePhysicalProgramRejected
653 error
654 telemetry
655 .
656 (constructor
657 NativeObservedProgramResult
658 NativeObservedProgramRefused
659 (bytes-append
660 b"observed-program-lowering-refused:"
661 (nativePhysicalErrorCodeBytes error)))))))
662 (constructor
663 NativeObservedProgramResult
664 NativeObservedProgramRefused
665 b"observed-program-source-scope-or-flow-refused"))
666 (constructor
667 NativeObservedProgramResult
668 NativeObservedProgramRefused
669 b"observed-program-native-layout-unavailable"))))
670 (branch
671 TelemetryDispatchRefused
672 reason
673 .
674 (constructor
675 NativeObservedProgramResult
676 NativeObservedProgramRefused
677 (bytes-append b"observed-program-policy-refused:" reason)))))
678 (branch
679 TelemetryRoutedPolicyRefused
680 reason
681 .
682 (constructor
683 NativeObservedProgramResult
684 NativeObservedProgramRefused
685 (bytes-append b"observed-program-policy-refused:" reason))))))))))))))The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.