├── figures ├── gen.png ├── overview.jpg └── overview.png ├── .gitignore ├── scripts ├── glucose_test.sh ├── dataset_solve.sh ├── auto_rmcore.sh ├── solve_core.sh ├── main.sh ├── auto_lscore_multi.sh ├── auto_rmcore_multi.sh ├── loose_core.sh ├── remove_core.sh └── log │ ├── mdp-28-11-unsat_repeat0_rm.log │ ├── mdp-28-11-unsat_repeat1_rm.log │ ├── mdp-28-12-unsat_repeat0_rm.log │ └── mdp-28-12-unsat_repeat1_rm.log ├── dataset ├── lcg_stats.csv └── mp1_core │ └── mp1-tri_ali_s11_c35_bail_UNS_core ├── src ├── stats.py ├── postprocess │ ├── sat_remove_repeat.py │ └── sat_dataprocess.py ├── model.py ├── utils.py ├── main_train.py ├── args.py ├── main_test.py ├── batch.py ├── core.py ├── train.py └── eval │ ├── conversion_lcg.py │ ├── scalefree.cpp │ └── evaluate_graphs_lcg.py └── README.md /figures/gen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thinklab-SJTU/HardSATGEN/HEAD/figures/gen.png -------------------------------------------------------------------------------- /figures/overview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thinklab-SJTU/HardSATGEN/HEAD/figures/overview.jpg -------------------------------------------------------------------------------- /figures/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Thinklab-SJTU/HardSATGEN/HEAD/figures/overview.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | graphs/* 2 | formulas/* 3 | datasets/* 4 | model/* 5 | runs/* 6 | postprocess/* 7 | *.DS_Store -------------------------------------------------------------------------------- /scripts/glucose_test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cd .. 3 | cd glucose/build && cmake .. && make && cd ../.. 4 | 5 | for file in generated/*; do 6 | [[ -e "$file" ]] || break 7 | ./glucose/build/glucose-simp ./generated/$file | grep '^c CPU time' >>record.txt 8 | done 9 | -------------------------------------------------------------------------------- /scripts/dataset_solve.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dir_path=${1} 4 | cd .. 5 | 6 | for cnf in $dir_path/*.cnf; do 7 | echo $cnf 8 | cd postprocess/cadical/build 9 | ../../../../runlim-master/runlim ./cadical ../../../${cnf} --no-binary &>> ../../../$dir_path/solve.log 10 | cd ../../.. 11 | done 12 | -------------------------------------------------------------------------------- /dataset/lcg_stats.csv: -------------------------------------------------------------------------------- 1 | mdp/mdp-28-11-unsat,757,4270 2 | mdp/mdp-28-12-unsat,760,4302 3 | mp1/mp1-bsat210-739,210,739 4 | mp1/mp1-squ_any_s09x07_c27_abix_UNS,851,2731 5 | mp1/mp1-tri_ali_s11_c35_abix_UNS,932,2994 6 | mp1/mp1-tri_ali_s11_c35_bail_UNS,400,1737 7 | sp4/sp4-33-bin-nons-flat-noid,786,5793 8 | sp4/sp4-33-one-stri-tree-noid,2052,3959 9 | sp4/sp4-33-una-stri-flat-noid,819,4423 10 | -------------------------------------------------------------------------------- /scripts/auto_rmcore.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | class_name=${1} 5 | num_iter=${2} 6 | goal_time=${3} 7 | dir_path=../formulas/${class_name} 8 | core_dir_path=../dataset/${class_name}_core 9 | 10 | for input in $dir_path/*.cnf; do 11 | cnf_name=${input##*/} 12 | cnf_name=${cnf_name%.cnf} 13 | cnf_name=${cnf_name%_repeat*} 14 | bash remove_core.sh $input ${core_dir_path}/${cnf_name}_core $num_iter $goal_time 15 | done -------------------------------------------------------------------------------- /scripts/solve_core.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dir_path=${1} 4 | cd .. 5 | 6 | for cnf in $dir_path/*.cnf; do 7 | echo $cnf 8 | cd postprocess/cadical/build 9 | # ./cadical ../../../${cnf} --no-binary &>> ../../../$dir_path/solve.log 10 | ./cadical ../../../${cnf} --no-binary ../../../${cnf%.cnf}.drat &>> ../../../$dir_path/solve.log 11 | echo ../../../$dir_path.log 12 | cd ../../drat-trim 13 | ./drat-trim ../../${cnf} ../../${cnf%.cnf}.drat -c ../../${cnf%.cnf}_core 14 | rm -rf ../../${cnf%.cnf}.drat 15 | cd ../.. 16 | done 17 | -------------------------------------------------------------------------------- /scripts/main.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | class=${1} 4 | gen_num=${2} 5 | 6 | # train && test 7 | python src/main_train.py --epoch_num 201 --data_name ${class} --core_flag --model GCN 8 | python src/main_test.py --epoch_num 200 --data_name ${class} --core_flag --model GCN --repeat $gen_num 9 | 10 | 11 | # generate sat.cnf form from dat 12 | mkdir ./formulas/$class 13 | python src/eval/conversion_lcg.py --src graphs/${class}_GCN_coreTrue_0.9_1_${gen_num}.dat --store-dir formulas/$class --action=lcg2sat 14 | 15 | # post-process 16 | cd scripts && bash auto_rmcore_multi.sh $class 200 500 17 | -------------------------------------------------------------------------------- /scripts/auto_lscore_multi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # param 3 | maxNumJobs=20 4 | 5 | mkdir -p log 6 | 7 | class_name=${1} 8 | num_iter=${2} 9 | goal_time=${3} 10 | dir_path=../formulas/${class_name} 11 | 12 | for input in $dir_path/*.cnf; do 13 | echo $input 14 | cnf_name=${input##*/} 15 | cnf_name=${cnf_name%.cnf} 16 | bash loose_core.sh $input $num_iter $goal_time & 17 | 18 | runningJobs=`jobs -r | wc -l` 19 | echo "Running Jobs: ${runningJobs}" 20 | 21 | while [ `jobs -r | wc -l` -ge ${maxNumJobs} ]; do 22 | : 23 | done 24 | done 25 | 26 | 27 | while [ `jobs -r | wc -l` -gt 0 ]; do 28 | : 29 | done 30 | 31 | echo "Finish all jobs:" 32 | jobs 33 | echo "========================" 34 | -------------------------------------------------------------------------------- /src/stats.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | 4 | source_path = './dataset/pigeonhole' 5 | store_csv = './dataset/pi_stats.csv' 6 | 7 | 8 | for filename in os.listdir(source_path): 9 | if not filename[-4:] == ".cnf": 10 | continue 11 | lcg_filename = filename.split(".")[0] 12 | with open(f'{source_path}/{filename}') as cnf: 13 | content = cnf.readlines() 14 | while content[0].split()[0] == 'c': 15 | content = content[1:] 16 | if content[0].split()[0] == 'p': 17 | num_vars = int(content[0].split(' ')[2]) 18 | num_clauses = int(content[0].split(' ')[3]) 19 | 20 | with open(store_csv, 'a') as out_file: 21 | out_file.write("pigeonhole/{},{},{}\n".format(lcg_filename, num_vars, num_clauses)) 22 | -------------------------------------------------------------------------------- /scripts/auto_rmcore_multi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # param 3 | maxNumJobs=20 4 | 5 | mkdir -p log 6 | 7 | class_name=${1} 8 | num_iter=${2} 9 | goal_time=${3} 10 | dir_path=../formulas/${class_name} 11 | core_dir_path=../formulas/${class_name}_core 12 | 13 | for input in $dir_path/*.cnf; do 14 | cnf_name=${input##*/} 15 | cnf_name=${cnf_name%.cnf} 16 | bash remove_core.sh $input ${core_dir_path}/${cnf_name}_core $num_iter $goal_time &> log/${cnf_name}_rm.log & 17 | 18 | runningJobs=`jobs -r | wc -l` 19 | echo "Running Jobs: ${runningJobs}" 20 | 21 | while [ `jobs -r | wc -l` -ge ${maxNumJobs} ]; do 22 | : 23 | done 24 | done 25 | 26 | 27 | while [ `jobs -r | wc -l` -gt 0 ]; do 28 | : 29 | done 30 | 31 | echo "Finish all jobs:" 32 | jobs 33 | echo "========================" 34 | -------------------------------------------------------------------------------- /src/postprocess/sat_remove_repeat.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | 3 | def make_arguments(): 4 | parser = argparse.ArgumentParser() 5 | parser.add_argument("--cnf", type=str) 6 | parser.add_argument("--save", type=str) 7 | return parser 8 | 9 | 10 | def remove_repeat(args): 11 | with open(args.cnf) as cnf: 12 | content = cnf.readlines() 13 | while content[0].split()[0] == 'c': 14 | content = content[1:] 15 | num_vars = int(content[0].split(' ')[2]) 16 | while content[0].split()[0] == 'p': 17 | content = content[1:] 18 | while len(content[-1].split()) <= 1: 19 | content = content[:-1] 20 | 21 | content_set = [] 22 | for clause in content: 23 | clause_set = sorted(clause.split(' ')[:-1]) 24 | if clause_set not in content_set: 25 | content_set.append(clause_set) 26 | 27 | content = [] 28 | for clause in content_set: 29 | content.append(' '.join(clause) + ' 0\n') 30 | 31 | with open(args.save, 'w') as out_file: 32 | out_file.write("c generated by G2SAT lcg\n") 33 | out_file.write("p cnf {} {}\n".format(num_vars, len(content))) 34 | for clause in content: 35 | out_file.write(clause) 36 | 37 | return 38 | 39 | 40 | 41 | if __name__ == "__main__": 42 | args = make_arguments().parse_args() 43 | remove_repeat(args) -------------------------------------------------------------------------------- /scripts/loose_core.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | no=0 4 | no1=1 5 | 6 | cnf_file=${1} 7 | num_iter=${2} 8 | goal_time=${3} 9 | goal_time=`echo $goal_time|awk '{print $1}'` 10 | 11 | cnf_name=${cnf_file##*/} 12 | cnf_name=${cnf_name%.cnf} 13 | save_path=${cnf_file%/*}_post 14 | mkdir $save_path 15 | 16 | drat_file=${cnf_file%.cnf}.drat 17 | core_file=${cnf_file%.cnf}_core 18 | save_file=$save_path/${cnf_name}_r$no1.cnf 19 | 20 | cd ../postprocess/cadical/build 21 | ./cadical ../../$cnf_file --no-binary ../../$drat_file 22 | cd ../../drat-trim 23 | ./drat-trim ../$cnf_file ../$drat_file -c ../$core_file 24 | cd ../.. 25 | python src/postprocess/sat_dataprocess.py --cnf $cnf_file --core $core_file --save $save_file --add_var 26 | rm $drat_file 27 | rm $core_file 28 | 29 | 30 | while [ "$no" -lt $num_iter ]; do 31 | no=$((no + 1)) 32 | no1=$((no1 + 1)) 33 | 34 | cnf_file=$save_file 35 | drat_file=${cnf_file%.cnf}.drat 36 | core_file=${cnf_file%.cnf}_core 37 | save_file=$save_path/${cnf_name}_r$no1.cnf 38 | 39 | cd postprocess/cadical/build 40 | mkdir -p ../log 41 | ./cadical ../../$cnf_file --no-binary ../../$drat_file &>> ../log/${cnf_name%.cnf}.log 42 | time=`tail -n 1 ../log/${cnf_name%.cnf}.log` 43 | time=${time#*exit } 44 | time=`eval echo $time|awk '{print $1}'` 45 | if [ $time -eq 10 ] 46 | then 47 | rm $drat_file 48 | break 1 49 | fi 50 | 51 | cd ../../drat-trim 52 | ./drat-trim ../$cnf_file ../$drat_file -c ../$core_file 53 | cd ../.. 54 | python src/postprocess/sat_dataprocess.py --cnf $cnf_file --core $core_file --save $save_file 55 | 56 | rm $cnf_file 57 | rm $core_file 58 | rm $drat_file 59 | 60 | done 61 | 62 | 63 | -------------------------------------------------------------------------------- /scripts/remove_core.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | no=0 4 | no1=1 5 | 6 | cnf_file=${1} 7 | origin_core=${2} 8 | num_iter=${3} 9 | goal_time=${4} 10 | goal_time=`echo $goal_time|awk '{print $1}'` 11 | 12 | cnf_name=${cnf_file##*/} 13 | cnf_name=${cnf_name%.cnf} 14 | save_path=${cnf_file%/*}_post 15 | mkdir $save_path 16 | 17 | drat_file=${cnf_file%.cnf}.drat 18 | core_file=${cnf_file%.cnf}_core 19 | save_file=$save_path/${cnf_name}_r$no1.cnf 20 | 21 | cd ../postprocess/cadical/build 22 | ./cadical ../../$cnf_file --no-binary ../../$drat_file 23 | cd ../../drat-trim 24 | ./drat-trim ../$cnf_file ../$drat_file -c ../$core_file 25 | cd ../../src 26 | python postprocess/sat_dataprocess.py --cnf $cnf_file --core $core_file --save $save_file --origin $origin_core --add_var 27 | rm $drat_file 28 | rm $core_file 29 | cd .. 30 | 31 | while [ "$no" -lt $num_iter ]; do 32 | no=$((no + 1)) 33 | no1=$((no1 + 1)) 34 | 35 | cnf_file=$save_file 36 | drat_file=${cnf_file%.cnf}.drat 37 | core_file=${cnf_file%.cnf}_core 38 | save_file=$save_path/${cnf_name}_r$no1.cnf 39 | 40 | cd postprocess/cadical/build 41 | ./cadical ../../$cnf_file --no-binary ../../$drat_file &>> ../log/${cnf_name%.cnf}.log 42 | time=`tail -n 7 ../log/${cnf_name%.cnf}.log` 43 | time=${time#*:} 44 | time=${time%%seconds*} 45 | time=`eval echo $time|awk '{print $1}'` 46 | if [ `echo "$time > $goal_time" | bc` -eq 1 ] 47 | then 48 | break 1 49 | fi 50 | 51 | cd ../../drat-trim 52 | ./drat-trim ../$cnf_file ../$drat_file -c ../$core_file 53 | cd ../../src 54 | python postprocess/sat_dataprocess.py --cnf $cnf_file --core $core_file --save $save_file --origin $origin_core 55 | 56 | rm $cnf_file 57 | rm $core_file 58 | rm $drat_file 59 | cd .. 60 | 61 | done 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/model.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | import torch_geometric as tg 4 | import torch.nn.functional as F 5 | 6 | ####################### SAGE ############################# 7 | 8 | class SAGE(torch.nn.Module): 9 | def __init__(self, input_dim, feature_dim, hidden_dim, output_dim, 10 | feature_pre=True, layer_num=2, dropout=True, **kwargs): 11 | super(SAGE, self).__init__() 12 | self.feature_pre = feature_pre 13 | self.layer_num = layer_num 14 | self.dropout = dropout 15 | if feature_pre: 16 | self.linear_pre = nn.Linear(input_dim, feature_dim) 17 | self.conv_first = tg.nn.SAGEConv(feature_dim, hidden_dim) 18 | else: 19 | self.conv_first = tg.nn.SAGEConv(input_dim, hidden_dim) 20 | self.conv_hidden = nn.ModuleList([tg.nn.SAGEConv(hidden_dim, hidden_dim) for i in range(layer_num - 2)]) 21 | self.conv_out = tg.nn.SAGEConv(hidden_dim, output_dim) 22 | 23 | def forward(self, data): 24 | x, edge_index = data.x, data.edge_index 25 | if self.feature_pre: 26 | x = self.linear_pre(x) 27 | x = self.conv_first(x, edge_index) 28 | x = F.relu(x) 29 | if self.dropout: 30 | x = F.dropout(x, training=self.training) 31 | for i in range(self.layer_num-2): 32 | x = self.conv_hidden[i](x, edge_index) 33 | x = F.relu(x) 34 | if self.dropout: 35 | x = F.dropout(x, training=self.training) 36 | x = self.conv_out(x, edge_index) 37 | x = F.normalize(x, p=2, dim=-1) 38 | return x 39 | 40 | ####################### GCN ############################# 41 | 42 | class GCN(torch.nn.Module): 43 | def __init__(self, input_dim, feature_dim, hidden_dim, output_dim, 44 | feature_pre=True, layer_num=2, dropout=True, **kwargs): 45 | super(GCN, self).__init__() 46 | self.feature_pre = feature_pre 47 | self.layer_num = layer_num 48 | self.dropout = dropout 49 | if feature_pre: 50 | self.linear_pre = nn.Linear(input_dim, feature_dim) 51 | self.conv_first = tg.nn.GCNConv(feature_dim, hidden_dim) 52 | else: 53 | self.conv_first = tg.nn.GCNConv(input_dim, hidden_dim) 54 | self.conv_hidden = nn.ModuleList([tg.nn.GCNConv(hidden_dim, hidden_dim) for i in range(layer_num - 2)]) 55 | self.conv_out = tg.nn.GCNConv(hidden_dim, output_dim) 56 | 57 | def forward(self, data): 58 | x, edge_index = data.x, data.edge_index 59 | if self.feature_pre: 60 | x = self.linear_pre(x) 61 | x = self.conv_first(x, edge_index) 62 | x = F.relu(x) 63 | if self.dropout: 64 | x = F.dropout(x, training=self.training) 65 | for i in range(self.layer_num-2): 66 | x = self.conv_hidden[i](x, edge_index) 67 | x = F.relu(x) 68 | if self.dropout: 69 | x = F.dropout(x, training=self.training) 70 | x = self.conv_out(x, edge_index) 71 | x = F.normalize(x, p=2, dim=-1) 72 | return x 73 | -------------------------------------------------------------------------------- /src/utils.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import pickle 3 | import pdb 4 | import networkx as nx 5 | import numpy as np 6 | import json 7 | 8 | 9 | # save a list of graphs 10 | def save_graph_list(G_list, fname, file_names, clean=False, has_par=False, nodes_par1_list=None, nodes_par2_list=None): 11 | with open(fname, "wb") as f: 12 | graphs_info = [] 13 | for i,G in enumerate(G_list): 14 | if clean: 15 | G = max(nx.connected_component_subgraphs(G), key=len) 16 | if has_par: 17 | graphs_info.append([file_names[i], G.nodes(), G.edges(), nodes_par1_list[i], nodes_par2_list[i]]) 18 | else: 19 | graphs_info.append([file_names[i], G.nodes(), G.edges()]) 20 | pickle.dump(graphs_info, f) 21 | 22 | def load_graph_list(fname, has_par=False): 23 | with open(fname, "rb") as f: 24 | graphs = [] 25 | if has_par: 26 | nodes_par1_list = [] 27 | nodes_par2_list = [] 28 | graphs_info = pickle.load(f) 29 | for graph_info in graphs_info: 30 | G = nx.Graph() 31 | G.add_nodes_from(graph_info[0]) 32 | G.add_edges_from(graph_info[1]) 33 | graphs.append(G) 34 | if has_par: 35 | nodes_par1_list.append(graph_info[2]) 36 | nodes_par2_list.append(graph_info[3]) 37 | if has_par: 38 | return graphs, nodes_par1_list, nodes_par2_list 39 | else: 40 | return graphs 41 | 42 | def load_graph_list_fg(fname, has_par=False): 43 | with open(fname, "rb") as f: 44 | graphs = [] 45 | if has_par: 46 | nodes_par1_list = [] 47 | nodes_par2_list = [] 48 | graphs_info = pickle.load(f) 49 | for graph_info in graphs_info: 50 | G = nx.Graph() 51 | G.add_nodes_from(graph_info[0]) 52 | for edge in graph_info[1]: 53 | G.add_edge(edge[0], edge[1], features=edge[2]['features']) 54 | graphs.append(G) 55 | if has_par: 56 | nodes_par1_list.append(graph_info[2]) 57 | nodes_par2_list.append(graph_info[3]) 58 | if has_par: 59 | return graphs, nodes_par1_list, nodes_par2_list 60 | else: 61 | return graphs 62 | 63 | 64 | # draw a list of graphs [G] 65 | def draw_graph_list(G_list, row, col, fname = 'figures/test', layout='spring', is_single=False,k=1,node_size=55,alpha=1,width=1.3): 66 | # # draw graph view 67 | # from pylab import rcParams 68 | # rcParams['figure.figsize'] = 12,3 69 | if len(G_list)>row*col: 70 | G_list = G_list[:row*col] 71 | plt.switch_backend('agg') 72 | for i,G in enumerate(G_list): 73 | plt.subplot(row,col,i+1) 74 | plt.subplots_adjust(left=0, bottom=0, right=1, top=1, 75 | wspace=0, hspace=0) 76 | plt.axis("off") 77 | if layout=='spring': 78 | pos = nx.spring_layout(G,k=k/np.sqrt(G.number_of_nodes()),iterations=20) # default 100 79 | # pos = nx.spring_layout(G) 80 | 81 | elif layout=='spectral': 82 | pos = nx.spectral_layout(G) 83 | # # nx.draw_networkx(G, with_labels=True, node_size=2, width=0.15, font_size = 1.5, node_color=colors,pos=pos) 84 | # nx.draw_networkx(G, with_labels=False, node_size=1.5, width=0.2, font_size = 1.5, linewidths=0.2, node_color = 'k',pos=pos,alpha=0.2) 85 | 86 | if is_single: 87 | # node_size default 60, edge_width default 1.5 88 | nx.draw_networkx_nodes(G, pos, node_size=node_size, node_color='#336699', alpha=1, linewidths=0, font_size=0) 89 | nx.draw_networkx_edges(G, pos, alpha=alpha, width=width) 90 | else: 91 | nx.draw_networkx_nodes(G, pos, node_size=1.5, node_color='#336699',alpha=1, linewidths=0.2, font_size = 1.5) 92 | nx.draw_networkx_edges(G, pos, alpha=0.3,width=0.2) 93 | 94 | plt.tight_layout() 95 | plt.savefig(fname+'.png', dpi=600) 96 | plt.close() 97 | 98 | if __name__ == '__main__': 99 | configs_file = '/Users/jiaxuan/Downloads/best_configs.json' 100 | with open(configs_file, 'r') as f: 101 | configs = json.load(f) 102 | pdb.set_trace() 103 | fname = 'GCN_3_32_preTrue_dropFalse_yield1_08000.dat' 104 | graphs = load_graph_list('graphs/'+fname) 105 | graph = graphs[0] 106 | pdb.set_trace() 107 | draw_graph_list(graphs, row=4, col=4, fname='fig/'+fname) 108 | -------------------------------------------------------------------------------- /src/main_train.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import os 3 | import torch 4 | from tensorboardX import SummaryWriter 5 | from networkx.algorithms.community import greedy_modularity_communities 6 | 7 | from args import make_args 8 | from train import train 9 | from model import GCN, SAGE 10 | from batch import DataLoader 11 | from data_lcg import Dataset_sat_intercmt, Dataset_sat_incmt, load_graphs_vig, load_graphs_lcg 12 | 13 | ### args 14 | args = make_args() 15 | print(args) 16 | np.random.seed(123) 17 | 18 | args.name = '{}_{}_core{}'.format(args.data_name, args.model, args.core_flag) 19 | writer_train = SummaryWriter(comment=args.name+'train') 20 | writer_test = SummaryWriter(comment=args.name+'test') 21 | args.graphs_save_path = 'graphs/' 22 | 23 | ### set up gpu 24 | if args.gpu: 25 | os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" 26 | os.environ['CUDA_VISIBLE_DEVICES'] = str(args.cuda) 27 | print('Using GPU {}'.format(os.environ['CUDA_VISIBLE_DEVICES'])) 28 | else: 29 | print('Using CPU') 30 | device = torch.device('cuda:'+str(args.cuda) if args.gpu else 'cpu') 31 | 32 | ### load data 33 | graphs_train_vig = load_graphs_vig(data_dir=f'dataset/{args.data_name}/', stats_dir='dataset/') 34 | community_list = [] 35 | for G in graphs_train_vig: 36 | c = greedy_modularity_communities(G) 37 | community_list.append(c) 38 | print([len(c) for c in community_list]) 39 | 40 | graphs_train, nodes_par1s_train, nodes_par2s_train, nodes_communitys_train, core_indexes_train, file_names = \ 41 | load_graphs_lcg(data_dir=f'dataset/{args.data_name}/', stats_dir='dataset/', community_list=community_list, core_flag=args.core_flag) 42 | node_nums = [graph.number_of_nodes() for graph in graphs_train] 43 | edge_nums = [graph.number_of_edges() for graph in graphs_train] 44 | print('Num {}, Node {} {} {}, Edge {} {} {}'.format( 45 | len(graphs_train),min(node_nums),max(node_nums),sum(node_nums)/len(node_nums),min(edge_nums),max(edge_nums),sum(edge_nums)/len(edge_nums))) 46 | 47 | 48 | 49 | dataset_train_intercmt = Dataset_sat_intercmt(graphs_train, nodes_par1s_train, nodes_par2s_train, nodes_communitys_train, 50 | community_list, args.core_flag, core_indexes_train, epoch_len=5000, yield_prob=args.yield_prob, speedup=True) 51 | dataset_test_intercmt = Dataset_sat_intercmt(graphs_train, nodes_par1s_train, nodes_par2s_train, nodes_communitys_train, 52 | community_list, args.core_flag, core_indexes_train, epoch_len=1000, yield_prob=args.yield_prob, speedup=False) 53 | 54 | loader_train_intercmt = DataLoader(dataset_train_intercmt, batch_size=args.batch_size, shuffle=True, num_workers=args.worker_num) 55 | loader_test_intercmt = DataLoader(dataset_test_intercmt, batch_size=args.batch_size, shuffle=True, num_workers=args.worker_num) 56 | 57 | graphs_train_incmt, nodes_par1s_train_incmt, nodes_par2s_train_incmt, nodes_communitys_train_incmt = dataset_train_intercmt.get_graph_incmt() 58 | 59 | dataset_train_incmt = Dataset_sat_incmt(graphs_train_incmt, nodes_par1s_train_incmt, nodes_par2s_train_incmt, nodes_communitys_train_incmt, 60 | community_list, args.core_flag, core_indexes_train, epoch_len=5000, yield_prob=args.yield_prob, speedup=True) 61 | dataset_test_incmt = Dataset_sat_incmt(graphs_train_incmt, nodes_par1s_train_incmt, nodes_par2s_train_incmt, nodes_communitys_train_incmt, 62 | community_list, args.core_flag, core_indexes_train, epoch_len=1000, yield_prob=args.yield_prob, speedup=False) 63 | 64 | loader_train_incmt = DataLoader(dataset_train_incmt, batch_size=args.batch_size, shuffle=True, num_workers=args.worker_num) 65 | loader_test_incmt = DataLoader(dataset_test_incmt, batch_size=args.batch_size, shuffle=True, num_workers=args.worker_num) 66 | 67 | input_dim = 4 68 | model_intercmt = locals()[args.model](input_dim=input_dim, feature_dim=args.feature_dim, 69 | hidden_dim=args.hidden_dim, output_dim=args.output_dim, 70 | feature_pre=args.feature_pre, layer_num=args.layer_num, dropout=args.dropout).to(device) 71 | model_incmt = locals()[args.model](input_dim=input_dim, feature_dim=args.feature_dim, 72 | hidden_dim=args.hidden_dim, output_dim=args.output_dim, 73 | feature_pre=args.feature_pre, layer_num=args.layer_num, dropout=args.dropout).to(device) 74 | 75 | 76 | optimizer_intercmt = torch.optim.Adam(model_intercmt.parameters(), lr=args.lr, weight_decay=5e-4) 77 | optimizer_incmt = torch.optim.Adam(model_incmt.parameters(), lr=args.lr, weight_decay=5e-4) 78 | 79 | train(args, loader_train_intercmt, loader_test_intercmt, model_intercmt, optimizer_intercmt, writer_train, writer_test, device, "intercmt") 80 | train(args, loader_train_incmt, loader_test_incmt, model_incmt, optimizer_incmt, writer_train, writer_test, device, "incmt") 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /src/args.py: -------------------------------------------------------------------------------- 1 | from argparse import ArgumentParser 2 | def make_args(): 3 | parser = ArgumentParser() 4 | # general 5 | parser.add_argument('--comment', dest='comment', default='0', type=str, 6 | help='comment') 7 | parser.add_argument('--task', dest='task', default='link', type=str, 8 | help='link; node') 9 | parser.add_argument('--model', dest='model', default='SAGE', type=str, 10 | help='SAGE; GCN') 11 | parser.add_argument('--dataset', dest='dataset', default='grid', type=str, 12 | help='grid; caveman; barabasi, cora, citeseer, pubmed') 13 | parser.add_argument('--data_name', dest='data_name', default='fuhs', 14 | help='Family name to use') 15 | parser.add_argument('--loss', dest='loss', default='l2', type=str, 16 | help='l2; cross_entropy') 17 | parser.add_argument('--gpu', dest='gpu', action='store_true', 18 | help='whether use gpu') 19 | parser.add_argument('--cache_no', dest='cache', action='store_false', 20 | help='whether use cache') 21 | parser.add_argument('--cpu', dest='gpu', action='store_false', 22 | help='whether use cpu') 23 | parser.add_argument('--cuda', dest='cuda', default='0', type=str) 24 | 25 | # dataset 26 | parser.add_argument('--graph_test_ratio', dest='graph_test_ratio', default=0.2, type=float) 27 | parser.add_argument('--feature_pre', dest='feature_pre', action='store_true', 28 | help='whether pre transform feature') 29 | parser.add_argument('--feature_pre_no', dest='feature_pre', action='store_false', 30 | help='whether pre transform feature') 31 | parser.add_argument('--dropout', dest='dropout', action='store_true', 32 | help='whether dropout, default 0.5') 33 | parser.add_argument('--dropout_no', dest='dropout', action='store_false', 34 | help='whether dropout, default 0.5') 35 | parser.add_argument('--speedup', dest='speedup', action='store_true', 36 | help='whether speedup') 37 | parser.add_argument('--speedup_no', dest='speedup', action='store_false', 38 | help='whether speedup') 39 | parser.add_argument('--recompute_template', dest='recompute_template', action='store_true', 40 | help='whether save_template') 41 | parser.add_argument('--load_model', dest='load_model', action='store_true', 42 | help='whether load_model') 43 | 44 | 45 | parser.add_argument('--batch_size', dest='batch_size', default=64, type=int) # implemented via accumulating gradient 46 | parser.add_argument('--layer_num', dest='layer_num', default=3, type=int) 47 | parser.add_argument('--feature_dim', dest='feature_dim', default=32, type=int) 48 | parser.add_argument('--hidden_dim', dest='hidden_dim', default=32, type=int) 49 | parser.add_argument('--output_dim', dest='output_dim', default=32, type=int) 50 | parser.add_argument('--worker_num', dest='worker_num', default=6, type=int) 51 | 52 | parser.add_argument('--lr', dest='lr', default=1e-3, type=float) 53 | parser.add_argument('--yield_prob', dest='yield_prob', default=1, type=float) 54 | parser.add_argument('--clause_ratio', dest='clause_ratio', default=1, type=float) 55 | parser.add_argument('--epoch_num', dest='epoch_num', default=201, type=int) 56 | parser.add_argument('--epoch_log', dest='epoch_log', default=20, type=int) # test every 57 | parser.add_argument('--epoch_test', dest='epoch_test', default=0, type=int) # test start from when. Default not doing test. 58 | parser.add_argument('--epoch_save', dest='epoch_save', default=20, type=int) # save every 59 | parser.add_argument('--epoch_load', dest='epoch_load', default=200, type=int) # test start from when 60 | parser.add_argument('--gen_graph_num', dest='gen_graph_num', default=1, type=int) # graph num per template 61 | parser.add_argument('--sample_size', dest='sample_size', default=20000, type=int) # number of action samples 62 | parser.add_argument('--repeat', dest='repeat', default=1, type=int) 63 | parser.add_argument('--sat_id', dest='sat_id', default=0, type=int) 64 | parser.add_argument('--alpha', dest='alpha', default=0.9, type=float) 65 | 66 | parser.add_argument('--core_flag', dest='core_flag', action='store_true', 67 | help='whether enable core detect') 68 | parser.add_argument('--scramble_ratio', dest='scramble_ratio', default='3-3-2', type=str) # x-x-x each points to 3 operations 69 | 70 | 71 | parser.set_defaults(gpu=True, task='link', model='SAGE', dataset='Cora', cache=True, 72 | feature_pre=True, dropout=False, recompute_template=False, load_model=False, 73 | speedup=False, core_flag=False) 74 | args = parser.parse_args() 75 | return args -------------------------------------------------------------------------------- /src/main_test.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import os 3 | import csv 4 | import torch 5 | from networkx.algorithms.community import greedy_modularity_communities 6 | 7 | from args import make_args 8 | from utils import save_graph_list 9 | from train import test 10 | from model import GCN, SAGE 11 | from data_lcg import Dataset_sat_intercmt, Dataset_sat_incmt, graph_generator, load_graphs_vig, load_graphs_lcg 12 | 13 | ### args 14 | args = make_args() 15 | print(args) 16 | np.random.seed(123) 17 | args.name = '{}_{}_core{}'.format(args.data_name, args.model, args.core_flag) 18 | 19 | ### set up gpu 20 | if args.gpu: 21 | os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" 22 | os.environ['CUDA_VISIBLE_DEVICES'] = str(args.cuda) 23 | print('Using GPU {}'.format(os.environ['CUDA_VISIBLE_DEVICES'])) 24 | else: 25 | print('Using CPU') 26 | device = torch.device('cuda:'+str(args.cuda) if args.gpu else 'cpu') 27 | 28 | ### create graph templates to initailize generator 29 | if not os.path.isdir('graphs/'): 30 | os.mkdir('graphs/') 31 | template_name = f'graphs/template_small_{args.data_name}.dat' 32 | train_name = f'graphs/train_small_{args.data_name}.dat' 33 | 34 | ### load data 35 | graphs_train_vig = load_graphs_vig(data_dir=f'dataset/{args.data_name}/', stats_dir='dataset/') 36 | community_list = [] 37 | for G in graphs_train_vig: 38 | c = greedy_modularity_communities(G) 39 | community_list.append(c) 40 | print([len(c) for c in community_list]) 41 | 42 | # if args.recompute_template or not os.path.isfile(template_name): 43 | graphs_train, nodes_par1s_train, nodes_par2s_train, nodes_communitys_train, core_indexes_train, file_names = \ 44 | load_graphs_lcg(data_dir=f'dataset/{args.data_name}/', stats_dir='dataset/', community_list=community_list, core_flag=args.core_flag) 45 | 46 | save_graph_list(graphs_train, train_name, file_names, has_par=True, nodes_par1_list=nodes_par1s_train, nodes_par2_list=nodes_par2s_train) 47 | print('Train graphs saved!', len(graphs_train)) 48 | node_nums = [graph.number_of_nodes() for graph in graphs_train] 49 | edge_nums = [graph.number_of_edges() for graph in graphs_train] 50 | print('Num {}, Node {} {} {}, Edge {} {} {}'.format( 51 | len(graphs_train), min(node_nums), max(node_nums), sum(node_nums) / len(node_nums), min(edge_nums), 52 | max(edge_nums), sum(edge_nums) / len(edge_nums))) 53 | 54 | 55 | dataset_train_intercmt = Dataset_sat_intercmt(graphs_train, nodes_par1s_train, nodes_par2s_train, nodes_communitys_train, 56 | community_list, args.core_flag, core_indexes_train, epoch_len=5000, yield_prob=args.yield_prob, speedup=True) 57 | graphs_train_incmt, nodes_par1s_train_incmt, nodes_par2s_train_incmt, nodes_communitys_train_incmt = dataset_train_intercmt.get_graph_incmt() 58 | 59 | dataset_train_incmt = Dataset_sat_incmt(graphs_train_incmt, nodes_par1s_train_incmt, nodes_par2s_train_incmt, nodes_communitys_train_incmt, 60 | community_list, args.core_flag, core_indexes_train, epoch_len=5000, yield_prob=args.yield_prob, speedup=False) 61 | 62 | graph_templates, nodes_par1s, nodes_par2s, nodes_communitys = dataset_train_incmt.get_template() 63 | 64 | clause_num_intercmt = [len(x) for x in nodes_par2s_train] 65 | clause_num_incmt = [len(x) for x in nodes_par2s_train_incmt] 66 | print(clause_num_intercmt) 67 | print(clause_num_incmt) 68 | print([len(x) for x in nodes_par2s]) 69 | 70 | 71 | print('Template num', len(graph_templates)) 72 | 73 | 74 | # load stats 75 | stat_file = 'lcg_stats.csv' 76 | with open('dataset/' + stat_file) as csvfile: 77 | data = csv.reader(csvfile, delimiter=',') 78 | stats = [] 79 | for stat in data: 80 | stats.append(stat) 81 | generator_list = [] 82 | tmp_names = file_names.copy() 83 | file_names = [] 84 | for i in range(len(graph_templates)): 85 | for j in range(args.repeat): 86 | generator_list.append(graph_generator( 87 | graph_templates[i], nodes_par1s[i], nodes_par2s[i], nodes_communitys[i], community_list[i], args.core_flag, core_indexes_train[i], sample_size=args.sample_size, device=device)) 88 | tmp_name = tmp_names[i].strip('_lcg_edge_list') 89 | tmp_name = tmp_names[i].strip('_fg_edge_list') 90 | file_names.append(f'{tmp_names[i]}_repeat{j}') 91 | 92 | 93 | input_dim = 4 94 | model_intercmt = locals()[args.model](input_dim=input_dim, feature_dim=args.feature_dim, 95 | hidden_dim=args.hidden_dim, output_dim=args.output_dim, 96 | feature_pre=args.feature_pre, layer_num=args.layer_num, dropout=args.dropout).to(device) 97 | model_incmt = locals()[args.model](input_dim=input_dim, feature_dim=args.feature_dim, 98 | hidden_dim=args.hidden_dim, output_dim=args.output_dim, 99 | feature_pre=args.feature_pre, layer_num=args.layer_num, dropout=args.dropout).to(device) 100 | model_intercmt.load_state_dict(torch.load('model/'+args.name+"_"+str(args.epoch_load)+"_intercmt", map_location=device)) 101 | model_intercmt.to(device).eval() 102 | model_incmt.load_state_dict(torch.load('model/'+args.name+"_"+str(args.epoch_load)+"_incmt", map_location=device)) 103 | model_incmt.to(device).eval() 104 | print('Models loaded!') 105 | 106 | clause_num_intercmt = np.array(clause_num_intercmt) * args.clause_ratio 107 | clause_num_incmt = np.array(clause_num_incmt) * args.clause_ratio 108 | alpha = args.alpha 109 | clause_num_intercmt = (1 - alpha) * clause_num_incmt + alpha * clause_num_intercmt 110 | clause_num_intercmt, clause_num_incmt = clause_num_intercmt.astype(int), clause_num_incmt.astype(int) 111 | 112 | test(args, generator_list, model_intercmt, model_incmt, clause_num_intercmt, 113 | clause_num_incmt, file_names, repeat=args.repeat) 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HardSATGEN: Understanding the Difficulty of Hard SAT Formula Generation and A Strong Structure-Hardness-Aware Baseline 2 | 3 | Official implementation of SIGKDD 2023 paper "HardSATGEN: Understanding the Difficulty of Hard SAT Formula Generation and A Strong Structure-Hardness-Aware Baseline". 4 | 5 | ![image-20230603233325455](figures/overview.jpg) 6 | 7 | **Abstract:** Industrial SAT formula generation is a critical yet challenging task. Existing SAT generation approaches can hardly simultaneously capture the global structural properties and maintain plausible computational hardness. We first present an in-depth analysis for the limitation of previous learning methods in reproducing the computational hardness of original instances, which may stem from the inherent homogeneity in their adopted split-merge procedure. On top of the observations that industrial formulae exhibit clear community structure and oversplit substructures lead to the difficulty in semantic formation of logical structures, we propose HardSATGEN, which introduces a fine-grained control mechanism to the neural split-merge paradigm for SAT formula generation to better recover the structural and computational properties of the industrial benchmarks. Experiments including evaluations on private and practical corporate testbed show the superiority of HardSATGEN being the only method to successfully augments formulae maintaining similar computational hardness and capturing the global structural properties simultaneously. Compared to the best previous methods, the average performance gains achieve 38.5% in structural statistics, 88.4\% in computational metrics, and over 140.7% in the effectiveness of guiding solver tuning by our generated instances. 8 | 9 | --- 10 | 11 | ## Installation 12 | 13 | - Basic environment (tested on) 14 | - python==3.8 15 | - pytorch==1.13.0+cu116 16 | - torch_geometric==2.3 17 | - networkx==2.8 18 | - pygmtools==0.3.5 19 | - protobuf==3.20 20 | - tensorboardX==2.2 21 | - matplotlib==3.7.1 22 | 23 | 24 | - Open source tools 25 | - [cadical](https://github.com/arminbiere/cadical): clone to `./postprocess/cadical` 26 | - build: `./configure && make` 27 | - make dir `log` under `./postprocess/cadical/` 28 | - [drat-trim](https://github.com/marijnheule/drat-trim): clone to `./postprocess/drat-trim` 29 | - build: `make` 30 | - glucose: See more in "Evalution and Solver Tuning" section. 31 | 32 | ## Dataset Preparation 33 | 34 | Example dataset: `${dataset_name}` 35 | 36 | - formula: located in `./dataset/${dataset_name}/`, `${formula_name}.cnf` for each formula 37 | - core: located in `./dataset/${dataset_name}_core/`, `${formula_name}_core` for each 38 | - `./dataset/lcg_stats.csv`: statistics for the formulae with the format as `${dataset_name}/${formula_name}, ${num_variable}, ${num_clause}` 39 | 40 | If needed, you can build your own dataset with collected formulae with the following steps: 41 | 42 | 1. Prepare core (make sure to build cadical & drat-trim first): 43 | 44 | ```bash 45 | bash scripts/solve_core.sh dataset/${dataset_name} 46 | ``` 47 | 48 | Core files will generated under `dataset/${dataset_name}`, then move them to `dataset/${dataset_name}_core`. The cadical solving log are stored in `dataset/class_name.log`, check solving time if needed. 49 | 50 | 2. Prepare statistics for the formulae: collect each formula's `dataset_name/formula_name, num_var, num_clause` statistics to form `./dataset/lcg_stats.csv`. 51 | 52 | 53 | ## Run 54 | 55 | 1. Train models: 56 | 57 | ```bash 58 | # Do not remain unsat core 59 | python src/main_train.py --epoch_num 201 --data_name ${dataset_name} --model GCN # SAGE; GCN 60 | # remain unsat core && introduce scrambling operation 61 | python src/main_train.py --epoch_num 201 --data_name ${dataset_name} --core_flag --model GCN # SAGE; GCN 62 | ``` 63 | 64 | Trained models will be saved in `model/` directory. 65 | 66 | 2. Generate formulae: 67 | 68 | ```bash 69 | python src/main_test.py --epoch_load 200 --data_name ${dataset_name} --model GCN # SAGE; GCN 70 | # remain unsat core && introduce scrambling operation 71 | python src/main_test.py --epoch_num 200 --data_name ${dataset_name} --core_flag --model GCN # SAGE; GCN 72 | ``` 73 | 74 | The generated graphs will be saved to `graphs/` directory. We can then generate CNF formulae by converting the graphs: 75 | 76 | ```bash 77 | python src/eval/conversion_lcg.py --src graphs/${dataset_name}_lcg_GCN_coreTrue_alpha.dat --store-dir formulas/${dataset_name} --action=lcg2sat 78 | ``` 79 | 80 | 3. Post-processing: 81 | 82 | ```bash 83 | cd scripts && bash auto_rmcore.sh ${dataset_name} 200 2255 84 | # ${1}: class name in ./formulas/train_set 85 | # ${2}: maximum re-post times 86 | # ${3}: expected solving time threshold in sec 87 | 88 | # multi-task version: 89 | cd scripts && bash auto_rmcore_multi.sh ${dataset_name} 200 2255 90 | ``` 91 | 92 | The post-processed formulae will be stored in `./formulas/${dataset_name}_post`, with logs in `./postprocess/cadical/build`. 93 | 94 | 95 | ## Evalution and Solver Tuning 96 | 97 | 1. Evaluate graph properties of formulas. 98 | 99 | ```bash 100 | # preparation 101 | g++ -o src/eval/scalefree eval/scalefree.cpp 102 | 103 | # evaluate 104 | python src/eval/evaluate_graphs_lcg.py -s src/eval/scalefree -d formulas/${dataset_name}/ -o ${dataset_name}.csv 105 | ``` 106 | 107 | 1. Solver tuning. 108 | 109 | Build [glucose](https://github.com/wadoon/glucose) solver first. Download and build it under `./glucose`. 110 | 111 | ```bash 112 | mkdir build 113 | cd build 114 | cmake .. 115 | make 116 | ``` 117 | 118 | Grid-search: change variable decay $v_d$ & clause decay $c_d$ in `glucose/core/Solver.cc` ( `opt_var_decay`: {0.75, 0.85, 0.95}. `opt_clause_decay`: {0.7, 0.8, 0.9, 0.999}). For hyperparameter settings, run `script/glucose_test.sh` to solve the formulae in `glucose/generated`. Pick the quickist settings of $v_d, c_d$ as the best tuned parameters. 119 | 120 | 121 | ## Reference 122 | 123 | ```bibtex 124 | @inproceedings{li2023hardsatgen, 125 | title={HardSATGEN: Understanding the Difficulty of Hard SAT Formula Generation and A Strong Structure-Hardness-Aware Baseline}, 126 | author={Li, Yang and Chen, Xinyan and Guo, Wenxuan and Li, Xijun and Luo, Wanqian and Huang, Junhua and Zhen, Hui-Ling and Yuan, Mingxuan and Yan, Junchi}, 127 | booktitle={Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining}, 128 | year={2023} 129 | } 130 | ``` 131 | 132 | ## Acknowledgment 133 | 134 | This repository is built upon [G2SAT](https://github.com/JiaxuanYou/G2SAT) and [SAT_generators](https://github.com/i4vk/SAT_generators). 135 | -------------------------------------------------------------------------------- /src/batch.py: -------------------------------------------------------------------------------- 1 | import torch 2 | from torch_geometric.data import Data 3 | import torch.utils.data 4 | import re 5 | import numpy as np 6 | 7 | 8 | class Dataset_mine(torch.utils.data.Dataset): 9 | def __init__(self, data_list): 10 | super(Dataset_mine, self).__init__() 11 | self.data = data_list 12 | # self.num_features = self.data[0].x.shape[1] 13 | # self.num_classes = len(np.unique(self.data[0].y)) 14 | 15 | def __getitem__(self, index): 16 | return self.data[index] 17 | 18 | def __len__(self): 19 | return len(self.data) 20 | 21 | @property 22 | def num_features(self): 23 | return self.data[0].x.shape[1] 24 | @property 25 | def num_classes(self): 26 | return len(np.unique(self.data[0].y)) 27 | 28 | 29 | 30 | 31 | def __cat_dim__(key, value): 32 | r"""Returns the dimension for which :obj:`value` of attribute 33 | :obj:`key` will get concatenated when creating batches. 34 | 35 | .. note:: 36 | 37 | This method is for internal use only, and should only be overridden 38 | if the batch concatenation process is corrupted for a specific data 39 | attribute. 40 | """ 41 | # `*index*` and `*face*` should be concatenated in the last dimension, 42 | # everything else in the first dimension. 43 | return -1 if bool(re.search('(index|face|mask_link)', key)) else 0 44 | 45 | def __cumsum__(key, value): 46 | r"""If :obj:`True`, :obj:`value` of attribute :obj:`key` is 47 | cumulatively summed up when creating batches. 48 | 49 | .. note:: 50 | 51 | This method is for internal use only, and should only be overridden 52 | if the batch concatenation process is corrupted for a specific data 53 | attribute. 54 | """ 55 | return bool(re.search('(index|face|mask_link)', key)) 56 | 57 | class Batch(Data): 58 | r"""A plain old python object modeling a batch of graphs as one big 59 | (dicconnected) graph. With :class:`torch_geometric.data.Data` being the 60 | base class, all its methods can also be used here. 61 | In addition, single graphs can be reconstructed via the assignment vector 62 | :obj:`batch`, which maps each node to its respective graph identifier. 63 | """ 64 | 65 | def __init__(self, batch=None, **kwargs): 66 | super(Batch, self).__init__(**kwargs) 67 | self.batch = batch 68 | 69 | @staticmethod 70 | def from_data_list(data_list): 71 | r"""Constructs a batch object from a python list holding 72 | :class:`torch_geometric.data.Data` objects. 73 | The assignment vector :obj:`batch` is created on the fly.""" 74 | keys = [set(data.keys) for data in data_list] 75 | keys = list(set.union(*keys)) 76 | # don't take "dists" 77 | keys = [key for key in keys if key!='dists'] 78 | assert 'batch' not in keys 79 | 80 | batch = Batch() 81 | 82 | for key in keys: 83 | batch[key] = [] 84 | batch.batch = [] 85 | 86 | cumsum = 0 87 | for i, data in enumerate(data_list): 88 | num_nodes = data.num_nodes 89 | batch.batch.append(torch.full((num_nodes, ), i, dtype=torch.long)) 90 | for key in keys: 91 | item = data[key] 92 | item = item + cumsum if __cumsum__(key, item) else item 93 | batch[key].append(item) 94 | cumsum += num_nodes 95 | for key in keys: 96 | item = batch[key][0] 97 | if torch.is_tensor(item): 98 | batch[key] = torch.cat( 99 | batch[key], dim=__cat_dim__(key, item)) 100 | elif isinstance(item, int) or isinstance(item, float): 101 | batch[key] = torch.tensor(batch[key]) 102 | else: 103 | raise ValueError('Unsupported attribute type.') 104 | batch.batch = torch.cat(batch.batch, dim=-1) 105 | 106 | return batch.contiguous() 107 | 108 | @staticmethod 109 | def from_data_list_batch(data_list): 110 | # load one batch at a time 111 | r"""Constructs a batch object from a python list holding 112 | :class:`torch_geometric.data.Data` objects. 113 | The assignment vector :obj:`batch` is created on the fly.""" 114 | flatten = lambda l: [item for sublist in l for item in sublist] 115 | data_list = flatten(data_list) 116 | keys = [set(data.keys) for data in data_list] 117 | keys = list(set.union(*keys)) 118 | # don't take "dists" 119 | keys = [key for key in keys if key != 'dists'] 120 | assert 'batch' not in keys 121 | 122 | batch = Batch() 123 | 124 | for key in keys: 125 | batch[key] = [] 126 | batch.batch = [] 127 | 128 | cumsum = 0 129 | for i, data in enumerate(data_list): 130 | num_nodes = data.num_nodes 131 | batch.batch.append(torch.full((num_nodes,), i, dtype=torch.long)) 132 | for key in keys: 133 | item = data[key] 134 | item = item + cumsum if __cumsum__(key, item) else item 135 | batch[key].append(item) 136 | cumsum += num_nodes 137 | for key in keys: 138 | item = batch[key][0] 139 | if torch.is_tensor(item): 140 | batch[key] = torch.cat( 141 | batch[key], dim=__cat_dim__(key, item)) 142 | elif isinstance(item, int) or isinstance(item, float): 143 | batch[key] = torch.tensor(batch[key]) 144 | else: 145 | raise ValueError('Unsupported attribute type.') 146 | batch.batch = torch.cat(batch.batch, dim=-1) 147 | 148 | return batch.contiguous() 149 | 150 | @property 151 | def num_graphs(self): 152 | """Returns the number of graphs in the batch.""" 153 | return self.batch[-1].item() + 1 154 | 155 | 156 | 157 | 158 | 159 | 160 | class DataLoader(torch.utils.data.DataLoader): 161 | r"""Data loader which merges data objects from a 162 | :class:`torch_geometric.data.dataset` to a mini-batch. 163 | 164 | Args: 165 | dataset (Dataset): The dataset from which to load the data. 166 | batch_size (int, optional): How may samples per batch to load. 167 | (default: :obj:`1`) 168 | shuffle (bool, optional): If set to :obj:`True`, the data will be 169 | reshuffled at every epoch (default: :obj:`True`) 170 | """ 171 | 172 | def __init__(self, dataset, batch_size=1, shuffle=True, **kwargs): 173 | super(DataLoader, self).__init__( 174 | dataset, 175 | batch_size, 176 | shuffle, 177 | collate_fn=lambda data_list: Batch.from_data_list(data_list), 178 | **kwargs) 179 | 180 | class DataLoader_batch(torch.utils.data.DataLoader): 181 | # each item is a batch of data 182 | r"""Data loader which merges data objects from a 183 | :class:`torch_geometric.data.dataset` to a mini-batch. 184 | 185 | Args: 186 | dataset (Dataset): The dataset from which to load the data. 187 | batch_size (int, optional): How may samples per batch to load. 188 | (default: :obj:`1`) 189 | shuffle (bool, optional): If set to :obj:`True`, the data will be 190 | reshuffled at every epoch (default: :obj:`True`) 191 | """ 192 | 193 | def __init__(self, dataset, batch_size=1, shuffle=True, **kwargs): 194 | super(DataLoader, self).__init__( 195 | dataset, 196 | batch_size, 197 | shuffle, 198 | collate_fn=lambda data_list: Batch.from_data_list_batch(data_list), 199 | **kwargs) -------------------------------------------------------------------------------- /src/core.py: -------------------------------------------------------------------------------- 1 | import os 2 | import networkx as nx 3 | import random 4 | 5 | 6 | # adding unsat-core info to given graph 7 | def mark_unsat_core(graph, core_file, num_vars, num_clause, is_LCG=True): 8 | core_file = open(core_file) 9 | content = core_file.readlines() 10 | while content[0].split()[0] == 'c': 11 | content = content[1:] 12 | while len(content[-1].split()) <= 1: 13 | content = content[:-1] 14 | 15 | core_index = dict() 16 | core_index['clause'] = [] 17 | core_index['vars'] = set() 18 | 19 | # parameters 20 | parameters = content[0].split() 21 | assert(parameters[0] == 'p') 22 | core_index['num_vars'] = int(parameters[2]) 23 | core_index['num_clause'] = int(parameters[3]) 24 | 25 | # mark line by line 26 | formula = content[1:] 27 | for i in range(len(formula)): 28 | if is_LCG: 29 | lits = [(int(x)-1 if int(x) > 0 else (abs(int(x)) + num_vars-1)) for x in formula[i].split()[:-1]] 30 | clause = set(graph[lits[0]]) 31 | for lit in lits[1:]: 32 | clause = clause & set(graph[lit]) 33 | tmp = clause.copy() 34 | for node in tmp: 35 | if node > 2*num_vars + num_clause: 36 | clause.remove(node) 37 | elif len(graph[node]) != len(lits): 38 | for nodelits in graph[node]: 39 | if nodelits not in lits and nodelits < 2*num_vars + num_clause: 40 | clause.remove(node) 41 | break 42 | assert(len(list(clause)) == 1) 43 | clause = list(clause)[0] 44 | graph.nodes[clause]['core'] = True 45 | core_index['clause'].append(clause) 46 | tmp = set([abs(int(x))-1 for x in formula[i].split()[:-1]]) 47 | core_index['vars'] = core_index['vars'] | tmp 48 | else: 49 | vars = [abs(int(x))-1 for x in formula[i].split()[:-1]] 50 | signs = [([1,0,0] if int(x) > 0 else [0,1,0]) for x in formula[i].split()[:-1]] 51 | clause = set() 52 | for cls in graph[vars[0]]: 53 | if graph.edges[vars[0], cls]['features'] == signs[0]: 54 | clause.add(cls) 55 | for idx in range(len(vars)): 56 | tmp = set() 57 | for cls in graph[vars[idx]]: 58 | if graph.edges[vars[idx], cls]['features'] == signs[idx]: 59 | tmp.add(cls) 60 | clause = clause & tmp 61 | tmp = clause.copy() 62 | for node in tmp: 63 | if node > num_vars + num_clause: 64 | clause.remove(node) 65 | elif len(graph[node]) != len(vars): 66 | clause.remove(node) 67 | assert(len(list(clause)) == 1) 68 | clause = list(clause)[0] 69 | graph.nodes[clause]['core'] = True 70 | core_index['clause'].append(clause) 71 | core_index['vars'] = core_index['vars'] | set(vars) 72 | 73 | core_index['vars'] = list(core_index['vars']) 74 | return core_index 75 | 76 | 77 | def scramble_graphs(graphs, node_pars1, core_indexes, scramble_ratio, is_LCG=True): 78 | for i in range(len(graphs)): 79 | if is_LCG: 80 | graphs[i] = scrambling_core_lcg(graphs[i], len(node_pars1[i])//2, core_indexes[i], scramble_ratio) 81 | else: 82 | graphs[i] = scrambling_core_fg(graphs[i], len(node_pars1[i]), core_indexes[i], scramble_ratio) 83 | return graphs 84 | 85 | # scrambling unsat-core 86 | def scrambling_core_lcg(LCG, num_vars, core_index, scramble_ratio): 87 | # scrambling_ratio: a list with 3 elements 88 | # num of permuting variable, permuting clause and flipping variable 89 | 90 | for i in range(int(scramble_ratio[0] * len(core_index['vars']))): 91 | var1 = random.choice(core_index['vars']) 92 | var2 = var1 93 | while var2 == var1: 94 | var2 = random.choice(core_index['vars']) 95 | LCG = permute_variable_lcg(var1, var2, LCG, num_vars) 96 | 97 | for i in range(int(scramble_ratio[1] * len(core_index['clause']))): 98 | clause1 = random.choice(core_index['clause']) 99 | clause2 = clause1 100 | while clause2 == clause1: 101 | clause2 = random.choice(core_index['clause']) 102 | LCG = permute_clause(clause1, clause2, LCG, num_vars) 103 | 104 | for i in range(int(scramble_ratio[2] * len(core_index['vars']))): 105 | var = random.choice(core_index['vars']) 106 | LCG = flip_variable_lcg(var, LCG, num_vars) 107 | 108 | return LCG 109 | 110 | 111 | 112 | # scrambling unsat-core 113 | def scrambling_core_fg(LCG, num_vars, core_index, scramble_ratio): 114 | # scrambling_ratio: a list with 3 elements 115 | # num of permuting variable, permuting clause and flipping variable 116 | 117 | for i in range(int(scramble_ratio[0] * len(core_index['vars']))): 118 | var1 = random.choice(core_index['vars']) 119 | var2 = var1 120 | while var2 == var1: 121 | var2 = random.choice(core_index['vars']) 122 | LCG = permute_variable_fg(var1, var2, LCG, num_vars) 123 | 124 | for i in range(int(scramble_ratio[1] * len(core_index['clause']))): 125 | clause1 = random.choice(core_index['clause']) 126 | clause2 = clause1 127 | while clause2 == clause1: 128 | clause2 = random.choice(core_index['clause']) 129 | LCG = permute_clause(clause1, clause2, LCG, num_vars) 130 | 131 | for i in range(int(scramble_ratio[2] * len(core_index['vars']))): 132 | var = random.choice(core_index['vars']) 133 | LCG = flip_variable_fg(var, LCG, num_vars) 134 | 135 | return LCG 136 | 137 | 138 | def output_core(graphs, node_pars1, core_indexes, graph_names, out_dir, is_LCG): 139 | if not os.path.isdir(out_dir): 140 | os.mkdir(out_dir) 141 | for idx, graph in enumerate(graphs): 142 | node_par1 = node_pars1[idx] 143 | core_dir = core_indexes[idx] 144 | graph_name = graph_names[idx] 145 | 146 | if is_LCG: 147 | num_var = len(node_par1) // 2 148 | core_clauses = [] 149 | for clause_node in core_dir['clause']: 150 | assert (clause_node >= num_var * 2) 151 | neighbors = list(graph.neighbors(clause_node)) 152 | clause = "" 153 | assert(len(neighbors) > 0) 154 | for lit in neighbors: 155 | if lit < num_var: 156 | clause += "{} ".format(lit + 1) 157 | else: 158 | assert(lit < 2 * num_var) 159 | clause += "{} ".format(-(lit - num_var + 1)) 160 | clause += "0\n" 161 | core_clauses.append(clause) 162 | else: 163 | pass 164 | 165 | save_name = f'{out_dir}/{graph_name}_core' 166 | with open(save_name, 'w') as out_file: 167 | out_file.write("p cnf {} {} \n".format(num_var, len(core_clauses))) 168 | for clause in core_clauses: 169 | out_file.write(clause) 170 | 171 | return 172 | 173 | 174 | 175 | def permute_variable_lcg(var1, var2, LCG, num_vars): 176 | neg_var1 = var1 + num_vars 177 | neg_var2 = var2 + num_vars 178 | mapping = {} 179 | mapping[var1] = var2 180 | mapping[var2] = var1 181 | mapping[neg_var1] = neg_var2 182 | mapping[neg_var2] = neg_var1 183 | LCG = nx.relabel_nodes(LCG, mapping) 184 | return LCG 185 | 186 | 187 | def permute_variable_fg(var1, var2, LCG, num_vars): 188 | mapping = {} 189 | mapping[var1] = var2 190 | mapping[var2] = var1 191 | LCG = nx.relabel_nodes(LCG, mapping) 192 | return LCG 193 | 194 | 195 | def permute_clause(clause1, clause2, LCG, num_vars): 196 | mapping = {} 197 | mapping[clause1] = clause2 198 | mapping[clause2] = clause1 199 | LCG = nx.relabel_nodes(LCG, mapping) 200 | return LCG 201 | 202 | 203 | def flip_variable_lcg(var, LCG, num_vars): 204 | assert(var < num_vars) 205 | neg_var = var + num_vars 206 | mapping = {} 207 | mapping[var] = neg_var 208 | mapping[neg_var] = var 209 | LCG = nx.relabel_nodes(LCG, mapping) 210 | return LCG 211 | 212 | 213 | def flip_variable_fg(var, LCG, num_vars): 214 | assert(var < num_vars) 215 | neighbour_clause = list(LCG[var]) 216 | for cls in neighbour_clause: 217 | if LCG.edges[var, cls]['features'] == [1,0,0]: 218 | LCG.edges[var, cls]['features'] = [0,1,0] 219 | elif LCG.edges[var, cls]['features'] == [0,1,0]: 220 | LCG.edges[var, cls]['features'] = [1,0,0] 221 | return LCG -------------------------------------------------------------------------------- /src/train.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | from sklearn.metrics import roc_auc_score 4 | import os.path 5 | import numpy as np 6 | import os 7 | import time 8 | 9 | from model import * 10 | from utils import * 11 | import core as core 12 | import logging 13 | 14 | 15 | def train(args, loader_train, loader_test, model, optimizer, 16 | writer_train, writer_test, device, model_label, save_dir='model/'): 17 | if not os.path.isdir(save_dir): 18 | os.mkdir(save_dir) 19 | loss_func = nn.BCEWithLogitsLoss() 20 | out_act = nn.Sigmoid() 21 | for epoch in range(args.epoch_num): 22 | loss_train = 0 23 | auc_train = 0 24 | acc_train = 0 25 | grad_norm_min = 0 26 | grad_norm_max = 0 27 | grad_norm_mean = 0 28 | pred_np_min = 0 29 | pred_np_max = 0 30 | pred_np_mean = 0 31 | counter = 0 32 | time_model = 0 33 | time_total = time.time() 34 | for data in loader_train: 35 | time1 = time.time() 36 | model.train() 37 | optimizer.zero_grad() 38 | data.to(device) 39 | 40 | out = model(data) 41 | 42 | edge_mask = torch.cat((data.node_index_positive, data.node_index_negative), dim=-1) 43 | nodes_first = torch.index_select(out, 0, edge_mask[0, :].long().to(device)) 44 | nodes_second = torch.index_select(out, 0, edge_mask[1, :].long().to(device)) 45 | pred = torch.sum(nodes_first * nodes_second, dim=-1) 46 | label_positive = torch.ones([data.node_index_positive.shape[1], ], dtype=pred.dtype) 47 | label_negative = torch.zeros([data.node_index_negative.shape[1], ], dtype=pred.dtype) 48 | label = torch.cat((label_positive, label_negative)).to(device) 49 | loss = loss_func(pred, label) 50 | loss_train += loss.cpu().data.numpy() 51 | label_np = label.flatten().cpu().numpy() 52 | pred_np = out_act(pred).flatten().data.cpu().numpy() 53 | pred_np_min += pred_np.min() 54 | pred_np_max += pred_np.max() 55 | pred_np_mean += pred_np.mean() 56 | auc_train += roc_auc_score(label_np, pred_np) 57 | acc_train += np.mean((pred_np>0.5).astype(int)==label_np) 58 | # update 59 | loss.backward() 60 | optimizer.step() 61 | 62 | grad_norms = [] 63 | for p in model.parameters(): 64 | if p.grad is not None: 65 | grad_norms.append(p.grad.norm().cpu().numpy()) 66 | grad_norm_min += min(grad_norms) 67 | grad_norm_max += max(grad_norms) 68 | grad_norm_mean += sum(grad_norms)/len(grad_norms) 69 | counter += 1 70 | time2 = time.time() 71 | time_model += time2-time1 72 | time_total = time.time() - time_total 73 | if epoch % args.epoch_log == 0: 74 | print('[Epoch {}/{}] Train time per epoch: total {:.4f}, model {:.4f}'.format(epoch, args.epoch_num, time_total,time_model)) 75 | 76 | loss_train /= counter 77 | auc_train /= counter 78 | acc_train /= counter 79 | grad_norm_min /= counter 80 | grad_norm_max /= counter 81 | grad_norm_mean /= counter 82 | pred_np_min /= counter 83 | pred_np_max /= counter 84 | pred_np_mean /= counter 85 | writer_train.add_scalar('auc', auc_train, epoch) 86 | writer_train.add_scalar('loss', loss_train, epoch) 87 | writer_train.add_scalar('grad_norm_min', grad_norm_min, epoch) 88 | writer_train.add_scalar('grad_norm_max', grad_norm_max, epoch) 89 | writer_train.add_scalar('grad_norm_mean', grad_norm_max, epoch) 90 | writer_train.add_scalar('pred_np_min', pred_np_min, epoch) 91 | writer_train.add_scalar('pred_np_max', pred_np_max, epoch) 92 | writer_train.add_scalar('pred_np_mean', pred_np_mean, epoch) 93 | 94 | if epoch % args.epoch_save == 0: 95 | torch.save(model.state_dict(), save_dir+args.name+"_"+str(epoch)+"_"+model_label) 96 | print('model saved!') 97 | 98 | if epoch % args.epoch_log == 0 and epoch>=args.epoch_test: 99 | # test 100 | loss_test = 0 101 | auc_test = 0 102 | acc_test = 0 103 | counter = 0 104 | for data in loader_test: 105 | # evaluate 106 | data.to(device) 107 | 108 | out = model(data) 109 | 110 | edge_mask = torch.cat((data.node_index_positive, data.node_index_negative), dim=-1) 111 | nodes_first = torch.index_select(out, 0, edge_mask[0, :].long().to(device)) 112 | nodes_second = torch.index_select(out, 0, edge_mask[1, :].long().to(device)) 113 | pred = torch.sum(nodes_first * nodes_second, dim=-1) 114 | label_positive = torch.ones([data.node_index_positive.shape[1], ], dtype=pred.dtype) 115 | label_negative = torch.zeros([data.node_index_negative.shape[1], ], dtype=pred.dtype) 116 | label = torch.cat((label_positive, label_negative)).to(device) 117 | loss_test += loss_func(pred, label).cpu().data.numpy() 118 | label_np = label.flatten().cpu().numpy() 119 | pred_np = out_act(pred).flatten().data.cpu().numpy() 120 | auc_test += roc_auc_score(label_np, pred_np) 121 | acc_test += np.mean((pred_np > 0.5).astype(int) == label_np) 122 | counter += 1 123 | loss_test /= counter 124 | auc_test /= counter 125 | acc_test /= counter 126 | print('Model {}'.format(args.model), epoch, 'Loss {:.4f}'.format(loss_train), 127 | 'Train AUC: {:.4f}'.format(auc_train), 'Test AUC: {:.4f}'.format(auc_test), 128 | 'Train ACC: {:.4f}'.format(acc_train), 'Test ACC: {:.4f}'.format(acc_test)) 129 | 130 | writer_test.add_scalar('auc', auc_test, epoch) 131 | writer_test.add_scalar('loss', loss_test, epoch) 132 | 133 | f_out = open("progress.txt", "w") 134 | f_out.write(str(epoch)) 135 | f_out.close() 136 | 137 | return model 138 | 139 | 140 | 141 | 142 | def test(args, generator_list, model_intercmt, model_incmt, clause_num_intercmt, clause_num_incmt, file_names, repeat=0, outdir='graphs/'): 143 | if not os.path.isdir(outdir): 144 | os.mkdir(outdir) 145 | clause_num_intercmt = np.repeat(clause_num_intercmt, repeat) 146 | clause_num_incmt = np.repeat(clause_num_incmt, repeat) 147 | # generate graph batch 148 | for i,generator in enumerate(generator_list): 149 | time0 = time.time() 150 | time_model = 0 151 | generator.reset() 152 | while True: 153 | time1 = time.time() 154 | flag_intercmt = len(generator.node_par2s) <= clause_num_incmt[i] 155 | out = model_intercmt(generator.data) if flag_intercmt else model_incmt(generator.data) 156 | 157 | nodes_first = torch.index_select(out, 0, generator.data.node_index[0, :]) 158 | nodes_second = torch.index_select(out, 0, generator.data.node_index[1, :]) 159 | pred = torch.sum(nodes_first * nodes_second, dim=-1) 160 | try: 161 | pred_id = torch.argmax(pred).data 162 | except RuntimeError: 163 | print(f'error on pred length: {len(pred)}') 164 | assert(False) 165 | time2 = time.time() 166 | time_model += time2 - time1 167 | exit_flag = generator.update(generator.data.node_index[:, pred_id], clause_num_intercmt[i], flag_intercmt) 168 | if exit_flag: 169 | break 170 | time3 = time.time() 171 | print('Generate time for 1 graph: total {:.4f}, model {:.4f}'.format( 172 | time3 - time0, time_model)) 173 | logging.info('Generate time for 1 graph: total {:.4f}, model {:.4f}'.format( 174 | time3 - time0, time_model)) 175 | 176 | 177 | graphs = [generator.get_graph() for generator in generator_list] 178 | nodes_par1s = [generator.nodes_par1 for generator in generator_list] 179 | core_indexes = [generator.core_indexes for generator in generator_list] 180 | 181 | ### scramble unsat-core 182 | if args.core_flag: 183 | if args.model in ["SAGE", "GCN"]: 184 | is_LCG = True 185 | else: 186 | is_LCG = False 187 | scramble_ratio = args.scramble_ratio.split('-') 188 | scramble_ratio = [int(r) * 0.1 for r in scramble_ratio] 189 | graphs = core.scramble_graphs(graphs, nodes_par1s, core_indexes, scramble_ratio, is_LCG) 190 | core.output_core(graphs, nodes_par1s, core_indexes, file_names, f'formulas/{args.data_name}_core/', is_LCG) 191 | 192 | 193 | save_graph_list(graphs, f'{outdir}{args.name}_{str(args.alpha)}_{str(args.clause_ratio)}_{str(args.repeat)}.dat', file_names) 194 | node_nums = [graph.number_of_nodes() for graph in graphs] 195 | edge_nums = [graph.number_of_edges() for graph in graphs] 196 | print('Num {}, Node {} {} {}, Edge {} {} {}'.format( 197 | len(graphs), min(node_nums), max(node_nums), sum(node_nums) / len(node_nums), min(edge_nums), 198 | max(edge_nums), sum(edge_nums) / len(edge_nums))) 199 | logging.info('Num {}, Node {} {} {}, Edge {} {} {}'.format( 200 | len(graphs), min(node_nums), max(node_nums), sum(node_nums) / len(node_nums), min(edge_nums), 201 | max(edge_nums), sum(edge_nums) / len(edge_nums))) 202 | 203 | -------------------------------------------------------------------------------- /src/eval/conversion_lcg.py: -------------------------------------------------------------------------------- 1 | import networkx as nx 2 | import argparse 3 | import os 4 | 5 | def main(): 6 | args = make_arguments().parse_args() 7 | source_path = args.src 8 | store_dir = args.store_dir 9 | action = args.action 10 | 11 | try: 12 | os.mkdir(store_dir) 13 | except: 14 | pass 15 | 16 | if action == "sat2lcg": 17 | for filename in os.listdir(source_path): 18 | assert(filename[-4:] == ".cnf") 19 | lcg_filename = filename.split(".")[0] + "_lcg_edge_list" 20 | LCG = sat_to_LCG(source_path + "/" + filename) 21 | save_graph_list(LCG, "{}/{}".format(store_dir, lcg_filename)) 22 | elif action == "lcg2sat": 23 | graphs, graph_names = load_graphs(source_path) 24 | benchmark_name = os.path.basename(source_path).split('.')[0] 25 | for i, graph in enumerate(graphs): 26 | LCG_to_sat(graph, "{}/{}.cnf".format(store_dir, graph_names[i])) 27 | elif action == "sat2vig": 28 | for filename in os.listdir(source_path): 29 | assert(filename[-4:] == ".cnf") 30 | lcg_filename = filename.split(".")[0] + "_vig_edge_list" 31 | VIG = sat_to_VIG(source_path + "/" + filename) 32 | save_graph_list(VIG, "{}/{}".format(store_dir, lcg_filename)) 33 | else: 34 | print("Invalid action!") 35 | return 36 | 37 | def make_arguments(): 38 | parser = argparse.ArgumentParser() 39 | parser.add_argument("--src", type=str, help="path to source objects") 40 | parser.add_argument("--store-dir", "-s", type=str, help="Directory to store the converted objects") 41 | parser.add_argument("--action", "-a", type=str, default="sat2lcg", help="sat2lcg/lcg2sat/sat2vig") 42 | return parser 43 | 44 | def save_graph_list(G, fname): 45 | with open(fname, "wb") as f: 46 | nx.write_edgelist(G, f) 47 | 48 | def load_graphs(filename): 49 | graphs = [] 50 | file_names = [] 51 | Gs = nx.read_gpickle(filename) 52 | for G in Gs: 53 | graph = nx.Graph() 54 | graph.add_nodes_from(G[1]) 55 | graph.add_edges_from(G[2]) 56 | graphs.append(graph) 57 | file_names.append(G[0]) 58 | return graphs, file_names 59 | 60 | def cut_inner_edge(mat, partite): 61 | for i in range(partite): 62 | for j in range (partite): 63 | mat[i][j] = 0 64 | for i in range(len(mat) - partite): 65 | for j in range(len(mat) - partite): 66 | mat[i + partite][j + partite] = 0 67 | return mat 68 | 69 | # convert a file of adjacency matrix to a matrix 70 | def file_to_mat(filename): 71 | print ("reading file...") 72 | lst = [] 73 | with open(filename, 'r') as file: 74 | for line in file.readlines(): 75 | if ',' in line: 76 | l = line.split(", ") 77 | while "\n" in l: 78 | l.remove("\n") 79 | else: 80 | l = line.split() 81 | for i in range(len(l)): 82 | l[i] = int(float(l[i])) 83 | lst.append(l) 84 | print ("Successful!") 85 | return lst 86 | 87 | # Takes in an adjacency matrix of a VCG, convert it to a dimacs file 88 | def LCG_to_sat(graph, save_name): 89 | nodes = list(graph.nodes()) 90 | assert(0 in nodes) 91 | num_var = min(list(graph.neighbors(0))) 92 | clauses = [] 93 | for node in nodes: 94 | if (node >= num_var * 2): 95 | neighbors = list(graph.neighbors(node)) 96 | clause = "" 97 | assert(len(neighbors) > 0) 98 | for lit in neighbors: 99 | if lit < num_var: 100 | clause += "{} ".format(lit + 1) 101 | else: 102 | assert(lit < 2 * num_var) 103 | clause += "{} ".format(-(lit - num_var + 1)) 104 | clause += "0\n" 105 | clauses.append(clause) 106 | with open(save_name, 'w') as out_file: 107 | out_file.write("c generated by G2SAT lcg\n") 108 | out_file.write("p cnf {} {}\n".format(num_var, len(clauses))) 109 | for clause in clauses: 110 | out_file.write(clause) 111 | return 112 | 113 | # Takes in an dimacs file, convert it to a networkx graph representation of the variable-clause graph 114 | def sat_to_VCG(source): 115 | cnf = open(source) 116 | content = cnf.readlines() 117 | while content[0].split()[0] == 'c': 118 | content = content[1:] 119 | while len(content[-1].split()) <= 1: 120 | content = content[:-1] 121 | 122 | # Paramters 123 | parameters = content[0].split() 124 | formula = content[1:] # The clause part of the dimacs file 125 | formula = to_int_matrix(formula) 126 | num_vars = int(parameters[2]) 127 | num_clause = int(parameters[3]) 128 | 129 | VCG = nx.Graph() 130 | VCG.add_nodes_from(range(num_vars + num_clause + 1)[1:]) 131 | preprocess_VCG(formula, VCG, num_vars) # Build a VCG 132 | return VCG 133 | 134 | # Takes in an dimacs file, convert it to a nx graph representation of the literal-clause graph 135 | def sat_to_LCG(source): 136 | cnf = open(source) 137 | content = cnf.readlines() 138 | while content[0].split()[0] == 'c': 139 | content = content[1:] 140 | while len(content[-1].split()) <= 1: 141 | content = content[:-1] 142 | 143 | # Paramters 144 | parameters = content[0].split() 145 | formula = content[1:] # The clause part of the dimacs file 146 | formula = to_int_matrix(formula) 147 | num_vars = int(parameters[2]) 148 | num_clause = int(parameters[3]) 149 | 150 | VCG = nx.Graph() 151 | VCG.add_nodes_from(range(num_vars * 2 + num_clause + 1)[1:]) 152 | preprocess_LCG(formula, VCG, num_vars) # Build a VCG 153 | # mat = nx.adjacency_matrix(VCG) 154 | return VCG 155 | 156 | # Takes in an dimacs file, convert it to a nx graph representation of the literal incidence graph 157 | def sat_to_LIG(source): 158 | cnf = open(source) 159 | content = cnf.readlines() 160 | while content[0].split()[0] == 'c': 161 | content = content[1:] 162 | while len(content[-1].split()) <= 1: 163 | content = content[:-1] 164 | 165 | # Paramters 166 | parameters = content[0].split() 167 | formula = content[1:] 168 | formula = to_int_matrix(formula) 169 | num_vars = int(parameters[2]) 170 | num_clause = int(parameters[3]) 171 | 172 | LIG = nx.Graph() 173 | LIG.add_nodes_from(range(num_vars * 2 + 1)[1:]) 174 | preprocess_LIG(formula, LIG, num_vars) # Build a LIG 175 | return LIG 176 | 177 | # Takes in an dimacs file, convert it to a nx graph representation of the variable incidence graph 178 | def sat_to_VIG(source): 179 | cnf = open(source) 180 | content = cnf.readlines() 181 | while content[0].split()[0] == 'c': 182 | content = content[1:] 183 | while len(content[-1].split()) <= 1: 184 | content = content[:-1] 185 | 186 | # Paramters 187 | parameters = content[0].split() 188 | formula = content[1:] 189 | formula = to_int_matrix(formula) 190 | num_vars = int(parameters[2]) 191 | num_clause = int(parameters[3]) 192 | 193 | VIG = nx.Graph() 194 | VIG.add_nodes_from(range(num_vars + 1)[1:]) 195 | preprocess_VIG(formula, VIG, num_vars) # Build a LIG 196 | return VIG 197 | 198 | def get_cl_string(clause): 199 | s = "" 200 | clause = sorted(clause) 201 | for ele in clause: 202 | s += str(ele) + "-" 203 | return s[:-1] 204 | 205 | def remove_duplicate(content): 206 | new_content = [content[0].split()] 207 | cs = set() 208 | num_clause = 0 209 | for line in content[1:]: 210 | line = map(int, line.split()[:-1]) 211 | c = get_cl_string(line) 212 | if c not in cs: 213 | num_clause += 1 214 | new_content.append(line) 215 | cs.add(c) 216 | new_content[0][3] = num_clause 217 | return new_content 218 | 219 | def preprocess_VCG(formula, VCG, num_vars): 220 | """ 221 | Builds VCG 222 | """ 223 | for cn in range(len(formula)): 224 | for var in formula[cn]: 225 | if var > 0: 226 | VCG.add_edge(var, cn + num_vars + 1) 227 | elif var < 0: 228 | VCG.add_edge(abs(var), cn + num_vars + 1) 229 | 230 | def preprocess_LCG(formula, LCG, num_vars): 231 | """ 232 | Builds LCG 233 | """ 234 | for cn in range(len(formula)): 235 | for var in formula[cn]: 236 | if var > 0: 237 | LCG.add_edge(var, cn + 2 * num_vars + 1) 238 | elif var < 0: 239 | LCG.add_edge(abs(var) + num_vars, cn + 2 * num_vars + 1) 240 | 241 | def preprocess_LIG(formula, LIG, num_vars): 242 | """ 243 | Builds LIG. 244 | """ 245 | for cn in range(len(formula)): 246 | for i in range(len(formula[cn])-1): 247 | for j in range(len(formula[cn]))[i+1:]: 248 | lit1 = formula[cn][i] 249 | lit2 = formula[cn][j] 250 | if lit1 > 0: 251 | node1 = lit1 252 | elif lit1 < 0: 253 | node1 = abs(lit1) + num_vars 254 | if lit2 > 0: 255 | node2 = lit2 256 | elif lit2 < 0: 257 | node2 = abs(lit2) + num_vars 258 | LIG.add_edge(node1, node2) 259 | 260 | def preprocess_VIG(formula, VIG, num_vars): 261 | """ 262 | Builds VIG. 263 | """ 264 | for cn in range(len(formula)): 265 | for i in range(len(formula[cn])-1): 266 | for j in range(len(formula[cn]))[i+1:]: 267 | lit1 = formula[cn][i] 268 | lit2 = formula[cn][j] 269 | if lit1 > 0: 270 | node1 = lit1 271 | elif lit1 < 0: 272 | node1 = abs(lit1) 273 | if lit2 > 0: 274 | node2 = lit2 275 | elif lit2 < 0: 276 | node2 = abs(lit2) 277 | VIG.add_edge(node1, node2) 278 | 279 | def to_int_matrix(formula): 280 | new_formula = [] 281 | for i in range(len(formula)): 282 | line = [] 283 | for ele in formula[i].split()[: -1]: 284 | line.append(int(ele)) 285 | new_formula.append(line) 286 | return new_formula 287 | 288 | if __name__ == "__main__": 289 | main() 290 | -------------------------------------------------------------------------------- /src/eval/scalefree.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | using namespace std; 11 | 12 | char *filename; 13 | int maxxmin = 10; 14 | 15 | 16 | void printUsage(){ 17 | cout << "scalefree: analyzer of the scale-free structure of SAT instances. Version 2.3" << endl; 18 | cout << "Copyright (C) 2016 C. Ansótegui, M.L. Bonet, J. Giráldez-Cru, J. Levy" << endl; 19 | cout << "Cite: C. Ansótegui, M. L. Bonet, J. Levy: \"On the Structure of Industrial SAT Instances\"." <" << endl; 22 | cout << "OPTIONS:" << endl; 23 | cout << " -x : Max number of values discarded to estimate alpha or beta (default: 10)." << endl; 24 | exit(-1); 25 | } 26 | 27 | void parseArgs(int argc, char *argv[]){ 28 | int opt; 29 | while((opt=getopt(argc, argv, "h?x:")) != -1) 30 | switch(opt){ 31 | case 'x': 32 | maxxmin = atoi(optarg); 33 | break; 34 | case 'h': 35 | case '?': 36 | default: 37 | printUsage(); 38 | } 39 | if(optind < argc) 40 | filename = argv[optind]; 41 | else 42 | printUsage(); 43 | } 44 | 45 | 46 | //----------------------------------------------------------------------------- 47 | double powlawc(int x, int xmin, double alpha) { 48 | //----------------------------------------------------------------------------- 49 | // Computes sum_{i=x}^{\infty} x^{alpha} / sum_{i=xmin}^{\infty} x^{alpha} 50 | // or approximates it as (x/xmin)^(alpha+1) 51 | //----------------------------------------------------------------------------- 52 | assert(alpha < -1); 53 | assert(xmin <= x); 54 | #define MAXITER 10000 55 | double num = 0, den = 0; 56 | int i; 57 | 58 | if (xmin < 25) { 59 | 60 | for (i=xmin; i 0.00000001 && n < MAXITER) { 67 | den += pow((double)i, alpha); 68 | num += pow((double)i, alpha); 69 | i++; 70 | n++; 71 | pold = p; 72 | p = num/den; 73 | } 74 | if (n < MAXITER) 75 | return p; 76 | } 77 | return pow((double)x/xmin, alpha + 1); 78 | } 79 | 80 | //----------------------------------------------------------------------------- 81 | double exponc(int x, int xmin, double beta) { 82 | //----------------------------------------------------------------------------- 83 | return exp(beta*(xmin - x)) ; 84 | } 85 | 86 | 87 | //----------------------------------------------------------------------------- 88 | void arity(vector > &arityVar, vector > &arityCla){ 89 | //----------------------------------------------------------------------------- 90 | FILE *source; 91 | 92 | source = fopen(filename, "r"); 93 | if(!source){ 94 | cerr << "ERROR: Unable to read CNF file " << filename << endl; 95 | exit(-1); 96 | } 97 | 98 | // Skip comments 99 | int aux=-1; 100 | while((aux=getc(source))=='c') 101 | while (getc(source)!='\n'); 102 | ungetc(aux,source); 103 | 104 | // File Head 105 | int totVars=0, totClauses=0; 106 | if( !fscanf(source, "p cnf %i %i", &totVars, &totClauses)) { 107 | cerr << "Invalid CNF file\n"; 108 | exit(-1); 109 | } 110 | 111 | vector nOccurs(totVars,0); //nOccurs[i] = number of occurences of variable i+1 112 | vector nSizes; //nSizes[i] = number of clauses of size i 113 | 114 | int var; 115 | int size = 0; 116 | while(fscanf(source, "%d", &var)==1) { 117 | if(var == 0){ 118 | if(size >= nSizes.size()) 119 | nSizes.resize(size+1); 120 | nSizes[size]++; 121 | size=0; 122 | } else { 123 | size++; 124 | nOccurs[abs(var)-1]++; 125 | } 126 | } 127 | 128 | sort(nOccurs.begin(), nOccurs.end()); 129 | 130 | int prev = nOccurs[0]; 131 | int addition = 1; 132 | for (int i=1; i0) 145 | arityCla.push_back(make_pair(i,nSizes[i])); 146 | } 147 | 148 | 149 | //----------------------------------------------------------------------------- 150 | void mostlikely(vector > &v, string filename) { 151 | //----------------------------------------------------------------------------- 152 | 153 | if (v.size() < 3) { 154 | cerr << "ERROR: Unable to compute exponent for "< x(n), y(n+1), syx(n+1), sylogx(n+1); 162 | 163 | double Sy = 0; // the sum of the occurences of all degrees 164 | for (int i=0; i=0; i--) { 170 | x[i] = v[i].first; 171 | y[i] = y[i+1] + v[i].second / Sy; // Cumulative F(real) 172 | sylogx[i] = sylogx[i+1] + v[i].second / Sy * log(x[i]); 173 | syx[i] = syx[i+1] + v[i].second / Sy * x[i]; 174 | } 175 | 176 | //------ Compute, for powerlaw (a) and exponential (b), 177 | // the best alpha, xmin, dif and where is located-------------------- 178 | 179 | double bestalpha, bestbeta; 180 | int bestxmina=0, bestxminb=0; 181 | double bestdifa = 1, bestdifb = 1; 182 | int bestinda, bestindb; 183 | int wherea, whereb; 184 | 185 | int ind = 0; 186 | int xmin; 187 | 188 | 189 | for (int ind=0; ind<=maxxmin && ind= bestdifa) { 208 | worstdif = aux; 209 | worstx = (int)x[j]; 210 | j = n; //Finish search of worst diff 211 | } else if (aux >= worstdif) { 212 | worstdif = aux; 213 | worstx = (int)x[j]; 214 | } 215 | } 216 | for (int j=ind; j= bestdifa) { 221 | worstdif = aux; 222 | worstx = (int)x[j]+1; 223 | j = n; //Finish search of worst diff 224 | } else if (aux >= worstdif) { 225 | worstdif = aux; 226 | worstx = (int)x[j]+1; 227 | } 228 | } 229 | } 230 | if(worstdif < bestdifa) { 231 | bestalpha = alpha; 232 | bestxmina = xmin; 233 | bestdifa = worstdif; 234 | bestinda = ind; 235 | wherea = worstx; 236 | } 237 | 238 | //------------- Model exponential ----------------------------------------- 239 | worstdif = -1; 240 | worstx = -1; 241 | 242 | for (int j=ind+1; j= bestdifb) { 246 | worstdif = aux; 247 | worstx = x[j]; 248 | j = n; //Finish search of worst diff 249 | } else if (aux >= worstdif) { 250 | worstdif = aux; 251 | worstx = x[j]; 252 | } 253 | } 254 | for (int j=ind; j= bestdifb) { 259 | worstdif = aux; 260 | worstx = x[j]+1; 261 | j = n; //Finish search of worst diff 262 | } else if (aux >= worstdif) { 263 | worstdif = aux; 264 | worstx = x[j]+1; 265 | } 266 | } 267 | } 268 | if(worstdif < bestdifb) { 269 | bestbeta = beta; 270 | bestxminb = xmin; 271 | bestdifb = worstdif; 272 | bestindb = ind; 273 | whereb = worstx; 274 | } 275 | } 276 | 277 | //--------- Write results -------------------------------------------- 278 | 279 | cout << " Powerlaw:\n"; 280 | cout << " alpha = " << -bestalpha << endl; 281 | cout << " min. value = " << bestxmina << endl; 282 | cout << " max. error = " << bestdifa << endl; //" in value:"<< wherea << endl; 283 | cout << " Exponential:\n"; 284 | cout << " beta = " << bestbeta << endl; 285 | cout << " min. value = " << bestxminb << endl; 286 | cout << " max. error = " << bestdifb << endl; //" in value:"<< whereb << endl; 287 | // 288 | // //--------- Generate file INT----------------------------------------- 289 | // 290 | // string fileint(filename); 291 | // fileint.append(".int"); 292 | // FILE *fint = fopen(fileint.c_str(), "w"); 293 | // if(fint == NULL) { 294 | // cerr << "ERROR: Unable to open file " << fileint << endl; 295 | // exit(-1); 296 | // } 297 | // 298 | // for (int i=0; i > arityVar; 340 | vector > arityCla; 341 | double bestAlphaVar, bestBetaVar, bestAlphaCla, bestBetaCla; 342 | 343 | parseArgs(argc,argv); 344 | arity(arityVar, arityCla); 345 | 346 | string nameroot(filename); 347 | nameroot=nameroot.substr(0,nameroot.length()-4); 348 | 349 | string namevar(nameroot); 350 | namevar.append(".var"); 351 | cout << "VARIABLES" << endl; 352 | mostlikely(arityVar, namevar); 353 | 354 | if (arityCla.size() > 2) { 355 | string namecla(nameroot); 356 | namecla.append(".cla"); 357 | cout << "CLAUSES" << endl; 358 | mostlikely(arityCla, namecla); 359 | } 360 | } 361 | -------------------------------------------------------------------------------- /src/eval/evaluate_graphs_lcg.py: -------------------------------------------------------------------------------- 1 | #from sklearn import preprocessing 2 | import sys 3 | import subprocess 4 | sys.path.append("/Library/Python/2.7/site-packages") 5 | import networkx as nx 6 | import numpy as np 7 | from scipy import stats 8 | from pulp import * 9 | from optparse import OptionParser 10 | import community 11 | import csv 12 | 13 | """ 14 | This file takes in a dimacs file, calculates the features of it and stores them in a 15 | .txt file. 16 | """ 17 | 18 | def main(): 19 | parser = getParser() 20 | 21 | (options, args) = parser.parse_args() 22 | 23 | path_to_formulas = options.path_to_formulas 24 | benchmark_set_name = path_to_formulas.split("/")[-2] 25 | out_name = options.out_file 26 | scale_free = options.scale_free 27 | 28 | title = [ "name", "num. vars", "num. clauses", "VIG clust.", 29 | "mod. VIG", "mod. LIG", "mod. VCG", "mod. LCG", 30 | "var. alpha", "clause alpha"] 31 | 32 | lines = [] 33 | for filename in os.listdir(path_to_formulas): 34 | source = path_to_formulas + filename 35 | cnf = open(source) 36 | content = cnf.readlines() 37 | cnf.close() 38 | 39 | print ("Successfully read generated file {}".format(source)) 40 | 41 | while content[0].split()[0] == 'c': 42 | content = content[1:] 43 | while len(content[-1].split()) <= 1: 44 | content = content[:-1] 45 | 46 | 47 | parameters = content[0].split() 48 | formula = content[1:] 49 | formula = to_int_matrix(formula) 50 | (formula, num_clauses) = remove_duplicate(formula) 51 | 52 | num_vars = int(parameters[2]) 53 | 54 | assert (get_vacuous(formula) == 0) 55 | assert(num_vars != 0) 56 | assert(num_clauses == len(formula)) 57 | 58 | VIG = nx.Graph() 59 | VIG.add_nodes_from(range(num_vars+1)[1:]) 60 | 61 | LIG = nx.Graph() 62 | LIG.add_nodes_from(range(num_vars * 2 + 1)[1:]) 63 | 64 | VCG = nx.Graph() 65 | VCG.add_nodes_from(range(num_vars + num_clauses + 1)[1:]) 66 | 67 | LCG = nx.Graph() 68 | VCG.add_nodes_from(range(2 * num_vars + num_clauses + 1)[1:]) 69 | 70 | preprocess_VIG(formula, VIG) # Build a VIG 71 | preprocess_LIG(formula, LIG, num_vars) # Build a LIG 72 | preprocess_VCG(formula, VCG, num_vars) # Build a VCG 73 | preprocess_LCG(formula, LCG, num_vars) # Build a VCG 74 | 75 | features = [] 76 | features.append(filename[:-3]) 77 | features.append(num_vars) 78 | features.append(num_clauses) 79 | features += [nx.average_clustering(VIG)] 80 | features += get_modularities(VIG, LIG, VCG, LCG) # Modularities of VIG & VCG 81 | features += get_scale_free(source, scale_free) 82 | lines.append(features) 83 | 84 | if out_name != None: 85 | with open(out_name, 'a') as csvFile: 86 | writer = csv.writer(csvFile) 87 | writer.writerows([title] + lines) 88 | else: 89 | lines = np.array(lines) 90 | means = np.nanmean(lines, axis=0) 91 | std = np.nanstd(lines, axis=0) 92 | for i, column_name in enumerate(title): 93 | print("mean/std {}: {}/{}".format(column_name, means[i], std[i])) 94 | 95 | def getParser(): 96 | parser = OptionParser(usage="usage: %prog [options] formula outfile", 97 | version="%prog 1.0") 98 | parser.add_option("-o", "--out", 99 | dest="out_file", 100 | default=None, 101 | help="save stats into a file") 102 | parser.add_option("-s", "--scale-free", 103 | dest="scale_free", 104 | default=None, 105 | help="enter the path to the scale-free computing binary") 106 | parser.add_option("-d", "--path-to-formulas", 107 | dest="path_to_formulas", 108 | default=None, 109 | help="Path to the directory of the formulas") 110 | return parser 111 | 112 | 113 | #--------------------------------------------Unit Clause---------------------------------------------------# 114 | def no_unit_clause(formula): 115 | for line in formula: 116 | if len(line) == 1: 117 | return False 118 | return True 119 | 120 | 121 | #--------------------------------------------preprocess---------------------------------------------------# 122 | def to_int_matrix(formula): 123 | for i in range(len(formula)): 124 | formula[i] = list(map(int, formula[i].split()))[: -1] 125 | return formula 126 | 127 | def get_cl_string(clause): 128 | s = "" 129 | clause.sort() 130 | for ele in clause: 131 | s += str(ele) + "," 132 | return s[:-1] 133 | 134 | def remove_duplicate(formula): 135 | cs = [] 136 | new_formula = [] 137 | num_clause = 0 138 | for line in formula: 139 | c = get_cl_string(line) 140 | if c not in cs: 141 | num_clause += 1 142 | new_formula.append(line) 143 | cs.append(c) 144 | return (new_formula, num_clause) 145 | 146 | 147 | def preprocess_VIG(formula, VIG): 148 | """ 149 | Builds VIG. 150 | """ 151 | for cn in range(len(formula)): 152 | for i in range(len(formula[cn])-1): 153 | for j in range(len(formula[cn]))[i+1:]: 154 | VIG.add_edge(abs(formula[cn][i]), abs(formula[cn][j])) 155 | 156 | 157 | def preprocess_LIG(formula, LIG, num_vars): 158 | for cn in range(len(formula)): 159 | for i in range(len(formula[cn])-1): 160 | for j in range(len(formula[cn]))[i+1:]: 161 | if formula[cn][i] > 0: 162 | fst = formula[cn][i] 163 | else: 164 | fst = abs(formula[cn][i]) + num_vars 165 | if formula[cn][j] > 0: 166 | snd = formula[cn][j] 167 | else: 168 | snd = abs(formula[cn][j]) + num_vars 169 | LIG.add_edge(fst, snd) 170 | 171 | def preprocess_VCG(formula, VCG, num_vars): 172 | """ 173 | Builds VCG 174 | """ 175 | for cn in range(len(formula)): 176 | for var in formula[cn]: 177 | VCG.add_edge(abs(var), cn + num_vars + 1) 178 | 179 | 180 | def preprocess_LCG(formula, LCG, num_vars): 181 | """ 182 | Builds LCG 183 | """ 184 | for cn in range(len(formula)): 185 | for var in formula[cn]: 186 | if var > 0: 187 | LCG.add_edge(abs(var), cn + num_vars + 1) 188 | else: 189 | LCG.add_edge(abs(var) + num_vars, cn + num_vars + 1) 190 | 191 | 192 | def get_pos_neg(formula, LCG, num_vars): 193 | degrees = dict(LCG.degree()) 194 | lst = [] 195 | for var in range(num_vars + 1)[1:]: 196 | if var in degrees: 197 | if var + num_vars in degrees: 198 | lst.append(degrees[var] * 1.0 / (degrees[var] + degrees[var + num_vars])) 199 | else: 200 | lst.append(1.0) 201 | else: 202 | lst.append(0.0) 203 | return lst 204 | 205 | 206 | 207 | 208 | #--------------------------------------------feature extraction methods-------------------------------------# 209 | 210 | #-------------------Formula related----------------------# 211 | def pure_variables(formula, num_vars): 212 | lst = [0] * num_vars 213 | num_pure = 0 214 | for line in formula: 215 | for ele in line: 216 | if ele > 0 and (lst[ele - 1] == 0 or lst[ele - 1] == 2): 217 | lst[ele - 1] += 3 # if pos, add three to lst[ele - 1] 218 | if ele < 0 and (lst[abs(ele) - 1] == 0 or lst[abs(ele) - 1] == 3): 219 | lst[abs(ele) - 1] += 2 #if neg, add two to lst[ele - 1] 220 | for i in range(len(lst)): 221 | if lst[i] == 2 or lst[i] == 3: 222 | num_pure += 1 223 | return [num_pure] 224 | 225 | 226 | def get_binary(formula, num_clause): 227 | """ 228 | get the ratio of binary clauses, ternary clauses, long clauses 229 | """ 230 | num_bi = 0 231 | for line in formula: 232 | if len(line) == 2: 233 | num_bi += 1 234 | return [float(num_bi) / num_clause] 235 | 236 | 237 | def get_vacuous(formula): 238 | vac = 0 239 | for line in formula: 240 | vac_loc = 0 241 | for ele in line: 242 | if -ele in line: 243 | vac_loc = 1 244 | if vac_loc == 1: 245 | vac += 1 246 | return vac 247 | 248 | #-------------------Graph related----------------------# 249 | 250 | def VCG_var_deg(VCG, num_vars): 251 | var_degs = [] 252 | for var in range(num_vars + 1)[1:]: 253 | var_degs.append(VCG.degree[var]) 254 | return add_stat(var_degs) 255 | 256 | def VCG_clause_deg(VCG, num_vars, num_clauses, formula): 257 | clause_degs = [] 258 | for clause in range(num_clauses): 259 | clause_degs.append(VCG.degree[clause + num_vars + 1]) 260 | return add_stat(clause_degs) 261 | 262 | def VCG_num_edges(VCG, formula): 263 | num_edges = 0 264 | for line in formula: 265 | num_edges += len(line) 266 | return [num_edges] 267 | 268 | 269 | def get_binary_subgraph(formula): 270 | bin_formula = [] 271 | for clause in formula: 272 | if len(clause) == 2: 273 | bin_formula.append(clause) 274 | return bin_formula 275 | 276 | 277 | def get_long_subgraph(formula): 278 | long_formula = [] 279 | for clause in formula: 280 | if len(clause) > 2: 281 | long_formula.append(clause) 282 | return long_formula 283 | 284 | #***********************************************Modularity-related features *************************************** 285 | 286 | def get_modularities(VIG, LIG, VCG, LCG): 287 | """ 288 | Returns the modularities of VIG, LIG and VCG representations of the formula 289 | """ 290 | part_VIG = community.best_partition(VIG) 291 | mod_VIG = community.modularity(part_VIG, VIG) # Modularity of VIG 292 | num_parts = len(part_VIG) 293 | 294 | part_LIG = community.best_partition(LIG) 295 | mod_LIG = community.modularity(part_LIG, LIG) # Modularity of VCG 296 | 297 | part_VCG = community.best_partition(VCG) 298 | mod_VCG = community.modularity(part_VCG, VCG) # Modularity of VCG 299 | 300 | 301 | part_LCG = community.best_partition(LCG) 302 | mod_LCG = community.modularity(part_LCG, LCG) # Modularity of LCG 303 | 304 | return [mod_VIG, mod_LIG, mod_VCG, mod_LCG] 305 | 306 | #------------------------------------------- Subprocesses -------------------------------------------# 307 | 308 | 309 | def get_scale_free(source, scale_free=False): 310 | feats = [] 311 | f = open("blah.txt", "w") 312 | if scale_free: 313 | subprocess.call([scale_free, source], stdout=f) 314 | else: 315 | subprocess.call(["/Users/anwu/Monkeyswedding/Projects/SAT_GAN/sat_gen/cpp/scalefree", source], stdout=f) 316 | f.close() 317 | with open("blah.txt", 'r') as f: 318 | for line in f.readlines(): 319 | if ("alpha" in line):# or ("min. value" in line) or ("beta" in line) or ("max. error" in line): 320 | feats.append(line.split()[-1]) 321 | os.remove("blah.txt") 322 | return list(map(float, feats)) 323 | 324 | #-----------------------------------------------statistics-------------------------------------------------# 325 | 326 | def add_stat(lst): 327 | """ 328 | add max, min, mean, std of the give statistics to the features list. 329 | """ 330 | return [max(lst),min(lst), np.mean(lst), np.std(lst)] 331 | 332 | def kl_div(orig_data, data): 333 | size = int (max(max(orig_data), max(data))) 334 | orig_occurence = [0] * size 335 | for ele in orig_data: 336 | orig_occurence[ele - 1] += 1 337 | 338 | occurence = [0] * size 339 | for ele in data: 340 | occurence[ele - 1] += 1 341 | 342 | return stats.entropy(occurence, qk = orig_occurence) 343 | 344 | if __name__ == "__main__": 345 | main() 346 | -------------------------------------------------------------------------------- /src/postprocess/sat_dataprocess.py: -------------------------------------------------------------------------------- 1 | import random 2 | import argparse 3 | 4 | 5 | 6 | def make_arguments(): 7 | parser = argparse.ArgumentParser() 8 | parser.add_argument("--cnf", type=str) 9 | parser.add_argument("--core", type=str) 10 | parser.add_argument("--save", type=str) 11 | parser.add_argument("--origin", type=str, default=None) 12 | parser.add_argument("--drat", type=str, default=None) 13 | parser.add_argument("--add_var", action="store_true", default=False) 14 | return parser 15 | 16 | 17 | def clause_in_core(core_clause, origin_content): 18 | for clause in origin_content: 19 | if set(core_clause.split(' ')) == set(clause.split(' ')): 20 | return True 21 | return False 22 | 23 | 24 | def update_clause(new_clause, old_clause, content): 25 | # delete clause 26 | if new_clause == '-': 27 | for idx, clause in enumerate(content): 28 | if set(old_clause.split(' ')) == set(clause.split(' ')): 29 | break 30 | content[idx] = content[-1] 31 | content = content[:-1] 32 | return content 33 | 34 | for idx, clause in enumerate(content): 35 | if set(old_clause.split(' ')) == set(clause.split(' ')): 36 | content[idx] = new_clause 37 | return content 38 | 39 | 40 | def read_files(args): 41 | with open(args.cnf) as cnf: 42 | content = cnf.readlines() 43 | while content[0].split()[0] == 'c': 44 | content = content[1:] 45 | num_vars = int(content[0].split(' ')[2]) 46 | while content[0].split()[0] == 'p': 47 | content = content[1:] 48 | while len(content[-1].split()) <= 1: 49 | content = content[:-1] 50 | 51 | with open(args.core) as core: 52 | core_content = core.readlines() 53 | while core_content[0].split()[0] == 'c' or core_content[0].split()[0] == 'p': 54 | core_content = core_content[1:] 55 | while len(core_content[-1].split()) <= 1: 56 | core_content = core_content[:-1] 57 | 58 | if args.origin == None: 59 | return content, num_vars, core_content, None, None 60 | 61 | with open(args.origin) as origin: 62 | origin_content = origin.readlines() 63 | while origin_content[0].split()[0] == 'c' or origin_content[0].split()[0] == 'p': 64 | origin_content = origin_content[1:] 65 | while len(origin_content[-1].split()) <= 1: 66 | origin_content = origin_content[:-1] 67 | 68 | if args.drat == None: 69 | return content, num_vars, core_content, origin_content, None 70 | 71 | with open(args.drat) as drat: 72 | drat_content = drat.readlines() 73 | drat_content = drat_content[:-1] 74 | 75 | return content, num_vars, core_content, origin_content, drat_content 76 | 77 | 78 | 79 | 80 | 81 | def remove_core(args): 82 | content, num_vars, core_content, origin_content, _ = read_files(args) 83 | 84 | for core_clause in core_content: 85 | origin_flag = False 86 | for origin_clause in origin_content: 87 | if set(core_clause.split(' ')) == set(origin_clause.split(' ')): 88 | origin_content.remove(origin_clause) 89 | origin_flag = True 90 | break 91 | if origin_flag: 92 | continue 93 | for clause in content: 94 | if set(core_clause.split(' ')) == set(clause.split(' ')): 95 | content.remove(clause) 96 | break 97 | 98 | with open(args.save, 'w') as out_file: 99 | out_file.write("c generated by G2SAT lcg\n") 100 | out_file.write("p cnf {} {}\n".format(num_vars, len(content))) 101 | for clause in content: 102 | out_file.write(clause) 103 | 104 | return 105 | 106 | 107 | def add_variables(args): 108 | content, num_vars, core_content, origin_content, _ = read_files(args) 109 | 110 | core_vars = [x for x in range(1, num_vars+1)] 111 | print(F'BEFORE REMOVE, len(core_vars)={len(core_vars)}') 112 | for core_clause in core_content: 113 | core_lits = core_clause.split(' ')[:-1] 114 | for lit in core_lits: 115 | var = abs(int(lit)) 116 | if var in core_vars: 117 | core_vars.remove(var) 118 | print(F'AFTER REMOVE, len(core_vars)={len(core_vars)}') 119 | 120 | 121 | for core_clause in core_content: 122 | origin_flag = False 123 | for origin_clause in origin_content: 124 | if set(core_clause.split(' ')) == set(origin_clause.split(' ')): 125 | origin_content.remove(origin_clause) 126 | origin_flag = True 127 | break 128 | if origin_flag: 129 | continue 130 | for idx, clause in enumerate(content): 131 | if set(core_clause.split(' ')) == set(clause.split(' ')): 132 | # ! difference between this and remove_core(): 133 | # do_operation = random.randint(0, 1) 134 | do_operation = 1 135 | rm_not_add = random.randint(0, 1) 136 | # rm_not_add = 1 137 | if do_operation and rm_not_add: 138 | var = random.choice(core_vars) 139 | core_vars.remove(var) 140 | sign = random.randint(0, 1) 141 | lit = var if sign else -var 142 | content[idx] = f'{lit} ' + clause 143 | print(f'add vars {lit} in {content[idx]}') 144 | if do_operation and not rm_not_add and len(clause.split(' ')) > 2: 145 | varidx = random.randint(0, len(clause.split(' '))-2) 146 | var = clause.split(' ')[varidx] 147 | var = var + ' ' 148 | varidx = clause.find(var) 149 | print(f'remove vars {var}in {content[idx]}') 150 | content[idx] = clause[:varidx] + clause[varidx + len(var):] 151 | break 152 | 153 | with open(args.save, 'w') as out_file: 154 | out_file.write("c generated by G2SAT lcg\n") 155 | out_file.write("p cnf {} {}\n".format(num_vars, len(content))) 156 | for clause in content: 157 | out_file.write(clause) 158 | 159 | return 160 | 161 | 162 | def merge_clauses(args): 163 | content, num_vars, core_content, origin_content, _ = read_files(args) 164 | 165 | merge_flag = False 166 | random.shuffle(core_content) 167 | for core_clause in core_content: 168 | if merge_flag: 169 | break 170 | origin_flag = False 171 | for origin_clause in origin_content: 172 | if set(core_clause.split(' ')) == set(origin_clause.split(' ')): 173 | origin_content.remove(origin_clause) 174 | origin_flag = True 175 | break 176 | if origin_flag: 177 | continue 178 | for idx, clause in enumerate(content): 179 | if set(core_clause.split(' ')) == set(clause.split(' ')): 180 | tmp_content = content.copy() 181 | random.shuffle(tmp_content) 182 | for clause2 in tmp_content: 183 | if clause2 == clause: 184 | continue 185 | set1 = set([abs(int(x)) for x in clause.split(' ')]) 186 | set2 = set([abs(int(x)) for x in clause2.split(' ')]) 187 | if set1 | set2 == set1 or set1 | set2 == set2: 188 | tmp_set = set([x for x in clause.split(' ')[:-1]]) | set([x for x in clause2.split(' ')[:-1]]) 189 | content[idx] = ' '.join(list(tmp_set)) + ' 0\n' 190 | print(f'change: {content[idx]}') 191 | merge_flag = True 192 | break 193 | if merge_flag == False: 194 | print(f'Not change') 195 | with open(args.save, 'w') as out_file: 196 | out_file.write("c generated by G2SAT lcg\n") 197 | out_file.write("p cnf {} {}\n".format(num_vars, len(content))) 198 | for clause in content: 199 | out_file.write(clause) 200 | 201 | return 202 | 203 | 204 | 205 | def loose_core(args): 206 | content, num_vars, core_content, origin_content, _ = read_files(args) 207 | 208 | core_lits = set() 209 | not_core_lits = set() 210 | for core_clause in core_content: 211 | origin_flag = False 212 | for origin_clause in origin_content: 213 | if set(core_clause.split(' ')) == set(origin_clause.split(' ')): 214 | origin_content.remove(origin_clause) 215 | core_lits = core_lits | set([int(x) for x in core_clause.split(' ')[:-1]]) 216 | origin_flag = True 217 | break 218 | if origin_flag: 219 | continue 220 | 221 | not_core_lits = set([int(x) for x in core_clause.split(' ')[:-1]]) 222 | 223 | not_core_lits = not_core_lits - core_lits 224 | 225 | if len(not_core_lits) == 0: 226 | print(f'No variable in small core could be flip, failed.') 227 | return 228 | # selected_lit = random.choice(list(not_core_lits)) 229 | for selected_lit in not_core_lits: 230 | print(f'selected var: {selected_lit}') 231 | # flip selected var in core of content 232 | for core_clause in core_content: 233 | clause_lits = [int(x) for x in core_clause.split(' ')[:-1]] 234 | if selected_lit in clause_lits: 235 | for idx, clause in enumerate(content): 236 | # if selected_lit in [int(x) for x in clause.split(' ')[:-1]]: 237 | if set(core_clause.split(' ')) == set(clause.split(' ')): 238 | clause_lits.remove(selected_lit) 239 | clause_lits.append(-selected_lit) 240 | content[idx] = ' '.join([str(x) for x in clause_lits]) + ' 0\n' 241 | break 242 | 243 | with open(args.save, 'w') as out_file: 244 | out_file.write("c generated by G2SAT lcg\n") 245 | out_file.write("p cnf {} {}\n".format(num_vars, len(content))) 246 | for clause in content: 247 | out_file.write(clause) 248 | 249 | return 250 | 251 | 252 | 253 | def remove_partial_core(args): 254 | content, num_vars, core_content, origin_content, _ = read_files(args) 255 | 256 | random.shuffle(core_content) 257 | for core_clause in core_content: 258 | origin_flag = False 259 | for origin_clause in origin_content: 260 | if set(core_clause.split(' ')) == set(origin_clause.split(' ')): 261 | origin_content.remove(origin_clause) 262 | origin_flag = True 263 | break 264 | if origin_flag: 265 | continue 266 | origin_flag = False 267 | for clause in content: 268 | if set(core_clause.split(' ')) == set(clause.split(' ')): 269 | content.remove(clause) 270 | origin_flag = True 271 | break 272 | if origin_flag: 273 | break 274 | 275 | with open(args.save, 'w') as out_file: 276 | out_file.write("c generated by G2SAT lcg\n") 277 | out_file.write("p cnf {} {}\n".format(num_vars, len(content))) 278 | for clause in content: 279 | out_file.write(clause) 280 | 281 | return 282 | 283 | 284 | 285 | def trace_back(args, delete=False): 286 | content, num_vars, core_content, origin_content, drat_content = read_files(args) 287 | 288 | for drat_lit in drat_content: 289 | if drat_lit[0] == 'd': 290 | continue 291 | drat_lit = [x for x in drat_lit.split(' ')][0] 292 | neg_drat_lit = str(-int(drat_lit)) 293 | 294 | flip_flag = False 295 | for core_clause in core_content: 296 | if neg_drat_lit not in core_clause.split(' ')[:-1]: 297 | continue 298 | if clause_in_core(core_clause, origin_content): 299 | continue 300 | 301 | if delete: 302 | content = update_clause('-', core_clause, content) 303 | flip_flag = True 304 | break 305 | else: 306 | fliped_clause = core_clause.split(' ')[:-1] 307 | fliped_clause.remove(neg_drat_lit) 308 | fliped_clause.append(drat_lit) 309 | fliped_clause = ' '.join(fliped_clause) + ' 0\n' 310 | content = update_clause(fliped_clause, core_clause, content) 311 | flip_flag = True 312 | 313 | if flip_flag: 314 | break 315 | 316 | if not flip_flag: 317 | print(f'No lit could be flip!') 318 | return 319 | 320 | with open(args.save, 'w') as out_file: 321 | out_file.write("c generated by G2SAT lcg\n") 322 | out_file.write("p cnf {} {}\n".format(num_vars, len(content))) 323 | for clause in content: 324 | out_file.write(clause) 325 | 326 | return 327 | 328 | 329 | 330 | def attach_new_lit(args): 331 | content, num_vars, core_content, origin_content, _ = read_files(args) 332 | 333 | random.shuffle(core_content) 334 | for core_clause in core_content: 335 | origin_flag = False 336 | for origin_clause in origin_content: 337 | if set(core_clause.split(' ')) == set(origin_clause.split(' ')): 338 | origin_content.remove(origin_clause) 339 | origin_flag = True 340 | break 341 | if origin_flag: 342 | continue 343 | origin_flag = False 344 | for idx, clause in enumerate(content): 345 | if set(core_clause.split(' ')) == set(clause.split(' ')): 346 | if args.add_var: 347 | num_vars += 1 348 | clause = f"{num_vars} " + clause 349 | content[idx] = clause 350 | origin_flag = True 351 | break 352 | if origin_flag: 353 | break 354 | 355 | with open(args.save, 'w') as out_file: 356 | out_file.write("c generated by G2SAT lcg\n") 357 | out_file.write("p cnf {} {}\n".format(num_vars, len(content))) 358 | for clause in content: 359 | out_file.write(clause) 360 | 361 | return 362 | 363 | 364 | 365 | def loose_big_core(args): 366 | content, num_vars, core_content, _, _ = read_files(args) 367 | 368 | random.shuffle(core_content) 369 | for core_clause in core_content: 370 | origin_flag = False 371 | for idx, clause in enumerate(content): 372 | if set(core_clause.split(' ')) == set(clause.split(' ')): 373 | if args.add_var: 374 | num_vars += 1 375 | clause = f"{num_vars} " + clause 376 | content[idx] = clause 377 | origin_flag = True 378 | break 379 | if origin_flag: 380 | break 381 | 382 | with open(args.save, 'w') as out_file: 383 | out_file.write("c generated by G2SAT lcg\n") 384 | out_file.write("p cnf {} {}\n".format(num_vars, len(content))) 385 | for clause in content: 386 | out_file.write(clause) 387 | 388 | return 389 | 390 | 391 | 392 | if __name__ == "__main__": 393 | args = make_arguments().parse_args() 394 | attach_new_lit(args) -------------------------------------------------------------------------------- /scripts/log/mdp-28-11-unsat_repeat0_rm.log: -------------------------------------------------------------------------------- 1 | mkdir: cannot create directory ‘../formulas/mdp_post’: File exists 2 | remove_core.sh: line 21: cd: ../postprocess/cadical/build: No such file or directory 3 | remove_core.sh: line 22: ./cadical: No such file or directory 4 | remove_core.sh: line 23: cd: ../../drat-trim: No such file or directory 5 | remove_core.sh: line 24: ./drat-trim: No such file or directory 6 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 7 | rm: cannot remove '../formulas/mdp/mdp-28-11-unsat_repeat0.drat': No such file or directory 8 | rm: cannot remove '../formulas/mdp/mdp-28-11-unsat_repeat0_core': No such file or directory 9 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 10 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 11 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 12 | (standard_in) 1: syntax error 13 | remove_core.sh: line 46: [: -eq: unary operator expected 14 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 15 | remove_core.sh: line 52: ./drat-trim: No such file or directory 16 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 17 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r1.cnf': No such file or directory 18 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r1_core': No such file or directory 19 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r1.drat': No such file or directory 20 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 21 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 22 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 23 | (standard_in) 1: syntax error 24 | remove_core.sh: line 46: [: -eq: unary operator expected 25 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 26 | remove_core.sh: line 52: ./drat-trim: No such file or directory 27 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 28 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r2.cnf': No such file or directory 29 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r2_core': No such file or directory 30 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r2.drat': No such file or directory 31 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 32 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 33 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 34 | (standard_in) 1: syntax error 35 | remove_core.sh: line 46: [: -eq: unary operator expected 36 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 37 | remove_core.sh: line 52: ./drat-trim: No such file or directory 38 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 39 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r3.cnf': No such file or directory 40 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r3_core': No such file or directory 41 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r3.drat': No such file or directory 42 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 43 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 44 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 45 | (standard_in) 1: syntax error 46 | remove_core.sh: line 46: [: -eq: unary operator expected 47 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 48 | remove_core.sh: line 52: ./drat-trim: No such file or directory 49 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 50 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r4.cnf': No such file or directory 51 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r4_core': No such file or directory 52 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r4.drat': No such file or directory 53 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 54 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 55 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 56 | (standard_in) 1: syntax error 57 | remove_core.sh: line 46: [: -eq: unary operator expected 58 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 59 | remove_core.sh: line 52: ./drat-trim: No such file or directory 60 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 61 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r5.cnf': No such file or directory 62 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r5_core': No such file or directory 63 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r5.drat': No such file or directory 64 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 65 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 66 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 67 | (standard_in) 1: syntax error 68 | remove_core.sh: line 46: [: -eq: unary operator expected 69 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 70 | remove_core.sh: line 52: ./drat-trim: No such file or directory 71 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 72 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r6.cnf': No such file or directory 73 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r6_core': No such file or directory 74 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r6.drat': No such file or directory 75 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 76 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 77 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 78 | (standard_in) 1: syntax error 79 | remove_core.sh: line 46: [: -eq: unary operator expected 80 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 81 | remove_core.sh: line 52: ./drat-trim: No such file or directory 82 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 83 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r7.cnf': No such file or directory 84 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r7_core': No such file or directory 85 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r7.drat': No such file or directory 86 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 87 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 88 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 89 | (standard_in) 1: syntax error 90 | remove_core.sh: line 46: [: -eq: unary operator expected 91 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 92 | remove_core.sh: line 52: ./drat-trim: No such file or directory 93 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 94 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r8.cnf': No such file or directory 95 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r8_core': No such file or directory 96 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r8.drat': No such file or directory 97 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 98 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 99 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 100 | (standard_in) 1: syntax error 101 | remove_core.sh: line 46: [: -eq: unary operator expected 102 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 103 | remove_core.sh: line 52: ./drat-trim: No such file or directory 104 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 105 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r9.cnf': No such file or directory 106 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r9_core': No such file or directory 107 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r9.drat': No such file or directory 108 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 109 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 110 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 111 | (standard_in) 1: syntax error 112 | remove_core.sh: line 46: [: -eq: unary operator expected 113 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 114 | remove_core.sh: line 52: ./drat-trim: No such file or directory 115 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 116 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r10.cnf': No such file or directory 117 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r10_core': No such file or directory 118 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r10.drat': No such file or directory 119 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 120 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 121 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 122 | (standard_in) 1: syntax error 123 | remove_core.sh: line 46: [: -eq: unary operator expected 124 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 125 | remove_core.sh: line 52: ./drat-trim: No such file or directory 126 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 127 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r11.cnf': No such file or directory 128 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r11_core': No such file or directory 129 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r11.drat': No such file or directory 130 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 131 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 132 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 133 | (standard_in) 1: syntax error 134 | remove_core.sh: line 46: [: -eq: unary operator expected 135 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 136 | remove_core.sh: line 52: ./drat-trim: No such file or directory 137 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 138 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r12.cnf': No such file or directory 139 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r12_core': No such file or directory 140 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r12.drat': No such file or directory 141 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 142 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 143 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 144 | (standard_in) 1: syntax error 145 | remove_core.sh: line 46: [: -eq: unary operator expected 146 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 147 | remove_core.sh: line 52: ./drat-trim: No such file or directory 148 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 149 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r13.cnf': No such file or directory 150 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r13_core': No such file or directory 151 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r13.drat': No such file or directory 152 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 153 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 154 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 155 | (standard_in) 1: syntax error 156 | remove_core.sh: line 46: [: -eq: unary operator expected 157 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 158 | remove_core.sh: line 52: ./drat-trim: No such file or directory 159 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 160 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r14.cnf': No such file or directory 161 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r14_core': No such file or directory 162 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r14.drat': No such file or directory 163 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 164 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 165 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 166 | (standard_in) 1: syntax error 167 | remove_core.sh: line 46: [: -eq: unary operator expected 168 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 169 | remove_core.sh: line 52: ./drat-trim: No such file or directory 170 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 171 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r15.cnf': No such file or directory 172 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r15_core': No such file or directory 173 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r15.drat': No such file or directory 174 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 175 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 176 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 177 | (standard_in) 1: syntax error 178 | remove_core.sh: line 46: [: -eq: unary operator expected 179 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 180 | remove_core.sh: line 52: ./drat-trim: No such file or directory 181 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 182 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r16.cnf': No such file or directory 183 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r16_core': No such file or directory 184 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r16.drat': No such file or directory 185 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 186 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 187 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 188 | (standard_in) 1: syntax error 189 | remove_core.sh: line 46: [: -eq: unary operator expected 190 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 191 | remove_core.sh: line 52: ./drat-trim: No such file or directory 192 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 193 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r17.cnf': No such file or directory 194 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r17_core': No such file or directory 195 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r17.drat': No such file or directory 196 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 197 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 198 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 199 | (standard_in) 1: syntax error 200 | remove_core.sh: line 46: [: -eq: unary operator expected 201 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 202 | remove_core.sh: line 52: ./drat-trim: No such file or directory 203 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 204 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r18.cnf': No such file or directory 205 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r18_core': No such file or directory 206 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r18.drat': No such file or directory 207 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 208 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 209 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 210 | (standard_in) 1: syntax error 211 | remove_core.sh: line 46: [: -eq: unary operator expected 212 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 213 | remove_core.sh: line 52: ./drat-trim: No such file or directory 214 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 215 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r19.cnf': No such file or directory 216 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r19_core': No such file or directory 217 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r19.drat': No such file or directory 218 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 219 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat0.log: No such file or directory 220 | tail: cannot open '../log/mdp-28-11-unsat_repeat0.log' for reading: No such file or directory 221 | (standard_in) 1: syntax error 222 | remove_core.sh: line 46: [: -eq: unary operator expected 223 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 224 | remove_core.sh: line 52: ./drat-trim: No such file or directory 225 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 226 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r20.cnf': No such file or directory 227 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r20_core': No such file or directory 228 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat0_r20.drat': No such file or directory 229 | -------------------------------------------------------------------------------- /scripts/log/mdp-28-11-unsat_repeat1_rm.log: -------------------------------------------------------------------------------- 1 | mkdir: cannot create directory ‘../formulas/mdp_post’: File exists 2 | remove_core.sh: line 21: cd: ../postprocess/cadical/build: No such file or directory 3 | remove_core.sh: line 22: ./cadical: No such file or directory 4 | remove_core.sh: line 23: cd: ../../drat-trim: No such file or directory 5 | remove_core.sh: line 24: ./drat-trim: No such file or directory 6 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 7 | rm: cannot remove '../formulas/mdp/mdp-28-11-unsat_repeat1.drat': No such file or directory 8 | rm: cannot remove '../formulas/mdp/mdp-28-11-unsat_repeat1_core': No such file or directory 9 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 10 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 11 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 12 | (standard_in) 1: syntax error 13 | remove_core.sh: line 46: [: -eq: unary operator expected 14 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 15 | remove_core.sh: line 52: ./drat-trim: No such file or directory 16 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 17 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r1.cnf': No such file or directory 18 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r1_core': No such file or directory 19 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r1.drat': No such file or directory 20 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 21 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 22 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 23 | (standard_in) 1: syntax error 24 | remove_core.sh: line 46: [: -eq: unary operator expected 25 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 26 | remove_core.sh: line 52: ./drat-trim: No such file or directory 27 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 28 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r2.cnf': No such file or directory 29 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r2_core': No such file or directory 30 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r2.drat': No such file or directory 31 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 32 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 33 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 34 | (standard_in) 1: syntax error 35 | remove_core.sh: line 46: [: -eq: unary operator expected 36 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 37 | remove_core.sh: line 52: ./drat-trim: No such file or directory 38 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 39 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r3.cnf': No such file or directory 40 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r3_core': No such file or directory 41 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r3.drat': No such file or directory 42 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 43 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 44 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 45 | (standard_in) 1: syntax error 46 | remove_core.sh: line 46: [: -eq: unary operator expected 47 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 48 | remove_core.sh: line 52: ./drat-trim: No such file or directory 49 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 50 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r4.cnf': No such file or directory 51 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r4_core': No such file or directory 52 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r4.drat': No such file or directory 53 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 54 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 55 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 56 | (standard_in) 1: syntax error 57 | remove_core.sh: line 46: [: -eq: unary operator expected 58 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 59 | remove_core.sh: line 52: ./drat-trim: No such file or directory 60 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 61 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r5.cnf': No such file or directory 62 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r5_core': No such file or directory 63 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r5.drat': No such file or directory 64 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 65 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 66 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 67 | (standard_in) 1: syntax error 68 | remove_core.sh: line 46: [: -eq: unary operator expected 69 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 70 | remove_core.sh: line 52: ./drat-trim: No such file or directory 71 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 72 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r6.cnf': No such file or directory 73 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r6_core': No such file or directory 74 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r6.drat': No such file or directory 75 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 76 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 77 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 78 | (standard_in) 1: syntax error 79 | remove_core.sh: line 46: [: -eq: unary operator expected 80 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 81 | remove_core.sh: line 52: ./drat-trim: No such file or directory 82 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 83 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r7.cnf': No such file or directory 84 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r7_core': No such file or directory 85 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r7.drat': No such file or directory 86 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 87 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 88 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 89 | (standard_in) 1: syntax error 90 | remove_core.sh: line 46: [: -eq: unary operator expected 91 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 92 | remove_core.sh: line 52: ./drat-trim: No such file or directory 93 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 94 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r8.cnf': No such file or directory 95 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r8_core': No such file or directory 96 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r8.drat': No such file or directory 97 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 98 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 99 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 100 | (standard_in) 1: syntax error 101 | remove_core.sh: line 46: [: -eq: unary operator expected 102 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 103 | remove_core.sh: line 52: ./drat-trim: No such file or directory 104 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 105 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r9.cnf': No such file or directory 106 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r9_core': No such file or directory 107 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r9.drat': No such file or directory 108 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 109 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 110 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 111 | (standard_in) 1: syntax error 112 | remove_core.sh: line 46: [: -eq: unary operator expected 113 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 114 | remove_core.sh: line 52: ./drat-trim: No such file or directory 115 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 116 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r10.cnf': No such file or directory 117 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r10_core': No such file or directory 118 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r10.drat': No such file or directory 119 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 120 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 121 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 122 | (standard_in) 1: syntax error 123 | remove_core.sh: line 46: [: -eq: unary operator expected 124 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 125 | remove_core.sh: line 52: ./drat-trim: No such file or directory 126 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 127 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r11.cnf': No such file or directory 128 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r11_core': No such file or directory 129 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r11.drat': No such file or directory 130 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 131 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 132 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 133 | (standard_in) 1: syntax error 134 | remove_core.sh: line 46: [: -eq: unary operator expected 135 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 136 | remove_core.sh: line 52: ./drat-trim: No such file or directory 137 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 138 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r12.cnf': No such file or directory 139 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r12_core': No such file or directory 140 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r12.drat': No such file or directory 141 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 142 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 143 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 144 | (standard_in) 1: syntax error 145 | remove_core.sh: line 46: [: -eq: unary operator expected 146 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 147 | remove_core.sh: line 52: ./drat-trim: No such file or directory 148 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 149 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r13.cnf': No such file or directory 150 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r13_core': No such file or directory 151 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r13.drat': No such file or directory 152 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 153 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 154 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 155 | (standard_in) 1: syntax error 156 | remove_core.sh: line 46: [: -eq: unary operator expected 157 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 158 | remove_core.sh: line 52: ./drat-trim: No such file or directory 159 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 160 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r14.cnf': No such file or directory 161 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r14_core': No such file or directory 162 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r14.drat': No such file or directory 163 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 164 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 165 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 166 | (standard_in) 1: syntax error 167 | remove_core.sh: line 46: [: -eq: unary operator expected 168 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 169 | remove_core.sh: line 52: ./drat-trim: No such file or directory 170 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 171 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r15.cnf': No such file or directory 172 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r15_core': No such file or directory 173 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r15.drat': No such file or directory 174 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 175 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 176 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 177 | (standard_in) 1: syntax error 178 | remove_core.sh: line 46: [: -eq: unary operator expected 179 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 180 | remove_core.sh: line 52: ./drat-trim: No such file or directory 181 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 182 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r16.cnf': No such file or directory 183 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r16_core': No such file or directory 184 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r16.drat': No such file or directory 185 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 186 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 187 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 188 | (standard_in) 1: syntax error 189 | remove_core.sh: line 46: [: -eq: unary operator expected 190 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 191 | remove_core.sh: line 52: ./drat-trim: No such file or directory 192 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 193 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r17.cnf': No such file or directory 194 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r17_core': No such file or directory 195 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r17.drat': No such file or directory 196 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 197 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 198 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 199 | (standard_in) 1: syntax error 200 | remove_core.sh: line 46: [: -eq: unary operator expected 201 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 202 | remove_core.sh: line 52: ./drat-trim: No such file or directory 203 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 204 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r18.cnf': No such file or directory 205 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r18_core': No such file or directory 206 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r18.drat': No such file or directory 207 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 208 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 209 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 210 | (standard_in) 1: syntax error 211 | remove_core.sh: line 46: [: -eq: unary operator expected 212 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 213 | remove_core.sh: line 52: ./drat-trim: No such file or directory 214 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 215 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r19.cnf': No such file or directory 216 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r19_core': No such file or directory 217 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r19.drat': No such file or directory 218 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 219 | remove_core.sh: line 41: ../log/mdp-28-11-unsat_repeat1.log: No such file or directory 220 | tail: cannot open '../log/mdp-28-11-unsat_repeat1.log' for reading: No such file or directory 221 | (standard_in) 1: syntax error 222 | remove_core.sh: line 46: [: -eq: unary operator expected 223 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 224 | remove_core.sh: line 52: ./drat-trim: No such file or directory 225 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 226 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r20.cnf': No such file or directory 227 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r20_core': No such file or directory 228 | rm: cannot remove '../formulas/mdp_post/mdp-28-11-unsat_repeat1_r20.drat': No such file or directory 229 | -------------------------------------------------------------------------------- /scripts/log/mdp-28-12-unsat_repeat0_rm.log: -------------------------------------------------------------------------------- 1 | mkdir: cannot create directory ‘../formulas/mdp_post’: File exists 2 | remove_core.sh: line 21: cd: ../postprocess/cadical/build: No such file or directory 3 | remove_core.sh: line 22: ./cadical: No such file or directory 4 | remove_core.sh: line 23: cd: ../../drat-trim: No such file or directory 5 | remove_core.sh: line 24: ./drat-trim: No such file or directory 6 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 7 | rm: cannot remove '../formulas/mdp/mdp-28-12-unsat_repeat0.drat': No such file or directory 8 | rm: cannot remove '../formulas/mdp/mdp-28-12-unsat_repeat0_core': No such file or directory 9 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 10 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 11 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 12 | (standard_in) 1: syntax error 13 | remove_core.sh: line 46: [: -eq: unary operator expected 14 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 15 | remove_core.sh: line 52: ./drat-trim: No such file or directory 16 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 17 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r1.cnf': No such file or directory 18 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r1_core': No such file or directory 19 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r1.drat': No such file or directory 20 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 21 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 22 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 23 | (standard_in) 1: syntax error 24 | remove_core.sh: line 46: [: -eq: unary operator expected 25 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 26 | remove_core.sh: line 52: ./drat-trim: No such file or directory 27 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 28 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r2.cnf': No such file or directory 29 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r2_core': No such file or directory 30 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r2.drat': No such file or directory 31 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 32 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 33 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 34 | (standard_in) 1: syntax error 35 | remove_core.sh: line 46: [: -eq: unary operator expected 36 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 37 | remove_core.sh: line 52: ./drat-trim: No such file or directory 38 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 39 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r3.cnf': No such file or directory 40 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r3_core': No such file or directory 41 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r3.drat': No such file or directory 42 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 43 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 44 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 45 | (standard_in) 1: syntax error 46 | remove_core.sh: line 46: [: -eq: unary operator expected 47 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 48 | remove_core.sh: line 52: ./drat-trim: No such file or directory 49 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 50 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r4.cnf': No such file or directory 51 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r4_core': No such file or directory 52 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r4.drat': No such file or directory 53 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 54 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 55 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 56 | (standard_in) 1: syntax error 57 | remove_core.sh: line 46: [: -eq: unary operator expected 58 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 59 | remove_core.sh: line 52: ./drat-trim: No such file or directory 60 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 61 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r5.cnf': No such file or directory 62 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r5_core': No such file or directory 63 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r5.drat': No such file or directory 64 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 65 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 66 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 67 | (standard_in) 1: syntax error 68 | remove_core.sh: line 46: [: -eq: unary operator expected 69 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 70 | remove_core.sh: line 52: ./drat-trim: No such file or directory 71 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 72 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r6.cnf': No such file or directory 73 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r6_core': No such file or directory 74 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r6.drat': No such file or directory 75 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 76 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 77 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 78 | (standard_in) 1: syntax error 79 | remove_core.sh: line 46: [: -eq: unary operator expected 80 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 81 | remove_core.sh: line 52: ./drat-trim: No such file or directory 82 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 83 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r7.cnf': No such file or directory 84 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r7_core': No such file or directory 85 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r7.drat': No such file or directory 86 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 87 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 88 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 89 | (standard_in) 1: syntax error 90 | remove_core.sh: line 46: [: -eq: unary operator expected 91 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 92 | remove_core.sh: line 52: ./drat-trim: No such file or directory 93 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 94 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r8.cnf': No such file or directory 95 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r8_core': No such file or directory 96 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r8.drat': No such file or directory 97 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 98 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 99 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 100 | (standard_in) 1: syntax error 101 | remove_core.sh: line 46: [: -eq: unary operator expected 102 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 103 | remove_core.sh: line 52: ./drat-trim: No such file or directory 104 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 105 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r9.cnf': No such file or directory 106 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r9_core': No such file or directory 107 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r9.drat': No such file or directory 108 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 109 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 110 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 111 | (standard_in) 1: syntax error 112 | remove_core.sh: line 46: [: -eq: unary operator expected 113 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 114 | remove_core.sh: line 52: ./drat-trim: No such file or directory 115 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 116 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r10.cnf': No such file or directory 117 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r10_core': No such file or directory 118 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r10.drat': No such file or directory 119 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 120 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 121 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 122 | (standard_in) 1: syntax error 123 | remove_core.sh: line 46: [: -eq: unary operator expected 124 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 125 | remove_core.sh: line 52: ./drat-trim: No such file or directory 126 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 127 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r11.cnf': No such file or directory 128 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r11_core': No such file or directory 129 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r11.drat': No such file or directory 130 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 131 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 132 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 133 | (standard_in) 1: syntax error 134 | remove_core.sh: line 46: [: -eq: unary operator expected 135 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 136 | remove_core.sh: line 52: ./drat-trim: No such file or directory 137 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 138 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r12.cnf': No such file or directory 139 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r12_core': No such file or directory 140 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r12.drat': No such file or directory 141 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 142 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 143 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 144 | (standard_in) 1: syntax error 145 | remove_core.sh: line 46: [: -eq: unary operator expected 146 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 147 | remove_core.sh: line 52: ./drat-trim: No such file or directory 148 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 149 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r13.cnf': No such file or directory 150 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r13_core': No such file or directory 151 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r13.drat': No such file or directory 152 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 153 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 154 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 155 | (standard_in) 1: syntax error 156 | remove_core.sh: line 46: [: -eq: unary operator expected 157 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 158 | remove_core.sh: line 52: ./drat-trim: No such file or directory 159 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 160 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r14.cnf': No such file or directory 161 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r14_core': No such file or directory 162 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r14.drat': No such file or directory 163 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 164 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 165 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 166 | (standard_in) 1: syntax error 167 | remove_core.sh: line 46: [: -eq: unary operator expected 168 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 169 | remove_core.sh: line 52: ./drat-trim: No such file or directory 170 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 171 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r15.cnf': No such file or directory 172 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r15_core': No such file or directory 173 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r15.drat': No such file or directory 174 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 175 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 176 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 177 | (standard_in) 1: syntax error 178 | remove_core.sh: line 46: [: -eq: unary operator expected 179 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 180 | remove_core.sh: line 52: ./drat-trim: No such file or directory 181 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 182 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r16.cnf': No such file or directory 183 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r16_core': No such file or directory 184 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r16.drat': No such file or directory 185 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 186 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 187 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 188 | (standard_in) 1: syntax error 189 | remove_core.sh: line 46: [: -eq: unary operator expected 190 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 191 | remove_core.sh: line 52: ./drat-trim: No such file or directory 192 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 193 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r17.cnf': No such file or directory 194 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r17_core': No such file or directory 195 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r17.drat': No such file or directory 196 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 197 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 198 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 199 | (standard_in) 1: syntax error 200 | remove_core.sh: line 46: [: -eq: unary operator expected 201 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 202 | remove_core.sh: line 52: ./drat-trim: No such file or directory 203 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 204 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r18.cnf': No such file or directory 205 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r18_core': No such file or directory 206 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r18.drat': No such file or directory 207 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 208 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 209 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 210 | (standard_in) 1: syntax error 211 | remove_core.sh: line 46: [: -eq: unary operator expected 212 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 213 | remove_core.sh: line 52: ./drat-trim: No such file or directory 214 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 215 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r19.cnf': No such file or directory 216 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r19_core': No such file or directory 217 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r19.drat': No such file or directory 218 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 219 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat0.log: No such file or directory 220 | tail: cannot open '../log/mdp-28-12-unsat_repeat0.log' for reading: No such file or directory 221 | (standard_in) 1: syntax error 222 | remove_core.sh: line 46: [: -eq: unary operator expected 223 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 224 | remove_core.sh: line 52: ./drat-trim: No such file or directory 225 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 226 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r20.cnf': No such file or directory 227 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r20_core': No such file or directory 228 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat0_r20.drat': No such file or directory 229 | -------------------------------------------------------------------------------- /scripts/log/mdp-28-12-unsat_repeat1_rm.log: -------------------------------------------------------------------------------- 1 | mkdir: cannot create directory ‘../formulas/mdp_post’: File exists 2 | remove_core.sh: line 21: cd: ../postprocess/cadical/build: No such file or directory 3 | remove_core.sh: line 22: ./cadical: No such file or directory 4 | remove_core.sh: line 23: cd: ../../drat-trim: No such file or directory 5 | remove_core.sh: line 24: ./drat-trim: No such file or directory 6 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 7 | rm: cannot remove '../formulas/mdp/mdp-28-12-unsat_repeat1.drat': No such file or directory 8 | rm: cannot remove '../formulas/mdp/mdp-28-12-unsat_repeat1_core': No such file or directory 9 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 10 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 11 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 12 | (standard_in) 1: syntax error 13 | remove_core.sh: line 46: [: -eq: unary operator expected 14 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 15 | remove_core.sh: line 52: ./drat-trim: No such file or directory 16 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 17 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r1.cnf': No such file or directory 18 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r1_core': No such file or directory 19 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r1.drat': No such file or directory 20 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 21 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 22 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 23 | (standard_in) 1: syntax error 24 | remove_core.sh: line 46: [: -eq: unary operator expected 25 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 26 | remove_core.sh: line 52: ./drat-trim: No such file or directory 27 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 28 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r2.cnf': No such file or directory 29 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r2_core': No such file or directory 30 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r2.drat': No such file or directory 31 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 32 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 33 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 34 | (standard_in) 1: syntax error 35 | remove_core.sh: line 46: [: -eq: unary operator expected 36 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 37 | remove_core.sh: line 52: ./drat-trim: No such file or directory 38 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 39 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r3.cnf': No such file or directory 40 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r3_core': No such file or directory 41 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r3.drat': No such file or directory 42 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 43 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 44 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 45 | (standard_in) 1: syntax error 46 | remove_core.sh: line 46: [: -eq: unary operator expected 47 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 48 | remove_core.sh: line 52: ./drat-trim: No such file or directory 49 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 50 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r4.cnf': No such file or directory 51 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r4_core': No such file or directory 52 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r4.drat': No such file or directory 53 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 54 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 55 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 56 | (standard_in) 1: syntax error 57 | remove_core.sh: line 46: [: -eq: unary operator expected 58 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 59 | remove_core.sh: line 52: ./drat-trim: No such file or directory 60 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 61 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r5.cnf': No such file or directory 62 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r5_core': No such file or directory 63 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r5.drat': No such file or directory 64 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 65 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 66 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 67 | (standard_in) 1: syntax error 68 | remove_core.sh: line 46: [: -eq: unary operator expected 69 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 70 | remove_core.sh: line 52: ./drat-trim: No such file or directory 71 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 72 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r6.cnf': No such file or directory 73 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r6_core': No such file or directory 74 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r6.drat': No such file or directory 75 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 76 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 77 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 78 | (standard_in) 1: syntax error 79 | remove_core.sh: line 46: [: -eq: unary operator expected 80 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 81 | remove_core.sh: line 52: ./drat-trim: No such file or directory 82 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 83 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r7.cnf': No such file or directory 84 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r7_core': No such file or directory 85 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r7.drat': No such file or directory 86 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 87 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 88 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 89 | (standard_in) 1: syntax error 90 | remove_core.sh: line 46: [: -eq: unary operator expected 91 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 92 | remove_core.sh: line 52: ./drat-trim: No such file or directory 93 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 94 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r8.cnf': No such file or directory 95 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r8_core': No such file or directory 96 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r8.drat': No such file or directory 97 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 98 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 99 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 100 | (standard_in) 1: syntax error 101 | remove_core.sh: line 46: [: -eq: unary operator expected 102 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 103 | remove_core.sh: line 52: ./drat-trim: No such file or directory 104 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 105 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r9.cnf': No such file or directory 106 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r9_core': No such file or directory 107 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r9.drat': No such file or directory 108 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 109 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 110 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 111 | (standard_in) 1: syntax error 112 | remove_core.sh: line 46: [: -eq: unary operator expected 113 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 114 | remove_core.sh: line 52: ./drat-trim: No such file or directory 115 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 116 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r10.cnf': No such file or directory 117 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r10_core': No such file or directory 118 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r10.drat': No such file or directory 119 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 120 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 121 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 122 | (standard_in) 1: syntax error 123 | remove_core.sh: line 46: [: -eq: unary operator expected 124 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 125 | remove_core.sh: line 52: ./drat-trim: No such file or directory 126 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 127 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r11.cnf': No such file or directory 128 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r11_core': No such file or directory 129 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r11.drat': No such file or directory 130 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 131 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 132 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 133 | (standard_in) 1: syntax error 134 | remove_core.sh: line 46: [: -eq: unary operator expected 135 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 136 | remove_core.sh: line 52: ./drat-trim: No such file or directory 137 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 138 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r12.cnf': No such file or directory 139 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r12_core': No such file or directory 140 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r12.drat': No such file or directory 141 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 142 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 143 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 144 | (standard_in) 1: syntax error 145 | remove_core.sh: line 46: [: -eq: unary operator expected 146 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 147 | remove_core.sh: line 52: ./drat-trim: No such file or directory 148 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 149 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r13.cnf': No such file or directory 150 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r13_core': No such file or directory 151 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r13.drat': No such file or directory 152 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 153 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 154 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 155 | (standard_in) 1: syntax error 156 | remove_core.sh: line 46: [: -eq: unary operator expected 157 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 158 | remove_core.sh: line 52: ./drat-trim: No such file or directory 159 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 160 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r14.cnf': No such file or directory 161 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r14_core': No such file or directory 162 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r14.drat': No such file or directory 163 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 164 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 165 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 166 | (standard_in) 1: syntax error 167 | remove_core.sh: line 46: [: -eq: unary operator expected 168 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 169 | remove_core.sh: line 52: ./drat-trim: No such file or directory 170 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 171 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r15.cnf': No such file or directory 172 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r15_core': No such file or directory 173 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r15.drat': No such file or directory 174 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 175 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 176 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 177 | (standard_in) 1: syntax error 178 | remove_core.sh: line 46: [: -eq: unary operator expected 179 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 180 | remove_core.sh: line 52: ./drat-trim: No such file or directory 181 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 182 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r16.cnf': No such file or directory 183 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r16_core': No such file or directory 184 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r16.drat': No such file or directory 185 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 186 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 187 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 188 | (standard_in) 1: syntax error 189 | remove_core.sh: line 46: [: -eq: unary operator expected 190 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 191 | remove_core.sh: line 52: ./drat-trim: No such file or directory 192 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 193 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r17.cnf': No such file or directory 194 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r17_core': No such file or directory 195 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r17.drat': No such file or directory 196 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 197 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 198 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 199 | (standard_in) 1: syntax error 200 | remove_core.sh: line 46: [: -eq: unary operator expected 201 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 202 | remove_core.sh: line 52: ./drat-trim: No such file or directory 203 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 204 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r18.cnf': No such file or directory 205 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r18_core': No such file or directory 206 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r18.drat': No such file or directory 207 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 208 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 209 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 210 | (standard_in) 1: syntax error 211 | remove_core.sh: line 46: [: -eq: unary operator expected 212 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 213 | remove_core.sh: line 52: ./drat-trim: No such file or directory 214 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 215 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r19.cnf': No such file or directory 216 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r19_core': No such file or directory 217 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r19.drat': No such file or directory 218 | remove_core.sh: line 40: cd: postprocess/cadical/build: No such file or directory 219 | remove_core.sh: line 41: ../log/mdp-28-12-unsat_repeat1.log: No such file or directory 220 | tail: cannot open '../log/mdp-28-12-unsat_repeat1.log' for reading: No such file or directory 221 | (standard_in) 1: syntax error 222 | remove_core.sh: line 46: [: -eq: unary operator expected 223 | remove_core.sh: line 51: cd: ../../drat-trim: No such file or directory 224 | remove_core.sh: line 52: ./drat-trim: No such file or directory 225 | python: can't open file 'src/postprocess/sat_dataprocess.py': [Errno 2] No such file or directory 226 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r20.cnf': No such file or directory 227 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r20_core': No such file or directory 228 | rm: cannot remove '../formulas/mdp_post/mdp-28-12-unsat_repeat1_r20.drat': No such file or directory 229 | -------------------------------------------------------------------------------- /dataset/mp1_core/mp1-tri_ali_s11_c35_bail_UNS_core: -------------------------------------------------------------------------------- 1 | p cnf 400 1211 2 | -65 -66 399 0 3 | -65 397 0 4 | -66 397 0 5 | -63 -64 400 0 6 | -63 398 0 7 | -64 398 0 8 | -62 395 -61 0 9 | 393 -61 0 10 | -62 393 0 11 | 396 -60 -59 0 12 | 394 -59 0 13 | -60 394 0 14 | 391 -58 -57 0 15 | 389 -57 0 16 | 389 -58 0 17 | 392 -55 -56 0 18 | -55 390 0 19 | 390 -56 0 20 | 387 -54 -53 0 21 | 385 -53 0 22 | -54 385 0 23 | -52 388 -51 0 24 | 386 -51 0 25 | -52 386 0 26 | -49 383 -50 0 27 | -49 381 0 28 | 381 -50 0 29 | -48 -47 384 0 30 | -47 382 0 31 | -48 382 0 32 | -46 -45 379 0 33 | 377 -45 0 34 | -46 377 0 35 | -43 -44 380 0 36 | 378 -43 0 37 | 378 -44 0 38 | 375 -42 -41 0 39 | 373 -41 0 40 | 373 -42 0 41 | -39 376 -40 0 42 | -39 374 0 43 | 374 -40 0 44 | -37 -38 371 0 45 | -37 369 0 46 | -38 369 0 47 | -35 372 -36 0 48 | -35 370 0 49 | 370 -36 0 50 | -34 367 -33 0 51 | -33 365 0 52 | -34 365 0 53 | 368 -31 -32 0 54 | -31 366 0 55 | 366 -32 0 56 | -29 -30 363 0 57 | -29 361 0 58 | -30 361 0 59 | -28 364 -27 0 60 | 362 -27 0 61 | 362 -28 0 62 | 359 -26 -25 0 63 | 357 -25 0 64 | -26 357 0 65 | -23 360 -24 0 66 | -23 358 0 67 | 358 -24 0 68 | -21 355 -22 0 69 | -21 353 0 70 | 353 -22 0 71 | -20 356 -19 0 72 | 354 -19 0 73 | -20 354 0 74 | 351 -17 -18 0 75 | 349 -17 0 76 | 349 -18 0 77 | -16 -15 352 0 78 | -15 350 0 79 | -16 350 0 80 | -14 347 -13 0 81 | -13 345 0 82 | -14 345 0 83 | 348 -11 -12 0 84 | -11 346 0 85 | -12 346 0 86 | -10 343 -9 0 87 | 341 -9 0 88 | -10 341 0 89 | 344 -7 -8 0 90 | -7 342 0 91 | 342 -8 0 92 | -6 339 -5 0 93 | 337 -5 0 94 | -6 337 0 95 | -3 340 -4 0 96 | -3 338 0 97 | 338 -4 0 98 | -1 333 -2 0 99 | -1 331 0 100 | 331 -2 0 101 | -399 -400 336 0 102 | -400 -397 335 0 103 | -399 -398 335 0 104 | -400 334 0 105 | -397 -398 334 0 106 | -399 334 0 107 | -398 332 0 108 | -397 332 0 109 | -396 -395 329 0 110 | -396 -393 327 0 111 | -395 327 -394 0 112 | -396 325 0 113 | -393 325 -394 0 114 | -395 325 0 115 | 323 -394 0 116 | -393 323 0 117 | 330 -391 -392 0 118 | 328 -392 -389 0 119 | 328 -391 -390 0 120 | -392 326 0 121 | 326 -389 -390 0 122 | -391 326 0 123 | 324 -390 0 124 | 324 -389 0 125 | -388 321 -387 0 126 | -388 319 -385 0 127 | -386 319 -387 0 128 | -388 317 0 129 | 317 -386 -385 0 130 | 317 -387 0 131 | 315 -386 0 132 | 315 -385 0 133 | -383 -384 322 0 134 | -384 -381 320 0 135 | -383 -382 320 0 136 | -384 318 0 137 | -382 -381 318 0 138 | -383 318 0 139 | 316 -382 0 140 | 316 -381 0 141 | -379 -380 313 0 142 | -380 -377 311 0 143 | -379 -378 311 0 144 | -380 309 0 145 | -378 -377 309 0 146 | -379 309 0 147 | -378 307 0 148 | -377 307 0 149 | -376 -375 314 0 150 | -376 -373 312 0 151 | -375 312 -374 0 152 | -376 310 0 153 | 310 -373 -374 0 154 | -375 310 0 155 | 308 -374 0 156 | -373 308 0 157 | -372 -371 305 0 158 | -372 -369 303 0 159 | -371 303 -370 0 160 | -372 301 0 161 | 301 -369 -370 0 162 | -371 301 0 163 | 299 -370 0 164 | 299 -369 0 165 | -367 -368 306 0 166 | -368 -365 304 0 167 | -367 304 -366 0 168 | -368 302 0 169 | 302 -365 -366 0 170 | -367 302 0 171 | 300 -366 0 172 | -365 300 0 173 | -363 -364 297 0 174 | -364 295 -361 0 175 | -363 295 -362 0 176 | -364 293 0 177 | 293 -362 -361 0 178 | -363 293 0 179 | 291 -362 0 180 | 291 -361 0 181 | -359 -360 298 0 182 | -360 296 -357 0 183 | -359 296 -358 0 184 | -360 294 0 185 | 294 -358 -357 0 186 | -359 294 0 187 | 292 -358 0 188 | 292 -357 0 189 | -355 -356 289 0 190 | -356 287 -353 0 191 | -355 287 -354 0 192 | -356 285 0 193 | 285 -353 -354 0 194 | -355 285 0 195 | 283 -354 0 196 | 283 -353 0 197 | -352 290 -351 0 198 | -352 288 -349 0 199 | 288 -350 -351 0 200 | -352 286 0 201 | 286 -350 -349 0 202 | 286 -351 0 203 | 284 -350 0 204 | 284 -349 0 205 | -348 -347 281 0 206 | -348 279 -345 0 207 | -347 279 -346 0 208 | -348 277 0 209 | 277 -345 -346 0 210 | -347 277 0 211 | -346 275 0 212 | -345 275 0 213 | -343 282 -344 0 214 | 280 -344 -341 0 215 | -343 280 -342 0 216 | -344 278 0 217 | 278 -342 -341 0 218 | -343 278 0 219 | -342 276 0 220 | 276 -341 0 221 | -339 -340 271 0 222 | -340 269 -337 0 223 | -339 269 -338 0 224 | 267 -340 0 225 | 267 -338 -337 0 226 | -339 267 0 227 | 265 -338 0 228 | -337 265 0 229 | -336 274 -333 0 230 | -336 273 -331 0 231 | -335 273 -333 0 232 | -336 272 0 233 | -335 272 -331 0 234 | -334 -333 272 0 235 | -335 270 0 236 | -334 270 -331 0 237 | -332 -333 270 0 238 | -334 268 0 239 | -332 268 -331 0 240 | -333 268 0 241 | -332 266 0 242 | 266 -331 0 243 | -329 -330 263 0 244 | -327 -330 261 0 245 | -329 261 -328 0 246 | -330 -325 259 0 247 | -327 259 -328 0 248 | -329 259 -326 0 249 | -330 257 -323 0 250 | -325 257 -328 0 251 | -327 257 -326 0 252 | -329 257 -324 0 253 | -330 255 0 254 | 255 -323 -328 0 255 | -325 255 -326 0 256 | -327 255 -324 0 257 | -329 255 0 258 | 253 -328 0 259 | 253 -323 -326 0 260 | 253 -325 -324 0 261 | -327 253 0 262 | 251 -326 0 263 | 251 -323 -324 0 264 | -325 251 0 265 | 249 -324 0 266 | 249 -323 0 267 | -321 -322 264 0 268 | -322 262 -319 0 269 | -321 -320 262 0 270 | -322 260 -317 0 271 | -320 -319 260 0 272 | -321 -318 260 0 273 | -322 258 -315 0 274 | -320 258 -317 0 275 | -319 -318 258 0 276 | -321 258 -316 0 277 | -322 256 0 278 | -320 256 -315 0 279 | -318 256 -317 0 280 | -319 256 -316 0 281 | -321 256 0 282 | -320 254 0 283 | -318 254 -315 0 284 | 254 -316 -317 0 285 | -319 254 0 286 | 252 -318 0 287 | 252 -316 -315 0 288 | 252 -317 0 289 | 250 -316 0 290 | 250 -315 0 291 | -313 -314 247 0 292 | -314 245 -311 0 293 | -313 245 -312 0 294 | -314 243 -309 0 295 | -311 -312 243 0 296 | -313 243 -310 0 297 | -314 241 -307 0 298 | 241 -312 -309 0 299 | -311 241 -310 0 300 | -313 241 -308 0 301 | -314 239 0 302 | 239 -312 -307 0 303 | 239 -309 -310 0 304 | 239 -311 -308 0 305 | -313 239 0 306 | -312 237 0 307 | -307 -310 237 0 308 | -309 -308 237 0 309 | -311 237 0 310 | 235 -310 0 311 | 235 -307 -308 0 312 | 235 -309 0 313 | 233 -308 0 314 | 233 -307 0 315 | -305 -306 248 0 316 | -303 -306 246 0 317 | -305 246 -304 0 318 | -306 244 -301 0 319 | -303 -304 244 0 320 | -305 244 -302 0 321 | -306 242 -299 0 322 | 242 -304 -301 0 323 | -303 242 -302 0 324 | -305 242 -300 0 325 | -306 240 0 326 | -304 240 -299 0 327 | -302 -301 240 0 328 | -303 240 -300 0 329 | -305 240 0 330 | -304 238 0 331 | 238 -302 -299 0 332 | 238 -301 -300 0 333 | -303 238 0 334 | 236 -302 0 335 | 236 -299 -300 0 336 | 236 -301 0 337 | 234 -300 0 338 | 234 -299 0 339 | -297 -298 231 0 340 | -298 229 -295 0 341 | -297 -296 229 0 342 | -298 -293 227 0 343 | -296 -295 227 0 344 | -297 227 -294 0 345 | -298 225 -291 0 346 | -296 225 -293 0 347 | -295 225 -294 0 348 | -297 225 -292 0 349 | -298 223 0 350 | -296 223 -291 0 351 | 223 -293 -294 0 352 | 223 -295 -292 0 353 | -297 223 0 354 | -296 221 0 355 | 221 -291 -294 0 356 | 221 -293 -292 0 357 | 221 -295 0 358 | 219 -294 0 359 | 219 -291 -292 0 360 | -293 219 0 361 | 217 -292 0 362 | 217 -291 0 363 | -289 -290 232 0 364 | -290 -287 230 0 365 | -289 -288 230 0 366 | -290 228 -285 0 367 | -287 -288 228 0 368 | -289 228 -286 0 369 | -290 226 -283 0 370 | -288 -285 226 0 371 | -287 226 -286 0 372 | -289 226 -284 0 373 | -290 224 0 374 | -288 224 -283 0 375 | 224 -285 -286 0 376 | -287 224 -284 0 377 | -289 224 0 378 | -288 222 0 379 | 222 -286 -283 0 380 | 222 -285 -284 0 381 | -287 222 0 382 | 220 -286 0 383 | 220 -284 -283 0 384 | 220 -285 0 385 | 218 -284 0 386 | 218 -283 0 387 | -281 -282 213 0 388 | -282 211 -279 0 389 | -281 211 -280 0 390 | -282 209 -277 0 391 | -279 209 -280 0 392 | -281 209 -278 0 393 | -282 207 -275 0 394 | -277 207 -280 0 395 | -279 207 -278 0 396 | -281 207 -276 0 397 | -282 205 0 398 | 205 -275 -280 0 399 | 205 -277 -278 0 400 | -279 205 -276 0 401 | -281 205 0 402 | 203 -280 0 403 | -278 -275 203 0 404 | -277 203 -276 0 405 | -279 203 0 406 | 201 -278 0 407 | 201 -275 -276 0 408 | 201 -277 0 409 | -276 199 0 410 | -275 199 0 411 | -274 216 -271 0 412 | -274 215 -269 0 413 | -273 215 -271 0 414 | -274 214 -267 0 415 | -273 214 -269 0 416 | 214 -272 -271 0 417 | 212 -274 -265 0 418 | -273 212 -267 0 419 | 212 -272 -269 0 420 | 212 -270 -271 0 421 | -273 210 -265 0 422 | -272 210 -267 0 423 | -270 210 -269 0 424 | -271 -268 210 0 425 | -272 208 -265 0 426 | -270 208 -267 0 427 | -269 -268 208 0 428 | -271 208 -266 0 429 | -272 206 0 430 | -270 206 -265 0 431 | -268 206 -267 0 432 | -269 206 -266 0 433 | -271 206 0 434 | -270 204 0 435 | -268 204 -265 0 436 | 204 -267 -266 0 437 | -269 204 0 438 | 202 -265 -266 0 439 | 202 -267 0 440 | 200 -265 0 441 | -263 -262 195 0 442 | -264 -259 193 0 443 | -261 -262 193 0 444 | -263 -260 193 0 445 | -264 -257 191 0 446 | -259 -262 191 0 447 | -261 -260 191 0 448 | -263 191 -258 0 449 | -264 189 -255 0 450 | -257 -262 189 0 451 | -259 -260 189 0 452 | -261 189 -258 0 453 | -263 189 -256 0 454 | -264 187 -253 0 455 | -262 187 -255 0 456 | -257 -260 187 0 457 | -259 187 -258 0 458 | -261 187 -256 0 459 | -263 187 -254 0 460 | -264 185 -251 0 461 | -262 185 -253 0 462 | -260 185 -255 0 463 | -257 185 -258 0 464 | -259 185 -256 0 465 | -261 185 -254 0 466 | -263 185 -252 0 467 | -264 183 -249 0 468 | -262 183 -251 0 469 | -260 183 -253 0 470 | 183 -255 -258 0 471 | -257 183 -256 0 472 | -259 183 -254 0 473 | -261 183 -252 0 474 | -263 183 -250 0 475 | -264 181 0 476 | -262 181 -249 0 477 | -260 181 -251 0 478 | -258 181 -253 0 479 | -255 181 -256 0 480 | -257 181 -254 0 481 | -259 181 -252 0 482 | -261 181 -250 0 483 | 179 -262 0 484 | 179 -260 -249 0 485 | 179 -258 -251 0 486 | 179 -256 -253 0 487 | 179 -255 -254 0 488 | 179 -257 -252 0 489 | 179 -259 -250 0 490 | -260 177 0 491 | -258 177 -249 0 492 | -256 177 -251 0 493 | -254 177 -253 0 494 | -255 177 -252 0 495 | -257 177 -250 0 496 | 175 -258 0 497 | 175 -256 -249 0 498 | 175 -254 -251 0 499 | 175 -253 -252 0 500 | 175 -255 -250 0 501 | 173 -256 0 502 | 173 -254 -249 0 503 | 173 -251 -252 0 504 | 173 -253 -250 0 505 | 173 -255 0 506 | 171 -254 0 507 | 171 -252 -249 0 508 | 171 -251 -250 0 509 | -248 194 -243 0 510 | -245 -246 194 0 511 | -248 192 -241 0 512 | -246 192 -243 0 513 | -245 -244 192 0 514 | -247 192 -242 0 515 | -248 190 -239 0 516 | -246 190 -241 0 517 | -244 190 -243 0 518 | -245 190 -242 0 519 | -247 190 -240 0 520 | -248 188 -237 0 521 | -246 188 -239 0 522 | -244 188 -241 0 523 | -243 188 -242 0 524 | -245 188 -240 0 525 | -247 188 -238 0 526 | -248 186 -235 0 527 | -246 186 -237 0 528 | -244 186 -239 0 529 | 186 -242 -241 0 530 | -243 186 -240 0 531 | -245 186 -238 0 532 | -247 186 -236 0 533 | -248 184 -233 0 534 | -246 184 -235 0 535 | -244 184 -237 0 536 | 184 -242 -239 0 537 | 184 -240 -241 0 538 | -243 184 -238 0 539 | -245 184 -236 0 540 | -247 184 -234 0 541 | -246 182 -233 0 542 | -244 182 -235 0 543 | -242 -237 182 0 544 | -240 182 -239 0 545 | -241 182 -238 0 546 | -243 182 -236 0 547 | -245 182 -234 0 548 | -244 180 -233 0 549 | -242 180 -235 0 550 | -240 180 -237 0 551 | 180 -239 -238 0 552 | 180 -241 -236 0 553 | -243 180 -234 0 554 | -242 178 -233 0 555 | -240 178 -235 0 556 | 178 -237 -238 0 557 | -239 -236 178 0 558 | -241 178 -234 0 559 | -243 178 0 560 | 176 -242 0 561 | 176 -240 -233 0 562 | 176 -238 -235 0 563 | 176 -237 -236 0 564 | 176 -239 -234 0 565 | 176 -241 0 566 | 174 -238 -233 0 567 | 174 -236 -235 0 568 | 174 -237 -234 0 569 | 174 -239 0 570 | 172 -236 -233 0 571 | 172 -235 -234 0 572 | 172 -237 0 573 | 170 -236 0 574 | 170 -233 -234 0 575 | 170 -235 0 576 | -231 -232 162 0 577 | -229 160 -232 0 578 | 158 -232 -227 0 579 | -230 -229 158 0 580 | -231 -228 158 0 581 | 156 -232 -225 0 582 | -230 156 -227 0 583 | -229 156 -228 0 584 | -231 156 -226 0 585 | -232 154 -223 0 586 | -230 -225 154 0 587 | -228 -227 154 0 588 | -229 -226 154 0 589 | -231 154 -224 0 590 | -232 152 -221 0 591 | -230 -223 152 0 592 | -228 -225 152 0 593 | -227 -226 152 0 594 | -229 152 -224 0 595 | -231 152 -222 0 596 | -232 150 -219 0 597 | -230 -221 150 0 598 | -228 -223 150 0 599 | -226 -225 150 0 600 | -227 150 -224 0 601 | -229 150 -222 0 602 | -231 150 -220 0 603 | -232 148 -217 0 604 | -230 148 -219 0 605 | -228 148 -221 0 606 | -226 -223 148 0 607 | -225 148 -224 0 608 | -227 148 -222 0 609 | -229 148 -220 0 610 | -230 146 -217 0 611 | -228 146 -219 0 612 | -226 -221 146 0 613 | -223 146 -224 0 614 | -225 146 -222 0 615 | -227 146 -220 0 616 | -229 146 -218 0 617 | -230 144 0 618 | -228 144 -217 0 619 | -226 144 -219 0 620 | -221 144 -224 0 621 | -223 144 -222 0 622 | -225 144 -220 0 623 | -227 144 -218 0 624 | -226 142 -217 0 625 | 142 -224 -219 0 626 | 142 -221 -222 0 627 | 142 -223 -220 0 628 | -225 142 -218 0 629 | 140 -226 0 630 | 140 -224 -217 0 631 | 140 -219 -222 0 632 | 140 -221 -220 0 633 | 140 -223 -218 0 634 | 138 -224 0 635 | 138 -217 -222 0 636 | 138 -219 -220 0 637 | -215 -211 163 0 638 | -215 -209 161 0 639 | -211 161 -214 0 640 | -215 159 -207 0 641 | -209 159 -214 0 642 | -212 -211 159 0 643 | -213 159 -210 0 644 | -216 157 -203 0 645 | -215 157 -205 0 646 | 157 -214 -207 0 647 | -212 -209 157 0 648 | -211 157 -210 0 649 | -213 157 -208 0 650 | -215 155 -203 0 651 | 155 -214 -205 0 652 | -212 155 -207 0 653 | -209 -210 155 0 654 | -211 155 -208 0 655 | -213 155 -206 0 656 | -215 153 -201 0 657 | 153 -214 -203 0 658 | -212 153 -205 0 659 | 153 -210 -207 0 660 | -209 153 -208 0 661 | -211 153 -206 0 662 | -213 153 -204 0 663 | 151 -214 -201 0 664 | -212 151 -203 0 665 | -210 151 -205 0 666 | 151 -208 -207 0 667 | -209 151 -206 0 668 | -211 151 -204 0 669 | 149 -214 -199 0 670 | -212 149 -201 0 671 | 149 -210 -203 0 672 | 149 -208 -205 0 673 | 149 -206 -207 0 674 | -209 149 -204 0 675 | -211 149 -202 0 676 | -210 147 -201 0 677 | 147 -208 -203 0 678 | 147 -206 -205 0 679 | 147 -207 -204 0 680 | -209 147 -202 0 681 | 145 -208 -201 0 682 | 145 -206 -203 0 683 | 145 -205 -204 0 684 | 145 -207 -202 0 685 | -209 145 -200 0 686 | -206 143 -201 0 687 | 143 -203 -204 0 688 | -205 143 -202 0 689 | -207 143 -200 0 690 | 141 -204 -201 0 691 | 141 -203 -202 0 692 | -190 -189 84 0 693 | -191 -188 84 0 694 | -193 -186 84 0 695 | -192 -185 86 0 696 | -190 -187 86 0 697 | -189 -188 86 0 698 | -191 -186 86 0 699 | -184 -193 86 0 700 | -183 -192 88 0 701 | -190 -185 88 0 702 | -187 -188 88 0 703 | -189 -186 88 0 704 | -184 -191 88 0 705 | -193 -182 88 0 706 | -194 90 -179 0 707 | -192 90 -181 0 708 | -183 -190 90 0 709 | -185 -188 90 0 710 | -187 -186 90 0 711 | -184 -189 90 0 712 | -191 90 -182 0 713 | -193 90 -180 0 714 | -195 90 -178 0 715 | 92 -194 -177 0 716 | 92 -192 -179 0 717 | -190 92 -181 0 718 | -183 -188 92 0 719 | -185 -186 92 0 720 | -187 -184 92 0 721 | -189 92 -182 0 722 | -191 92 -180 0 723 | -193 92 -178 0 724 | 94 -194 -175 0 725 | 94 -192 -177 0 726 | 94 -190 -179 0 727 | -188 94 -181 0 728 | -183 -186 94 0 729 | -185 -184 94 0 730 | -187 94 -182 0 731 | -189 94 -180 0 732 | -191 94 -178 0 733 | -193 94 -176 0 734 | 96 -194 -173 0 735 | 96 -192 -175 0 736 | 96 -190 -177 0 737 | 96 -188 -179 0 738 | 96 -186 -181 0 739 | 96 -183 -184 0 740 | 96 -185 -182 0 741 | 96 -187 -180 0 742 | 96 -189 -178 0 743 | 96 -191 -176 0 744 | 98 -192 -173 0 745 | 98 -190 -175 0 746 | 98 -188 -177 0 747 | 98 -186 -179 0 748 | 98 -184 -181 0 749 | 98 -183 -182 0 750 | 98 -185 -180 0 751 | 98 -187 -178 0 752 | 98 -189 -176 0 753 | 100 -190 -173 0 754 | 100 -188 -175 0 755 | 100 -186 -177 0 756 | 100 -184 -179 0 757 | 100 -181 -182 0 758 | 100 -183 -180 0 759 | 100 -185 -178 0 760 | 100 -187 -176 0 761 | 102 -188 -173 0 762 | 102 -186 -175 0 763 | 102 -184 -177 0 764 | 102 -179 -182 0 765 | 102 -181 -180 0 766 | 102 -183 -178 0 767 | 102 -185 -176 0 768 | 102 -187 -174 0 769 | 104 -186 -173 0 770 | 104 -184 -175 0 771 | 104 -177 -182 0 772 | 104 -179 -180 0 773 | 104 -181 -178 0 774 | 104 -183 -176 0 775 | 104 -185 -174 0 776 | 104 -187 -172 0 777 | 106 -184 -173 0 778 | 106 -182 -175 0 779 | 106 -177 -180 0 780 | 106 -179 -178 0 781 | 106 -181 -176 0 782 | 106 -183 -174 0 783 | 106 -185 -172 0 784 | 108 -180 -175 0 785 | 108 -177 -178 0 786 | 108 -179 -176 0 787 | 108 -181 -174 0 788 | 114 -178 -171 0 789 | 114 -176 -173 0 790 | 114 -177 -172 0 791 | 114 -179 -170 0 792 | -153 -162 113 0 793 | -159 107 -150 0 794 | -157 -152 107 0 795 | -154 -155 107 0 796 | -156 -153 107 0 797 | -158 -151 107 0 798 | -160 107 -149 0 799 | -161 105 -146 0 800 | 105 -159 -148 0 801 | 105 -157 -150 0 802 | -155 105 -152 0 803 | -154 -153 105 0 804 | -156 -151 105 0 805 | -158 105 -149 0 806 | -160 105 -147 0 807 | 103 -161 -144 0 808 | 103 -159 -146 0 809 | 103 -157 -148 0 810 | 103 -155 -150 0 811 | 103 -153 -152 0 812 | 103 -154 -151 0 813 | 103 -156 -149 0 814 | 103 -158 -147 0 815 | 101 -163 -140 0 816 | 101 -161 -142 0 817 | 101 -159 -144 0 818 | 101 -157 -146 0 819 | 101 -155 -148 0 820 | 101 -153 -150 0 821 | 101 -151 -152 0 822 | 101 -154 -149 0 823 | 101 -156 -147 0 824 | 101 -158 -145 0 825 | 99 -161 -140 0 826 | 99 -159 -142 0 827 | 99 -157 -144 0 828 | 99 -155 -146 0 829 | 99 -153 -148 0 830 | 99 -151 -150 0 831 | 99 -152 -149 0 832 | 99 -154 -147 0 833 | 99 -156 -145 0 834 | 97 -159 -140 0 835 | 97 -157 -142 0 836 | 97 -155 -144 0 837 | 97 -153 -146 0 838 | 97 -151 -148 0 839 | 97 -150 -149 0 840 | 97 -152 -147 0 841 | 97 -154 -145 0 842 | -156 97 -143 0 843 | 95 -157 -140 0 844 | 95 -155 -142 0 845 | 95 -153 -144 0 846 | 95 -151 -146 0 847 | 95 -148 -149 0 848 | 95 -150 -147 0 849 | 95 -152 -145 0 850 | -154 95 -143 0 851 | 95 -156 -141 0 852 | 93 -157 -138 0 853 | 93 -155 -140 0 854 | 93 -153 -142 0 855 | 93 -151 -144 0 856 | 93 -146 -149 0 857 | 93 -148 -147 0 858 | 93 -150 -145 0 859 | -152 93 -143 0 860 | -155 91 -138 0 861 | -153 91 -140 0 862 | -151 91 -142 0 863 | -144 -149 91 0 864 | -146 -147 91 0 865 | -148 -145 91 0 866 | -150 91 -143 0 867 | 91 -152 -141 0 868 | -151 89 -140 0 869 | -149 89 -142 0 870 | -144 -147 89 0 871 | -146 -145 89 0 872 | -148 89 -143 0 873 | -150 89 -141 0 874 | -149 87 -140 0 875 | -147 87 -142 0 876 | -144 -145 87 0 877 | -146 87 -143 0 878 | -148 87 -141 0 879 | -147 85 -140 0 880 | -145 85 -142 0 881 | -144 85 -143 0 882 | -145 83 -140 0 883 | 83 -142 -143 0 884 | -113 -114 0 885 | -107 -108 0 886 | -105 -106 0 887 | -103 -104 0 888 | -101 -102 0 889 | -99 -100 0 890 | -97 -98 0 891 | -96 -95 0 892 | -94 -93 0 893 | -92 -91 0 894 | -90 -89 0 895 | -88 -87 0 896 | -86 -85 0 897 | -84 -83 0 898 | 55 65 54 0 899 | 53 54 64 0 900 | 53 52 63 0 901 | 62 52 51 0 902 | 61 50 51 0 903 | 60 50 49 0 904 | 48 49 59 0 905 | 58 48 47 0 906 | 47 57 46 0 907 | 45 43 64 0 908 | 42 44 63 0 909 | 62 43 41 0 910 | 61 42 40 0 911 | 60 39 41 0 912 | 59 38 40 0 913 | 37 58 39 0 914 | 45 54 44 0 915 | 53 44 43 0 916 | 52 42 43 0 917 | 51 42 41 0 918 | 50 40 41 0 919 | 49 40 39 0 920 | 38 48 39 0 921 | 37 38 47 0 922 | 36 63 33 0 923 | 35 62 32 0 924 | 61 34 31 0 925 | 60 30 33 0 926 | 59 29 32 0 927 | 53 36 34 0 928 | 35 52 33 0 929 | 51 34 32 0 930 | 50 33 31 0 931 | 30 49 32 0 932 | 48 29 31 0 933 | 35 36 44 0 934 | 43 35 34 0 935 | 42 34 33 0 936 | 41 33 32 0 937 | 40 32 31 0 938 | 30 39 31 0 939 | 38 30 29 0 940 | 62 28 24 0 941 | 27 61 23 0 942 | 60 22 26 0 943 | 28 52 25 0 944 | 27 51 24 0 945 | 50 23 26 0 946 | 49 22 25 0 947 | 43 28 26 0 948 | 27 42 25 0 949 | 41 24 26 0 950 | 40 23 25 0 951 | 39 22 24 0 952 | 27 35 28 0 953 | 27 26 34 0 954 | 33 25 26 0 955 | 25 24 32 0 956 | 24 23 31 0 957 | 30 22 23 0 958 | 16 61 21 0 959 | 17 51 21 0 960 | 16 50 20 0 961 | 18 42 21 0 962 | 17 20 41 0 963 | 16 40 19 0 964 | 19 21 34 0 965 | 33 18 20 0 966 | 17 19 32 0 967 | 16 18 31 0 968 | 27 21 20 0 969 | 20 19 26 0 970 | 18 19 25 0 971 | 18 17 24 0 972 | 16 17 23 0 973 | 41 15 11 0 974 | 15 33 12 0 975 | 32 11 14 0 976 | 15 26 13 0 977 | 25 12 14 0 978 | 24 13 11 0 979 | 20 15 14 0 980 | 19 13 14 0 981 | 18 12 13 0 982 | 17 12 11 0 983 | 10 7 25 0 984 | 19 10 8 0 985 | 18 9 7 0 986 | 9 10 14 0 987 | 9 8 13 0 988 | 7 8 12 0 989 | 13 4 6 0 990 | 9 6 5 0 991 | 5 4 8 0 992 | 2 5 3 0 993 | 55 65 66 0 994 | 54 65 64 0 995 | 53 63 64 0 996 | 62 52 63 0 997 | 61 62 51 0 998 | 60 61 50 0 999 | 59 60 49 0 1000 | 59 48 58 0 1001 | 57 58 47 0 1002 | 56 57 46 0 1003 | 45 66 64 0 1004 | 44 65 63 0 1005 | 62 43 64 0 1006 | 61 42 63 0 1007 | 60 62 41 0 1008 | 61 59 40 0 1009 | 60 58 39 0 1010 | 38 59 57 0 1011 | 37 56 58 0 1012 | 55 45 54 0 1013 | 53 54 44 0 1014 | 53 52 43 0 1015 | 52 51 42 0 1016 | 51 50 41 0 1017 | 50 49 40 0 1018 | 48 49 39 0 1019 | 38 48 47 0 1020 | 37 47 46 0 1021 | 36 66 63 0 1022 | 35 62 65 0 1023 | 34 61 64 0 1024 | 60 63 33 0 1025 | 59 62 32 0 1026 | 61 58 31 0 1027 | 60 30 57 0 1028 | 56 59 29 0 1029 | 53 55 36 0 1030 | 35 54 52 0 1031 | 53 51 34 0 1032 | 52 50 33 0 1033 | 51 49 32 0 1034 | 48 50 31 0 1035 | 30 49 47 0 1036 | 48 46 29 0 1037 | 45 36 44 0 1038 | 43 35 44 0 1039 | 42 43 34 0 1040 | 42 41 33 0 1041 | 40 41 32 0 1042 | 39 40 31 0 1043 | 38 30 39 0 1044 | 38 37 29 0 1045 | 62 28 66 0 1046 | 27 61 65 0 1047 | 60 64 26 0 1048 | 59 63 25 0 1049 | 62 58 24 0 1050 | 61 57 23 0 1051 | 56 60 22 0 1052 | 55 52 28 0 1053 | 27 54 51 0 1054 | 53 50 26 0 1055 | 52 49 25 0 1056 | 48 51 24 0 1057 | 50 47 23 0 1058 | 49 46 22 0 1059 | 43 45 28 0 1060 | 27 42 44 0 1061 | 43 41 26 0 1062 | 42 40 25 0 1063 | 39 41 24 0 1064 | 38 40 23 0 1065 | 37 39 22 0 1066 | 36 35 28 0 1067 | 27 35 34 0 1068 | 26 34 33 0 1069 | 25 33 32 0 1070 | 24 32 31 0 1071 | 30 23 31 0 1072 | 30 29 22 0 1073 | 61 66 21 0 1074 | 60 65 20 0 1075 | 59 19 64 0 1076 | 18 58 63 0 1077 | 17 62 57 0 1078 | 16 56 61 0 1079 | 55 51 21 0 1080 | 54 50 20 0 1081 | 53 49 19 0 1082 | 18 48 52 0 1083 | 17 51 47 0 1084 | 16 50 46 0 1085 | 45 42 21 0 1086 | 44 20 41 0 1087 | 40 43 19 0 1088 | 18 42 39 0 1089 | 17 38 41 0 1090 | 16 37 40 0 1091 | 36 21 34 0 1092 | 35 20 33 0 1093 | 19 34 32 0 1094 | 18 33 31 0 1095 | 17 30 32 0 1096 | 16 29 31 0 1097 | 27 28 21 0 1098 | 27 20 26 0 1099 | 19 25 26 0 1100 | 18 25 24 0 1101 | 17 23 24 0 1102 | 16 22 23 0 1103 | 60 66 15 0 1104 | 59 65 14 0 1105 | 58 64 13 0 1106 | 57 63 12 0 1107 | 56 62 11 0 1108 | 55 50 15 0 1109 | 54 49 14 0 1110 | 53 48 13 0 1111 | 52 47 12 0 1112 | 51 46 11 0 1113 | 45 41 15 0 1114 | 40 44 14 0 1115 | 43 39 13 0 1116 | 38 42 12 0 1117 | 37 41 11 0 1118 | 36 15 33 0 1119 | 35 32 14 0 1120 | 34 31 13 0 1121 | 30 33 12 0 1122 | 29 32 11 0 1123 | 28 15 26 0 1124 | 27 25 14 0 1125 | 24 26 13 0 1126 | 23 25 12 0 1127 | 22 24 11 0 1128 | 21 20 15 0 1129 | 20 19 14 0 1130 | 18 19 13 0 1131 | 18 17 12 0 1132 | 16 17 11 0 1133 | 59 10 66 0 1134 | 58 65 9 0 1135 | 57 8 64 0 1136 | 56 7 63 0 1137 | 55 49 10 0 1138 | 48 54 9 0 1139 | 53 47 8 0 1140 | 52 46 7 0 1141 | 45 40 10 0 1142 | 39 44 9 0 1143 | 38 43 8 0 1144 | 37 42 7 0 1145 | 36 10 32 0 1146 | 35 9 31 0 1147 | 30 8 34 0 1148 | 29 7 33 0 1149 | 28 10 25 0 1150 | 27 9 24 0 1151 | 8 23 26 0 1152 | 7 22 25 0 1153 | 19 10 21 0 1154 | 18 9 20 0 1155 | 17 19 8 0 1156 | 16 18 7 0 1157 | 10 15 14 0 1158 | 9 14 13 0 1159 | 8 12 13 0 1160 | 7 12 11 0 1161 | 58 66 6 0 1162 | 57 65 5 0 1163 | 56 4 64 0 1164 | 55 48 6 0 1165 | 54 47 5 0 1166 | 53 46 4 0 1167 | 45 39 6 0 1168 | 38 44 5 0 1169 | 43 37 4 0 1170 | 36 6 31 0 1171 | 30 35 5 0 1172 | 29 4 34 0 1173 | 28 6 24 0 1174 | 27 5 23 0 1175 | 4 22 26 0 1176 | 18 6 21 0 1177 | 17 5 20 0 1178 | 16 19 4 0 1179 | 6 15 13 0 1180 | 5 12 14 0 1181 | 4 13 11 0 1182 | 6 9 10 0 1183 | 9 8 5 0 1184 | 4 7 8 0 1185 | 57 66 3 0 1186 | 56 65 2 0 1187 | 55 47 3 0 1188 | 54 46 2 0 1189 | 38 45 3 0 1190 | 37 44 2 0 1191 | 30 36 3 0 1192 | 35 29 2 0 1193 | 28 23 3 0 1194 | 27 2 22 0 1195 | 17 21 3 0 1196 | 16 2 20 0 1197 | 15 3 12 0 1198 | 2 11 14 0 1199 | 10 8 3 0 1200 | 2 9 7 0 1201 | 6 5 3 0 1202 | 2 4 5 0 1203 | 56 66 1 0 1204 | 55 46 1 0 1205 | 37 45 1 0 1206 | 36 29 1 0 1207 | 28 22 1 0 1208 | 16 21 1 0 1209 | 15 1 11 0 1210 | 10 7 1 0 1211 | 4 6 1 0 1212 | 2 1 3 0 1213 | --------------------------------------------------------------------------------