Did you know ... | Search Documentation: |

Predicate properties |

- HOME
- DOWNLOAD
- DOCUMENTATION
- TUTORIALS
- Beginner▶
- Advanced▶
- Web applications▶
- Semantic web▶
- Graphics▶
- Machine learning▶
- External collections▶
- For packagers▶

- COMMUNITY
- COMMERCIAL
- WIKI

- Documentation
- Reference manual
- Packages
- SWI-Prolog Semantic Web Library 3.0
- Two RDF APIs
- library(semweb/rdf_db): The RDF database
- Query the RDF database
- Enumerating objects
- Modifying the RDF database
- Update view, transactions and snapshots
- Type checking predicates
- Loading and saving to file
- Graph manipulation
- Literal matching and indexing
- Predicate properties
- Prefix Handling
- Miscellaneous predicates
- Memory management considerations

- library(semweb/rdf_db): The RDF database

- Two RDF APIs

- SWI-Prolog Semantic Web Library 3.0

The predicates below form an experimental interface to provide more
reasoning inside the kernel of the rdb_db engine. Note that `symetric`

,
`inverse_of`

and `transitive`

are not yet
supported by the rest of the engine. Also note that there is no relation
to defined RDF properties. Properties that have no triples are not
reported by this predicate, while predicates that are involved in
triples do not need to be defined as an instance of rdf:Property.

- [det]
**rdf_set_predicate**(`+Predicate, +Property`) - Define a property of the predicate. This predicate currently supports
the following properties:
**symmetric**(`+Boolean`)- Set/unset the predicate as being symmetric. Using
`symmetric(true)`

is the same as`inverse_of(Predicate)`

, i.e., creating a predicate that is the inverse of itself. **transitive**(`+Boolean`)- Sets the transitive property.
**inverse_of**(`+Predicate2`)- Define
`Predicate`as the inverse of`Predicate2`. An inverse relation is deleted using`inverse_of([])`

.

The

`transitive`

property is currently not used. The`symmetric`

and`inverse_of`

properties are considered by rdf_has/3,4 and rdf_reachable/3.- To be done
- Maintain these properties based on OWL triples.

**rdf_predicate_property**(`?Predicate, ?Property`)- Query properties of a defined predicate. Currently defined properties
are given below.
**symmetric**(`Bool`)- True if the predicate is defined to be symetric. I.e., {A} P
{B} implies {B} P {A}. Setting symmetric is equivalent to
`inverse_of(Self)`

. **inverse_of**(`Inverse`)- True if this predicate is the inverse of
`Inverse`. This property is used by rdf_has/3, rdf_has/4, rdf_reachable/3 and rdf_reachable/5. **transitive**(`Bool`)- True if this predicate is transitive. This predicate is currently not used. It might be used to make rdf_has/3 imply rdf_reachable/3 for transitive predicates.
**triples**(`Triples`)- Unify
`Triples`with the number of existing triples using this predicate as second argument. Reporting the number of triples is intended to support query optimization. **rdf_subject_branch_factor**(`-Float`)- Unify
`Float`with the average number of triples associated with each unique value for the subject-side of this relation. If there are no triples the value 0.0 is returned. This value is cached with the predicate and recomputed only after substantial changes to the triple set associated to this relation. This property is intended for path optimalisation when solving conjunctions of rdf/3 goals. **rdf_object_branch_factor**(`-Float`)- Unify
`Float`with the average number of triples associated with each unique value for the object-side of this relation. In addition to the comments with the`rdf_subject_branch_factor`

property, uniqueness of the object value is computed from the hash key rather than the actual values. **rdfs_subject_branch_factor**(`-Float`)- Same as
`rdf_subject_branch_factor`

, but also considering triples ofâ€˜subPropertyOf' this relation. See also rdf_has/3. **rdfs_object_branch_factor**(`-Float`)- Same as
`rdf_object_branch_factor`

, but also considering triples ofâ€˜subPropertyOf' this relation. See also rdf_has/3.

- See also
- rdf_set_predicate/2.

Tags are associated to your profile if you are logged in

Tags: