207 Commits

Author SHA1 Message Date
Matthew Barr
c510b85bf1 whitespace changes 2017-05-30 13:59:00 +10:00
Matthew Barr
0b8f25a036 Ensure simd types are aligned to what we assume
Turns out Clang is sensitive to the location of the alignment attribute.
2017-05-30 13:48:38 +10:00
Justin Viiret
e8162960fc unit: use bytecode_ptr instead of aligned_unique_ptr 2017-04-26 15:19:36 +10:00
Justin Viiret
a197074c5d nfa: switch to using bytecode_ptr<NFA> 2017-04-26 15:19:36 +10:00
Justin Viiret
cf82924a39 depth: make constructor explicit 2017-04-26 15:19:19 +10:00
Alex Coyte
37cb93e60f rose_build: reduce size/scope of context objects 2017-04-26 15:19:01 +10:00
Matthew Barr
8201183138 Check compiler architecture flags in one place 2017-04-26 15:18:26 +10:00
Justin Viiret
a4df49dd66 unit: better output from expr_info unit tests 2017-04-26 15:18:25 +10:00
Justin Viiret
a871f70c25 ng_extparam: split up work and do per-comp reduce
This change breaks extparam processing up into:

 - propagateExtendedParams: propagates min_length, min_offset and
   max_offset into the reports on the graph
 - reduceExtendedParams: runs graph reductions based on extparams

Then, we apply the reduce pass to the whole graph, and later as well to
each component after calc_components.
2017-04-26 15:18:22 +10:00
Alex Coyte
0cbec2c1c3 mmbBuildInitRangePlan: correct offset if initial block is not block 0 2017-04-26 15:18:13 +10:00
Justin Viiret
560e522457 ng_calc_components: add Grey box control 2017-04-26 15:18:13 +10:00
Justin Viiret
ba867ebaff ng_calc_components: rework to move graphs
Rather than cloning graphs for output, rework calc components so that it
moves them.
2017-04-26 15:18:13 +10:00
Justin Viiret
5dfae12a62 ng: split NGWrapper into NGHolder, ExpressionInfo
We now use NGHolder for all graph information, while other expression
properties (report, flag information, etc) go in new class
ExpressionInfo.
2017-04-26 15:18:09 +10:00
Justin Viiret
d8eb259ac7 serialize: tidy 2017-04-26 15:17:03 +10:00
Justin Viiret
bc7da2807a unit: modernise test_util 2017-04-26 15:17:03 +10:00
Justin Viiret
1376f3849a serialize: parameterize on pattern as well 2017-04-26 15:17:03 +10:00
Justin Viiret
a97ec56aee serialize: add vectored mode 2017-04-26 15:17:03 +10:00
Justin Viiret
7ca81ff530 ng_find_matches: limit how big we're willing to go
Tests which require tracking more than 15K states (including edit
distance states) are very, very slow.
2017-04-26 15:16:22 +10:00
Justin Viiret
5edecbf539 ng: check can_never_match before validate_fuzzy 2017-04-26 15:16:03 +10:00
Anatoly Burakov
9f72dede5c Add support for approximate matching in NFA matcher unit tests 2017-04-26 15:11:54 +10:00
Anatoly Burakov
2de6706df2 Adding support for compiling approximate matching patterns
Adds new "edit_distance" extparam
2017-04-26 15:11:39 +10:00
Justin Viiret
1245156f44 parser: handle "control verbs" without close paren 2017-04-26 14:59:02 +10:00
Justin Viiret
bef6889844 parser: use control_verb parser inline 2017-04-26 14:58:43 +10:00
Justin Viiret
1875d55cf1 parser: add initial parser for control verbs
This more reliably handles control verbs like (*UTF8) that can only
happen at the start of the pattern, and allows them in any ordering.
2017-04-26 14:57:46 +10:00
Alex Coyte
fbaa0a1b25 make expected too large patterns even larger 2017-04-26 14:44:49 +10:00
Justin Viiret
f520599ab7 flat_map: add value_comp() 2017-04-26 14:41:30 +10:00
Justin Viiret
e37fdb240a flat_set/map: add hash_value tests 2017-04-26 14:41:30 +10:00
Justin Viiret
07a6b6510c rose/hwlm: limit literals to eight bytes
Rework HWLM to work over literals of eight bytes ("medium length"),
doing confirm in the Rose interpreter.
2017-04-26 14:41:29 +10:00
Alex Coyte
8f8ba2d591 basic unit test to check correct stream state is being used. 2017-03-01 13:05:10 +11:00
Matthew Barr
46f74300f2 update copyright year 2017-01-17 11:38:09 +11:00
Matthew Barr
981e9896b4 MSVC gets confused by one line of the graph tests 2017-01-06 11:24:16 +11:00
Matthew Barr
0d0e1a5106 api: hs_valid_platform 2016-12-14 15:35:13 +11:00
Matthew Barr
c3a73446ee Fat runtime 2016-12-14 15:34:54 +11:00
Matthew Barr
2214296b7f Convert compile-time code to not require SIMD 2016-12-14 15:29:01 +11:00
Justin Viiret
e271781d95 multibit, fatbit: make _size build-time only
This commit makes mmbit_size() and fatbit_size compile-time only, and
adds a resource limit for very large multibits.
2016-12-14 15:28:54 +11:00
Alex Coyte
e51b6d23b9 introduce Sheng-McClellan hybrid 2016-12-14 15:27:18 +11:00
Alex Coyte
f605ca0dc1 check for partial matches at end of dverm 2016-12-02 11:34:04 +11:00
Alex Coyte
e1e9010cac Introduce custom adjacency-list based graph 2016-12-02 11:31:33 +11:00
Alex Coyte
445cf987a8 remove unused includes 2016-10-28 14:52:56 +11:00
Justin Viiret
68bf473e2e fdr: move long literal handling into Rose
Move the hash table used for long literal support in streaming mode from
FDR to Rose, and introduce new instructions CHECK_LONG_LIT and
CHECK_LONG_LIT_NOCASE for doing literal confirm for long literals.

