pddl-workspace
Version:
70 lines (69 loc) • 2.33 kB
TypeScript
import { PddlRange } from "./DocumentPositionResolver";
export declare const PDDL = "pddl";
export declare const PLAN = "plan";
export declare const HAPPENINGS = "happenings";
export declare enum PddlLanguage {
PDDL = 0,
PLAN = 1,
HAPPENINGS = 2
}
export declare function toLanguageFromId(languageId: string): PddlLanguage | undefined;
/**
* Status of the file parsing.
*/
export declare enum FileStatus {
/** File is parsed when the FileInfo object is created. */
Parsed = 0,
/** File was parsed before, but was updated, but not re-parsed yet. */
Dirty = 1,
/** Running external language-specific deep parser/validator. */
Validating = 2,
/** Finished running external language-specific deep parser/validator. */
Validated = 3
}
/**
* State variable.
*/
export declare class Variable {
readonly declaredName: string;
readonly parameters: Term[];
readonly name: string;
readonly declaredNameWithoutTypes: string;
private location?;
private documentation;
private unit;
/** @deprecated use one of the fromXyz methods or parseVariableDeclaration(fullName) function*/
constructor(declaredName: string, parameters?: Term[]);
static from(name: string, terms: Term[]): Variable;
static fromGrounded(fullName: string): Variable;
ground(objects: ObjectInstance[]): Variable;
bind(parameters: Parameter[]): Variable;
getFullName(): string;
matchesShortNameCaseInsensitive(symbolName: string): boolean;
isGrounded(): boolean;
setDocumentation(documentation: string[]): void;
getDocumentation(): string[];
getUnit(): string;
setLocation(range: PddlRange): void;
getLocation(): PddlRange | undefined;
}
export declare abstract class Term {
type: string;
constructor(type: string);
abstract toPddlString(): string;
abstract isGrounded(): boolean;
}
export declare class Parameter extends Term {
name: string;
constructor(name: string, type: string);
object(objectName: string): ObjectInstance;
isGrounded(): boolean;
toPddlString(): string;
static createPddlString(...params: Parameter[]): string;
}
export declare class ObjectInstance extends Term {
name: string;
constructor(name: string, type: string);
toPddlString(): string;
isGrounded(): boolean;
}