Skip to content

Commit

Permalink
CHANGED: hdt_node/2 implementation similar to existing term preds.
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterbeek committed Sep 9, 2017
1 parent 26601f3 commit 2e8c53e
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions prolog/hdt.pl
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,19 @@
).

hdt_node(HDT, Node) :-
( var(Node)
-> ( hdt_column_(HDT, shared, Node)
; hdt_column_(HDT, subject, Node)
; hdt_column_(HDT, object, Node)
)
; hdt_search(HDT, Node, _, _)
-> true
; hdt_search(HDT, _, _, Node)
-> true
).
( var(Node)
-> ( hdt_column_(HDT, shared, Var),
Var = Node
; hdt_column_(HDT, subject, Var),
Var = Node
; hdt_object_(HDT, OHDT),
post_object(Node, OHDT)
)
; hdt_search(HDT, Node, _, _)
-> true
; hdt_search(HDT, _, _, Node)
-> true
).


%% pre_object(+HDT, ?O, -OHDT) is det.
Expand Down

0 comments on commit 2e8c53e

Please sign in to comment.