26 Commits

Author SHA1 Message Date
Alex Coyte
89d7728f77 refactoring of double byte offset accel to use paths and add to mcclellan 2016-04-20 13:34:56 +10:00
Alex Coyte
f53c093baa simple offset accel for mcclellan start state 2016-04-20 13:34:56 +10:00
Alex Coyte
956b86e97a move MultibyteAccelInfo to accelcompile.h 2016-04-20 13:34:56 +10:00
Justin Viiret
5354b7a5ca mpv: fire only one report when simple-exhaustible 2016-04-20 13:34:55 +10:00
Justin Viiret
839c90594c mcclellan: Remove the use of state numbering
McClellan and Haig only need to know which states are not participants
(i.e. unused start, startDs)
2016-04-20 13:34:55 +10:00
Justin Viiret
12921b7c97 Add hs_expression_ext_info() API function
This is a variant of hs_expression_info() that can also accept extended
parameters.
2016-04-20 13:34:54 +10:00
Mohammad Abdul Awal
b58d05dfec Fixed some DEBUG_OUTPUT format string. 2016-04-20 13:34:53 +10:00
Justin Viiret
670eff5bc0 NFA merging: permit different reports
For cases where the edges from start are not to a mix of accept and
acceptEod, report sets can be combined.
2016-03-01 11:34:26 +11:00
Justin Viiret
94b33421ca ng_filter: Fix bug introduced in 98eff64
If the max width is modified for a region, use the modified version when
checking to see if a self-loop must be added on the last vertex.
2016-03-01 11:30:20 +11:00
Justin Viiret
cca4116861 Move cyclic path redundancy into reduce loop
Sometimes cyclic path redundancy can uncover further reduction work that
can be done by the other passes in the reduce loop.
2016-03-01 11:29:00 +11:00
Alex Coyte
255d84a83a squashing: prevent generation of pairs of squash states 2016-03-01 11:23:56 +11:00
Justin Viiret
98eff64edf ng_prefilter: turn large max bound into inf
During prefilter region replacement, turn regions with very large max
bounds into repeats with inf max bound. This improves compile time and
the likelihood that we will actually be able to build an implementation
for such patterns.
2016-03-01 11:22:45 +11:00
Anatoly Burakov
87424713a7 Multibyte acceleration compile side 2016-03-01 11:21:39 +11:00
Justin Viiret
326abeb3ee Perform an early removeRedundancy call on graph
This allows sibling character classes to be merged together before graph
component splitting is done by calcComponents().

In particular, this transforms (A|a)(B|b)(C|c) into [Aa][Bb][Cc]
earlier.
2016-03-01 11:16:17 +11:00
Alex Coyte
a7d8dafb71 detach the sidecar 2016-03-01 11:13:23 +11:00
Alex Coyte
e58786e192 Use add_edge_if_not_present in somMayGoBackwards()
As somMayGoBackwards() operates on a copy of the graph where virtual
starts have been collapsed on to startDs, we need to be careful not to
create parallel edges.
2016-03-01 11:09:49 +11:00
Justin Viiret
8c09d054c9 Add per-top findMinWidth etc for NFA graphs 2015-12-07 09:38:32 +11:00
Justin Viiret
abbd548899 ng_execute: update interface to use flat_set
This changes all the execute_graph() interfaces so that instead of
mutating a std::set of vertices, they accept an initial flat_set of
states and return a resultant flat_set of states after execution.

(Note that internally execute_graph() still uses bitsets)

This is both faster and more flexible.
2015-11-18 15:27:17 +11:00
Justin Viiret
2a2576e907 Introduce copy_bytes for writing into bytecode
Protects memcpy from nullptr sources, which triggers failures in GCC's
UB sanitizer.
2015-11-18 15:26:16 +11:00
Justin Viiret
5805ac193c NGWrapper: mark dtor with override 2015-11-10 14:36:38 +11:00
Alex Coyte
89660e30b6 raw_som_dfa: initialize members in constructor 2015-11-10 14:36:14 +11:00
Alex Coyte
510e999738 make Automaton_Base ctor protected
Makes explicit that Automaton_Base is intended to be used as a only base class
2015-11-10 14:25:05 +11:00
Alex Coyte
7b6ad2a01a doComponent: make it obvious that a is never null 2015-11-10 14:25:05 +11:00
Justin Viiret
da2386585d Init filter members to nullptr
Note that BGL filters must be default-constructible.
2015-11-10 14:25:04 +11:00
Alex Coyte
629be08683 reduce memory use in ng_small_literal_set/ng_literal_decorated
These passes kept temporary strings/paths alive longer than was needed which
lead to high memory usage during these passes in pathological cases.
2015-10-30 11:28:37 +11:00
Matthew Barr
904e436f11 Initial commit of Hyperscan 2015-10-20 09:13:35 +11:00