mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-09 15:52:27 +03:00
dfa: prune_overlong -> clear_deeper_reports
Rather than pruning states, we simply clear reports on states that are too deep and allow Hopcroft minimisation to reduce the size of the DFA afterwards.
This commit is contained in:
committed by
Matthew Barr
parent
8650a1a33f
commit
41d7aa8281
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2016, Intel Corporation
|
||||
* Copyright (c) 2015-2017, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -39,10 +39,12 @@ namespace ue2 {
|
||||
u32 remove_leading_dots(raw_dfa &raw);
|
||||
|
||||
/**
|
||||
* Prunes any states which cannot be reached within max_offset from start of
|
||||
* stream. Returns false if no changes are made to the rdfa
|
||||
* \brief Clear reports on any states that are deeper than \a max_offset from
|
||||
* start of stream.
|
||||
*
|
||||
* Returns false if no changes are made to the DFA.
|
||||
*/
|
||||
bool prune_overlong(raw_dfa &raw, u32 max_offset);
|
||||
bool clear_deeper_reports(raw_dfa &raw, u32 max_offset);
|
||||
|
||||
std::set<ReportID> all_reports(const raw_dfa &rdfa);
|
||||
bool has_eod_accepts(const raw_dfa &rdfa);
|
||||
|
Reference in New Issue
Block a user