<p>I just wanted to try and see if I can cook up some simple Python routines to allow translation of commonly used models into code that we can then use some inference engine on. So, basically I am trying my hand at designing some probabilistic programming framework and learning some things in the process.</p>

<p>I wanted to seek some advice on designing some software that can be flexible enough to allow translation of most commonly used graphical models to code. In particular, I wanted some advice on class design and suitable representation (factor graphs versus different representation for directed/undirected graphs etc.). Would this kind of question be considered on-topic on CV? The design issue clearly belongs on SO but the folks here are more knowledgeable regarding the models themselves and can advise better on what these objects should include/represent.</p>
