diff --git a/RELEASE b/RELEASE index d0b8f44e6..17f785c36 100644 --- a/RELEASE +++ b/RELEASE @@ -1,5 +1,6 @@ EYE release +[v2.10.3] adding blogic negative surface redundancy removal [v2.10.2] using log:onQuerySurface instead of log:onConstructSurface [v2.10.1] fixing https://github.com/eyereasoner/Notation3-By-Example/blob/main/log/blogic/negativeSurface3.n3 [v2.10.0] backward rules are now using log:onConstructSurface instead of log:onQuerySurface diff --git a/VERSION b/VERSION index c6436a853..5f4f65c85 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.10.2 +2.10.3 diff --git a/eye.pl b/eye.pl index d552c9cba..349fd093d 100644 --- a/eye.pl +++ b/eye.pl @@ -20,7 +20,7 @@ :- use_module(library(semweb/turtle)). :- catch(use_module(library(http/http_open)), _, true). -version_info('EYE v2.10.2 josd'). +version_info('EYE v2.10.3 josd'). license_info('MIT License @@ -706,14 +706,14 @@ assertz(flag(blogic)), retractall(flag(nope)), assertz(flag(nope)), - % positive surfaces + % positive surface assertz(implies(''(_, G), G, '<>')), % inference fuse assertz(implies((''(V, G), makevars(G, H, beta(V)), call(H) ), false, '<>')), - % negative surfaces + % negative surface resolve positive surface assertz(implies((''(V, G), conj_list(G, L), \+member(''(_, _), L), @@ -723,6 +723,7 @@ append(K, D, E), conj_list(F, E) ), ''(V, F), '<>')), + % negative surface even level erasure assertz(implies((''(V, G), conj_list(G, L), select(''(W, H), L, K), @@ -730,6 +731,16 @@ conj_list(H, M), select(''(W, C), M, _) ), ''(W, C), '<>')), + % negative surface redundancy removal + assertz(implies((''(V, G), + conj_list(G, L), + list_to_set(L, M), + conj_list(H, M), + ( \+''(V, H) + -> assertz(''(V, H)) + ; true + )), true, '<>')), + % adjust graffiti assertz(implies((''(V, G), findvars(G, U, beta), findall(M, @@ -740,7 +751,7 @@ ), W \= V ), ''(W, G), '<>')), - % forward rules + % forward rule assertz(implies((''(V, G), conj_list(G, L), select(''(_, H), L, K), @@ -748,6 +759,7 @@ domain(V, C, P), makevars(''(P, H), B, beta(V)) ), B, '<>')), + % forward rule with contrapositives assertz(implies((''(V, G), conj_list(G, L), select(''(W, H), L, K), @@ -767,6 +779,7 @@ ), makevars(''(D, E), B, beta(V)) ), B, '<>')), + % forward rule with positive premis negative conclusion assertz(implies((''(V, G), conj_list(G, L), \+member(''(_, _), L), @@ -779,6 +792,7 @@ domain(V, R, P), makevars(''(P, E), B, beta(V)) ), B, '<>')), + % forward rule with mixed premis and negative conclusion assertz(implies((''(V, G), conj_list(G, L), select(J, L, K), @@ -798,6 +812,7 @@ C = ''([], H), makevars(''(J, C), B, beta(V)) ), B, '<>')), + % premis resolution assertz(implies((implies(''(_, D), C, _), D \= implies(_, _, _), D \= (implies(_, _, _), _), @@ -807,7 +822,7 @@ domain(V, true, P), makevars(''(P, C), B, beta(V)) ), B, '<>')), - % backward rules + % backward rule assertz(implies((''(V, G), conj_list(G, L), ( select(''(_, H), L, K) @@ -822,7 +837,7 @@ assertz(C) ; true )), true, '<>')), - % queries + % ask surface assertz(implies((''([], G), G \= true, conj_list(G, L), @@ -830,8 +845,11 @@ conj_list(H, K), T = (''([], ''([], J)), H), - assertz(''([], T)) - ), true, '<>')), + ( \+''([], T) + -> assertz(''([], T)) + ; true + )), true, '<>')), + % query surface assertz(implies((''(V, G), conj_list(G, L), ( ( select(''(_, H), L, K) @@ -851,24 +869,6 @@ retractall(brake) ; true )), true, '<>')), - % warn for multiple models - assertz(implies((flag(warn), - ''(V, G), - conj_list(G, L), - select(''(_, H), L, K), - findall(M, - ( member(M, K), - M \= ''(_, _) - ), - J - ), - conj_list(C, J), - length(K, N), - length(J, I), - N > I, - makevars(''(V, G), B, beta(V)), - format(user_error, '** WARNING ** multiple models ~w~n', B) - ), true, '<>')), % extended unifier asserta((unify(A, true) :- nonvar(A), diff --git a/eye.zip b/eye.zip index d48a78293..1482066de 100644 Binary files a/eye.zip and b/eye.zip differ