ML-KULeuven / problog

ProbLog is a Probabilistic Logic Programming Language for logic programs with probabilities.
https://dtai.cs.kuleuven.be/problog/
298 stars 34 forks source link

Support DCG (Definite Clause Grammar syntax) #27

Open XVilka opened 4 years ago

XVilka commented 4 years ago

For easier integration (or porting) with the existing Prolog libraries/programs, since DCG are popular in Prolog world.

number --> digit, number_remaining.
number_remaining --> dot,number_remaining.
number_remaining --> digit,number_remaining.
number_remaining([],[]).
dot -->[0'.].
digit --> [J], {digit_code(J)}.
digit_code(J):- J >= 0'0, J =< 0'9.
vsraptor commented 3 years ago

any info on this ? Is it easy to develop ? OR how you will emulate DCG w/o having the syntax available with pure Problog ?