Programmatic analysis tool for BPMN diagrams