Having most useful readability, we make use of the notation defined within the [RIF-DTB], which provides shortcuts to have composing Eye

The first shortcut notation lets one write long rif:iri constants in the form prefix:identity, where prefix is a short name that ex boyfriendpands into an IRI according to a suitable Prefix directive. For instance, ex:guy would expand into the rif:iri constant ""^^rif:iri, if ex is defined as in the Prefix(ex . ) directive below. The second shortcut notation uses angle brackets as a way to shorten the ". "^^rif:iri idiom. For instance, the prevous rif:iri constant can be alternatively represented as < The last shortcut notation lets one write rif:iri constants using IRIs relative to a base, how to delete amor en linea account where the base IRI is specified in a directive. For instance, with the directive, below, both and "Yorick"^^rif:iri expand into the rif:iri constant ""^^rif:iri. The example also illustrates attachment of annotations.

The above mentioned RIF formulas try (admittedly embarrassing) analytical renderings of the pursuing the comments regarding Shakespeare’s Hamlet: “Some thing are spoiled in the condition out of Denmark,” “To be, or perhaps not as,” and you may “All kid features organization and you can notice.”

Observe that the above set of formulas has a nested subset with its own annotation, , which contains only a global IRI. ?

Base

The first document, below, imports the second document, which is assumed to be located at the IRI In addition, the first document has references to two remote modules, which are located at and correspondingly. These segments are believed as knowledge bases that provide the fresh new typical facts about college registration, programmes available in other semesters, and so on. The principles comparable to the latest remote modules aren't shown, because they do not teach new features. Throughout the simplest case, such knowledge basics can just only be groups of issues with the predicates/structures who supply the new required information.

In this example, the main document contains three rules, which define the predicates u:takes, u:will teach and u:popular_direction. The information for the first two predicates is obtained by querying the remote modules corresponding to Universities 1 and 2. The rule that defines the first predicate says that if the remote university knowledge base says that a student s takes a course c in a certain semester s then takes(s c s) is true in the main document. The second rule makes a similar statement about professors teaching courses in various semesters. Inside the main document, the external modules are referred to via the terms _univ(1) and _univ(2). The Component directives tie these references to the actual locations. The underscore in front of univ signifies that this is a rif:regional symbol and is a shortcut for "univ"^^rif:local, as defined in [RIF-DTB], Section Constants and Symbol Spaces. Note that the remote modules use frames to represent the enrollment information and predicates to represent course offerings. The rules in the main document convert both of these representations to predicates. The third rule illustrates a use of aggregation. The comprehension variable here is ?Stud and ?Crs is a grouping variable. Note that these are the only free variables in the formula over which aggregation is computed. For each course, the aggregate counts the number of students in that course over all semesters, and if the number exceeds 500 then the course is declared popular. Note also that the comprehension variable ?Stud is bound by the aggregate, so it is not quantified in the Forall-prefix of the rule.

I teach algorithms, along with records and you can groups, to the pursuing the over example (that have apologies to Shakespeare to the incomplete leaving of one’s implied meaning when you look at the reasoning)

The imported document has only one rule, which defines a new concept, u:studentOf (a student is a studentOf of a certain professor if that student takes a course from that professor). Since the main document imports the second document, it can answer queries about u:studentOf as if this concept were defined directly within the main document. ?

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد.

این فیلد را پر کنید
این فیلد را پر کنید
لطفاً یک نشانی ایمیل معتبر بنویسید.
برای ادامه، شما باید با قوانین موافقت کنید

فهرست