The validation of syntactical correctness of directed graphs is a rather complex issues. A proposal from our end would relate to apply a simulation based approach as defined in this post
http://www.adoxx.org/live/faq/-/message_boards/message/27518?p_p_auth=0XAmfWl8 - Alternative B. This would also validate if the model is syntactically correct with respect to the simulation model of a path analysis.
In case for a more comprehensive solution, we would propose a logic/business rule based development approach. This could be realized by calling external services or calling validation functions implemented in AdoScript for validation.