From c02297dc1f531e08ba7ce585f4918198e2495deb Mon Sep 17 00:00:00 2001 From: josd Date: Sat, 1 Jun 2024 14:21:51 +0200 Subject: [PATCH] using surface names from https://w3c-cg.github.io/rdfsurfaces/ --- VERSION | 2 +- rdfsurfaces/beetle/beetle.s | 18 +- rdfsurfaces/complex/complex.s | 56 +-- .../contradiction-builtin-output.s | 2 +- .../contradiction/contradiction-builtin.s | 6 +- .../contradiction/contradiction-output.s | 2 +- rdfsurfaces/contradiction/contradiction.s | 10 +- .../contradiction/contradiction5-output.s | 2 +- rdfsurfaces/contradiction/contradiction5.s | 8 +- rdfsurfaces/dishes/dishes-output.s | 2 +- rdfsurfaces/dishes/dishes.s | 18 +- rdfsurfaces/dqc/sdcoding.s | 44 +- rdfsurfaces/edt/edt.s | 8 +- rdfsurfaces/fibonacci/fibonacci.s | 40 +- rdfsurfaces/graph/graph.s | 12 +- rdfsurfaces/lubm/lubm.s | 428 +++++++++--------- rdfsurfaces/peano/peano.s | 32 +- rdfsurfaces/pi/pi.s | 16 +- rdfsurfaces/policy/policy.s | 16 +- rdfsurfaces/socrates/socrates.s | 8 +- rdfsurfaces/turing/turing.s | 66 +-- rdfsurfaces/universal/universal.s | 8 +- rdfsurfaces/witch/witch.s | 20 +- retina.pl | 102 ++--- 24 files changed, 463 insertions(+), 463 deletions(-) diff --git a/VERSION b/VERSION index 8a30e8f..d50359d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.4.0 +5.5.0 diff --git a/rdfsurfaces/beetle/beetle.s b/rdfsurfaces/beetle/beetle.s index 343dd86..8c151d1 100644 --- a/rdfsurfaces/beetle/beetle.s +++ b/rdfsurfaces/beetle/beetle.s @@ -4,43 +4,43 @@ ''('', ''). % all cars are green or blue -''(['_:A'], +''(['_:A'], ( ''('_:A', ''), - ''([], + ''([], ''('_:A', '') ), - ''([], + ''([], ''('_:A', '') ) ) ). % green things are beautiful -''(['_:A'], +''(['_:A'], ( ''('_:A', ''), - ''([], + ''([], ''('_:A', '') ) ) ). % blue things are beautiful -''(['_:A'], +''(['_:A'], ( ''('_:A', ''), - ''([], + ''([], ''('_:A', '') ) ) ). % questions -''(['_:S', '_:O'], +''(['_:S', '_:O'], ( ''('_:S', '_:O'), - ''([], + ''([], ''('_:S', '_:O') ) ) diff --git a/rdfsurfaces/complex/complex.s b/rdfsurfaces/complex/complex.s index 976bc14..a28c8ca 100644 --- a/rdfsurfaces/complex/complex.s +++ b/rdfsurfaces/complex/complex.s @@ -1,7 +1,7 @@ % exponentiation -''(['_:A', '_:B', '_:C', '_:D', '_:E', '_:F', '_:R', '_:T', '_:Z1', '_:Z2', '_:Z3', '_:Z4', '_:Z5', '_:Z6', '_:Z7', '_:Z8', '_:Z9', '_:Z10'], +''(['_:A', '_:B', '_:C', '_:D', '_:E', '_:F', '_:R', '_:T', '_:Z1', '_:Z2', '_:Z3', '_:Z4', '_:Z5', '_:Z6', '_:Z7', '_:Z8', '_:Z9', '_:Z10'], ( - ''([], + ''([], ''([['_:A', '_:B'], ['_:C', '_:D']], ['_:E', '_:F']) ), ''(['_:A', '_:B'], ['_:R', '_:T']), @@ -21,9 +21,9 @@ ). % asin -''(['_:A', '_:B', '_:C', '_:D', '_:E', '_:F', '_:Z1', '_:Z2', '_:Z3', '_:Z4', '_:Z5', '_:Z6', '_:Z7', '_:Z8', '_:Z9', '_:Z10', '_:Z11', '_:Z12', '_:Z13', '_:Z14', '_:Z15'], +''(['_:A', '_:B', '_:C', '_:D', '_:E', '_:F', '_:Z1', '_:Z2', '_:Z3', '_:Z4', '_:Z5', '_:Z6', '_:Z7', '_:Z8', '_:Z9', '_:Z10', '_:Z11', '_:Z12', '_:Z13', '_:Z14', '_:Z15'], ( - ''([], + ''([], ''(['_:A', '_:B'], ['_:C', '_:D']) ), ''([1, '_:A'], '_:Z1'), @@ -49,9 +49,9 @@ ). % acos -''(['_:A', '_:B', '_:C', '_:D', '_:E', '_:F', '_:U', '_:Z1', '_:Z2', '_:Z3', '_:Z4', '_:Z5', '_:Z6', '_:Z7', '_:Z8', '_:Z9', '_:Z10', '_:Z11', '_:Z12', '_:Z13', '_:Z14', '_:Z15'], +''(['_:A', '_:B', '_:C', '_:D', '_:E', '_:F', '_:U', '_:Z1', '_:Z2', '_:Z3', '_:Z4', '_:Z5', '_:Z6', '_:Z7', '_:Z8', '_:Z9', '_:Z10', '_:Z11', '_:Z12', '_:Z13', '_:Z14', '_:Z15'], ( - ''([], + ''([], ''(['_:A', '_:B'], ['_:C', '_:D']) ), ''([1, '_:A'], '_:Z1'), @@ -77,9 +77,9 @@ ) ). -''(['_:X', '_:Y', '_:R', '_:T', '_:Tp', '_:Z1', '_:Z2', '_:Z3', '_:Z4', '_:Z5'], +''(['_:X', '_:Y', '_:R', '_:T', '_:Tp', '_:Z1', '_:Z2', '_:Z3', '_:Z4', '_:Z5'], ( - ''([], + ''([], ''(['_:X', '_:Y'], ['_:R', '_:Tp']) ), ''(['_:X', 2], '_:Z1'), @@ -93,9 +93,9 @@ ) ). -''(['_:X', '_:Y', '_:T', '_:Tp'], +''(['_:X', '_:Y', '_:T', '_:Tp'], ( - ''([], + ''([], ''(['_:X', '_:Y', '_:T'], '_:Tp') ), ''('_:X', 0), @@ -104,9 +104,9 @@ ) ). -''(['_:X', '_:Y', '_:T', '_:Tp'], +''(['_:X', '_:Y', '_:T', '_:Tp'], ( - ''([], + ''([], ''(['_:X', '_:Y', '_:T'], '_:Tp') ), ''('_:X', 0), @@ -115,9 +115,9 @@ ) ). -''(['_:X', '_:Y', '_:T', '_:Tp'], +''(['_:X', '_:Y', '_:T', '_:Tp'], ( - ''([], + ''([], ''(['_:X', '_:Y', '_:T'], '_:Tp') ), ''('_:X', 0), @@ -126,9 +126,9 @@ ) ). -''(['_:X', '_:Y', '_:T', '_:Tp'], +''(['_:X', '_:Y', '_:T', '_:Tp'], ( - ''([], + ''([], ''(['_:X', '_:Y', '_:T'], '_:Tp') ), ''('_:X', 0), @@ -139,55 +139,55 @@ ). % questions -''(['_:A', '_:B'], +''(['_:A', '_:B'], ( ''([[-1, 0], [0.5, 0]], ['_:A', '_:B']), - ''([], + ''([], ''([[-1, 0], [0.5, 0]], ['_:A', '_:B']) ) ) ). -''(['_:A', '_:B'], +''(['_:A', '_:B'], ( ''([[2.718281828459045, 0], [0, 3.141592653589793]], ['_:A', '_:B']), - ''([], + ''([], ''([[2.718281828459045, 0], [0, 3.141592653589793]], ['_:A', '_:B']) ) ) ). -''(['_:A', '_:B'], +''(['_:A', '_:B'], ( ''([[0, 1], [0, 1]], ['_:A', '_:B']), - ''([], + ''([], ''([[0, 1], [0, 1]], ['_:A', '_:B']) ) ) ). -''(['_:A', '_:B'], +''(['_:A', '_:B'], ( ''([[2.718281828459045, 0], [-1.57079632679, 0]], ['_:A', '_:B']), - ''([], + ''([], ''([[2.718281828459045, 0], [-1.57079632679, 0]], ['_:A', '_:B']) ) ) ). -''(['_:A', '_:B'], +''(['_:A', '_:B'], ( ''([2, 0], ['_:A', '_:B']), - ''([], + ''([], ''([2, 0], ['_:A', '_:B']) ) ) ). -''(['_:A', '_:B'], +''(['_:A', '_:B'], ( ''([2, 0], ['_:A', '_:B']), - ''([], + ''([], ''([2, 0], ['_:A', '_:B']) ) ) diff --git a/rdfsurfaces/contradiction/contradiction-builtin-output.s b/rdfsurfaces/contradiction/contradiction-builtin-output.s index bff7b95..b34a6a5 100644 --- a/rdfsurfaces/contradiction/contradiction-builtin-output.s +++ b/rdfsurfaces/contradiction/contradiction-builtin-output.s @@ -1 +1 @@ -inference_fuse(''([],''(':y',':z')),''(':y',':z')). +inference_fuse(''([],''(':y',':z')),''(':y',':z')). diff --git a/rdfsurfaces/contradiction/contradiction-builtin.s b/rdfsurfaces/contradiction/contradiction-builtin.s index a929289..55d9611 100644 --- a/rdfsurfaces/contradiction/contradiction-builtin.s +++ b/rdfsurfaces/contradiction/contradiction-builtin.s @@ -1,16 +1,16 @@ :- dynamic(''/2). % ForAll x : x = y -> x a z -''(['_:x'],( +''(['_:x'],( ''('_:x',':y'), - ''([], + ''([], ''('_:x',':z') ) ) ). % ForAll x : x in [y] -> ~(x a z) -''(['_:x'],( +''(['_:x'],( ''('_:x',[':y']), ''('_:x',':z') ) diff --git a/rdfsurfaces/contradiction/contradiction-output.s b/rdfsurfaces/contradiction/contradiction-output.s index e73d353..1c78d1e 100644 --- a/rdfsurfaces/contradiction/contradiction-output.s +++ b/rdfsurfaces/contradiction/contradiction-output.s @@ -1,3 +1,3 @@ ''('',''). ''('',''). -inference_fuse(''([],''('','')),''('','')). +inference_fuse(''([],''('','')),''('','')). diff --git a/rdfsurfaces/contradiction/contradiction.s b/rdfsurfaces/contradiction/contradiction.s index 1888dc7..eddf193 100644 --- a/rdfsurfaces/contradiction/contradiction.s +++ b/rdfsurfaces/contradiction/contradiction.s @@ -6,26 +6,26 @@ % humans are mortal ''('', ''). -''(['_:A', '_:B', '_:S'], +''(['_:A', '_:B', '_:S'], ( ''('_:A', '_:B'), ''('_:S', '_:A'), - ''([], + ''([], ''('_:S', '_:B') ) ) ). % Socrates is a not mortal -''([], +''([], ''('', '') ). % questions -''(['_:S', '_:C'], +''(['_:S', '_:C'], ( ''('_:S', '_:C'), - ''([], + ''([], ''('_:S', '_:C') ) ) diff --git a/rdfsurfaces/contradiction/contradiction5-output.s b/rdfsurfaces/contradiction/contradiction5-output.s index fd514f4..83e2d53 100644 --- a/rdfsurfaces/contradiction/contradiction5-output.s +++ b/rdfsurfaces/contradiction/contradiction5-output.s @@ -1 +1 @@ -inference_fuse(''(['_:x_1'],''('_:x_1',''('',''))),''(['_:a_1'],''('',''))). +inference_fuse(''(['_:x_1'],''('_:x_1',''('',''))),''(['_:a_1'],''('',''))). diff --git a/rdfsurfaces/contradiction/contradiction5.s b/rdfsurfaces/contradiction/contradiction5.s index 488e87b..6335f4d 100644 --- a/rdfsurfaces/contradiction/contradiction5.s +++ b/rdfsurfaces/contradiction/contradiction5.s @@ -2,18 +2,18 @@ :- dynamic(''/2). -''(['_:x'], - ''('_:x', +''(['_:x'], + ''('_:x', ''('', '') ) ). -''(['_:a'], +''(['_:a'], ''('', '') ). ''('', true). -''([], +''([], ''('', true) ). diff --git a/rdfsurfaces/dishes/dishes-output.s b/rdfsurfaces/dishes/dishes-output.s index e670013..c935929 100644 --- a/rdfsurfaces/dishes/dishes-output.s +++ b/rdfsurfaces/dishes/dishes-output.s @@ -1 +1 @@ -''([],''('','')). +''([],''('','')). diff --git a/rdfsurfaces/dishes/dishes.s b/rdfsurfaces/dishes/dishes.s index c160332..16748f0 100644 --- a/rdfsurfaces/dishes/dishes.s +++ b/rdfsurfaces/dishes/dishes.s @@ -3,14 +3,14 @@ :- dynamic(''/2). % Bob doesn't do the dishes -''([], +''([], ''('', '') ). % When anyone cant do dishes, it is because the sink doens't contain water -''(['_:X'], +''(['_:X'], ( - ''([], + ''([], ''('_:X', '') ), ''('', '') @@ -18,23 +18,23 @@ ). % If the faucet is open, then the sink contains water -''([], +''([], ( ''('', ''), - ''([], + ''([], ''('', '') ) ) ). % Test that we don't have an open faucet -''([], +''([], ( - ''([], + ''([], ''('', '') ), - ''([], - ''([], + ''([], + ''([], ''('', '') ) ) diff --git a/rdfsurfaces/dqc/sdcoding.s b/rdfsurfaces/dqc/sdcoding.s index 0312a51..50b3029 100644 --- a/rdfsurfaces/dqc/sdcoding.s +++ b/rdfsurfaces/dqc/sdcoding.s @@ -38,9 +38,9 @@ ''(true, true). % KG -''(['_:X', '_:Y', '_:Z'], +''(['_:X', '_:Y', '_:Z'], ( - ''([], + ''([], ''('_:X', '_:Y') ), ''('_:X', '_:Z'), @@ -49,9 +49,9 @@ ). % GK -''(['_:X', '_:Y', '_:Z'], +''(['_:X', '_:Y', '_:Z'], ( - ''([], + ''([], ''('_:X', '_:Y') ), ''('_:X', '_:Z'), @@ -60,36 +60,36 @@ ). % Alice -''(['_:X', '_:Y'], +''(['_:X', '_:Y'], ( - ''([], + ''([], ''(0, ['_:X', '_:Y']) ), ''('_:X', '_:Y') ) ). -''(['_:X', '_:Y'], +''(['_:X', '_:Y'], ( - ''([], + ''([], ''(1, ['_:X', '_:Y']) ), ''('_:X', '_:Y') ) ). -''(['_:X', '_:Y'], +''(['_:X', '_:Y'], ( - ''([], + ''([], ''(2, ['_:X', '_:Y']) ), ''('_:X', '_:Y') ) ). -''(['_:X', '_:Y'], +''(['_:X', '_:Y'], ( - ''([], + ''([], ''(3, ['_:X', '_:Y']) ), ''('_:X', '_:Y') @@ -97,36 +97,36 @@ ). % Bob -''(['_:X', '_:Y'], +''(['_:X', '_:Y'], ( - ''([], + ''([], ''(['_:X', '_:Y'], 0) ), ''('_:X', '_:Y') ) ). -''(['_:X', '_:Y'], +''(['_:X', '_:Y'], ( - ''([], + ''([], ''(['_:X', '_:Y'], 1) ), ''('_:X', '_:Y') ) ). -''(['_:X', '_:Y'], +''(['_:X', '_:Y'], ( - ''([], + ''([], ''(['_:X', '_:Y'], 2) ), ''('_:X', '_:Y') ) ). -''(['_:X', '_:Y'], +''(['_:X', '_:Y'], ( - ''([], + ''([], ''(['_:X', '_:Y'], 3) ), ''('_:X', '_:Y') @@ -134,7 +134,7 @@ ). % questions -''(['_:N', '_:A', '_:B', '_:M', '_:X', '_:Y', '_:Z', '_:L', '_:S', '_:I'], +''(['_:N', '_:A', '_:B', '_:M', '_:X', '_:Y', '_:Z', '_:L', '_:S', '_:I'], ( ''('_:N', '_:A'), ''('_:B', '_:M'), @@ -155,7 +155,7 @@ ''('_:L', '_:I'), ''(['_:I',2],1), - ''([], + ''([], ''('_:N', '_:M') ) ) diff --git a/rdfsurfaces/edt/edt.s b/rdfsurfaces/edt/edt.s index 4d14497..681a1e1 100644 --- a/rdfsurfaces/edt/edt.s +++ b/rdfsurfaces/edt/edt.s @@ -400002,9 +400002,9 @@ ''('',''). ''('',''). -''(['_:A', '_:B', '_:C'], +''(['_:A', '_:B', '_:C'], ( - ''([], + ''([], ''('_:A', '_:B') ), ''('_:C', '_:B'), @@ -400013,10 +400013,10 @@ ). % questions -''([], +''([], ( ''('', ''), - ''([], + ''([], ''('', '') ) ) diff --git a/rdfsurfaces/fibonacci/fibonacci.s b/rdfsurfaces/fibonacci/fibonacci.s index 9b5be7a..127dca4 100644 --- a/rdfsurfaces/fibonacci/fibonacci.s +++ b/rdfsurfaces/fibonacci/fibonacci.s @@ -1,31 +1,31 @@ -''(['_:X', '_:Y'], +''(['_:X', '_:Y'], ( - ''([], + ''([], ''('_:X', '_:Y') ), ''(['_:X', 0, 1], '_:Y') ) ). -''(['_:A', '_:B'], +''(['_:A', '_:B'], ( - ''([], + ''([], ''([0, '_:A', '_:B'], '_:A') ) ) ). -''(['_:A', '_:B'], +''(['_:A', '_:B'], ( - ''([], + ''([], ''([1, '_:A', '_:B'], '_:B') ) ) ). -''(['_:A', '_:B', '_:C', '_:D', '_:X', '_:Y'], +''(['_:A', '_:B', '_:C', '_:D', '_:X', '_:Y'], ( - ''([], + ''([], ''(['_:X', '_:A', '_:B'], '_:Y') ), ''('_:X', 1), @@ -36,55 +36,55 @@ ). % questions -''(['_:X'], +''(['_:X'], ( ''(1, '_:X'), - ''([], + ''([], ''(1, '_:X') ) ) ). -''(['_:X'], +''(['_:X'], ( ''(2, '_:X'), - ''([], + ''([], ''(2, '_:X') ) ) ). -''(['_:X'], +''(['_:X'], ( ''(3, '_:X'), - ''([], + ''([], ''(3, '_:X') ) ) ). -''(['_:X'], +''(['_:X'], ( ''(91, '_:X'), - ''([], + ''([], ''(91, '_:X') ) ) ). -''(['_:X'], +''(['_:X'], ( ''(283, '_:X'), - ''([], + ''([], ''(283, '_:X') ) ) ). -''(['_:X'], +''(['_:X'], ( ''(3674, '_:X'), - ''([], + ''([], ''(3674, '_:X') ) ) diff --git a/rdfsurfaces/graph/graph.s b/rdfsurfaces/graph/graph.s index c520436..e37fedf 100644 --- a/rdfsurfaces/graph/graph.s +++ b/rdfsurfaces/graph/graph.s @@ -13,31 +13,31 @@ ''('',''). % oneway subproperty of path -''(['_:A', '_:B'], +''(['_:A', '_:B'], ( ''('_:A', '_:B'), - ''([], + ''([], ''('_:A', '_:B') ) ) ). % path transitive property -''(['_:A', '_:B', '_:C'], +''(['_:A', '_:B', '_:C'], ( ''('_:B', '_:C'), ''('_:A', '_:B'), - ''([], + ''([], ''('_:A', '_:C') ) ) ). % questions -''(['_:A'], +''(['_:A'], ( ''('_:A', ''), - ''([], + ''([], ''('_:A', '') ) ) diff --git a/rdfsurfaces/lubm/lubm.s b/rdfsurfaces/lubm/lubm.s index 94c8796..c35be1f 100644 --- a/rdfsurfaces/lubm/lubm.s +++ b/rdfsurfaces/lubm/lubm.s @@ -106083,118 +106083,118 @@ ''('', ''). ''('', ''). -''(['_:X_1_1'], +''(['_:X_1_1'], ( ''('_:X_1_1', ''), - ''([], + ''([], ''('_:X_1_1', '') ) ) ). -''(['_:X_1_2', '_:Y_1_1'], +''(['_:X_1_2', '_:Y_1_1'], ( ''('_:X_1_2', '_:Y_1_1'), - ''([], + ''([], ''('_:X_1_2', '') ) ) ). -''(['_:X_1_3', '_:Y_1_2'], +''(['_:X_1_3', '_:Y_1_2'], ( ''('_:X_1_3', '_:Y_1_2'), - ''([], + ''([], ''('_:Y_1_2', '') ) ) ). -''(['_:X_1_4', '_:Y_1_3'], +''(['_:X_1_4', '_:Y_1_3'], ( ''('_:X_1_4', '_:Y_1_3'), - ''([], + ''([], ''('_:X_1_4', '') ) ) ). -''(['_:X_1_5', '_:Y_1_4'], +''(['_:X_1_5', '_:Y_1_4'], ( ''('_:X_1_5', '_:Y_1_4'), - ''([], + ''([], ''('_:Y_1_4', '') ) ) ). -''(['_:X_1_6', '_:Y_1_5'], +''(['_:X_1_6', '_:Y_1_5'], ( ''('_:X_1_6', '_:Y_1_5'), - ''([], + ''([], ''('_:X_1_6', '') ) ) ). -''(['_:X_1_7', '_:Y_1_6'], +''(['_:X_1_7', '_:Y_1_6'], ( ''('_:X_1_7', '_:Y_1_6'), - ''([], + ''([], ''('_:Y_1_6', '') ) ) ). -''(['_:X_1_8', '_:Y_1_7'], +''(['_:X_1_8', '_:Y_1_7'], ( ''('_:X_1_8', '_:Y_1_7'), - ''([], + ''([], ''('_:X_1_8', '') ) ) ). -''(['_:X_1_9'], +''(['_:X_1_9'], ( ''('_:X_1_9', ''), - ''([], + ''([], ''('_:X_1_9', '') ) ) ). -''(['_:X_1_10'], +''(['_:X_1_10'], ( ''('_:X_1_10', ''), - ''([], + ''([], ''('_:X_1_10', '') ) ) ). -''(['_:X_1_11'], +''(['_:X_1_11'], ( ''('_:X_1_11', ''), - ''([], + ''([], ''('_:X_1_11', '') ) ) ). -''(['_:X_1_12'], +''(['_:X_1_12'], ( ''('_:X_1_12', ''), - ''([], + ''([], ''('_:X_1_12', '') ) ) ). -''(['_:X_1_13', '_:Y_1_8'], +''(['_:X_1_13', '_:Y_1_8'], ( ''('_:X_1_13', ''), - ''([], + ''([], ( ''('_:X_1_13', '_:Y_1_8'), ''('_:Y_1_8', '') @@ -106203,64 +106203,64 @@ ) ). -''(['_:X_1_14'], +''(['_:X_1_14'], ( ''('_:X_1_14', ''), - ''([], + ''([], ''('_:X_1_14', '') ) ) ). -''(['_:X_1_15'], +''(['_:X_1_15'], ( ''('_:X_1_15', ''), - ''([], + ''([], ''('_:X_1_15', '') ) ) ). -''(['_:X_1_16'], +''(['_:X_1_16'], ( ''('_:X_1_16', ''), - ''([], + ''([], ''('_:X_1_16', '') ) ) ). -''(['_:X_1_17'], +''(['_:X_1_17'], ( ''('_:X_1_17', ''), - ''([], + ''([], ''('_:X_1_17', '') ) ) ). -''(['_:X_1_18'], +''(['_:X_1_18'], ( ''('_:X_1_18', ''), - ''([], + ''([], ''('_:X_1_18', '') ) ) ). -''(['_:X_1_19'], +''(['_:X_1_19'], ( ''('_:X_1_19', ''), - ''([], + ''([], ''('_:X_1_19', '') ) ) ). -''(['_:X_1_20', '_:Y_1_9'], +''(['_:X_1_20', '_:Y_1_9'], ( ''('_:X_1_20', ''), - ''([], + ''([], ( ''('_:X_1_20', '_:Y_1_9'), ''('_:Y_1_9', '') @@ -106269,55 +106269,55 @@ ) ). -''(['_:X_1_21'], +''(['_:X_1_21'], ( ''('_:X_1_21', ''), - ''([], + ''([], ''('_:X_1_21', '') ) ) ). -''(['_:X_1_22', '_:Y_1_10'], +''(['_:X_1_22', '_:Y_1_10'], ( ''('_:X_1_22', '_:Y_1_10'), - ''([], + ''([], ''('_:X_1_22', '') ) ) ). -''(['_:X_1_23', '_:Y_1_11'], +''(['_:X_1_23', '_:Y_1_11'], ( ''('_:X_1_23', '_:Y_1_11'), - ''([], + ''([], ''('_:Y_1_11', '') ) ) ). -''(['_:X_1_24', '_:Y_1_12'], +''(['_:X_1_24', '_:Y_1_12'], ( ''('_:Y_1_12', '_:X_1_24'), - ''([], + ''([], ''('_:X_1_24', '_:Y_1_12') ) ) ). -''(['_:X_1_25'], +''(['_:X_1_25'], ( ''('_:X_1_25', ''), - ''([], + ''([], ''('_:X_1_25', '') ) ) ). -''(['_:X_1_26', '_:Y_1_13'], +''(['_:X_1_26', '_:Y_1_13'], ( ''('_:X_1_26', ''), - ''([], + ''([], ( ''('_:X_1_26', '_:Y_1_13'), ''('_:Y_1_13', '') @@ -106326,64 +106326,64 @@ ) ). -''(['_:X_1_27'], +''(['_:X_1_27'], ( ''('_:X_1_27', ''), - ''([], + ''([], ''('_:X_1_27', '') ) ) ). -''(['_:X_1_28', '_:Y_1_14'], +''(['_:X_1_28', '_:Y_1_14'], ( ''('_:X_1_28', '_:Y_1_14'), - ''([], + ''([], ''('_:X_1_28', '') ) ) ). -''(['_:X_1_29', '_:Y_1_15'], +''(['_:X_1_29', '_:Y_1_15'], ( ''('_:X_1_29', '_:Y_1_15'), - ''([], + ''([], ''('_:Y_1_15', '') ) ) ). -''(['_:X_1_30', '_:Y_1_16'], +''(['_:X_1_30', '_:Y_1_16'], ( ''('_:X_1_30', '_:Y_1_16'), - ''([], + ''([], ''('_:X_1_30', '_:Y_1_16') ) ) ). -''(['_:X_1_31', '_:Y_1_17'], +''(['_:X_1_31', '_:Y_1_17'], ( ''('_:X_1_31', '_:Y_1_17'), - ''([], + ''([], ''('_:X_1_31', '') ) ) ). -''(['_:X_1_32'], +''(['_:X_1_32'], ( ''('_:X_1_32', ''), - ''([], + ''([], ''('_:X_1_32', '') ) ) ). -''(['_:X_1_33', '_:Y_1_18'], +''(['_:X_1_33', '_:Y_1_18'], ( ''('_:X_1_33', ''), - ''([], + ''([], ( ''('_:X_1_33', '_:Y_1_18'), ''('_:Y_1_18', '') @@ -106392,46 +106392,46 @@ ) ). -''(['_:X_1_34'], +''(['_:X_1_34'], ( ''('_:X_1_34', ''), - ''([], + ''([], ''('_:X_1_34', '') ) ) ). -''(['_:X_1_35'], +''(['_:X_1_35'], ( ''('_:X_1_35', ''), - ''([], + ''([], ''('_:X_1_35', '') ) ) ). -''(['_:X_1_36'], +''(['_:X_1_36'], ( ''('_:X_1_36', ''), - ''([], + ''([], ''('_:X_1_36', '') ) ) ). -''(['_:X_1_37'], +''(['_:X_1_37'], ( ''('_:X_1_37', ''), - ''([], + ''([], ''('_:X_1_37', '') ) ) ). -''(['_:X_1_38', '_:Y_1_19'], +''(['_:X_1_38', '_:Y_1_19'], ( ''('_:X_1_38', ''), - ''([], + ''([], ( ''('_:X_1_38', '_:Y_1_19'), ''('_:Y_1_19', '') @@ -106440,336 +106440,336 @@ ) ). -''(['_:X_1_39', '_:Y_1_20'], +''(['_:X_1_39', '_:Y_1_20'], ( ''('_:X_1_39', '_:Y_1_20'), - ''([], + ''([], ''('_:Y_1_20', '') ) ) ). -''(['_:X_1_40', '_:Y_1_21'], +''(['_:X_1_40', '_:Y_1_21'], ( ''('_:X_1_40', '_:Y_1_21'), - ''([], + ''([], ''('_:X_1_40', '') ) ) ). -''(['_:X_1_41', '_:Y_1_22'], +''(['_:X_1_41', '_:Y_1_22'], ( ''('_:Y_1_22', '_:X_1_41'), - ''([], + ''([], ''('_:X_1_41', '_:Y_1_22') ) ) ). -''(['_:X_1_42', '_:Y_1_23'], +''(['_:X_1_42', '_:Y_1_23'], ( ''('_:X_1_42', '_:Y_1_23'), ''('_:Y_1_23', ''), - ''([], + ''([], ''('_:X_1_42', '') ) ) ). -''(['_:X_1_43', '_:Y_1_24'], +''(['_:X_1_43', '_:Y_1_24'], ( ''('_:X_1_43', '_:Y_1_24'), - ''([], + ''([], ''('_:X_1_43', '_:Y_1_24') ) ) ). -''(['_:X_1_44'], +''(['_:X_1_44'], ( ''('_:X_1_44', ''), - ''([], + ''([], ''('_:X_1_44', '') ) ) ). -''(['_:X_1_45'], +''(['_:X_1_45'], ( ''('_:X_1_45', ''), - ''([], + ''([], ''('_:X_1_45', '') ) ) ). -''(['_:X_1_46'], +''(['_:X_1_46'], ( ''('_:X_1_46', ''), - ''([], + ''([], ''('_:X_1_46', '') ) ) ). -''(['_:X_1_47', '_:Y_1_25'], +''(['_:X_1_47', '_:Y_1_25'], ( ''('_:X_1_47', '_:Y_1_25'), - ''([], + ''([], ''('_:Y_1_25', '') ) ) ). -''(['_:X_1_48', '_:Y_1_26'], +''(['_:X_1_48', '_:Y_1_26'], ( ''('_:X_1_48', '_:Y_1_26'), - ''([], + ''([], ''('_:X_1_48', '') ) ) ). -''(['_:X_1_49'], +''(['_:X_1_49'], ( ''('_:X_1_49', ''), - ''([], + ''([], ''('_:X_1_49', '') ) ) ). -''(['_:X_1_50', '_:Y_1_27'], +''(['_:X_1_50', '_:Y_1_27'], ( ''('_:X_1_50', '_:Y_1_27'), - ''([], + ''([], ''('_:X_1_50', '') ) ) ). -''(['_:X_1_51', '_:Y_1_28'], +''(['_:X_1_51', '_:Y_1_28'], ( ''('_:X_1_51', '_:Y_1_28'), - ''([], + ''([], ''('_:Y_1_28', '') ) ) ). -''(['_:X_1_52', '_:Y_1_29'], +''(['_:X_1_52', '_:Y_1_29'], ( ''('_:X_1_52', '_:Y_1_29'), - ''([], + ''([], ''('_:X_1_52', '_:Y_1_29') ) ) ). -''(['_:X_1_53', '_:Y_1_30'], +''(['_:X_1_53', '_:Y_1_30'], ( ''('_:X_1_53', '_:Y_1_30'), - ''([], + ''([], ''('_:X_1_53', '') ) ) ). -''(['_:X_1_54', '_:Y_1_31'], +''(['_:X_1_54', '_:Y_1_31'], ( ''('_:X_1_54', '_:Y_1_31'), - ''([], + ''([], ''('_:Y_1_31', '') ) ) ). -''(['_:X_1_55', '_:Y_1_32'], +''(['_:X_1_55', '_:Y_1_32'], ( ''('_:Y_1_32', '_:X_1_55'), - ''([], + ''([], ''('_:X_1_55', '_:Y_1_32') ) ) ). -''(['_:X_1_56', '_:Y_1_33'], +''(['_:X_1_56', '_:Y_1_33'], ( ''('_:Y_1_33', '_:X_1_56'), - ''([], + ''([], ''('_:X_1_56', '_:Y_1_33') ) ) ). -''(['_:X_1_57', '_:Y_1_34'], +''(['_:X_1_57', '_:Y_1_34'], ( ''('_:X_1_57', '_:Y_1_34'), - ''([], + ''([], ''('_:X_1_57', '') ) ) ). -''(['_:X_1_58', '_:Y_1_35'], +''(['_:X_1_58', '_:Y_1_35'], ( ''('_:X_1_58', '_:Y_1_35'), - ''([], + ''([], ''('_:Y_1_35', '') ) ) ). -''(['_:X_1_59', '_:Y_1_36'], +''(['_:X_1_59', '_:Y_1_36'], ( ''('_:X_1_59', ''), ''('_:X_1_59', '_:Y_1_36'), ''('_:Y_1_36', ''), - ''([], + ''([], ''('_:X_1_59', '') ) ) ). -''(['_:X_1_60', '_:Y_1_37'], +''(['_:X_1_60', '_:Y_1_37'], ( ''('_:X_1_60', ''), ''('_:X_1_60', '_:Y_1_37'), ''('_:Y_1_37', ''), - ''([], + ''([], ''('_:X_1_60', '') ) ) ). -''(['_:X_1_61', '_:Y_1_38'], +''(['_:X_1_61', '_:Y_1_38'], ( ''('_:X_1_61', ''), ''('_:X_1_61', '_:Y_1_38'), ''('_:Y_1_38', ''), - ''([], + ''([], ''('_:X_1_61', '') ) ) ). -''(['_:X_1_62', '_:Y_1_39'], +''(['_:X_1_62', '_:Y_1_39'], ( ''('_:X_1_62', ''), ''('_:X_1_62', '_:Y_1_39'), ''('_:Y_1_39', ''), - ''([], + ''([], ''('_:X_1_62', '') ) ) ). -''(['_:X_1_63', '_:Y_1_40'], +''(['_:X_1_63', '_:Y_1_40'], ( ''('_:X_1_63', ''), ''('_:X_1_63', '_:Y_1_40'), ''('_:Y_1_40', ''), - ''([], + ''([], ''('_:X_1_63', '') ) ) ). -''(['_:X_1_64'], +''(['_:X_1_64'], ( ''('_:X_1_64', ''), - ''([], + ''([], ''('_:X_1_64', '') ) ) ). -''(['_:X_1_65'], +''(['_:X_1_65'], ( ''('_:X_1_65', ''), - ''([], + ''([], ''('_:X_1_65', '') ) ) ). -''(['_:X_1_66'], +''(['_:X_1_66'], ( ''('_:X_1_66', ''), - ''([], + ''([], ''('_:X_1_66', '') ) ) ). -''(['_:X_1_67', '_:Y_1_41'], +''(['_:X_1_67', '_:Y_1_41'], ( ''('_:X_1_67', '_:Y_1_41'), - ''([], + ''([], ''('_:Y_1_41', '') ) ) ). -''(['_:X_1_68', '_:Y_1_42'], +''(['_:X_1_68', '_:Y_1_42'], ( ''('_:X_1_68', '_:Y_1_42'), - ''([], + ''([], ''('_:X_1_68', '') ) ) ). -''(['_:X_1_69', '_:Y_1_43'], +''(['_:X_1_69', '_:Y_1_43'], ( ''('_:X_1_69', '_:Y_1_43'), - ''([], + ''([], ''('_:X_1_69', '') ) ) ). -''(['_:X_1_70', '_:Y_1_44'], +''(['_:X_1_70', '_:Y_1_44'], ( ''('_:X_1_70', '_:Y_1_44'), - ''([], + ''([], ''('_:X_1_70', '') ) ) ). -''(['_:X_1_71', '_:Y_1_45'], +''(['_:X_1_71', '_:Y_1_45'], ( ''('_:X_1_71', '_:Y_1_45'), - ''([], + ''([], ''('_:Y_1_45', '') ) ) ). -''(['_:X_1_72'], +''(['_:X_1_72'], ( ''('_:X_1_72', ''), - ''([], + ''([], ''('_:X_1_72', '') ) ) ). -''(['_:X_1_73'], +''(['_:X_1_73'], ( ''('_:X_1_73', ''), - ''([], + ''([], ''('_:X_1_73', '') ) ) ). -''(['_:X_1_74', '_:Y_1_46'], +''(['_:X_1_74', '_:Y_1_46'], ( ''('_:X_1_74', ''), - ''([], + ''([], ( ''('_:X_1_74', '_:Y_1_46'), ''('_:Y_1_46', '') @@ -106778,91 +106778,91 @@ ) ). -''(['_:X_1_75'], +''(['_:X_1_75'], ( ''('_:X_1_75', ''), - ''([], + ''([], ''('_:X_1_75', '') ) ) ). -''(['_:X_1_76', '_:Y_1_47'], +''(['_:X_1_76', '_:Y_1_47'], ( ''('_:X_1_76', '_:Y_1_47'), - ''([], + ''([], ''('_:Y_1_47', '') ) ) ). -''(['_:X_1_77', '_:Y_1_48'], +''(['_:X_1_77', '_:Y_1_48'], ( ''('_:X_1_77', '_:Y_1_48'), - ''([], + ''([], ''('_:X_1_77', '') ) ) ). -''(['_:X_1_78'], +''(['_:X_1_78'], ( ''('_:X_1_78', ''), - ''([], + ''([], ''('_:X_1_78', '') ) ) ). -''(['_:X_1_79', '_:Y_1_49'], +''(['_:X_1_79', '_:Y_1_49'], ( ''('_:X_1_79', '_:Y_1_49'), - ''([], + ''([], ''('_:Y_1_49', '') ) ) ). -''(['_:X_1_80', '_:Y_1_50'], +''(['_:X_1_80', '_:Y_1_50'], ( ''('_:X_1_80', '_:Y_1_50'), - ''([], + ''([], ''('_:X_1_80', '') ) ) ). -''(['_:X_1_81', '_:Y_1_51'], +''(['_:X_1_81', '_:Y_1_51'], ( ''('_:X_1_81', '_:Y_1_51'), - ''([], + ''([], ''('_:X_1_81', '') ) ) ). -''(['_:X_1_82'], +''(['_:X_1_82'], ( ''('_:X_1_82', ''), - ''([], + ''([], ''('_:X_1_82', '') ) ) ). -''(['_:X_1_83'], +''(['_:X_1_83'], ( ''('_:X_1_83', ''), - ''([], + ''([], ''('_:X_1_83', '') ) ) ). -''(['_:X_1_84', '_:Y_1_52'], +''(['_:X_1_84', '_:Y_1_52'], ( ''('_:X_1_84', ''), - ''([], + ''([], ( ''('_:X_1_84', '_:Y_1_52'), ''('_:Y_1_52', '') @@ -106871,74 +106871,74 @@ ) ). -''(['_:X_1_85', '_:Y_1_53'], +''(['_:X_1_85', '_:Y_1_53'], ( ''('_:X_1_85', '_:Y_1_53'), - ''([], + ''([], ''('_:X_1_85', '') ) ) ). -''(['_:X_1_86', '_:Y_1_54'], +''(['_:X_1_86', '_:Y_1_54'], ( ''('_:X_1_86', '_:Y_1_54'), - ''([], + ''([], ''('_:Y_1_54', '') ) ) ). -''(['_:X_1_87', '_:Y_1_55', '_:Z_1_1'], +''(['_:X_1_87', '_:Y_1_55', '_:Z_1_1'], ( ''('_:X_1_87', '_:Y_1_55'), ''('_:Y_1_55', '_:Z_1_1'), - ''([], + ''([], ''('_:X_1_87', '_:Z_1_1') ) ) ). -''(['_:X_1_88'], +''(['_:X_1_88'], ( ''('_:X_1_88', ''), - ''([], + ''([], ''('_:X_1_88', '') ) ) ). -''(['_:X_1_89', '_:Y_1_56'], +''(['_:X_1_89', '_:Y_1_56'], ( ''('_:X_1_89', '_:Y_1_56'), - ''([], + ''([], ''('_:Y_1_56', '') ) ) ). -''(['_:X_1_90', '_:Y_1_57'], +''(['_:X_1_90', '_:Y_1_57'], ( ''('_:X_1_90', '_:Y_1_57'), - ''([], + ''([], ''('_:X_1_90', '') ) ) ). -''(['_:X_1_91'], +''(['_:X_1_91'], ( ''('_:X_1_91', ''), - ''([], + ''([], ''('_:X_1_91', '') ) ) ). -''(['_:X_1_92', '_:Y_1_58'], +''(['_:X_1_92', '_:Y_1_58'], ( ''('_:X_1_92', ''), - ''([], + ''([], ( ''('_:X_1_92', '_:Y_1_58'), ''('_:Y_1_58', '') @@ -106947,137 +106947,137 @@ ) ). -''(['_:X_1_93', '_:Y_1_59'], +''(['_:X_1_93', '_:Y_1_59'], ( ''('_:X_1_93', '_:Y_1_59'), - ''([], + ''([], ''('_:Y_1_59', '') ) ) ). -''(['_:X_1_94', '_:Y_1_60'], +''(['_:X_1_94', '_:Y_1_60'], ( ''('_:X_1_94', '_:Y_1_60'), - ''([], + ''([], ''('_:X_1_94', '') ) ) ). -''(['_:X_1_95'], +''(['_:X_1_95'], ( ''('_:X_1_95', ''), - ''([], + ''([], ''('_:X_1_95', '') ) ) ). -''(['_:X_1_96', '_:Y_1_61'], +''(['_:X_1_96', '_:Y_1_61'], ( ''('_:X_1_96', '_:Y_1_61'), - ''([], + ''([], ''('_:X_1_96', '') ) ) ). -''(['_:X_1_97', '_:Y_1_62'], +''(['_:X_1_97', '_:Y_1_62'], ( ''('_:X_1_97', '_:Y_1_62'), - ''([], + ''([], ''('_:X_1_97', '') ) ) ). -''(['_:X_1_98', '_:Y_1_63'], +''(['_:X_1_98', '_:Y_1_63'], ( ''('_:X_1_98', '_:Y_1_63'), - ''([], + ''([], ''('_:X_1_98', '') ) ) ). -''(['_:X_1_99', '_:Y_1_64'], +''(['_:X_1_99', '_:Y_1_64'], ( ''('_:X_1_99', '_:Y_1_64'), - ''([], + ''([], ''('_:X_1_99', '') ) ) ). -''(['_:X_1_100', '_:Y_1_65'], +''(['_:X_1_100', '_:Y_1_65'], ( ''('_:X_1_100', '_:Y_1_65'), - ''([], + ''([], ''('_:Y_1_65', '') ) ) ). -''(['_:X_1_101', '_:Y_1_66'], +''(['_:X_1_101', '_:Y_1_66'], ( ''('_:X_1_101', '_:Y_1_66'), - ''([], + ''([], ''('_:X_1_101', '_:Y_1_66') ) ) ). -''(['_:X_1_102'], +''(['_:X_1_102'], ( ''('_:X_1_102', ''), - ''([], + ''([], ''('_:X_1_102', '') ) ) ). -''(['_:X_1_103'], +''(['_:X_1_103'], ( ''('_:X_1_103', ''), - ''([], + ''([], ''('_:X_1_103', '') ) ) ). -''(['_:X_1_104'], +''(['_:X_1_104'], ( ''('_:X_1_104', ''), - ''([], + ''([], ''('_:X_1_104', '') ) ) ). -''(['_:X_1_105'], +''(['_:X_1_105'], ( ''('_:X_1_105', ''), - ''([], + ''([], ''('_:X_1_105', '') ) ) ). -''(['_:X_1_106', '_:Y_1_67'], +''(['_:X_1_106', '_:Y_1_67'], ( ''('_:X_1_106', '_:Y_1_67'), - ''([], + ''([], ''('_:X_1_106', '_:Y_1_67') ) ) ). % questions -''(['_:X_1_107'], +''(['_:X_1_107'], ( ''('_:X_1_107', ''), - ''(['_:X_1_107'], + ''(['_:X_1_107'], ''('_:X_1_107', '') ) ) diff --git a/rdfsurfaces/peano/peano.s b/rdfsurfaces/peano/peano.s index b22ff29..cc1946c 100644 --- a/rdfsurfaces/peano/peano.s +++ b/rdfsurfaces/peano/peano.s @@ -1,17 +1,17 @@ % Peano arithmetic % add -''(['_:A'], +''(['_:A'], ( - ''([], + ''([], ''(['_:A', 0], '_:A') ) ) ). -''(['_:A', '_:B', '_:C'], +''(['_:A', '_:B', '_:C'], ( - ''([], + ''([], ''(['_:A', ['', '_:B']], ['', '_:C']) ), ''(['_:A', '_:B'], '_:C') @@ -19,17 +19,17 @@ ). % multiply -''(['_:A'], +''(['_:A'], ( - ''([], + ''([], ''(['_:A', 0], 0) ) ) ). -''(['_:A', '_:B', '_:C', '_:D'], +''(['_:A', '_:B', '_:C', '_:D'], ( - ''([], + ''([], ''(['_:A', ['', '_:B']], '_:C') ), ''(['_:A', '_:B'], '_:D'), @@ -38,26 +38,26 @@ ). % factorial -''(['_:A', '_:B'], +''(['_:A', '_:B'], ( - ''([], + ''([], ''('_:A', '_:B') ), ''(['_:A', ['', 0]], '_:B') ) ). -''(['_:A'], +''(['_:A'], ( - ''([], + ''([], ''([0, '_:A'], '_:A') ) ) ). -''(['_:A', '_:B', '_:C', '_:D'], +''(['_:A', '_:B', '_:C', '_:D'], ( - ''([], + ''([], ''([['', '_:A'], '_:B'], '_:C') ), ''(['_:B', ['', '_:A']], '_:D'), @@ -66,12 +66,12 @@ ). % questions -''(['_:A', '_:B', '_:C'], +''(['_:A', '_:B', '_:C'], ( ''([['', 0], ['', ['', 0]]], '_:A'), ''(['_:A', ['', ['', 0]]], '_:B'), ''('_:B', '_:C'), - ''([], + ''([], ''('', '_:C') ) ) diff --git a/rdfsurfaces/pi/pi.s b/rdfsurfaces/pi/pi.s index c6d81a9..b1c1cd3 100644 --- a/rdfsurfaces/pi/pi.s +++ b/rdfsurfaces/pi/pi.s @@ -1,7 +1,7 @@ % Calculate pi using Nilakantha series -''(['_:N', '_:Pi', '_:P', '_:B'], +''(['_:N', '_:Pi', '_:P', '_:B'], ( - ''([], + ''([], ''(['_:N', '_:Pi'], true) ), ''([1, '_:N', 0, '_:P', 1], true), @@ -10,17 +10,17 @@ ) ). -''(['_:N', '_:P', '_:S'], +''(['_:N', '_:P', '_:S'], ( - ''([], + ''([], ''(['_:N', '_:N', '_:P', '_:P', '_:S'], true) ) ) ). -''(['_:K', '_:N', '_:P0', '_:P', '_:S', '_:K1', '_:K2', '_:P1', '_:S1', '_:B2', '_:B3', '_:B4', '_:B5'], +''(['_:K', '_:N', '_:P0', '_:P', '_:S', '_:K1', '_:K2', '_:P1', '_:S1', '_:B2', '_:B3', '_:B4', '_:B5'], ( - ''([], + ''([], ''(['_:K', '_:N', '_:P0', '_:P', '_:S'], true) ), ''('_:K', '_:N'), @@ -37,10 +37,10 @@ ). % questions -''(['_:Pi'], +''(['_:Pi'], ( ''([1000, '_:Pi'], true), - ''([], + ''([], ''([1000, '_:Pi'], true) ) ) diff --git a/rdfsurfaces/policy/policy.s b/rdfsurfaces/policy/policy.s index e6cc7e8..97e68ae 100644 --- a/rdfsurfaces/policy/policy.s +++ b/rdfsurfaces/policy/policy.s @@ -8,18 +8,18 @@ ''([], ( % mapping foaf:Person and vcard:Individual on each other - ''(['_:S'], + ''(['_:S'], ( ''('_:S', ''), - ''([], + ''([], ''('_:S', '') ) ) ), - ''(['_:S'], + ''(['_:S'], ( ''('_:S', ''), - ''([], + ''([], ''('_:S', '') ) ) @@ -28,18 +28,18 @@ ). % enact -''(['_:S'], +''(['_:S'], ( ''([], '_:S'), - ''([], '_:S') + ''([], '_:S') ) ). % questions -''(['_:A', '_:B'], +''(['_:A', '_:B'], ( ''('_:A', '_:B'), - ''([], + ''([], ''('_:A', '_:B') ) ) diff --git a/rdfsurfaces/socrates/socrates.s b/rdfsurfaces/socrates/socrates.s index e45b155..387398c 100644 --- a/rdfsurfaces/socrates/socrates.s +++ b/rdfsurfaces/socrates/socrates.s @@ -8,21 +8,21 @@ ''('', ''). % rdfs subclass -''(['_:A', '_:B', '_:S'], +''(['_:A', '_:B', '_:S'], ( ''('_:A', '_:B'), ''('_:S', '_:A'), - ''([], + ''([], ''('_:S', '_:B') ) ) ). % questions -''(['_:P', '_:S', '_:O'], +''(['_:P', '_:S', '_:O'], ( '_:P'('_:S', '_:O'), - ''(['_:P', '_:S', '_:O'], + ''(['_:P', '_:S', '_:O'], '_:P'('_:S', '_:O') ) ) diff --git a/rdfsurfaces/turing/turing.s b/rdfsurfaces/turing/turing.s index 3ca711b..afac03b 100644 --- a/rdfsurfaces/turing/turing.s +++ b/rdfsurfaces/turing/turing.s @@ -1,9 +1,9 @@ -:- discontiguous(''/2). +:- discontiguous(''/2). % interpreter for Univeral Turing Machine -''(['_:OutTape', '_:Machine', '_:I'], +''(['_:OutTape', '_:Machine', '_:I'], ( - ''([], + ''([], ''([], '_:OutTape') ), ''('_:Machine', '_:I'), @@ -11,9 +11,9 @@ ) ). -''(['_:List', '_:OutTape', '_:Head', '_:Tail', '_:Machine', '_:I'], +''(['_:List', '_:OutTape', '_:Head', '_:Tail', '_:Machine', '_:I'], ( - ''([], + ''([], ''('_:List', '_:OutTape') ), ''('_:List', ['_:Head', '_:Tail']), @@ -22,9 +22,9 @@ ) ). -''(['_:State', '_:Left', '_:Cell', '_:Right', '_:OutTape', '_:Write', '_:Move', '_:Next', '_:A', '_:B', '_:C'], +''(['_:State', '_:Left', '_:Cell', '_:Right', '_:OutTape', '_:Write', '_:Move', '_:Next', '_:A', '_:B', '_:C'], ( - ''([], + ''([], ''(['_:State', '_:Left', '_:Cell', '_:Right'], '_:OutTape') ), ''(['_:State', '_:Cell', '_:Write', '_:Move'], '_:Next'), @@ -33,9 +33,9 @@ ) ). -''(['_:Left', '_:Cell', '_:Right', '_:OutTape', '_:R', '_:List'], +''(['_:Left', '_:Cell', '_:Right', '_:OutTape', '_:R', '_:List'], ( - ''([], + ''([], ''(['', '_:Left', '_:Cell', '_:Right'],'_:OutTape') ), ''('_:Left', '_:R'), @@ -44,27 +44,27 @@ ) ). -''(['_:State', '_:Left', '_:Cell', '_:Right', '_:OutTape'], +''(['_:State', '_:Left', '_:Cell', '_:Right', '_:OutTape'], ( - ''([], + ''([], ''(['_:State', '_:Left', '_:Cell', '_:Right'], '_:OutTape') ), ''(['_:State', '_:Left', '_:Cell', '_:Right'], '_:OutTape') ) ). -''(['_:Cell', '_:Right', '_:L'], +''(['_:Cell', '_:Right', '_:L'], ( - ''([], + ''([], ''(['', [], '_:Cell', '_:Right', [], #, '_:L'], true) ), ''('_:L', ['_:Cell', '_:Right']) ) ). -''(['_:List', '_:Cell', '_:Right', '_:Tail', '_:Head', '_:L'], +''(['_:List', '_:Cell', '_:Right', '_:Tail', '_:Head', '_:L'], ( - ''([], + ''([], ''(['', '_:List', '_:Cell', '_:Right', '_:Tail', '_:Head', '_:L'], true) ), ''('_:List', ['_:Head', '_:Tail']), @@ -72,26 +72,26 @@ ) ). -''(['_:Left', '_:Cell', '_:Right'], +''(['_:Left', '_:Cell', '_:Right'], ( - ''([], + ''([], ''(['', '_:Left', '_:Cell', '_:Right', '_:Left', '_:Cell', '_:Right'], true) ) ) ). -''(['_:Left', '_:Cell', '_:L'], +''(['_:Left', '_:Cell', '_:L'], ( - ''([], + ''([], ''(['', '_:Left', '_:Cell', [], '_:L', #, []], true) ), ''('_:L', ['_:Cell', '_:Left']) ) ). -''(['_:Left', '_:Cell', '_:List', '_:L', '_:Head', '_:Tail'], +''(['_:Left', '_:Cell', '_:List', '_:L', '_:Head', '_:Tail'], ( - ''([], + ''([], ''(['', '_:Left', '_:Cell', '_:List', '_:L', '_:Head', '_:Tail'], true) ), ''('_:List', ['_:Head', '_:Tail']), @@ -99,17 +99,17 @@ ) ). -''([], +''([], ( - ''([], + ''([], ''([], []) ) ) ). -''(['_:List', '_:Reverse', '_:Head', '_:Tail', '_:R'], +''(['_:List', '_:Reverse', '_:Head', '_:Tail', '_:R'], ( - ''([], + ''([], ''('_:List', '_:Reverse') ), ''('_:List', ['_:Head', '_:Tail']), @@ -129,37 +129,37 @@ ''([1, #, 1, ''], ''). % questions -''(['_:A'], +''(['_:A'], ( ''([1, 0, 1, 0, 0, 1], '_:A'), - ''([], + ''([], ''([1, 0, 1, 0, 0, 1], '_:A') ) ) ). -''(['_:A'], +''(['_:A'], ( ''([1, 0, 1, 1, 1, 1], '_:A'), - ''([], + ''([], ''([1, 0, 1, 1, 1, 1], '_:A') ) ) ). -''(['_:A'], +''(['_:A'], ( ''([1, 1, 1, 1, 1, 1], '_:A'), - ''([], + ''([], ''([1, 1, 1, 1, 1, 1], '_:A') ) ) ). -''(['_:A'], +''(['_:A'], ( ''([], '_:A'), - ''([], + ''([], ''([], '_:A') ) ) diff --git a/rdfsurfaces/universal/universal.s b/rdfsurfaces/universal/universal.s index e2502ea..8b3f752 100644 --- a/rdfsurfaces/universal/universal.s +++ b/rdfsurfaces/universal/universal.s @@ -1,7 +1,7 @@ % everybody loves somebody who is lonely -''(['_:A'], +''(['_:A'], ( - ''(['_:B'], + ''(['_:B'], ( ''('_:A','_:B'), ''('_:B','') @@ -11,11 +11,11 @@ ). % questions -''(['_:A'], +''(['_:A'], ( ''('','_:A'), ''('_:A',''), - ''([], + ''([], ''('', true) ) ) diff --git a/rdfsurfaces/witch/witch.s b/rdfsurfaces/witch/witch.s index 5b37103..be1eb0c 100644 --- a/rdfsurfaces/witch/witch.s +++ b/rdfsurfaces/witch/witch.s @@ -10,52 +10,52 @@ ''('', ''). % BURNS(x) /\ WOMAN(x) => WITCH(x) -''(['_:X'], +''(['_:X'], ( ''('_:X', ''), ''('_:X', ''), - ''([], + ''([], ''('_:X', '') ) ) ). % ISMADEOFWOOD(x) => BURNS(x) -''(['_:X'], +''(['_:X'], ( ''('_:X', ''), - ''([], + ''([], ''('_:X', '') ) ) ). % FLOATS(x) => ISMADEOFWOOD(x) -''(['_:X'], +''(['_:X'], ( ''('_:X', ''), - ''([], + ''([], ''('_:X', '') ) ) ). % FLOATS(x) /\ SAMEWEIGHT(x,y) => FLOATS(y) -''(['_:X', '_:Y'], +''(['_:X', '_:Y'], ( ''('_:X', ''), ''('_:X', '_:Y'), - ''([], + ''([], ''('_:Y', '') ) ) ). % questions -''(['_:X'], +''(['_:X'], ( ''('_:X', ''), - ''([], + ''([], ''('_:X', '') ) ) diff --git a/retina.pl b/retina.pl index 869413f..5645128 100644 --- a/retina.pl +++ b/retina.pl @@ -21,11 +21,11 @@ :- dynamic(recursion/1). :- dynamic(skolem/2). :- dynamic(uuid/2). -:- dynamic(''/2). -:- dynamic(''/2). -:- dynamic(''/2). +:- dynamic(''/2). +:- dynamic(''/2). +:- dynamic(''/2). -version_info('retina v5.4.0 (2024-04-21)'). +version_info('retina v5.5.0 (2024-06-01)'). % run run :- @@ -50,7 +50,7 @@ ; format(user_error, "*** fm=~w~n", [Cnt]), flush_output(user_error) ), - ( ''(_, _) + ( ''(_, _) -> true ; version_info(Version), format("% ~w~n", [Version]) @@ -63,7 +63,7 @@ % becomes % (_A_1) log:nand { .. _A_1 .. } relabel_graffiti :- - P = '', + P = '', A =.. [P, _, _], retract(A), tr_tr(A, B), @@ -83,7 +83,7 @@ tr_tr(A, B) :- A =.. [C|D], tr_tr(D, E), - ( C = '', + ( C = '', E = [[_|_]|_] -> tr_graffiti(A, B) ; B =.. [C|E] @@ -217,18 +217,18 @@ % TripleX % }. % If TripleX is true, we can throw an inference fuse -implies((''(V, G), +implies((''(V, G), list_si(V), makevars(G, H, V), % test if the predicate is true (exists in the database) catch(call(H), _, false), % creating fuse explanation - ( H = ''(_, C) - -> I = ''(_, C) + ( H = ''(_, C) + -> I = ''(_, C) ; I = H ), - ''(_, I) - ), throw(inference_fuse(''(V, G), H))). + ''(_, I) + ), throw(inference_fuse(''(V, G), H))). % - blow inference fuse (negative triple) % Given: @@ -236,10 +236,10 @@ % TripleX % }.. % If TripleX is true, we can throw an inference fuse -implies((''(A, T), +implies((''(A, T), % test if the predicate is true (exists in the database) catch(call(T), _, false) - ), throw(inference_fuse(''(A, T), T))). + ), throw(inference_fuse(''(A, T), T))). % - simplify graffiti % Remove unused graffiti nodes. @@ -251,7 +251,7 @@ % (_:A) log:nand { % _:A a :X . % } -implies((''(V, G), +implies((''(V, G), list_si(V), findvars(G, U), findall(M, @@ -261,7 +261,7 @@ W ), W \= V - ), ''(W, G)). + ), ''(W, G)). % - simplify negative surfaces % Given: @@ -278,14 +278,14 @@ % TripleX % TripleY % } -implies((''(V, G), +implies((''(V, G), list_si(V), conj_list(G, L), list_to_set(L, B), - select(''(Z, H), B, K), + select(''(Z, H), B, K), conj_list(H, M), list_to_set(M, T), - select(''(W, O), T, N), + select(''(W, O), T, N), list_si(W), ( conj_list(O, D), append(K, D, E), @@ -293,39 +293,39 @@ ; length(K, I), I > 1, conj_list(F, N), - conj_list(C, [''([], F)|K]) + conj_list(C, [''([], F)|K]) ), append([V, Z, W], U) - ), ''(U, C)). + ), ''(U, C)). % - resolve negative surfaces -implies((''(V, G), +implies((''(V, G), list_si(V), conj_list(G, L), list_to_set(L, B), - \+member(''(_, _), B), - \+member(''(_, _), B), + \+member(''(_, _), B), + \+member(''(_, _), B), findall(1, - ( member(''(_, _), B) + ( member(''(_, _), B) ), O ), length(O, E), length(B, D), memberchk(E, [0, 2, D]), - ''(W, F), + ''(W, F), list_si(W), conj_list(F, K), list_to_set(K, N), - \+member(''(_, _), N), - \+member(''(_, _), N), + \+member(''(_, _), N), + \+member(''(_, _), N), length(N, 2), makevars(N, J, W), - select(''(U, C), J, [P]), + select(''(U, C), J, [P]), list_si(U), - ( select(''(Z, Q), B, A), + ( select(''(Z, Q), B, A), list_si(Z), - M = [''(U, C)|A], + M = [''(U, C)|A], conj_list(Q, R), memberchk(P, R) ; select(Q, B, A), @@ -335,17 +335,17 @@ ), list_to_set(M, T), conj_list(H, T), - ground(''(V, H)) - ), ''(V, H)). + ground(''(V, H)) + ), ''(V, H)). % - create forward rule -implies((''(V, G), +implies((''(V, G), list_si(V), conj_list(G, L), list_to_set(L, B), - \+member(''(_, _), B), - \+member(''(_, _), B), - select(''(Z, H), B, K), + \+member(''(_, _), B), + \+member(''(_, _), B), + select(''(Z, H), B, K), list_si(Z), conj_list(R, K), find_graffiti(K, D), @@ -356,13 +356,13 @@ ), implies(Q, I)). % - create contrapositive rule -implies((''(V, G), +implies((''(V, G), list_si(V), conj_list(G, L), list_to_set(L, B), - \+member(''(_, _), B), - \+member(''(_, _), B), - \+member(''(_, _), B), + \+member(''(_, _), B), + \+member(''(_, _), B), + \+member(''(_, _), B), \+member(exopred(_, _, _), B), ( length(B, O), O =< 2 @@ -377,7 +377,7 @@ ), Z ), - E = ''(Z, T), + E = ''(Z, T), find_graffiti([R], D), append(V, D, U), makevars([R, E], [Q, S], U), @@ -386,11 +386,11 @@ ), implies(Q, I)). % - create backward rule -implies((''(V, G), +implies((''(V, G), list_si(V), conj_list(G, L), list_to_set(L, B), - select(''(Z, T), B, K), + select(''(Z, T), B, K), list_si(Z), conj_list(R, K), conjify(R, S), @@ -400,14 +400,14 @@ ), C). % - convert universal statements -implies((''(V, G), +implies((''(V, G), list_si(V), V \= [], conj_list(G, [G]), - ( G = ''(Z, H) + ( G = ''(Z, H) -> true ; Z = [], - H = ''([], G) + H = ''([], G) ), list_si(Z), conj_list(H, B), @@ -423,11 +423,11 @@ ), C). % - create question -implies((''(V, G), +implies((''(V, G), list_si(V), conj_list(G, L), list_to_set(L, B), - select(''(Z, H), B, K), + select(''(Z, H), B, K), list_si(Z), conj_list(P, K), find_graffiti(K, D), @@ -1015,7 +1015,7 @@ % find_graffiti(+Predicate,-GraffitiList) % Find all graffiti declaration in a (nested) surface. -% E.g. find_graffiti(''(['_:A'],''('_:C',2)),X). +% E.g. find_graffiti(''(['_:A'],''('_:C',2)),X). % X = ['_:A']. find_graffiti(A, []) :- atomic(A), @@ -1029,7 +1029,7 @@ append(D, E, C). find_graffiti(A, B) :- A =.. [C, D, E], - C = '', + C = '', list_si(D), !, find_graffiti(E, F),