A probability distribution can be expressed as a set of local potential functions, each defined on a small subset of variables, whose normalized products represents a probability distribution. Alternatively, it can be specified by weighted AND/OR graphs where sum-product bottom up recursive computation yields also probability distribution. The virtue of AND/OR networks is that they facilitate tractable inference (optimization and likelihood queries). In this talk I will overview multi-valued weighted AND/OR search graphs, show how they can be derived from a graphical model representation and how they can be compacted to yield canonical representation of a probability distribution. Alternatively, weighted AND/OR graphs can be learned or compiled directly from a probabilistic program model.