Fixed: spheres must be updated when spheres are accessed.
Three or so commits ago, the spheres were updated after every KnowledgeBase::AddClause etc. Now we avoid this, because it avoids adding a new Ply in the Grounder for every clause and should hence improve performance. Instead, the spheres are only built when actually needed, namely in KnowledgeBase::Entails(). Another case where they are needed are KnowlegeBase's n_spheres(), sphere(), spheres(). In particular, meta-variables in the PDL should range over the names in the spheres, i.e., over Solver::names() [this is actually very questionable, for it contains plus-names, and will probably be changed]. Hence we these methods need to update the spheres as well when needed.
Loading
Please register or sign in to comment