Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indirect relationship should be true #3

Open
silentrob opened this issue Feb 18, 2014 · 0 comments
Open

Indirect relationship should be true #3

silentrob opened this issue Feb 18, 2014 · 0 comments

Comments

@silentrob
Copy link

I'm trying to use a transitive relation though a isa but it is not working. Is this a bug in my code or approach, outside the scope of the project or perhaps a unimplemented feature, in which case I can try to tackle it perhaps with a little direction.

var ant = domain.Concept.create({id:"ant"}),
  dog = domain.Concept.create({id:"dog"}),
  mammal = domain.Concept.create({id:"mammal"}),
  insect = domain.Concept.create({id:"insect"}),
  smallerThan = domain.Relation.create({id:"smallerThan",isTransitive:true});

  ant.isa(insect);
  dog.isa(mammal);

  insect.smallerThan(mammal);

  // These should both be true
  assert(smallerThan(insect, mammal) === true); // true
  assert(smallerThan(ant, dog) === true); // false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant