\section{Semantics}
\label{semantics}
The semantics of LPADs for the case of programs without functions symbols can be given
as follows. An LPAD defines a probability distribution over normal logic programs called
\emph{worlds}. A world is obtained from an LPAD by first grounding it, by
selecting a single head atom for each ground clause and by including in the world
the clause with the selected head atom and the body.
The probability of a world is the product of the probabilities associated to the
heads selected.
The probability of a ground atom (the query) is given by the sum of the probabilities
of the worlds where the query is true.
If the LPAD contains function symbols, the definition is more complex, see
\cite{DBLP:journals/ai/Poole97,DBLP:journals/jair/SatoK01,Rig15-PLP-IW}.
For the semantics of programs with continuous random variables, see \cite{TLP:8688161}
that defines the probability
space for $N$ continuous random variables by considering the Borel $\sigma$-algebra
over $\mathbb{R}^N$
and defines a Lebesgue measure on this set as the probability measure.
The probability space is lifted to cover the entire program using the least model semantics of constraint logic programs. Alternatively,
\cite{Nitti2016} defines the semantics of distributional clauses by resorting to
a stochastic $Tp$ operator.
\verb|cplint| allows more freedom than distributional clauses in the use of continuous random variables
in expressions, for example
\href{http://cplint.eu/e/kalman_filter.pl}{\texttt{kalman\_filter.pl}} would not be allowed by distributional clauses.