Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Jul 2, 2024
1 parent 0154cbb commit 33ddd33
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.5.1
5.5.2
32 changes: 32 additions & 0 deletions retin3s
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
export prolog=${prolog:=tpl}
export retina=$(dirname "$(readlink -f "$0")")/retina.pl

if [ "$1" == "" ]; then
echo "usage: $0 file"
exit 1
fi

TMPDIR=$(mktemp -d)

eye --nope --quiet --pass --no-bnode-relabeling --ignore-inference-fuse --n3p-output $1 2>/dev/null > ${TMPDIR}/program.n3p

$prolog -g run $retina ${TMPDIR}/program.n3p > ${TMPDIR}/result.pl

eye --nope --quiet --pass --n3p ${TMPDIR}/result.pl 2> /dev/null

CONTRADICTION=$(cat ${TMPDIR}/result.pl | grep "contradicton detected")

if [ "${CONTRADICTION}" == "" ]; then
CODE=0
else
CODE=2
fi

cat ${TMPDIR}/result.pl

rm ${TMPDIR}/program.n3p
rm ${TMPDIR}/result.pl
rmdir ${TMPDIR}

exit ${CODE}
3 changes: 2 additions & 1 deletion retina.pl
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@
:- dynamic(recursion/1).
:- dynamic(skolem/2).
:- dynamic(uuid/2).
:- dynamic('<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>'/2).
:- dynamic('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'/2).
:- dynamic('<http://www.w3.org/2000/10/swap/log#onNegativeComponentSurface>'/2).
:- dynamic('<http://www.w3.org/2000/10/swap/log#onNegativeAnswerSurface>'/2).

version_info('retina v5.5.1 (2024-06-16)').
version_info('retina v5.5.2 (2024-07-02)').

% run
run :-
Expand Down

0 comments on commit 33ddd33

Please sign in to comment.