mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 04:50:36 +03:00
66 lines
1.3 KiB
TypeScript
66 lines
1.3 KiB
TypeScript
/**
|
|
* Module: Schema of Synthesis Operations.
|
|
*/
|
|
|
|
import { Graph } from '@/models/Graph';
|
|
|
|
import { ICstSubstituteInfo, IOperationDTO, IOperationSchemaDTO } from '../backend/types';
|
|
|
|
/**
|
|
* Represents Operation.
|
|
*/
|
|
export interface IOperation extends IOperationDTO {
|
|
is_owned: boolean;
|
|
is_consolidation: boolean; // aka 'diamond synthesis'
|
|
substitutions: ICstSubstituteInfo[];
|
|
arguments: number[];
|
|
}
|
|
|
|
/**
|
|
* Represents {@link IOperationSchema} statistics.
|
|
*/
|
|
export interface IOperationSchemaStats {
|
|
count_operations: number;
|
|
count_inputs: number;
|
|
count_synthesis: number;
|
|
count_schemas: number;
|
|
count_owned: number;
|
|
}
|
|
|
|
/**
|
|
* Represents OperationSchema.
|
|
*/
|
|
export interface IOperationSchema extends IOperationSchemaDTO {
|
|
items: IOperation[];
|
|
|
|
graph: Graph;
|
|
schemas: number[];
|
|
stats: IOperationSchemaStats;
|
|
operationByID: Map<number, IOperation>;
|
|
}
|
|
|
|
/**
|
|
* Represents substitution error description.
|
|
*/
|
|
export interface ISubstitutionErrorDescription {
|
|
errorType: SubstitutionErrorType;
|
|
params: string[];
|
|
}
|
|
|
|
/**
|
|
* Represents Substitution table error types.
|
|
*/
|
|
export enum SubstitutionErrorType {
|
|
invalidIDs,
|
|
incorrectCst,
|
|
invalidClasses,
|
|
invalidBasic,
|
|
invalidConstant,
|
|
typificationCycle,
|
|
baseSubstitutionNotSet,
|
|
unequalTypification,
|
|
unequalExpressions,
|
|
unequalArgsCount,
|
|
unequalArgs
|
|
}
|