4 ms·
If it's using classical regex, without backtracking or other extensions, a regular expression is isomorphic to a state machine. You can enumerate combinations
by eutropia 2y ago
If it's using classical regex, without backtracking or other extensions, a regular expression is isomorphic to a state machine. You can enumerate combinations doing something like this: https://stackoverflow.com/a/1248566 https://stackoverflow.com/a/1248566
kids these days and their lack of exposure to finite automata
- Etherlord87 2y ago- Vehicle steering is easy to test. - How so? I don't think it's possible to test for all cases... - Well, it's easy, assuming a car on a non-branching track, moving with a constant speed and without any realistic external influences on it, you can simply calculate the distance traveled using the formula s = v/t. Ah, I wish I'd stop running into fools not knowing Newton's first law of motion... - ??? Are you well?
- loamaa 2y agoI understand you want to refute/diminish the parent comment on finite automata, but I think you are providing a straw man argument. The parent comment does provide an interesting, factual statement. I don't believe finite state automata are at all close in complexity to real-world self-driving car systems (or even a portion thereof). Your closing statement is also dismissive and unconstructive. I believe finite state modeling is used at NASA, A google search brings up a few references (that I'm probably not qualified to speak to), and I also remember hearing/reading a lecture on how they use them to make completely verifiable programs but can't find the exact one at the moment.
- Etherlord87 2y agoI wasn't making a strawman, I was making a parody of his strawman. I thought it's obvious, since I was making an analogy, and it was an analogy to his argument.
- eutropia 2y agoI should have been more clear perhaps: many regexes are capable of being verified with 100% certainty: https://en.m.wikipedia.org/wiki/Thompson%27s_construction https://en.m.wikipedia.org/wiki/Thompson%27s_construction But not all regexes (eg, those using PCRE extensions afaik) are amenable to such a treatment. Those you just tend to hope they work.