necoherence/semantic_composition

Types

pub type AvailableValue {
  AvailableValue(
    producer: ProducerRef,
    contract: semantic_types.SlotContract,
    resource: option.Option(ResourceLotRef),
  )
}

Constructors

pub type BindingCompatibility {
  Inclusion(certificate: InclusionCertificate)
  SuppliedBindingValue(
    value: semantic_types.SlotValue(exact_json.JsonValue),
  )
}

Constructors

pub type BindingExpr {
  Source(
    value: ValueRef,
    projection: semantic_validation.ProjectionCertificate,
    compatibility: BindingCompatibility,
  )
  Product(
    construction: String,
    type_ref: semantic_types.TypeRef,
    fields: List(#(String, BindingExpr)),
  )
}

Constructors

pub type BranchFact {
  BranchFact(
    guard: GuardId,
    inspected: ValueRef,
    arm: GuardArm,
    refinement: option.Option(semantic_types.SlotContract),
    assumptions: List(semantic_validation.ProjectionAssumption),
    exact: option.Option(
      semantic_types.SlotValue(exact_json.JsonValue),
    ),
  )
}

Constructors

pub type BranchTrace {
  BranchTrace(steps: List(TraceStep), terminal: ReturnPlan)
}

Constructors

pub type CandidateBudget {
  CandidateBudget(
    bindings: Int,
    branch_nodes: Int,
    exhausted_bindings: Bool,
    exhausted_branches: Bool,
  )
}

Constructors

  • CandidateBudget(
      bindings: Int,
      branch_nodes: Int,
      exhausted_bindings: Bool,
      exhausted_branches: Bool,
    )
pub type CandidateTree {
  CandidateTree(
    tree: PlanTree,
    success: Bool,
    certificates: List(ResourceTraceCertificate),
    nodes: Int,
  )
}

Constructors

pub opaque type CheckedAcyclic
pub opaque type CheckedClosure
pub opaque type CheckedComposition
pub opaque type CheckedCompositionClosure
pub opaque type CheckedInclusion
pub opaque type CheckedReachability
pub type ChoiceCoverage {
  ChoiceCoverage(choice: ChoiceSkeleton, children: List(Int))
}

Constructors

pub type ChoiceSkeleton {
  InvocationChoice(
    invocation: InvocationPlan,
    outcomes: List(OutcomeId),
    empty_outcomes: List(OutcomeId),
  )
  GuardChoice(
    guard: GuardId,
    inspected: ValueRef,
    arms: List(GuardArm),
  )
}

Constructors

pub type ClosedSearchState {
  ClosedSearchState(
    state: SearchState,
    terminals: List(TerminalCoverage),
    choices: List(ChoiceCoverage),
    rejected_connections: List(ConnectionFailure),
    missing_supply: List(MissingSupply),
  )
}

Constructors

pub type CompatibilityDecision {
  Compatible(certificate: InclusionCertificate)
  Incompatible(certificate: CounterexampleCertificate)
  CompatibilityUnknown(obligations: List(TypeObligation))
}

Constructors

pub type CompositionClosureWitness {
  CompositionClosureWitness(
    input_snapshot: CompositionInput,
    root: Int,
    states: List(ClosedSearchState),
  )
}

Constructors

pub type CompositionDecision {
  Solved(
    composition: CheckedComposition,
    selection: SelectionEvidence,
  )
  Unreachable(closure: CompositionClosureWitness)
  CompositionUnknown(
    obligations: List(UnresolvedObligation),
    frontier: List(SearchState),
    rejected_connections: List(ConnectionFailure),
  )
  Ambiguous(
    candidates: List(VerifiedCompositionCandidate),
    canonical_plans: List(String),
  )
}

Constructors

pub type CompositionEffect {
  PureFunction
  HttpRequestResponse
  DataOnly
}

Constructors

  • PureFunction
  • HttpRequestResponse
  • DataOnly
pub type CompositionEngineFailure {
  ContractViolation(reason: String)
  ResourceFailure(failure: typed_mapping.SolverFailure)
  Witness(failure: WitnessFailure)
}

Constructors

pub type CompositionInput {
  CompositionInput(
    identity: String,
    revision: String,
    basis: SemanticBasis,
    signatures: List(FunctionSignature),
    initial_inputs: List(InitialInput),
    initial_resources: List(ResourceLot),
    goal: GoalSpec,
    invocation_domain: InvocationDomain,
    allowed_effects: List(CompositionEffect),
    explicit_order: List(#(SiteId, SiteId)),
    selection_policy: option.Option(SelectionPolicy),
    bounds: SearchBounds,
  )
}

Constructors

pub type CompositionInputFailure {
  InputBasisMismatch
  DuplicateIdentity(kind: String, identity: String)
  UnresolvedType(reference: semantic_types.TypeRef)
  UnresolvedFunction(reference: FunctionRef)
  InvalidSignature(function: FunctionRef, reason: String)
  InvalidInitialValue(
    input: InputId,
    failure: semantic_types.ValueFailure,
  )
  InvalidInitialCertificate(input: InputId, condition: String)
  InvalidInvocationDomain(reason: String)
  InvalidResourceDeclaration(reason: String)
  InvalidBound(reason: String)
  OperationEffectMismatch(
    operation: semantic_types.DefinitionRef,
    expected: CompositionEffect,
    supplied: CompositionEffect,
  )
}

Constructors

pub type CompositionPlan {
  CompositionPlan(
    input_identity: String,
    input_revision: String,
    root: PlanTree,
  )
}

Constructors

  • CompositionPlan(
      input_identity: String,
      input_revision: String,
      root: PlanTree,
    )
pub type CompositionWitness {
  CompositionWitness(
    input_snapshot: CompositionInput,
    initial_membership: List(
      #(InputId, semantic_types.SlotValue(exact_json.JsonValue)),
    ),
    resource_traces: List(ResourceTraceCertificate),
  )
}

Constructors

pub type ConnectionFailure {
  ConnectionFailure(
    value: option.Option(ValueRef),
    destination: semantic_types.SlotContract,
    counterexample: CounterexampleCertificate,
  )
}

Constructors

pub type ConstructionRule {
  ConstructionRule(
    identity: String,
    type_ref: semantic_types.TypeRef,
    nested_fields: List(#(String, String)),
    field_constraints: List(FieldConstraint),
  )
}

Constructors

pub type CounterexampleCertificate {
  CounterexampleCertificate(
    basis: SemanticBasis,
    source: semantic_types.SlotContract,
    destination: semantic_types.SlotContract,
    value: semantic_types.SlotValue(exact_json.JsonValue),
    destination_failure: semantic_types.ValueFailure,
  )
}

Constructors

pub type DeclaredGuard {
  DeclaredGuard(
    id: GuardId,
    source_type: semantic_types.TypeRef,
    path: List(semantic_types.PathStep),
    kind: GuardKind,
  )
}

Constructors

pub type Enumeration {
  Enumeration(
    terminals: List(ReturnPlan),
    choices: List(ChoiceSkeleton),
    unknown: List(UnresolvedObligation),
    failures: List(ConnectionFailure),
    missing: List(MissingSupply),
    budget: CandidateBudget,
  )
}

Constructors

pub type FailureEmbedding {
  FailureEmbedding(
    id: FailureEmbeddingId,
    origin: FailureOrigin,
    contract: semantic_types.SlotContract,
    final_resources: List(ResourceGoal),
  )
}

Constructors

pub type FailureEmbeddingId {
  FailureEmbeddingId(value: String)
}

Constructors

  • FailureEmbeddingId(value: String)
pub type FailureOrigin {
  FunctionFailure(function: FunctionRef, outcome: OutcomeId)
  GuardFailure(guard: GuardId, arm: GuardArm)
}

Constructors

pub type FieldConstraint {
  FieldConstraint(
    field: String,
    source: SourceConstraint,
    presence: FieldPresence,
  )
}

Constructors

pub type FieldPresence {
  Required
  Optional
}

Constructors

  • Required
  • Optional
pub type FunctionForm {
  Pure
  Operation(reference: semantic_types.DefinitionRef)
  DeclaredTransform
}

Constructors

pub type FunctionRef {
  FunctionRef(
    identity: String,
    revision: String,
    content_digest: String,
  )
}

Constructors

  • FunctionRef(
      identity: String,
      revision: String,
      content_digest: String,
    )
pub type FunctionSignature {
  FunctionSignature(
    reference: FunctionRef,
    form: FunctionForm,
    effect: CompositionEffect,
    inputs: List(InputPort),
    outcomes: List(OutcomeContract),
    resource_inputs: List(ResourceRequirement),
    assumption_ref: String,
    handles_failure: option.Option(FailureOrigin),
  )
}

Constructors

pub type GoalPort {
  GoalPort(
    id: GoalPortId,
    contract: semantic_types.SlotContract,
    source_constraint: SourceConstraint,
  )
}

Constructors

pub type GoalPortId {
  GoalPortId(value: String)
}

Constructors

  • GoalPortId(value: String)
pub type GoalSpec {
  GoalSpec(
    outputs: List(GoalPort),
    failures: List(FailureEmbedding),
    final_resources: List(ResourceGoal),
  )
}

Constructors

pub type GuardArm {
  GuardPresent
  GuardAbsent
  GuardNull
  GuardVariant(tag: String)
  UnknownVariant
  GuardAccepted
  GuardRejected
}

Constructors

  • GuardPresent
  • GuardAbsent
  • GuardNull
  • GuardVariant(tag: String)
  • UnknownVariant
  • GuardAccepted
  • GuardRejected
pub type GuardId {
  GuardId(value: String)
}

Constructors

  • GuardId(value: String)
pub type GuardKind {
  Presence
  Variants
  Validate(contract: semantic_types.SlotContract)
}

Constructors

pub type InclusionCertificate {
  InclusionCertificate(
    basis: SemanticBasis,
    source: semantic_types.SlotContract,
    destination: semantic_types.SlotContract,
    root: Int,
    empty_types: List(semantic_types.TypeRef),
    pairs: List(PairEntry),
  )
}

Constructors

pub type InclusionFailure {
  InclusionBasisMismatch
  ContractMismatch
  UndefinedMeaning(
    obligations: List(semantic_types.SemanticObligation),
  )
  MissingPair
  PairMismatch(index: Int)
  RuleMismatch(index: Int)
  ChildCoverage(index: Int)
  ForgedEmptiness
  CounterexampleMismatch
  InclusionUnresolved(obligation: TypeObligation)
}

Constructors

  • InclusionBasisMismatch
  • ContractMismatch
  • UndefinedMeaning(
      obligations: List(semantic_types.SemanticObligation),
    )
  • MissingPair
  • PairMismatch(index: Int)
  • RuleMismatch(index: Int)
  • ChildCoverage(index: Int)
  • ForgedEmptiness
  • CounterexampleMismatch
  • InclusionUnresolved(obligation: TypeObligation)
pub type InclusionRule {
  EmptySource
  InclusionBoolean
  IntegerIntersection
  FiniteStrings
  StringConditions
  BytesLength
  InclusionUnit
  JsonDomain
  PlainObjectDomain
  UnfoldSource
  UnfoldDestination
  InclusionArray
  InclusionProduct
  SourceUnion
  DestinationUnion
  SourceRecord
  DestinationRecord
  ProductTagCases
}

Constructors

  • EmptySource
  • InclusionBoolean
  • IntegerIntersection
  • FiniteStrings
  • StringConditions
  • BytesLength
  • InclusionUnit
  • JsonDomain
  • PlainObjectDomain
  • UnfoldSource
  • UnfoldDestination
  • InclusionArray
  • InclusionProduct
  • SourceUnion
  • DestinationUnion
  • SourceRecord
  • DestinationRecord
  • ProductTagCases
pub type InitialInput {
  InitialInput(
    id: InputId,
    contract: semantic_types.SlotContract,
    source: InitialSource,
    resource: option.Option(LotId),
  )
}

Constructors

pub type InitialSource {
  Argument
  SuppliedValue(
    value: semantic_types.SlotValue(exact_json.JsonValue),
  )
}

Constructors

pub type InputId {
  InputId(value: String)
}

Constructors

  • InputId(value: String)
pub type InputPort {
  InputPort(
    id: PortId,
    contract: semantic_types.SlotContract,
    source_constraint: SourceConstraint,
    resource_requirement: option.Option(RequirementId),
  )
}

Constructors

pub type InvocationDomain {
  InvocationDomain(
    identity: String,
    revision: String,
    sites: List(InvocationSite),
    permitted_projections: List(PermittedProjection),
    permitted_constructions: List(ConstructionRule),
    permitted_transforms: List(FunctionRef),
    guards: List(DeclaredGuard),
  )
}

Constructors

pub type InvocationPlan {
  InvocationPlan(
    site: SiteId,
    function: FunctionRef,
    bindings: List(#(PortId, BindingExpr)),
    resources: List(ResourceBinding),
  )
}

Constructors

pub type InvocationSite {
  InvocationSite(id: SiteId, function: FunctionRef)
}

Constructors

pub type LotId {
  LotId(value: String)
}

Constructors

  • LotId(value: String)
pub type LoweringFailure {
  InvalidLowering(reason: String)
  UnknownLowering(obligation: UnresolvedObligation)
}

Constructors

pub type MissingSupply {
  MissingSupply(
    site: option.Option(SiteId),
    port: String,
    contract: semantic_types.SlotContract,
  )
}

Constructors

pub type NormalizedResourceBinding {
  NormalizedResourceBinding(
    transition: String,
    lot: ResourceLotRef,
    read: Int,
    consume: Int,
    required_revision: Int,
  )
}

Constructors

  • NormalizedResourceBinding(
      transition: String,
      lot: ResourceLotRef,
      read: Int,
      consume: Int,
      required_revision: Int,
    )
pub type OutcomeContract {
  OutcomeContract(
    id: OutcomeId,
    form: OutcomeForm,
    value_ports: List(OutputPort),
    produced_resources: List(ResourceProduction),
  )
}

Constructors

pub type OutcomeForm {
  Success
  DeclaredFailure
}

Constructors

  • Success
  • DeclaredFailure
pub type OutcomeId {
  OutcomeId(value: String)
}

Constructors

  • OutcomeId(value: String)
pub type OutputPort {
  OutputPort(
    id: PortId,
    contract: semantic_types.SlotContract,
    resource_production: option.Option(ProductionId),
  )
}

Constructors

pub type PairEntry {
  PairEntry(
    pair: TypePair,
    source_shape: semantic_types.TypeShape,
    destination_shape: semantic_types.TypeShape,
    rule: InclusionRule,
    children: List(Int),
  )
}

Constructors

pub type PermittedProjection {
  PermittedProjection(
    source_type: semantic_types.TypeRef,
    path: List(semantic_types.PathStep),
  )
}

Constructors

pub type PlanNode {
  Invoke(
    invocation: InvocationPlan,
    arms: List(#(OutcomeId, PlanTree)),
    empty_outcomes: List(OutcomeId),
  )
  Guard(
    guard: GuardId,
    inspected: ValueRef,
    arms: List(#(GuardArm, PlanTree)),
  )
  Return(terminal: ReturnPlan)
}

Constructors

pub type PlanTree {
  PlanTree(rank: Int, node: PlanNode)
}

Constructors

pub type PortId {
  PortId(value: String)
}

Constructors

  • PortId(value: String)
pub opaque type PreparedCompositionInput
pub type ProducerRef {
  Initial(id: InputId)
  InvocationOutcome(
    site: SiteId,
    outcome: OutcomeId,
    port: PortId,
  )
}

Constructors

pub type ProductionId {
  ProductionId(value: String)
}

Constructors

  • ProductionId(value: String)
pub type RawComposition {
  RawComposition(
    plan: CompositionPlan,
    witness: CompositionWitness,
    selection: SelectionEvidence,
  )
}

Constructors

pub type RequirementId {
  RequirementId(value: String)
}

Constructors

  • RequirementId(value: String)
pub type ResourceBinding {
  ResourceBinding(
    requirement: RequirementId,
    lot: ResourceLotRef,
    inclusion: InclusionCertificate,
  )
}

Constructors

pub type ResourceBounds {
  ResourceBounds(
    max_bindings: Int,
    max_search_steps: Int,
    max_tokens: Int,
  )
}

Constructors

  • ResourceBounds(
      max_bindings: Int,
      max_search_steps: Int,
      max_tokens: Int,
    )
pub type ResourceCorrespondence {
  ResourceCorrespondence(
    lots: List(ResourceLotCorrespondence),
    values: List(ValueCorrespondence),
    normalized_bindings: List(NormalizedResourceBinding),
    execution_order: List(String),
  )
}

Constructors

pub type ResourceGoal {
  ResourceGoal(
    lot: ResourceLotRef,
    multiplicity: Int,
    revision: Int,
  )
}

Constructors

  • ResourceGoal(
      lot: ResourceLotRef,
      multiplicity: Int,
      revision: Int,
    )
pub type ResourceIdentityConstraint {
  AnyResource
  Exactly(producer: ResourceProducer)
}

Constructors

pub type ResourceLot {
  ResourceLot(
    id: LotId,
    token_type: semantic_types.TypeRef,
    producer: ResourceProducer,
    revision: Int,
    quantity: Int,
    provenance: String,
  )
}

Constructors

pub type ResourceLotCorrespondence {
  ResourceLotCorrespondence(
    lot: ResourceLotRef,
    place: String,
    producer: ResourceProducer,
    token_target: String,
    token_type: String,
    revision: Int,
    quantity: Int,
    provenance: String,
  )
}

Constructors

  • ResourceLotCorrespondence(
      lot: ResourceLotRef,
      place: String,
      producer: ResourceProducer,
      token_target: String,
      token_type: String,
      revision: Int,
      quantity: Int,
      provenance: String,
    )
pub type ResourceLotRef {
  InitialLot(id: LotId)
  ProducedLot(
    site: SiteId,
    outcome: OutcomeId,
    production: ProductionId,
  )
}

Constructors

pub type ResourceProducer {
  InitialResource(identity: String, revision: String)
  OutcomeResource(site: SiteId, outcome: OutcomeId)
}

Constructors

  • InitialResource(identity: String, revision: String)
  • OutcomeResource(site: SiteId, outcome: OutcomeId)
pub type ResourceProduction {
  ResourceProduction(
    id: ProductionId,
    token_type: semantic_types.TypeRef,
    revision: Int,
    quantity: Int,
    provenance: String,
  )
}

Constructors

pub type ResourceRequirement {
  ResourceRequirement(
    id: RequirementId,
    token_type: semantic_types.TypeRef,
    mode: typed_mapping.BindingMode,
    multiplicity: Int,
    required_revision: Int,
    identity: ResourceIdentityConstraint,
  )
}

Constructors

pub type ResourceTraceCertificate {
  ResourceTraceCertificate(
    trace: BranchTrace,
    lowering: typed_mapping.SolverInput,
    correspondence: ResourceCorrespondence,
    reachability: typed_mapping.ReachabilityWitness,
    acyclicity: typed_mapping.AcyclicWitness,
    value_sources: List(
      #(
        ProducerRef,
        semantic_types.SlotValue(exact_json.JsonValue),
      ),
    ),
  )
}

Constructors

pub type ReturnPlan {
  ReturnSuccess(outputs: List(#(GoalPortId, BindingExpr)))
  ReturnFailure(
    embedding: FailureEmbeddingId,
    value: BindingExpr,
  )
}

Constructors

pub type SampleObligation {
  SampleBound
}

Constructors

  • SampleBound
pub type SampleResult(a) {
  SampleResult(
    values: List(a),
    obligations: List(SampleObligation),
  )
}

Constructors

pub type SearchBounds {
  SearchBounds(
    max_expanded_states: Int,
    max_binding_candidates: Int,
    max_type_obligations: Int,
    max_branch_nodes: Int,
    resource_bounds: option.Option(ResourceBounds),
    max_sample_length: Int,
  )
}

Constructors

  • SearchBounds(
      max_expanded_states: Int,
      max_binding_candidates: Int,
      max_type_obligations: Int,
      max_branch_nodes: Int,
      resource_bounds: option.Option(ResourceBounds),
      max_sample_length: Int,
    )
pub type SearchState {
  SearchState(
    available: List(AvailableValue),
    used_sites: List(SiteId),
    used_guards: List(GuardId),
    facts: List(BranchFact),
    trace: List(TraceStep),
    pending_failure: option.Option(FailureOrigin),
  )
}

Constructors

pub type SelectionEvidence {
  AnyFeasibleEvidence
  Unique(
    closure: CompositionClosureWitness,
    canonical_plan: String,
  )
}

Constructors

pub type SelectionPolicy {
  RequireUnique
  AnyFeasible
}

Constructors

  • RequireUnique
  • AnyFeasible
pub type SemanticBasis {
  SemanticBasis(
    profile: semantic_types.SemanticProfile,
    sources: List(semantic_types.SourceRef),
  )
}

Constructors

pub type SiteId {
  SiteId(value: String)
}

Constructors

  • SiteId(value: String)
pub type SourceConstraint {
  AnyCompatible
  InitialOnly(
    input: InputId,
    path: List(semantic_types.PathStep),
  )
  ProducedBy(
    site: SiteId,
    outcome: OutcomeId,
    port: PortId,
    path: List(semantic_types.PathStep),
  )
}

Constructors

pub type TerminalAssessment {
  Feasible(certificate: ResourceTraceCertificate)
  ResourceUnreachable(
    trace: BranchTrace,
    lowering: typed_mapping.SolverInput,
    correspondence: ResourceCorrespondence,
    closure: typed_mapping.ClosureWitness,
  )
  RejectedLowering(trace: BranchTrace, reason: String)
  EmptyValues(producers: List(ProducerRef))
  TerminalUnknown(obligations: List(UnresolvedObligation))
}

Constructors

pub type TerminalCoverage {
  TerminalCoverage(
    terminal: ReturnPlan,
    assessment: TerminalAssessment,
  )
}

Constructors

pub type TraceStep {
  InvocationStep(invocation: InvocationPlan, outcome: OutcomeId)
  GuardStep(guard: GuardId, inspected: ValueRef, arm: GuardArm)
}

Constructors

pub type TypeObligation {
  TypeObligation(
    pair: TypePair,
    path: List(semantic_types.PathStep),
    reason: TypeObligationReason,
  )
}

Constructors

pub type TypeObligationReason {
  TypeMeaning(
    obligations: List(semantic_types.SemanticObligation),
  )
  ConstraintImplication
  TypePresence
  UnionRemainder
  ExtraField(name: String)
  TypeInhabitation
  ObligationBoundExhausted
}

Constructors

  • TypeMeaning(obligations: List(semantic_types.SemanticObligation))
  • ConstraintImplication
  • TypePresence
  • UnionRemainder
  • ExtraField(name: String)
  • TypeInhabitation
  • ObligationBoundExhausted
pub type TypePair {
  TypePair(
    source: semantic_types.SlotContract,
    destination: semantic_types.SlotContract,
    source_tag: option.Option(String),
  )
}

Constructors

pub type UnresolvedObligation {
  UnresolvedTypeObligation(
    value: option.Option(ValueRef),
    obligations: List(TypeObligation),
  )
  UnresolvedMeaning(
    obligations: List(semantic_types.SemanticObligation),
  )
  InvalidValidationCertificate(condition: String)
  Inhabitation(
    producer: ProducerRef,
    contract: semantic_types.SlotContract,
  )
  BranchInhabitation
  StateBoundExhausted
  BindingBoundExhausted
  BranchBoundExhausted
  ResourceSolverUnknown(reason: typed_mapping.UnknownReason)
  ResourceCapacityBound(required: Int, limit: Int)
  UnresolvedUniqueness
}

Constructors

pub type ValueCorrespondence {
  ValueCorrespondence(
    producer: ProducerRef,
    place: String,
    token_target: String,
    revision: Int,
  )
}

Constructors

  • ValueCorrespondence(
      producer: ProducerRef,
      place: String,
      token_target: String,
      revision: Int,
    )
pub type ValueRef {
  ValueRef(
    producer: ProducerRef,
    path: List(semantic_types.PathStep),
  )
}

Constructors

pub opaque type VerifiedCompositionCandidate
pub type WitnessFailure {
  InputRevisionMismatch
  InitialMembership(input: InputId)
  ProducerMismatch(value: ValueRef)
  ProjectionMismatch(
    failure: semantic_validation.ProjectionFailure,
  )
  SourceConstraintMismatch(value: ValueRef)
  InclusionMismatch(failure: InclusionFailure)
  SuppliedValueMismatch(value: ValueRef)
  ConstructionMismatch(reference: semantic_types.TypeRef)
  MissingBinding(identity: String)
  SignatureMismatch(site: SiteId)
  GuardNotDominating(value: ValueRef)
  IncompleteBranchCoverage(identity: String)
  FailureEmbeddingMismatch(embedding: FailureEmbeddingId)
  GoalMismatch
  RankViolation
  ResourceLoweringMismatch(reason: String)
  ResourceReplayMismatch(reason: String)
  ForgedClosure(reason: String)
  ForgedAcyclicity(reason: String)
  MissingEvidence(reason: String)
}

Constructors

  • InputRevisionMismatch
  • InitialMembership(input: InputId)
  • ProducerMismatch(value: ValueRef)
  • ProjectionMismatch(
      failure: semantic_validation.ProjectionFailure,
    )
  • SourceConstraintMismatch(value: ValueRef)
  • InclusionMismatch(failure: InclusionFailure)
  • SuppliedValueMismatch(value: ValueRef)
  • ConstructionMismatch(reference: semantic_types.TypeRef)
  • MissingBinding(identity: String)
  • SignatureMismatch(site: SiteId)
  • GuardNotDominating(value: ValueRef)
  • IncompleteBranchCoverage(identity: String)
  • FailureEmbeddingMismatch(embedding: FailureEmbeddingId)
  • GoalMismatch
  • RankViolation
  • ResourceLoweringMismatch(reason: String)
  • ResourceReplayMismatch(reason: String)
  • ForgedClosure(reason: String)
  • ForgedAcyclicity(reason: String)
  • MissingEvidence(reason: String)

Values

pub fn acyclic_input(
  checked: CheckedAcyclic,
) -> typed_mapping.SolverInput
pub fn acyclic_witness(
  checked: CheckedAcyclic,
) -> typed_mapping.AcyclicWitness
pub fn at(values: List(a), index: Int) -> option.Option(a)
pub fn bounded_slot_samples(
  graph: semantic_types.SemanticGraph,
  contract: semantic_types.SlotContract,
  limit: Int,
  max_sample_length: Int,
) -> SampleResult(semantic_types.SlotValue(exact_json.JsonValue))
pub fn candidate_components(
  prepared: PreparedCompositionInput,
  candidate: CandidateTree,
) -> Result(
  #(CompositionPlan, CompositionWitness),
  CompositionEngineFailure,
)
pub fn candidate_key(
  input: CompositionInput,
  candidate: CandidateTree,
) -> String
pub fn candidate_plan(
  candidate: VerifiedCompositionCandidate,
) -> CompositionPlan
pub fn candidate_witness(
  candidate: VerifiedCompositionCandidate,
) -> CompositionWitness
pub fn check_assignable(
  graph: semantic_types.SemanticGraph,
  source: semantic_types.SlotContract,
  destination: semantic_types.SlotContract,
  max_obligations: Int,
) -> CompatibilityDecision
pub fn check_function(
  graph: semantic_types.SemanticGraph,
  input: CompositionInput,
  function: FunctionSignature,
) -> Result(Nil, CompositionInputFailure)
pub fn check_return(
  prepared: PreparedCompositionInput,
  state: SearchState,
  terminal: ReturnPlan,
) -> Result(Bool, WitnessFailure)
pub fn checked_inclusion_certificate(
  checked: CheckedInclusion,
) -> InclusionCertificate
pub fn checked_inclusion_graph(
  checked: CheckedInclusion,
) -> semantic_types.SemanticGraph
pub fn checked_plan(
  checked: CheckedComposition,
) -> CompositionPlan
pub fn checked_prepared(
  checked: CheckedComposition,
) -> PreparedCompositionInput
pub fn checked_raw(checked: CheckedComposition) -> RawComposition
pub fn checked_witness(
  checked: CheckedComposition,
) -> CompositionWitness
pub fn choice_states(
  prepared: PreparedCompositionInput,
  state: SearchState,
  choice: ChoiceSkeleton,
) -> Result(List(SearchState), WitnessFailure)
pub fn closure_canonical_plans(
  checked: CheckedCompositionClosure,
) -> List(String)
pub fn collect(
  values: List(a),
  action: fn(a) -> Result(b, e),
) -> Result(List(b), e)
pub const default_resource_token_bound: Int
pub fn default_search_bounds() -> SearchBounds
pub fn distinct_candidates(
  input: CompositionInput,
  candidates: List(CandidateTree),
) -> List(CandidateTree)
pub fn enumerate_state(
  prepared: PreparedCompositionInput,
  state: SearchState,
  budget: CandidateBudget,
) -> Enumeration
pub fn fresh_budget() -> CandidateBudget
pub fn goal_unreachable(
  checked: CheckedCompositionClosure,
) -> Bool
pub fn guard_declaration(
  input: CompositionInput,
  id: GuardId,
) -> option.Option(DeclaredGuard)
pub fn inclusion_samples(
  graph: semantic_types.SemanticGraph,
  source: semantic_types.TypeRef,
  destination: semantic_types.TypeRef,
  limit: Int,
) -> List(exact_json.JsonValue)
pub fn index_of(
  values: List(a),
  value: a,
  index: Int,
) -> option.Option(Int)
pub fn initial_state(
  prepared: PreparedCompositionInput,
) -> SearchState
pub fn merge_choice(
  input: CompositionInput,
  state: SearchState,
  choice: ChoiceSkeleton,
  children: List(List(CandidateTree)),
  budget: CandidateBudget,
) -> #(List(CandidateTree), CandidateBudget)
pub fn prepare_composition(
  graph: semantic_types.SemanticGraph,
  input: CompositionInput,
  check_signature: fn(FunctionSignature) -> Result(
    Nil,
    CompositionInputFailure,
  ),
) -> Result(PreparedCompositionInput, CompositionInputFailure)
pub fn prepared_empty(
  prepared: PreparedCompositionInput,
) -> List(semantic_types.TypeRef)
pub fn prepared_initial_obligations(
  prepared: PreparedCompositionInput,
) -> List(semantic_types.SemanticObligation)
pub fn prepared_input(
  prepared: PreparedCompositionInput,
) -> CompositionInput
pub fn reachability_input(
  checked: CheckedReachability,
) -> typed_mapping.SolverInput
pub fn replace_at(
  values: List(a),
  index: Int,
  value: a,
) -> List(a)
pub fn require(condition: Bool, failure: e) -> Result(Nil, e)
pub fn resource_closure_input(
  checked: CheckedClosure,
) -> typed_mapping.SolverInput
pub fn resource_closure_witness(
  checked: CheckedClosure,
) -> typed_mapping.ClosureWitness
pub fn resource_trace_meaning(
  prepared: PreparedCompositionInput,
  correspondence: ResourceCorrespondence,
) -> Result(Nil, UnresolvedObligation)
pub fn sample_value_fuel(
  graph: semantic_types.SemanticGraph,
  reference: semantic_types.TypeRef,
  active: List(semantic_types.TypeRef),
  fuel: Int,
  max_sample_length: Int,
) -> SampleResult(exact_json.JsonValue)
pub fn samples(
  graph: semantic_types.SemanticGraph,
  reference: semantic_types.TypeRef,
  active: List(semantic_types.TypeRef),
  limit: Int,
) -> List(exact_json.JsonValue)
pub fn semantic_basis(
  graph: semantic_types.SemanticGraph,
) -> SemanticBasis
pub fn slot_empty(
  contract: semantic_types.SlotContract,
  empty: List(semantic_types.TypeRef),
) -> Bool
pub fn unique(values: List(a)) -> List(a)
pub fn verify_composition(
  prepared: PreparedCompositionInput,
  raw: RawComposition,
) -> Result(CheckedComposition, WitnessFailure)
pub fn verify_counterexample(
  graph: semantic_types.SemanticGraph,
  certificate: CounterexampleCertificate,
) -> Result(Nil, InclusionFailure)
pub fn verify_return_values(
  prepared: PreparedCompositionInput,
  terminal: ReturnPlan,
  values: List(
    #(ProducerRef, semantic_types.SlotValue(exact_json.JsonValue)),
  ),
) -> Result(Nil, WitnessFailure)
pub fn verify_unreachable_composition(
  prepared: PreparedCompositionInput,
  witness: CompositionClosureWitness,
) -> Result(Nil, WitnessFailure)
pub fn verify_value_models(
  prepared: PreparedCompositionInput,
  state: SearchState,
  values: List(
    #(ProducerRef, semantic_types.SlotValue(exact_json.JsonValue)),
  ),
) -> Result(Nil, WitnessFailure)
✨ Search Document