deepdive
deepdive copied to clipboard
ddlog support for arrays in factor functions
Currently ddlog does not support aggregating an array of variables into a factor function.
Let's call these "flexible-arity factors". It should not be hard to add support for them. However, we need to see more of compelling use cases, and decide the degree of customizability we are going to provide:
- boolean vars with a fixed indicator function (say AND over an array of bool vars) is easy in ddlog (though we still need to figure out the syntax since var IDs are not part of user schema now)
- categorical vars are trickier because we'd need array of <vid, cat_val> pairs
- we've thought about supporting user-defined factor functions (LLVM?); not clear if we should attack that directly or try to support (in ddlog and sampler) a more limited form of customization such as flexible-arity factors