author | blanchet |
Fri, 11 Jan 2013 16:30:56 +0100 | |
changeset 50827 | aba769dc82e9 |
parent 50619 | b958a94cf811 |
child 50840 | a5cc092156da |
permissions | -rwxr-xr-x |
50220 | 1 |
#!/usr/bin/python |
50222 | 2 |
# Title: HOL/Tools/Sledgehammer/MaSh/src/mash.py |
3 |
# Author: Daniel Kuehlwein, ICIS, Radboud University Nijmegen |
|
4 |
# Copyright 2012 |
|
5 |
# |
|
6 |
# Entry point for MaSh (Machine Learning for Sledgehammer). |
|
7 |
||
50220 | 8 |
''' |
9 |
MaSh - Machine Learning for Sledgehammer |
|
10 |
||
11 |
MaSh allows to use different machine learning algorithms to predict relevant fact for Sledgehammer. |
|
12 |
||
13 |
Created on July 12, 2012 |
|
14 |
||
15 |
@author: Daniel Kuehlwein |
|
16 |
''' |
|
17 |
||
18 |
import logging,datetime,string,os,sys |
|
19 |
from argparse import ArgumentParser,RawDescriptionHelpFormatter |
|
20 |
from time import time |
|
21 |
from stats import Statistics |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
22 |
from theoryStats import TheoryStatistics |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
23 |
from theoryModels import TheoryModels |
50220 | 24 |
from dictionaries import Dictionaries |
50399 | 25 |
#from fullNaiveBayes import NBClassifier |
50482 | 26 |
from sparseNaiveBayes import sparseNBClassifier |
50220 | 27 |
from snow import SNoW |
28 |
from predefined import Predefined |
|
29 |
||
30 |
# Set up command-line parser |
|
31 |
parser = ArgumentParser(description='MaSh - Machine Learning for Sledgehammer. \n\n\ |
|
32 |
MaSh allows to use different machine learning algorithms to predict relevant facts for Sledgehammer.\n\n\ |
|
33 |
--------------- Example Usage ---------------\n\ |
|
50434
960a3429615c
more MaSh tweaking -- in particular, export the same facts in "MaSh_Export" as are later tried in "MaSh_Eval"
blanchet
parents:
50399
diff
changeset
|
34 |
First initialize:\n./mash.py -l test.log -o ../tmp/ --init --inputDir ../data/Jinja/ \n\ |
960a3429615c
more MaSh tweaking -- in particular, export the same facts in "MaSh_Export" as are later tried in "MaSh_Eval"
blanchet
parents:
50399
diff
changeset
|
35 |
Then create predictions:\n./mash.py -i ../data/Jinja/mash_commands -p ../data/Jinja/mash_suggestions -l test.log -o ../tmp/ --statistics\n\ |
50220 | 36 |
\n\n\ |
37 |
Author: Daniel Kuehlwein, July 2012',formatter_class=RawDescriptionHelpFormatter) |
|
38 |
parser.add_argument('-i','--inputFile',help='File containing all problems to be solved.') |
|
39 |
parser.add_argument('-o','--outputDir', default='../tmp/',help='Directory where all created files are stored. Default=../tmp/.') |
|
50388 | 40 |
parser.add_argument('-p','--predictions',default='../tmp/%s.predictions' % datetime.datetime.now(), |
50220 | 41 |
help='File where the predictions stored. Default=../tmp/dateTime.predictions.') |
42 |
parser.add_argument('--numberOfPredictions',default=200,help="Number of premises to write in the output. Default=200.",type=int) |
|
43 |
||
44 |
parser.add_argument('--init',default=False,action='store_true',help="Initialize Mash. Requires --inputDir to be defined. Default=False.") |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
45 |
parser.add_argument('--inputDir',default='../data/20121212/Jinja/',\ |
50220 | 46 |
help='Directory containing all the input data. MaSh expects the following files: mash_features,mash_dependencies,mash_accessibility') |
47 |
parser.add_argument('--depFile', default='mash_dependencies', |
|
48 |
help='Name of the file with the premise dependencies. The file must be in inputDir. Default = mash_dependencies') |
|
49 |
parser.add_argument('--saveModel',default=False,action='store_true',help="Stores the learned Model at the end of a prediction run. Default=False.") |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
50 |
parser.add_argument('--learnTheories',default=False,action='store_true',help="Uses a two-lvl prediction mode. First the theories, then the premises. Default=False.") |
50827 | 51 |
#DEBUG: Change sineprioir default to false |
52 |
parser.add_argument('--sinePrior',default=True,action='store_true',help="Uses a SInE like prior for premise lvl predictions. Default=False.") |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
53 |
|
50220 | 54 |
|
55 |
parser.add_argument('--nb',default=False,action='store_true',help="Use Naive Bayes for learning. This is the default learning method.") |
|
56 |
parser.add_argument('--snow',default=False,action='store_true',help="Use SNoW's naive bayes instead of Naive Bayes for learning.") |
|
57 |
parser.add_argument('--predef',default=False,action='store_true',\ |
|
50399 | 58 |
help="Use predefined predictions. Used only for comparison with the actual learning. Expects mash_mepo_suggestions in inputDir.") |
50220 | 59 |
parser.add_argument('--statistics',default=False,action='store_true',help="Create and show statistics for the top CUTOFF predictions.\ |
60 |
WARNING: This will make the program a lot slower! Default=False.") |
|
61 |
parser.add_argument('--saveStats',default=None,help="If defined, stores the statistics in the filename provided.") |
|
62 |
parser.add_argument('--cutOff',default=500,help="Option for statistics. Only consider the first cutOff predictions. Default=500.",type=int) |
|
63 |
parser.add_argument('-l','--log', default='../tmp/%s.log' % datetime.datetime.now(), help='Log file name. Default=../tmp/dateTime.log') |
|
64 |
parser.add_argument('-q','--quiet',default=False,action='store_true',help="If enabled, only print warnings. Default=False.") |
|
65 |
||
50388 | 66 |
def main(argv = sys.argv[1:]): |
50220 | 67 |
# Initializing command-line arguments |
68 |
args = parser.parse_args(argv) |
|
69 |
||
50388 | 70 |
# Set up logging |
50220 | 71 |
logging.basicConfig(level=logging.DEBUG, |
72 |
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', |
|
73 |
datefmt='%d-%m %H:%M:%S', |
|
74 |
filename=args.log, |
|
75 |
filemode='w') |
|
76 |
console = logging.StreamHandler(sys.stdout) |
|
77 |
console.setLevel(logging.INFO) |
|
78 |
formatter = logging.Formatter('# %(message)s') |
|
79 |
console.setFormatter(formatter) |
|
80 |
logging.getLogger('').addHandler(console) |
|
81 |
logger = logging.getLogger('main.py') |
|
82 |
if args.quiet: |
|
83 |
logger.setLevel(logging.WARNING) |
|
84 |
console.setLevel(logging.WARNING) |
|
85 |
if not os.path.exists(args.outputDir): |
|
86 |
os.makedirs(args.outputDir) |
|
87 |
||
88 |
logger.info('Using the following settings: %s',args) |
|
89 |
# Pick algorithm |
|
90 |
if args.nb: |
|
50441
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
91 |
logger.info('Using sparse Naive Bayes for learning.') |
50827 | 92 |
model = sparseNBClassifier(args.sinePrior) |
50220 | 93 |
modelFile = os.path.join(args.outputDir,'NB.pickle') |
94 |
elif args.snow: |
|
95 |
logger.info('Using naive bayes (SNoW) for learning.') |
|
96 |
model = SNoW() |
|
97 |
modelFile = os.path.join(args.outputDir,'SNoW.pickle') |
|
98 |
elif args.predef: |
|
99 |
logger.info('Using predefined predictions.') |
|
50399 | 100 |
#predictionFile = os.path.join(args.inputDir,'mash_meng_paulson_suggestions') |
101 |
predictionFile = os.path.join(args.inputDir,'mash_mepo_suggestions') |
|
50220 | 102 |
model = Predefined(predictionFile) |
50399 | 103 |
modelFile = os.path.join(args.outputDir,'mepo.pickle') |
50220 | 104 |
else: |
50441
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
105 |
logger.info('No algorithm specified. Using sparse Naive Bayes.') |
50827 | 106 |
model = sparseNBClassifier(args.sinePrior) |
50388 | 107 |
modelFile = os.path.join(args.outputDir,'NB.pickle') |
108 |
dictsFile = os.path.join(args.outputDir,'dicts.pickle') |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
109 |
theoryFile = os.path.join(args.outputDir,'theory.pickle') |
50388 | 110 |
|
50220 | 111 |
# Initializing model |
50388 | 112 |
if args.init: |
50220 | 113 |
logger.info('Initializing Model.') |
114 |
startTime = time() |
|
50388 | 115 |
|
116 |
# Load all data |
|
50220 | 117 |
dicts = Dictionaries() |
118 |
dicts.init_all(args.inputDir,depFileName=args.depFile) |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
119 |
|
50220 | 120 |
# Create Model |
121 |
trainData = dicts.featureDict.keys() |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
122 |
model.initializeModel(trainData,dicts) |
50388 | 123 |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
124 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
125 |
depFile = os.path.join(args.inputDir,args.depFile) |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
126 |
theoryModels = TheoryModels() |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
127 |
theoryModels.init(depFile,dicts) |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
128 |
theoryModels.save(theoryFile) |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
129 |
|
50220 | 130 |
model.save(modelFile) |
131 |
dicts.save(dictsFile) |
|
132 |
||
133 |
logger.info('All Done. %s seconds needed.',round(time()-startTime,2)) |
|
134 |
return 0 |
|
50388 | 135 |
# Create predictions and/or update model |
50220 | 136 |
else: |
50399 | 137 |
lineCounter = 1 |
138 |
statementCounter = 1 |
|
139 |
computeStats = False |
|
50220 | 140 |
dicts = Dictionaries() |
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
141 |
theoryModels = TheoryModels() |
50220 | 142 |
# Load Files |
143 |
if os.path.isfile(dictsFile): |
|
144 |
dicts.load(dictsFile) |
|
145 |
if os.path.isfile(modelFile): |
|
146 |
model.load(modelFile) |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
147 |
if os.path.isfile(theoryFile) and args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
148 |
theoryModels.load(theoryFile) |
50388 | 149 |
|
50220 | 150 |
# IO Streams |
50441
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
151 |
OS = open(args.predictions,'w') |
50220 | 152 |
IS = open(args.inputFile,'r') |
50388 | 153 |
|
50220 | 154 |
# Statistics |
155 |
if args.statistics: |
|
156 |
stats = Statistics(args.cutOff) |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
157 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
158 |
theoryStats = TheoryStatistics() |
50388 | 159 |
|
50220 | 160 |
predictions = None |
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
161 |
predictedTheories = None |
50220 | 162 |
#Reading Input File |
163 |
for line in IS: |
|
50399 | 164 |
# try: |
50220 | 165 |
if True: |
166 |
if line.startswith('!'): |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
167 |
problemId = dicts.parse_fact(line) |
50220 | 168 |
# Statistics |
50399 | 169 |
if args.statistics and computeStats: |
170 |
computeStats = False |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
171 |
# Assume '!' comes after '?' |
50220 | 172 |
if args.predef: |
50399 | 173 |
predictions = model.predict(problemId) |
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
174 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
175 |
tmp = [dicts.idNameDict[x] for x in dicts.dependenciesDict[problemId]] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
176 |
usedTheories = set([x.split('.')[0] for x in tmp]) |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
177 |
theoryStats.update((dicts.idNameDict[problemId]).split('.')[0],predictedTheories,usedTheories) |
50399 | 178 |
stats.update(predictions,dicts.dependenciesDict[problemId],statementCounter) |
50220 | 179 |
if not stats.badPreds == []: |
180 |
bp = string.join([str(dicts.idNameDict[x]) for x in stats.badPreds], ',') |
|
50388 | 181 |
logger.debug('Bad predictions: %s',bp) |
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
182 |
|
50399 | 183 |
statementCounter += 1 |
50220 | 184 |
# Update Dependencies, p proves p |
185 |
dicts.dependenciesDict[problemId] = [problemId]+dicts.dependenciesDict[problemId] |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
186 |
if args.learnTheories: |
50827 | 187 |
theoryModels.update(problemId,dicts.featureDict[problemId],dicts.dependenciesDict[problemId],dicts) |
50441
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
188 |
if args.snow: |
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
189 |
model.update(problemId,dicts.featureDict[problemId],dicts.dependenciesDict[problemId],dicts) |
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
190 |
else: |
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
191 |
model.update(problemId,dicts.featureDict[problemId],dicts.dependenciesDict[problemId]) |
50220 | 192 |
elif line.startswith('p'): |
193 |
# Overwrite old proof. |
|
194 |
problemId,newDependencies = dicts.parse_overwrite(line) |
|
195 |
newDependencies = [problemId]+newDependencies |
|
196 |
model.overwrite(problemId,newDependencies,dicts) |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
197 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
198 |
theoryModels.overwrite(problemId,newDependencies,dicts) |
50220 | 199 |
dicts.dependenciesDict[problemId] = newDependencies |
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
200 |
elif line.startswith('?'): |
50220 | 201 |
startTime = time() |
50399 | 202 |
computeStats = True |
50220 | 203 |
if args.predef: |
204 |
continue |
|
50827 | 205 |
name,features,accessibles,hints = dicts.parse_problem(line) |
50220 | 206 |
# Create predictions |
50388 | 207 |
logger.info('Starting computation for problem on line %s',lineCounter) |
50827 | 208 |
# Update Models with hints |
209 |
if not hints == []: |
|
210 |
if args.learnTheories: |
|
211 |
accessibleTheories = set([(dicts.idNameDict[x]).split('.')[0] for x in accessibles]) |
|
212 |
theoryModels.update_with_acc('hints',features,hints,dicts,accessibleTheories) |
|
213 |
if args.snow: |
|
214 |
pass |
|
215 |
else: |
|
216 |
model.update('hints',features,hints) |
|
217 |
||
218 |
# Predict premises |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
219 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
220 |
predictedTheories,accessibles = theoryModels.predict(features,accessibles,dicts) |
50827 | 221 |
predictions,predictionValues = model.predict(features,accessibles,dicts) |
50220 | 222 |
assert len(predictions) == len(predictionValues) |
50827 | 223 |
|
224 |
# Delete hints |
|
225 |
if not hints == []: |
|
226 |
if args.learnTheories: |
|
227 |
theoryModels.delete('hints',features,hints,dicts) |
|
228 |
if args.snow: |
|
229 |
pass |
|
230 |
else: |
|
231 |
model.delete('hints',features,hints) |
|
232 |
||
50220 | 233 |
logger.info('Done. %s seconds needed.',round(time()-startTime,2)) |
50399 | 234 |
# Output |
50220 | 235 |
predictionNames = [str(dicts.idNameDict[p]) for p in predictions[:args.numberOfPredictions]] |
50388 | 236 |
predictionValues = [str(x) for x in predictionValues[:args.numberOfPredictions]] |
237 |
predictionsStringList = ['%s=%s' % (predictionNames[i],predictionValues[i]) for i in range(len(predictionNames))] |
|
50220 | 238 |
predictionsString = string.join(predictionsStringList,' ') |
239 |
outString = '%s: %s' % (name,predictionsString) |
|
240 |
OS.write('%s\n' % outString) |
|
241 |
else: |
|
242 |
logger.warning('Unspecified input format: \n%s',line) |
|
243 |
sys.exit(-1) |
|
50399 | 244 |
lineCounter += 1 |
50220 | 245 |
""" |
246 |
except: |
|
247 |
logger.warning('An error occurred on line %s .',line) |
|
248 |
lineCounter += 1 |
|
249 |
continue |
|
50388 | 250 |
""" |
50220 | 251 |
OS.close() |
252 |
IS.close() |
|
50388 | 253 |
|
50220 | 254 |
# Statistics |
255 |
if args.statistics: |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
256 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
257 |
theoryStats.printAvg() |
50220 | 258 |
stats.printAvg() |
50388 | 259 |
|
50220 | 260 |
# Save |
261 |
if args.saveModel: |
|
262 |
model.save(modelFile) |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
263 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
264 |
theoryModels.save(theoryFile) |
50220 | 265 |
dicts.save(dictsFile) |
266 |
if not args.saveStats == None: |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
267 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
268 |
theoryStatsFile = os.path.join(args.outputDir,'theoryStats') |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
269 |
theoryStats.save(theoryStatsFile) |
50220 | 270 |
statsFile = os.path.join(args.outputDir,args.saveStats) |
271 |
stats.save(statsFile) |
|
272 |
return 0 |
|
273 |
||
274 |
if __name__ == '__main__': |
|
275 |
# Example: |
|
50827 | 276 |
# Auth |
277 |
# ISAR Theories |
|
278 |
#args = ['-l','testNB.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121227b/Auth/','--learnTheories'] |
|
279 |
#args = ['-i', '../data/20121227b/Auth/mash_commands','-p','../tmp/testNB.pred','-l','../tmp/testNB.log','--nb','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaIsarNB.stats','--cutOff','500','--learnTheories'] |
|
280 |
# ISAR MePo |
|
281 |
#args = ['-l','testIsabelle.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121227b/Auth/','--predef'] |
|
282 |
#args = ['-i', '../data/20121227b/Auth/mash_commands','-p','../tmp/JinjaMePo.pred','-l','testIsabelle.log','--predef','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaMePo.stats'] |
|
283 |
||
284 |
||
50434
960a3429615c
more MaSh tweaking -- in particular, export the same facts in "MaSh_Export" as are later tried in "MaSh_Eval"
blanchet
parents:
50399
diff
changeset
|
285 |
# Jinja |
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
286 |
# ISAR Theories |
50827 | 287 |
#args = ['-l','testNB.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121227b/Jinja/','--learnTheories'] |
288 |
#args = ['-i', '../data/20121227b/Jinja/mash_commands','-p','../tmp/testNB.pred','-l','../tmp/testNB.log','--nb','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaIsarNB.stats','--cutOff','500','--learnTheories'] |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
289 |
# ISAR NB |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
290 |
#args = ['-l','testNB.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121221/Jinja/'] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
291 |
#args = ['-i', '../data/20121221/Jinja/mash_commands','-p','../tmp/testNB.pred','-l','../tmp/testNB.log','--nb','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaIsarNB.stats','--cutOff','500'] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
292 |
# ISAR MePo |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
293 |
#args = ['-l','testIsabelle.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121212/Jinja/','--predef'] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
294 |
#args = ['-i', '../data/20121212/Jinja/mash_commands','-p','../tmp/JinjaMePo.pred','-l','testIsabelle.log','--predef','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaMePo.stats'] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
295 |
# ISAR NB ATP |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
296 |
#args = ['-l','testNB.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121212/Jinja/','--depFile','mash_atp_dependencies'] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
297 |
#args = ['-i', '../data/Jinja/mash_commands','-p','../tmp/testNB.pred','-l','../tmp/testNB.log','--nb','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaIsarNB.stats','--cutOff','500','--depFile','mash_atp_dependencies'] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
298 |
#args = ['-l','testIsabelle.log','-o','../tmp/','--statistics','--init','--inputDir','../data/Jinja/','--predef','--depFile','mash_atp_dependencies'] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
299 |
#args = ['-i', '../data/Jinja/mash_commands','-p','../tmp/JinjaMePo.pred','-l','testIsabelle.log','--predef','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaMePo.stats','--depFile','mash_atp_dependencies'] |
50441
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
300 |
#args = ['-l','testNB.log','-o','../tmp/','--statistics','--init','--inputDir','../data/Jinja/','--depFile','mash_atp_dependencies','--snow'] |
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
301 |
#args = ['-i', '../data/Jinja/mash_commands','-p','../tmp/testNB.pred','-l','../tmp/testNB.log','--snow','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaIsarNB.stats','--cutOff','500','--depFile','mash_atp_dependencies'] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
302 |
# ISAR Snow |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
303 |
#args = ['-l','testNB.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121212/Jinja/','--snow'] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
304 |
#args = ['-i', '../data/20121212/Jinja/mash_commands','-p','../tmp/testNB.pred','-l','../tmp/testNB.log','--snow','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaIsarNB.stats','--cutOff','500'] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
305 |
|
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
306 |
|
50441
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
307 |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
308 |
# Probability |
50827 | 309 |
# ISAR Theories |
310 |
#args = ['-l','testNB.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121213/Probability/','--learnTheories'] |
|
311 |
#args = ['-i', '../data/20121213/Probability/mash_commands','-p','../tmp/testNB.pred','-l','../tmp/testNB.log','--nb','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaIsarNB.stats','--cutOff','500','--learnTheories'] |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
312 |
# ISAR NB |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
313 |
#args = ['-l','testNB.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121213/Probability/'] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
314 |
#args = ['-i', '../data/20121213/Probability/mash_commands','-p','../tmp/testNB.pred','-l','../tmp/testNB.log','--nb','-o','../tmp/','--statistics','--saveStats','../tmp/ProbIsarNB.stats','--cutOff','500'] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
315 |
# ISAR MePo |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
316 |
#args = ['-l','testIsabelle.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121213/Probability/','--predef'] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
317 |
#args = ['-i', '../data/20121213/Probability/mash_commands','-p','../tmp/JinjaMePo.pred','-l','testIsabelle.log','--predef','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaMePo.stats'] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
318 |
# ISAR NB ATP |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
319 |
#args = ['-l','testNB.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121212/Jinja/','--depFile','mash_atp_dependencies'] |
50441
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
320 |
#args = ['-i', '../data/Jinja/mash_commands','-p','../tmp/testNB.pred','-l','../tmp/testNB.log','--nb','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaIsarNB.stats','--cutOff','500','--depFile','mash_atp_dependencies'] |
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
321 |
#args = ['-l','testIsabelle.log','-o','../tmp/','--statistics','--init','--inputDir','../data/Jinja/','--predef','--depFile','mash_atp_dependencies'] |
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
322 |
#args = ['-i', '../data/Jinja/mash_commands','-p','../tmp/JinjaMePo.pred','-l','testIsabelle.log','--predef','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaMePo.stats','--depFile','mash_atp_dependencies'] |
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
323 |
#args = ['-l','testNB.log','-o','../tmp/','--statistics','--init','--inputDir','../data/Jinja/','--depFile','mash_atp_dependencies','--snow'] |
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
324 |
#args = ['-i', '../data/Jinja/mash_commands','-p','../tmp/testNB.pred','-l','../tmp/testNB.log','--snow','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaIsarNB.stats','--cutOff','500','--depFile','mash_atp_dependencies'] |
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
325 |
|
50399 | 326 |
|
327 |
||
50220 | 328 |
#startTime = time() |
329 |
#sys.exit(main(args)) |
|
50388 | 330 |
#print 'New ' + str(round(time()-startTime,2)) |
50220 | 331 |
sys.exit(main()) |