import Base import entity_key.bend as K type RelationKind is Data: Ordinary{} Hierarchy{} type Descriptor is Data: Descriptor{key: U32,name: String,inverseName: String,kind: RelationKind} type Edge is Data: Edge{relation: Descriptor,source: K.Key,target: K.Key} type Error is Data: MissingEntity{source: K.Key} MissingTargetEntity{source: K.Key,target: K.Key,relation: String} SelfRelationNotAllowed{source: K.Key,relation: String} HierarchyCycle{source: K.Key,target: K.Key,relation: String} MissingChildEntity{source: K.Key,child: K.Key,relation: String} DuplicateChild{source: K.Key,child: K.Key,relation: String} ChildNotRelatedToParent{source: K.Key,child: K.Key,relation: String} ChildSetMismatch{source: K.Key,relation: String} type Operation is Data: Relate{} ReorderChildren{} type Failure is Data: Failure{relation: Descriptor,operation: Operation,source: K.Key,target: K.Key,error: Error} type Inverse is Data: Inverse{relation: Descriptor,target: K.Key,sources: List<&2,K.Key>} type SpecGraph is Data: SpecGraph{edges: List<&2,Edge>} type Graph is Data: Graph{edges: List<&2,Edge>,inverses: List<&2,Inverse>} type SpecResult is Data: SpecResult{graph: SpecGraph,error: Maybe<&2,Error>} type CoreResult is Data: CoreResult{graph: Graph,error: Maybe<&2,Error>} type ChildStatus is Data: ChildStatus{id: K.Key,live: Bool} # Diagnostic continuation, not a new relation rejection policy. type CleanupFrame is Data: CleanupEnter{id:K.Key} CleanupDescriptors{id:K.Key,remaining:List<&2,Descriptor>} CleanupChildren{id:K.Key,descriptor:Descriptor,remainingDescriptors:List<&2,Descriptor>,remainingChildren:List<&2,K.Key>} CleanupFinish{id:K.Key} # Public reorder provisioning accepts this nominal hierarchy family only. type HierarchyDescriptor is Data: HierarchyDescriptor{key:U32,name:String,inverseName:String}