• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog Semantic Web Library 3.0
        • Two RDF APIs
          • library(semweb/rdf11): The RDF database
            • Query the RDF database
              • rdf/3
              • rdf/4
              • rdf_has/3
              • rdf_has/4
              • rdf_reachable/3
              • rdf_reachable/5
              • {}/1
              • rdf_where/1
Availability::- use_module(library(semweb/rdf11)).
Source[nondet]rdf_reachable(?S, +P, ?O)
[nondet]rdf_reachable(?S, +P, ?O, +MaxD, -D)
True when O can be reached from S using the transitive closure of P. The predicate uses (the internals of) rdf_has/3 and thus matches both rdfs:subPropertyOf and the inverse_of and symmetric predicate properties. The version rdf_reachable/5 maximizes the steps considered and returns the number of steps taken.

If both S and O are given, these predicates are semidet. The number of steps D is minimal because the implementation uses breadth first search.

Availability::- use_module(library(semweb/rdf_db)).
Source[nondet]rdf_reachable(?Subject, +Predicate, ?Object, +MaxD, -D)
Same as rdf_reachable/3, but in addition, MaxD limits the number of edges expanded and D is unified with the‘distance’between Subject and Object. Distance 0 means Subject and Object are the same resource. MaxD can be the constant infinite to impose no distance-limit.
ClioPatria (version V3.1.1-51-ga0b30a5)