I am trying to use pyDatalog to determine if the dependencies for various features are satisfied. Some library (lA,lB,...) provides outputs (1,2,...) which are needed by features (fX,fY,...).
For example:
+has("lA", 1) #Library A has output 1
+has("lA", 2) #Library A has output 2
+has("lB", 2) #Library B has output 2
+needs("fX", 1) #Feature X needs output 1
+needs("fX", 2) #Feature X needs output 2
+needs("fY", 2) #Feature Y needs output 2
Using the pyDatalog graph tutorials I can find libraries that provide at least one of the outputs required for a feature:
lib_supports_feature(X, Z) <= has(X, Y) & needs(Z, Y)
lib_supports_feature(X,"fX")
This returns: [('lA',), ('lB',)] because it is merely finding any library with at least one path to the feature.
Is there a good way to return only the libraries that meet all the needs of that feature using pyDatalog?