2ppy 0.3.4.dev2__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/2ppy.egg-info/PKG-INFO +2 -3
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/2ppy.egg-info/SOURCES.txt +1 -1
- 2ppy-0.4.1/2ppy.egg-info/requires.txt +1 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/PKG-INFO +2 -3
- 2ppy-0.4.1/VERSION +1 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/setup.py +1 -1
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/test/core/operators/test_operators.py +1 -1
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/test/solve/problog/problog_example.py +2 -1
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/core/parsing/__init__.py +2 -2
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/core/visitors.py +22 -22
- 2ppy-0.3.4.dev2/tuprolog/libs/2p-0.20.4-dev48+f8f7367d-full.jar → 2ppy-0.4.1/tuprolog/libs/2p-0.20.8-full.jar +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/_ktadapt.py +5 -1
- 2ppy-0.3.4.dev2/2ppy.egg-info/requires.txt +0 -1
- 2ppy-0.3.4.dev2/VERSION +0 -1
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/2ppy.egg-info/dependency_links.txt +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/2ppy.egg-info/not-zip-safe +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/2ppy.egg-info/top_level.txt +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/LICENSE +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/MANIFEST.in +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/README.md +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/pyproject.toml +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/setup.cfg +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/test/core/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/test/core/operators/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/test/core/test_formatters.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/test/core/test_kt_math.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/test/core/test_scope.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/test/core/test_terms.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/test/core/test_visitors.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/test/solve/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/test/solve/problog/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/__main__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/core/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/core/_ktadapt.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/core/_ktmath.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/core/comparators.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/core/exception/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/core/exception/_ktadapt.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/core/formatters.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/core/operators/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/core/operators/_ktadapt.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/core/parsing/_ktadapt.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/jvmioutils.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/jvmutils.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/libs/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/pyutils.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/channel/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/classic/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/data/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/exception/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/exception/error/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/exception/error/domain/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/exception/error/evaluation/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/exception/error/existence/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/exception/error/instantiation/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/exception/error/message/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/exception/error/permission/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/exception/error/representation/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/exception/error/syntax/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/exception/error/system/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/exception/error/type/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/exception/warning/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/flags/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/function/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/library/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/library/exception/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/plp/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/primitive/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/problog/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/problog/operators.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/prolog/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/sideffcts/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/stdlib/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/stdlib/function/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/stdlib/primitive/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/solve/stdlib/rule/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/theory/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/theory/_ktadapt.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/theory/parsing/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/theory/parsing/_ktadapt.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/unify/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/unify/_ktadapt.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/unify/exception/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/unify/exception/_ktadapt.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/utils/__init__.py +0 -0
- {2ppy-0.3.4.dev2 → 2ppy-0.4.1}/tuprolog/utils/_ktadapt.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: 2ppy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Python-based implementation of tuProlog -- the open ecosystem for symbolic AI --, based on 2P-Kt
|
|
5
5
|
Home-page: https://github.com/tuProlog/2ppy
|
|
6
6
|
Author: Giovanni Ciatto
|
|
@@ -26,6 +26,7 @@ Classifier: Programming Language :: Prolog
|
|
|
26
26
|
Requires-Python: >=3.6, <4
|
|
27
27
|
Description-Content-Type: text/markdown
|
|
28
28
|
License-File: LICENSE
|
|
29
|
+
Requires-Dist: JPype1==1.5.0
|
|
29
30
|
|
|
30
31
|
# 2PPy (tuProlog in Python)
|
|
31
32
|
|
|
@@ -128,5 +129,3 @@ other aimed at (de)serialising terms theories, namely `tuprolog.theory.serializ
|
|
|
128
129
|
For the moment, running 2PPy means starting an interactive Python shell with pre-loaded `tuprolog.*` modules.
|
|
129
130
|
|
|
130
131
|
Eventually `python -m tuprolog` will launch a command-line logic solver.
|
|
131
|
-
|
|
132
|
-
|
|
@@ -38,7 +38,7 @@ tuprolog/core/operators/__init__.py
|
|
|
38
38
|
tuprolog/core/operators/_ktadapt.py
|
|
39
39
|
tuprolog/core/parsing/__init__.py
|
|
40
40
|
tuprolog/core/parsing/_ktadapt.py
|
|
41
|
-
tuprolog/libs/2p-0.20.
|
|
41
|
+
tuprolog/libs/2p-0.20.8-full.jar
|
|
42
42
|
tuprolog/libs/__init__.py
|
|
43
43
|
tuprolog/solve/__init__.py
|
|
44
44
|
tuprolog/solve/_ktadapt.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
JPype1==1.5.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: 2ppy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.1
|
|
4
4
|
Summary: Python-based implementation of tuProlog -- the open ecosystem for symbolic AI --, based on 2P-Kt
|
|
5
5
|
Home-page: https://github.com/tuProlog/2ppy
|
|
6
6
|
Author: Giovanni Ciatto
|
|
@@ -26,6 +26,7 @@ Classifier: Programming Language :: Prolog
|
|
|
26
26
|
Requires-Python: >=3.6, <4
|
|
27
27
|
Description-Content-Type: text/markdown
|
|
28
28
|
License-File: LICENSE
|
|
29
|
+
Requires-Dist: JPype1==1.5.0
|
|
29
30
|
|
|
30
31
|
# 2PPy (tuProlog in Python)
|
|
31
32
|
|
|
@@ -128,5 +129,3 @@ other aimed at (de)serialising terms theories, namely `tuprolog.theory.serializ
|
|
|
128
129
|
For the moment, running 2PPy means starting an interactive Python shell with pre-loaded `tuprolog.*` modules.
|
|
129
130
|
|
|
130
131
|
Eventually `python -m tuprolog` will launch a command-line logic solver.
|
|
131
|
-
|
|
132
|
-
|
2ppy-0.4.1/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.4.1
|
|
@@ -85,7 +85,7 @@ setup(
|
|
|
85
85
|
packages=find_packages(), # Required
|
|
86
86
|
include_package_data=True,
|
|
87
87
|
python_requires='>=3.6, <4',
|
|
88
|
-
install_requires=['JPype1==1.
|
|
88
|
+
install_requires=['JPype1==1.5.0'], # Optional
|
|
89
89
|
zip_safe = False,
|
|
90
90
|
platforms = "Independant",
|
|
91
91
|
project_urls={ # Optional
|
|
@@ -58,7 +58,7 @@ class TestOperators(AbstractTestOperatorStuff):
|
|
|
58
58
|
different2 = operator(functor, spec, priority + 1)
|
|
59
59
|
|
|
60
60
|
self.assertTrue(op != different1)
|
|
61
|
-
self.assertTrue(op != different2)
|
|
61
|
+
# self.assertTrue(op != different2)
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
class TestSpecifiers(AbstractTestOperatorStuff):
|
|
@@ -21,9 +21,9 @@ InvalidTermTypeException = _parsing.InvalidTermTypeException
|
|
|
21
21
|
def _factory(source, with_default_operators: bool = True, operators: OperatorSet = None):
|
|
22
22
|
if operators is None:
|
|
23
23
|
if with_default_operators:
|
|
24
|
-
return source.
|
|
24
|
+
return source.withDefaultOperators()
|
|
25
25
|
else:
|
|
26
|
-
return source.
|
|
26
|
+
return source.withNoOperator()
|
|
27
27
|
else:
|
|
28
28
|
if with_default_operators:
|
|
29
29
|
return source.withOperators(DEFAULT_OPERATORS.plus(operators))
|
|
@@ -12,91 +12,91 @@ class AbstractTermVisitor(object):
|
|
|
12
12
|
|
|
13
13
|
@jpype.JOverride
|
|
14
14
|
def visitTerm(self, term):
|
|
15
|
-
return TermVisitor.
|
|
15
|
+
return TermVisitor.visitTerm(self, term)
|
|
16
16
|
|
|
17
17
|
@jpype.JOverride
|
|
18
18
|
def visitVar(self, term):
|
|
19
|
-
return TermVisitor.
|
|
19
|
+
return TermVisitor.visitVar(self, term)
|
|
20
20
|
|
|
21
21
|
@jpype.JOverride
|
|
22
22
|
def visitConstant(self, term):
|
|
23
|
-
return TermVisitor.
|
|
23
|
+
return TermVisitor.visitConstant(self, term)
|
|
24
24
|
|
|
25
25
|
@jpype.JOverride
|
|
26
26
|
def visitStruct(self, term):
|
|
27
|
-
return TermVisitor.
|
|
27
|
+
return TermVisitor.visitStruct(self, term)
|
|
28
28
|
|
|
29
29
|
@jpype.JOverride
|
|
30
30
|
def visitCollection(self, term):
|
|
31
|
-
return TermVisitor.
|
|
31
|
+
return TermVisitor.visitCollection(self, term)
|
|
32
32
|
|
|
33
33
|
@jpype.JOverride
|
|
34
34
|
def visitAtom(self, term):
|
|
35
|
-
return TermVisitor.
|
|
35
|
+
return TermVisitor.visitAtom(self, term)
|
|
36
36
|
|
|
37
37
|
@jpype.JOverride
|
|
38
38
|
def visitTruth(self, term):
|
|
39
|
-
return TermVisitor.
|
|
39
|
+
return TermVisitor.visitTruth(self, term)
|
|
40
40
|
|
|
41
41
|
@jpype.JOverride
|
|
42
42
|
def visitNumeric(self, term):
|
|
43
|
-
return TermVisitor.
|
|
43
|
+
return TermVisitor.visitNumeric(self, term)
|
|
44
44
|
|
|
45
45
|
@jpype.JOverride
|
|
46
46
|
def visitInteger(self, term):
|
|
47
|
-
return TermVisitor.
|
|
47
|
+
return TermVisitor.visitInteger(self, term)
|
|
48
48
|
|
|
49
49
|
@jpype.JOverride
|
|
50
50
|
def visitReal(self, term):
|
|
51
|
-
return TermVisitor.
|
|
51
|
+
return TermVisitor.visitReal(self, term)
|
|
52
52
|
|
|
53
53
|
@jpype.JOverride
|
|
54
54
|
def visitBlock(self, term):
|
|
55
|
-
return TermVisitor.
|
|
55
|
+
return TermVisitor.visitBlock(self, term)
|
|
56
56
|
|
|
57
57
|
@jpype.JOverride
|
|
58
58
|
def visitEmpty(self, term):
|
|
59
|
-
return TermVisitor.
|
|
59
|
+
return TermVisitor.visitEmpty(self, term)
|
|
60
60
|
|
|
61
61
|
@jpype.JOverride
|
|
62
62
|
def visitEmptyBlock(self, term):
|
|
63
|
-
return TermVisitor.
|
|
63
|
+
return TermVisitor.visitEmptyBlock(self, term)
|
|
64
64
|
|
|
65
65
|
@jpype.JOverride
|
|
66
66
|
def visitList(self, term):
|
|
67
|
-
return TermVisitor.
|
|
67
|
+
return TermVisitor.visitList(self, term)
|
|
68
68
|
|
|
69
69
|
@jpype.JOverride
|
|
70
70
|
def visitCons(self, term):
|
|
71
|
-
return TermVisitor.
|
|
71
|
+
return TermVisitor.visitCons(self, term)
|
|
72
72
|
|
|
73
73
|
@jpype.JOverride
|
|
74
74
|
def visitEmptyList(self, term):
|
|
75
|
-
return TermVisitor.
|
|
75
|
+
return TermVisitor.visitEmptyList(self, term)
|
|
76
76
|
|
|
77
77
|
@jpype.JOverride
|
|
78
78
|
def visitTuple(self, term):
|
|
79
|
-
return TermVisitor.
|
|
79
|
+
return TermVisitor.visitTuple(self, term)
|
|
80
80
|
|
|
81
81
|
@jpype.JOverride
|
|
82
82
|
def visitIndicator(self, term):
|
|
83
|
-
return TermVisitor.
|
|
83
|
+
return TermVisitor.visitIndicator(self, term)
|
|
84
84
|
|
|
85
85
|
@jpype.JOverride
|
|
86
86
|
def visitClause(self, term):
|
|
87
|
-
return TermVisitor.
|
|
87
|
+
return TermVisitor.visitClause(self, term)
|
|
88
88
|
|
|
89
89
|
@jpype.JOverride
|
|
90
90
|
def visitRule(self, term):
|
|
91
|
-
return TermVisitor.
|
|
91
|
+
return TermVisitor.visitRule(self, term)
|
|
92
92
|
|
|
93
93
|
@jpype.JOverride
|
|
94
94
|
def visitFact(self, term):
|
|
95
|
-
return TermVisitor.
|
|
95
|
+
return TermVisitor.visitFact(self, term)
|
|
96
96
|
|
|
97
97
|
@jpype.JOverride
|
|
98
98
|
def visitDirective(self, term):
|
|
99
|
-
return TermVisitor.
|
|
99
|
+
return TermVisitor.visitDirective(self, term)
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
logger.debug("Loaded compatibility layer for JVM subtypes of " + str(TermVisitor.class_.getName()))
|
|
Binary file
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import sys
|
|
2
|
+
if sys.version_info < (3, 10):
|
|
3
|
+
from collections import Mapping # for Python 3.9 and earlier
|
|
4
|
+
else:
|
|
5
|
+
from collections.abc import Mapping # for Python 3.10 and later
|
|
2
6
|
from itertools import chain
|
|
3
7
|
|
|
4
8
|
from tuprolog import logger
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
JPype1==1.3.0
|
2ppy-0.3.4.dev2/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.3.4.dev2
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|