mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-10 16:22:22 +03:00
tamarama: add container engine for exclusive nfas
Add the new Tamarama engine that acts as a container for infix/suffix engines that can be proven to run exclusively of one another. This reduces stream state for pattern sets with many exclusive engines.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Intel Corporation
|
||||
* Copyright (c) 2015-2016, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -55,6 +55,7 @@ namespace ue2 {
|
||||
struct CastleProto;
|
||||
struct raw_dfa;
|
||||
struct raw_som_dfa;
|
||||
struct TamaProto;
|
||||
|
||||
/** \brief Table type for a literal. */
|
||||
enum rose_literal_table {
|
||||
@@ -82,6 +83,7 @@ struct LeftEngInfo {
|
||||
std::shared_ptr<CastleProto> castle;
|
||||
std::shared_ptr<raw_dfa> dfa;
|
||||
std::shared_ptr<raw_som_dfa> haig;
|
||||
std::shared_ptr<TamaProto> tamarama;
|
||||
u32 lag = 0U;
|
||||
ReportID leftfix_report = MO_INVALID_IDX;
|
||||
depth dfa_min_width = 0;
|
||||
@@ -92,6 +94,7 @@ struct LeftEngInfo {
|
||||
&& other.castle == castle
|
||||
&& other.dfa == dfa
|
||||
&& other.haig == haig
|
||||
&& other.tamarama == tamarama
|
||||
&& other.lag == lag
|
||||
&& other.leftfix_report == leftfix_report;
|
||||
}
|
||||
@@ -104,6 +107,7 @@ struct LeftEngInfo {
|
||||
ORDER_CHECK(castle);
|
||||
ORDER_CHECK(dfa);
|
||||
ORDER_CHECK(haig);
|
||||
ORDER_CHECK(tamarama);
|
||||
ORDER_CHECK(lag);
|
||||
ORDER_CHECK(leftfix_report);
|
||||
return false;
|
||||
@@ -121,6 +125,7 @@ struct RoseSuffixInfo {
|
||||
std::shared_ptr<CastleProto> castle;
|
||||
std::shared_ptr<raw_som_dfa> haig;
|
||||
std::shared_ptr<raw_dfa> rdfa;
|
||||
std::shared_ptr<TamaProto> tamarama;
|
||||
depth dfa_min_width = 0;
|
||||
depth dfa_max_width = depth::infinity();
|
||||
|
||||
@@ -128,7 +133,7 @@ struct RoseSuffixInfo {
|
||||
bool operator!=(const RoseSuffixInfo &b) const { return !(*this == b); }
|
||||
bool operator<(const RoseSuffixInfo &b) const;
|
||||
void reset(void);
|
||||
operator bool() const { return graph || castle || haig || rdfa; }
|
||||
operator bool() const { return graph || castle || haig || rdfa || tamarama; }
|
||||
};
|
||||
|
||||
/** \brief Properties attached to each Rose graph vertex. */
|
||||
|
Reference in New Issue
Block a user