import { ICondition } from './interfaces'; import { IConstraint } from './constraint'; export declare enum patternType { composite = 0, object = 1, exists = 2, from = 3, from_exists = 4, from_not = 5, initial_fact = 6, not = 7 } export interface IPattern { id: number; tp: patternType; } export interface IObjectPattern extends IPattern { id: number; cls?: string; class_type: any; a: string; pattern: string; constraints: number[]; } import { IFromConstraint } from './constraint'; export interface IFromPattern extends IObjectPattern { from: IFromConstraint; } export interface IExistsPattern extends IObjectPattern { } export interface IFromExistsPattern extends IFromPattern { } export interface IFromNotPattern extends IFromPattern { } export interface INotPattern extends IObjectPattern { } export interface IInitialFactPattern extends IObjectPattern { } export interface ICompositePattern extends IPattern { id: number; leftPattern: IPattern; rightPattern: IPattern; } export declare function initial_fact_pattern(cs: IConstraint[]): IObjectPattern; export declare function composite_pattern(left: IPattern, right: IPattern): ICompositePattern; export default function pattern(condition: ICondition, cs: IConstraint[]): IPattern[];