diprism / perpl

The PERPL Compiler
MIT License
10 stars 5 forks source link

Continuous variables #138

Open davidweichiang opened 8 months ago

davidweichiang commented 8 months ago

might be okay as long as they are eliminated by de/refunctionalization.

ccshan commented 8 months ago

Is there some dynamic programming algorithm for a program like this?

data Region = Square | Scale Real Region | Or Region Region | And Region Region | Not Region
define genR = amb (factor 0.4 (Scale (gamma...) genR)) ...
define contains r x = case r of Square -> -1 < r < 1 | ...
contains genR 0
davidweichiang commented 8 months ago

Sounds plausible to me...another example would be the classic HMM-GMM model for speech recognition, where the HMM outputs a sequence of multivariate normals. The input to the decoder would be a sequence of vectors.