Diagrammatic Representation and Inference