You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In particular, my current implementation generates a DFA by regarding the negation [^abc] as a group [\u{ff}abc]=(\u{ff}|a|b|c). When generating a circom based on the DFA, if the edge string contains \u{ff}, it makes constraints that the state moves only if the input character is not in the list of the edge string except for \u{ff}.
We can regard this modification of constraints as the modification of edges in the already-generated DFA.
Therefore, it turns DFA back into an NFA with multiple possible edges.
One simple idea is that we convert [^abc], to a non-negate regex (\u00 | \u01 | \u02 | ... | \uff), which means a group regex of all 1-byte characters except for ones in the group of the negate regex, before generating the first DFA.
However, it will not be able to reduce the circom size because the resulting DFA will be still complex.
I am not sure this complexity is due to theoretical limitations or not.
The text was updated successfully, but these errors were encountered:
If from field and timestamp circoms are generated with negation regexes, their tests do not pass.
https://github.com/zkemail/zk-regex/blob/feat/invalid_dfa/packages/circom/circuits/common/from_addr.json
https://github.com/zkemail/zk-regex/blob/feat/invalid_dfa/packages/circom/circuits/common/timestamp.json
In particular, my current implementation generates a DFA by regarding the negation [^abc] as a group [\u{ff}abc]=(\u{ff}|a|b|c). When generating a circom based on the DFA, if the edge string contains \u{ff}, it makes constraints that the state moves only if the input character is not in the list of the edge string except for \u{ff}.
We can regard this modification of constraints as the modification of edges in the already-generated DFA.
Therefore, it turns DFA back into an NFA with multiple possible edges.
One simple idea is that we convert [^abc], to a non-negate regex (\u00 | \u01 | \u02 | ... | \uff), which means a group regex of all 1-byte characters except for ones in the group of the negate regex, before generating the first DFA.
However, it will not be able to reduce the circom size because the resulting DFA will be still complex.
I am not sure this complexity is due to theoretical limitations or not.
The text was updated successfully, but these errors were encountered: