Download Flora-2: User's Manual
Transcript
D
INSIDE FLORA-2
126
derived and d ; the arrow <---indicates the immediate dependency relationship, i.e., that the
predicate on the right appears in the body of a rule that defines the predicate on the left.
In program rules:
derived_fd <--- d_fd
In auxiliary runtime libraries:
d_fd <--- fd
d_ifd <--- ifd
fd <--inferred_fd
fd <--- not inferred_fd
<--- derived_fd
fd <--- not conflict_obj_ifd
fd <--ifd
fd <--immediate_isa
ifd
ifd
ifd
ifd
<--immediate_sub
<--inferred_ifd
<--- not inferred_ifd
<--- not conflict_ifd
ifddef <---
<--- ifddef <--- fd
<--- derived_ifd
<--- ifddef
ifd
derived_fd <--- storage_find_fact(...trie_name..., fd(...))
Here we listed only the predicates that are used to model scalar inheritable (ifd) and non-inheritable
(fd) methods. A similar diagram exists for set methods (which uses imvd and mvd), and another
one exist for method signatures. There is additional machinery for IS-A and subclass relationships,
and for equality maintenance.
The closure axioms tie all these predicates together to implement the semantics of F-logic. In
particular, they take care of the following features:
• Computing the transitive closure of “ :: ” (the subclass relationship). A runtime check warns
about cycles in the subclass hierarchy.
• Computing the closure of “ : ” with respect to “ :: ”, i.e., if X : C, C :: D then X : D.
• Performing monotonic and non-monotonic inheritance. The predicates conflict obj ifd,
conflict ifd, immediate sub, immediate isa, are used for this purpose.
• Making sure that scalar methods are, indeed, scalar.
• Making sure that when the equality maintenance mode changes as a result of the executable
instruction :- equality {basic|flogic|none}, program clauses are not overwritten by the
rules specified in Flora-2 runtime libraries. This is the reason for having the wrappers
derived fd and inferred fd. The former appear only in the rule heads of the clauses