logical flow analysis AI