Interface ReportBase

Hierarchy

Properties

Methods

Properties

character: {
    literal: Literal;
    pick: string;
    set: CharSet;
}

The character to be repeated in order to create an input for which the analysed literal will have super-linear runtime behavior.

Type declaration

  • literal: Literal

    A literal that represents set.

    E.g. if set only contained the character "a" (lower case A), then the literal may be /a/.

  • pick: string

    A single character that can be repeated to cause super-linear runtime.

    The implementation is allowed to pick any character in set but makes a best effort to pick a "humanly readable" character.

  • set: CharSet

    A non-empty set of characters that can be repeated to cause super-linear runtime.

    CharSet is a class from the refa library.

exponential: boolean

Whether the polynomial backtracking of this report causes exponential backtracking.

type: "Self" | "Trade" | "Move"

Methods

  • Returns a new literal with this cause of super-linear runtime being fixed. If the cause of this report could not be automatically fixed, undefined will be returned.

    A fixed literal is guaranteed to behave exactly the same as the analysed literal.

    Returns undefined | Literal