Skip to content

Commit

Permalink
Added flexibility to Minisat class
Browse files Browse the repository at this point in the history
  • Loading branch information
Fábián Tamás László committed Feb 6, 2013
1 parent 9be1775 commit e84a187
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion satispy/solver/minisat.py
Expand Up @@ -13,6 +13,11 @@ def __getitem__(self, i):
return self.varmap[i]

class Minisat(object):
COMMAND = 'minisat %s %s > /dev/null'

def __init__(self, command=COMMAND):
self.command = command

def solve(self, cnf):
s = Solution()

Expand All @@ -23,7 +28,7 @@ def solve(self, cnf):
infile.write(io.tostring(cnf))
infile.flush()

ret = call('minisat %s %s > /dev/null' % (infile.name, outfile.name), shell=True)
ret = call(self.command % (infile.name, outfile.name), shell=True)

infile.close()

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Expand Up @@ -5,12 +5,12 @@

setup(
name='satispy',
version='1.0a1',
version='1.0a2',
description='An interface to SAT solver tools (like minisat)',
author='FÁBIÁN Tamás László',
author_email='giganetom@gmail.com',
url='https://github.com/netom/satispy/',
download_url='https://github.com/netom/satispy/tarball/1.0a1#egg=satispy-1.0a1',
download_url='https://github.com/netom/satispy/tarball/1.0a2#egg=satispy-1.0a2',
license='BSD License',
platforms='OS Independent',
packages=['satispy', 'satispy.io', 'satispy.solver'],
Expand Down

0 comments on commit e84a187

Please sign in to comment.