I am trying to do some work on 2-SAT and 3-SAT for an assignment and I was allowed to search the web for the implementation of the program. I came across 2 programs in Python that basically I can run and they enable me to continue with my assignment. However I can’t get the output from one program to feed the other one:
The code here: http://goo.gl/6fdlq should provide input for the code here: http://goo.gl/rdfyR
which is what the instructions say:
Problem generator in Python –
Generates either C syntax expressions
or the input to… Fully functional
GSAT solver in Python – takes input
from the above and attempts to satisfy
it, while generating a log of the
output intended to be instructional to
those unfamiliar with the GSAT
algorithm.
Anyone could please tell me how to do this?
What you want to do is pipe the output from the first script into the second.
Since the scripts seem to be named
3sat.pyandgsat.pyrespectively, justcdinto the directory where they’re located and run:or, equivalently: