TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Converting Boolean-Logic Decision Trees to Finite State Machines

44 pointsby bkudriaover 4 years ago

5 comments

mciover 4 years ago
While I have only skimmed the article, I have not noticed:<p>* an explanation how to test the multiple heterogenous out-transitions of a state efficiently,<p>* the reason for the silent assumption that at most one out-transition of a state is followed, i.e. that this is not an NFA [0],<p>* most importantly, a comparison with Binary Decision Diagrams [1].<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Nondeterministic_finite_automaton" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Nondeterministic_finite_automa...</a><p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Binary_decision_diagram" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Binary_decision_diagram</a>
评论 #24329427 未加载
评论 #24329422 未加载
kimiover 4 years ago
Clojure has something like this in clojure.core.match - with a good bibliography by the end of the page. <a href="https:&#x2F;&#x2F;github.com&#x2F;clojure&#x2F;core.match&#x2F;wiki&#x2F;Overview" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;clojure&#x2F;core.match&#x2F;wiki&#x2F;Overview</a>
mpoteatover 4 years ago
In general I notice a trend in cybersecurity: it is very hard to do right, and it is very business critical.<p>This has led to a cottage industry of bad tech and bad science, whereby people peddle easy security solutions where none exist.<p>On what architecture would evaluating this abstract data structure be faster than a simple opcode?
评论 #24329321 未加载
mampover 4 years ago
This approach seems to be simply implementing short-circuit boolean operators e.g. as soon as any AND condition is false, then false; as soon as any OR condition is true return true. The first example of evaluates every condition in a bottom up approach. While it&#x27;s implemented as a FSM it doesn&#x27;t need to be.<p>I think using ROBDDs (binary decision diagrams) or unrolling the AST into opcodes would be a more standard way of implementing optimisations.
mumblemumbleover 4 years ago
Completely tangentially: I didn&#x27;t really appreciate this technique until I played TIS-100.