Class TRegexOptions
java.lang.Object
com.oracle.truffle.regex.tregex.TRegexOptions
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDon't force evaluation ofTruffleString.CodeRangeif the input string's byte length is greater than this threshold.static final booleanTry to make control flow through DFAs reducible by node splitting (seeDFANodeSplit).static final booleanTry to pre-calculate results of tree-like expressions (seeNFATraceFinderGenerator).static final intNumber of regex searches done without generating a DFA for a given regular expression.static final intIf a regex could have processed more than this number of characters without generating a fully expanded DFA, then we go ahead and generate the fully expanded DFA even before theTRegexGenerateDFAThresholdCallsthreshold is met.static final intMaximum number ofPureNFAstates allowed to be exploded inTRegexBacktrackingNFAExecutorNode.static final intBailout threshold for number of partial capture group transitions in the DFA (TRegexDFAExecutorNodegenerated byDFAGenerator).static final intBailout threshold for number of nodes in the DFA (TRegexDFAExecutorNodegenerated byDFAGenerator).static final intMaximum size of a DFA after being altered byDFANodeSplit.static final intBailout threshold for number of transitions in the DFA (TRegexDFAExecutorNodegenerated byDFAGenerator).static final intMaximumcapture group tracking costof eager capture group tracking DFA matchers.static final intBailout threshold for number of nodes in the NFA (NFAgenerated byNFAGenerator).static final intBailout threshold for number of ASTSuccessor instances allowed in a singleASTStep.static final intBailout threshold for number of capture groups.static final intBailout threshold for number of capture groups in the DFA generator.static final intMaximum number of NFA states involved in one DFA transition.static final intParser trees bigger than this setting will not be considered for DFA generation.static final intBailout threshold for number of nodes in the pure NFA (PureNFAgenerated byPureNFAGenerator).static final intBailout threshold for number of transitions in the pure NFA (PureNFAgenerated byPureNFAGenerator).static final intMaximum number oftransitionsfor aTRegexExecutorNodeto be considered trivial.static final intstatic final intstatic final intBailout threshold for number of nodes in the parser tree (RegexASTgenerated byRegexASTBuilder).static final intThe parser will try to unroll bounded quantifiers on groups up to this limit.static final intThe parser will try to unroll bounded quantifiers on single character classes up to this limit.static final intMinimum number of ranges that have the same high byte to convert into a bit set in aRangeListMatcherorRangeTreeMatcher.static final intMaximum number of pre-calculated results per TraceFinder DFA. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
TRegexGenerateDFAThresholdCalls
public static final int TRegexGenerateDFAThresholdCallsNumber of regex searches done without generating a DFA for a given regular expression. When this threshold is reached, TRegex tries to generate a fully expanded DFA to speed up further searches. This threshold is only checked in interpreter mode, so it should be sufficiently smaller than the Graal compilation threshold!- See Also:
-
TRegexGenerateDFAThresholdCharacters
public static final int TRegexGenerateDFAThresholdCharactersIf a regex could have processed more than this number of characters without generating a fully expanded DFA, then we go ahead and generate the fully expanded DFA even before theTRegexGenerateDFAThresholdCallsthreshold is met.- See Also:
-
TRegexEnableTraceFinder
public static final boolean TRegexEnableTraceFinderTry to pre-calculate results of tree-like expressions (seeNFATraceFinderGenerator). A regular expression is considered tree-like if it does not contain infinite loops (+ or *). This option will increase performance at the cost of startup time and memory usage.- See Also:
-
TRegexTraceFinderMaxNumberOfResults
public static final int TRegexTraceFinderMaxNumberOfResultsMaximum number of pre-calculated results per TraceFinder DFA. This number must not be higher than 254, because we compress the result indices tobyteinTraceFinderDFAStateNode, with 255 being reserved for "no result"!- See Also:
-
TRegexEnableNodeSplitter
public static final boolean TRegexEnableNodeSplitterTry to make control flow through DFAs reducible by node splitting (seeDFANodeSplit). This option will increase performance at the cost of startup time and memory usage.- See Also:
-
TRegexMaxDFASizeAfterNodeSplitting
public static final int TRegexMaxDFASizeAfterNodeSplittingMaximum size of a DFA after being altered byDFANodeSplit.- See Also:
-
TRegexRangeToBitSetConversionThreshold
public static final int TRegexRangeToBitSetConversionThresholdMinimum number of ranges that have the same high byte to convert into a bit set in aRangeListMatcherorRangeTreeMatcher. The threshold value must be greater than 1. Example:[က-ဠ], [ူ-၀], [ၐ-ၠ] are three ranges that have the same high byte (0x10). if TRegexRangeToBitSetConversionThreshold is <= 3, they will be converted to a bit set if they appear in a RangeList or RangeTree matcher.- See Also:
-
TRegexParserTreeMaxSize
public static final int TRegexParserTreeMaxSizeBailout threshold for number of nodes in the parser tree (RegexASTgenerated byRegexASTBuilder).- See Also:
-
TRegexParserTreeMaxNumberOfSequencesInGroup
-
TRegexParserTreeMaxNumberOfTermsInSequence
-
TRegexMaxParseTreeSizeForDFA
public static final int TRegexMaxParseTreeSizeForDFAParser trees bigger than this setting will not be considered for DFA generation. The current setting is based on run times ofgraal/com.oracle.truffle.js.test/js/trufflejs/regexp/npm_extracted/hungry-regexp*.js- See Also:
-
TRegexMaxNFASize
public static final int TRegexMaxNFASizeBailout threshold for number of nodes in the NFA (NFAgenerated byNFAGenerator). This number must not be higher thanShort.MAX_VALUE, because we useshortvalues for indexing NFA nodes. The current setting is based on run times ofgraal/com.oracle.truffle.js.test/js/trufflejs/regexp/npm_extracted/hungry-regexp*.js- See Also:
-
TRegexMaxNumberOfASTSuccessorsInOneASTStep
public static final int TRegexMaxNumberOfASTSuccessorsInOneASTStepBailout threshold for number of ASTSuccessor instances allowed in a singleASTStep. It is possible to construct patterns where the number of NFA transitions grows exponentially.ASTStepis an intermediate data structure between the AST and the NFA, which is filled eagerly and can cause anOutOfMemoryErrorif not capped. Since ASTSuccessors roughly correspond to NFA transitions, the cap has been set to the maximum number of NFA transitions we allow in a single NFA.- See Also:
-
TRegexMaxDFASize
public static final int TRegexMaxDFASizeBailout threshold for number of nodes in the DFA (TRegexDFAExecutorNodegenerated byDFAGenerator). This number must not be higher thanShort.MAX_VALUE, because we useshortvalues for indexing DFA nodes. The current setting is based on run times ofgraal/com.oracle.truffle.js.test/js/trufflejs/regexp/npm_extracted/hungry-regexp*.js- See Also:
-
TRegexMaxDFATransitions
public static final int TRegexMaxDFATransitionsBailout threshold for number of transitions in the DFA (TRegexDFAExecutorNodegenerated byDFAGenerator).- See Also:
-
TRegexMaxEagerCGDFACost
public static final int TRegexMaxEagerCGDFACostMaximumcapture group tracking costof eager capture group tracking DFA matchers.- See Also:
-
TRegexMaxDFACGPartialTransitions
public static final int TRegexMaxDFACGPartialTransitionsBailout threshold for number of partial capture group transitions in the DFA (TRegexDFAExecutorNodegenerated byDFAGenerator).- See Also:
-
TRegexQuantifierUnrollThresholdSingleCC
public static final int TRegexQuantifierUnrollThresholdSingleCCThe parser will try to unroll bounded quantifiers on single character classes up to this limit.- See Also:
-
TRegexQuantifierUnrollThresholdGroup
public static final int TRegexQuantifierUnrollThresholdGroupThe parser will try to unroll bounded quantifiers on groups up to this limit.- See Also:
-
TRegexMaxNumberOfCaptureGroups
public static final int TRegexMaxNumberOfCaptureGroupsBailout threshold for number of capture groups.- See Also:
-
TRegexMaxNumberOfCaptureGroupsForDFA
public static final int TRegexMaxNumberOfCaptureGroupsForDFABailout threshold for number of capture groups in the DFA generator. This number must not be higher than 127, because we compress capture group boundary indices tobyteinDFACaptureGroupPartialTransition!- See Also:
-
TRegexMaxNumberOfNFAStatesInOneDFATransition
public static final int TRegexMaxNumberOfNFAStatesInOneDFATransitionMaximum number of NFA states involved in one DFA transition. This number must not be higher than 255, because the maximum number of NFA states in one DFA transition determines the number of simultaneously tracked result sets (arrays) in capture group tracking mode, which are accessed over byte indices inDFACaptureGroupPartialTransition.- See Also:
-
TRegexMaxPureNFASize
public static final int TRegexMaxPureNFASizeBailout threshold for number of nodes in the pure NFA (PureNFAgenerated byPureNFAGenerator).- See Also:
-
TRegexMaxPureNFATransitions
public static final int TRegexMaxPureNFATransitionsBailout threshold for number of transitions in the pure NFA (PureNFAgenerated byPureNFAGenerator).- See Also:
-
TRegexMaxBackTrackerMergeExplodeSize
public static final int TRegexMaxBackTrackerMergeExplodeSizeMaximum number ofPureNFAstates allowed to be exploded inTRegexBacktrackingNFAExecutorNode.- See Also:
-
TRegexMaxTransitionsInTrivialExecutor
public static final int TRegexMaxTransitionsInTrivialExecutorMaximum number oftransitionsfor aTRegexExecutorNodeto be considered trivial.- See Also:
-
CODE_RANGE_EVALUATION_THRESHOLD
public static final int CODE_RANGE_EVALUATION_THRESHOLDDon't force evaluation ofTruffleString.CodeRangeif the input string's byte length is greater than this threshold.- See Also:
-
-
Constructor Details
-
TRegexOptions
public TRegexOptions()
-