Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

"social networks" example doesn't work. #8

@ldltools

Description

@ldltools

Hi, I've just started trying alchemy-2 with the soc-net example in the tutorial (http://alchemy.cs.washington.edu/mlns/tutorial/soc-net/smoking.mln),
but learnwts crashes after complaining "UNRECOVERABLE ERROR after parsing smoking.mln".
It looks like the idx > 0 part of src/logic/clause.h causes the problem.

  Predicate* getPredicate(const int& idx) const {
    if (idx > 0 && idx < getNumPredicates()){
      return (*predicates_)[idx];
    }   
    else return NULL;

Replacing the expression with idx >= 0 seems to fix the problem.
Is this a correct fix, or am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions