Skip to content

Commit

Permalink
removing unused predicates
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Mar 8, 2024
1 parent 9b0fa97 commit a8cfed5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 48 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.8
0.0.9
2 changes: 1 addition & 1 deletion mksee
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ cat see.pl | sed -e "s/'SEE.*'/'SEE $RELEASE \($DATE\)'/" > see.pl.tmp
mv see.pl.tmp see.pl

# create image
swipl -f see.pl -g "qsave_program('see.pvm', [goal(main)]),halt"
swipl -f see.pl -g "qsave_program('see.pvm', [goal(main)]), halt."

# link see command
sudo ln -sf $(realpath ./see) /usr/local/bin
Expand Down
53 changes: 7 additions & 46 deletions see.pl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
:- use_module(library(semweb/turtle)).
:- catch(use_module(library(http/http_open)), _, true).

version_info('SEE v0.0.8 (2024-03-07)').
version_info('SEE v0.0.9 (2024-03-08)').

help_info('Usage: see <options>* <data>*
see
Expand Down Expand Up @@ -192,6 +192,7 @@
fail
; true
),
% move rdf lists
( graph(A, B),
conj_list(B, C),
relist(C, D),
Expand All @@ -217,6 +218,9 @@
fail
; true
),
% remove rdf lists
retractall('<http://www.w3.org/1999/02/22-rdf-syntax-ns#first>'(_, _)),
retractall('<http://www.w3.org/1999/02/22-rdf-syntax-ns#rest>'(_, _)),
% create forward rules
assertz(implies((
'<http://www.w3.org/2000/10/swap/lingua#premise>'(R, A),
Expand Down Expand Up @@ -275,25 +279,16 @@
retractall(brake)
; true
)), true)),
% set scope
% set engine values
findall(Sc,
( scope(Sc)
),
Scope
),
nb_setval(scope, Scope),
( pfx('var:', _)
-> true
; assertz(pfx('var:', '<http://www.w3.org/2000/10/swap/var#>'))
),
( pfx('skolem:', _)
-> true
; nb_getval(var_ns, Sns),
atomic_list_concat(['<', Sns, '>'], B),
assertz(pfx('skolem:', B))
),
nb_setval(rn, 0),
nb_setval(keep_ng, true),
% run engine
catch(eam(0), Exc3,
( ( Exc3 = halt(0)
-> true
Expand Down Expand Up @@ -850,15 +845,6 @@
; true
),
!.
wt2(quad(triple(S, P, O), G)) :-
!,
wg(S),
write(' '),
wt0(P),
write(' '),
wg(O),
write(' '),
wg(G).
wt2(graph(X, Y)) :-
!,
wp(X),
Expand Down Expand Up @@ -915,15 +901,6 @@
write(' '),
wg(O)
).
wtn(triple(S, P, O)) :-
!,
write('<< '),
wg(S),
write(' '),
wp(P),
write(' '),
wg(O),
write(' >>').
wtn(X) :-
X =.. [B|C],
( atom(B),
Expand Down Expand Up @@ -2858,26 +2835,10 @@
% Support
%

def_pfx('math:', '<http://www.w3.org/2000/10/swap/math#>').
def_pfx('list:', '<http://www.w3.org/2000/10/swap/list#>').
def_pfx('xsd:', '<http://www.w3.org/2001/XMLSchema#>').
def_pfx('log:', '<http://www.w3.org/2000/10/swap/log#>').
def_pfx('rdfs:', '<http://www.w3.org/2000/01/rdf-schema#>').
def_pfx('time:', '<http://www.w3.org/2000/10/swap/time#>').
def_pfx('rdf:', '<http://www.w3.org/1999/02/22-rdf-syntax-ns#>').
def_pfx('string:', '<http://www.w3.org/2000/10/swap/string#>').
def_pfx('owl:', '<http://www.w3.org/2002/07/owl#>').

put_pfx(_, URI) :-
atomic_list_concat(['<', URI, '>'], U),
pfx(_, U),
!.
put_pfx(_, URI) :-
atomic_list_concat(['<', URI, '>'], U),
def_pfx(Pf, U),
\+pfx(Pf, _),
!,
assertz(pfx(Pf, U)).
put_pfx(Pf, URI) :-
atomic_list_concat(['<', URI, '>'], U),
fresh_pf(Pf, Pff),
Expand Down
Binary file modified see.pvm
Binary file not shown.

0 comments on commit a8cfed5

Please sign in to comment.