hakaru-dev / hakaru

A probabilistic programming language
BSD 3-Clause "New" or "Revised" License
309 stars 30 forks source link

'assume/ProcessTerm' invalid property #106

Closed cscherrer closed 7 years ago

cscherrer commented 7 years ago

lda.hk has a line like this:

if wordUpdate < numWords && w[wordUpdate] < size(word_prior) && doc[wordUpdate] < numDocs:

that's throwing an error in Simplify:

~/git/iu/tcp/src/LDA$ hk-maple -c Simplify lda.hk
hk-maple: MapleException:
Error, (in assuming) when calling 'assume/ProcessTerm'. Received: 'Or(size[w] <=
wordUpdate,numDocs <= idx[doc,wordUpdate],size[word_prior] <= idx[w,wordUpdate])
is an invalid property'

The LDA code is here

ccshan commented 7 years ago

Surely the Or of three properties should work as well as the Or of two properties? This error blocks our adding the LDA Gibbs workflow to our test suite (and have the test pass) so I'd appreciate effort from someone more familiar with how KB in Maple works nowadays.

JacquesCarette commented 7 years ago

Maple and 'surely' in the same sentence? Apparently you have still not used it enough...

@yuriy0 must be ill, as I have seen nothing from him this week. Hopefully he'll resurface soon (I'm on vacation, can't you tell?)

yuriy0 commented 7 years ago

I've fixed this issue on master, but the location of the fix seems to post-date the branch used by tcp. Is it possible to update tcp to use the current master (more precisely, b3b30a0b69c8321ee71728ffefcb3042e04611e5)?