This simplifies FDR confirm, and guarantees that HWLM matchers will only
be used for literals < 256 bytes long.
2016-10-28 14:52:26 +11:00
Matthew Barr
c3b5efefb6 Add short avx2 shufti form 2016-10-28 14:46:31 +11:00
Alex Coyte
a08e1dd690 Introduce a 64-bit LimEx model.
On 64-bit platforms, the Limex 64 model is implemented in normal GPRs.
On 32-bit platforms, however, 128-bit SSE registers are used for the
runtime implementation.
2016-10-28 14:44:12 +11:00
Xu, Chi
b96d5c23d1 rose: add new instruction CHECK_MASK_32
This is a specialisation of the "lookaround" code.
2016-10-28 14:43:33 +11:00
Matthew Barr
c1bc6acdea unit test for github issue #30 2016-08-29 11:30:15 +10:00
Matthew Barr
ead869992c unit: Disable warnings 2016-08-10 15:14:07 +10:00
Alex Coyte
702f256b39 remove exceptionMap from LimExNFA 2016-08-10 15:11:15 +10:00
Matthew Barr
b8d33732b5 Check for misaligned memory in compile error code
We now check that mem alloc for error message is aligned, and
fail with an appropriate message in the compile error.
2016-08-10 15:10:09 +10:00
Justin Viiret
67e450115a parser: ignore \E that is not preceded by \Q
This conforms to PCRE's behaviour, where an isolated \E that is not
preceded by \Q is ignored.
2016-08-10 15:08:01 +10:00
Matthew Barr
cbd115f7fe Don't shadow names 2016-08-10 15:06:57 +10:00
Justin Viiret
4ce268af47 ng: ensure that only match states have reports
Ensure (and assert) that vertices without an edge to {accept, acceptEod}
do not have reports set.
2016-08-10 15:05:23 +10:00