[66484] trunk/dports/science/sbsat
snc at macports.org
snc at macports.org
Wed Apr 14 08:34:18 PDT 2010
Revision: 66484
http://trac.macports.org/changeset/66484
Author: snc at macports.org
Date: 2010-04-14 08:34:13 -0700 (Wed, 14 Apr 2010)
Log Message:
-----------
update slider3 generator
Modified Paths:
--------------
trunk/dports/science/sbsat/Portfile
trunk/dports/science/sbsat/files/slider3_base.py
Modified: trunk/dports/science/sbsat/Portfile
===================================================================
--- trunk/dports/science/sbsat/Portfile 2010-04-14 12:54:38 UTC (rev 66483)
+++ trunk/dports/science/sbsat/Portfile 2010-04-14 15:34:13 UTC (rev 66484)
@@ -5,7 +5,7 @@
name sbsat
version 2.7b
-revision 1
+revision 2
categories science math
maintainers snc
description A state-based Satisfiability solver.
Modified: trunk/dports/science/sbsat/files/slider3_base.py
===================================================================
--- trunk/dports/science/sbsat/files/slider3_base.py 2010-04-14 12:54:38 UTC (rev 66483)
+++ trunk/dports/science/sbsat/files/slider3_base.py 2010-04-14 15:34:13 UTC (rev 66484)
@@ -52,20 +52,20 @@
def slider3_sat(out_type, size, offset):
s = size/20
- start1 = [1, 2*s+3, 2*s+1, size/2-1-3*s, size/2-1, size/2+1+offset]
- start2 = [1, 2*s-1, 2*s+2, size/2-1-4*s, size/2-1-2*s, size/2-1-s, size/2+1+offset]
+ start1 = [1, 2*s+3, 2*s+1, size/2-1-3*s, size/2-1, size/2+1]
+ start2 = [1, 2*s-1, 2*s+2, size/2-1-4*s, size/2-1-2*s, size/2-1-s, size/2+1]
'''
print >> sys.stderr, start1
print >> sys.stderr, start2
'''
- print "p bdd %d %d" % (size+offset,size)
+ print "p bdd %d %d" % (size+offset,size+2*offset)
print "; automatically generated SAT slider3 with size=%d " % size
print "; Disclaimer: no formal analysis was done to verify SAT and UNSAT"
#first function
print "#define add_state1(1, 2, 3, 5, 4, 6)"
print "#equ(xor(1, and(-3, 5), nand(6, 4)), ite(2, or(5, -6), -5)))"
- for i in range(0, size/2):
+ for i in range(0, size/2+offset):
sys.stdout.write("add_state1")
print tuple(start1)
for item in range(len(start1)):
@@ -76,7 +76,7 @@
print("#xor(-1, xor(3, and(-4, 5), 4), equ(6, 2))")
print("#define add_state3(1, 2, 3, 4, 5, 6)")
print("#xor(-1, xor(3, and(-4, 5), 4), equ(6, 2))")
- for i in range(0, size-size/2):
+ for i in range(0, size-size/2+offset):
test = (i%2)+2
sys.stdout.write("add_state%d" % test)
print tuple(start2[0:5]+start2[6:])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100414/351bca2b/attachment.html>
More information about the macports-changes
mailing list