author | blanchet |
Sat, 12 Jan 2013 16:49:39 +0100 | |
changeset 50840 | a5cc092156da |
parent 50827 | aba769dc82e9 |
child 50951 | e1cbaa7d5536 |
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.") |
|
50840 | 50 |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
51 |
parser.add_argument('--learnTheories',default=False,action='store_true',help="Uses a two-lvl prediction mode. First the theories, then the premises. Default=False.") |
50840 | 52 |
# Theory Parameters |
53 |
parser.add_argument('--theoryDefValPos',default=-7.5,help="Default value for positive unknown features. Default=-7.5.",type=float) |
|
54 |
parser.add_argument('--theoryDefValNeg',default=-15.0,help="Default value for negative unknown features. Default=-15.0.",type=float) |
|
55 |
parser.add_argument('--theoryPosWeight',default=10.0,help="Weight value for positive features. Default=10.0.",type=float) |
|
50220 | 56 |
|
57 |
parser.add_argument('--nb',default=False,action='store_true',help="Use Naive Bayes for learning. This is the default learning method.") |
|
50840 | 58 |
# NB Parameters |
59 |
parser.add_argument('--NBDefaultPriorWeight',default=20.0,help="Initializes classifiers with value * p |- p. Default=20.0.",type=float) |
|
60 |
parser.add_argument('--NBDefVal',default=-15.0,help="Default value for unknown features. Default=-15.0.",type=float) |
|
61 |
parser.add_argument('--NBPosWeight',default=10.0,help="Weight value for positive features. Default=10.0.",type=float) |
|
62 |
parser.add_argument('--NBSinePrior',default=False,action='store_true',help="Uses a SInE like prior for premise lvl predictions. Default=False.") |
|
63 |
parser.add_argument('--NBSineWeight',default=100.0,help="How much the SInE prior is weighted. Default=100.0.",type=float) |
|
64 |
||
50220 | 65 |
parser.add_argument('--snow',default=False,action='store_true',help="Use SNoW's naive bayes instead of Naive Bayes for learning.") |
66 |
parser.add_argument('--predef',default=False,action='store_true',\ |
|
50399 | 67 |
help="Use predefined predictions. Used only for comparison with the actual learning. Expects mash_mepo_suggestions in inputDir.") |
50220 | 68 |
parser.add_argument('--statistics',default=False,action='store_true',help="Create and show statistics for the top CUTOFF predictions.\ |
69 |
WARNING: This will make the program a lot slower! Default=False.") |
|
70 |
parser.add_argument('--saveStats',default=None,help="If defined, stores the statistics in the filename provided.") |
|
71 |
parser.add_argument('--cutOff',default=500,help="Option for statistics. Only consider the first cutOff predictions. Default=500.",type=int) |
|
72 |
parser.add_argument('-l','--log', default='../tmp/%s.log' % datetime.datetime.now(), help='Log file name. Default=../tmp/dateTime.log') |
|
73 |
parser.add_argument('-q','--quiet',default=False,action='store_true',help="If enabled, only print warnings. Default=False.") |
|
74 |
||
50388 | 75 |
def main(argv = sys.argv[1:]): |
50220 | 76 |
# Initializing command-line arguments |
77 |
args = parser.parse_args(argv) |
|
78 |
||
50388 | 79 |
# Set up logging |
50220 | 80 |
logging.basicConfig(level=logging.DEBUG, |
81 |
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', |
|
82 |
datefmt='%d-%m %H:%M:%S', |
|
83 |
filename=args.log, |
|
84 |
filemode='w') |
|
85 |
console = logging.StreamHandler(sys.stdout) |
|
86 |
console.setLevel(logging.INFO) |
|
87 |
formatter = logging.Formatter('# %(message)s') |
|
88 |
console.setFormatter(formatter) |
|
89 |
logging.getLogger('').addHandler(console) |
|
90 |
logger = logging.getLogger('main.py') |
|
91 |
if args.quiet: |
|
92 |
logger.setLevel(logging.WARNING) |
|
93 |
console.setLevel(logging.WARNING) |
|
94 |
if not os.path.exists(args.outputDir): |
|
95 |
os.makedirs(args.outputDir) |
|
96 |
||
97 |
logger.info('Using the following settings: %s',args) |
|
98 |
# Pick algorithm |
|
99 |
if args.nb: |
|
50441
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
100 |
logger.info('Using sparse Naive Bayes for learning.') |
50840 | 101 |
model = sparseNBClassifier(args.NBDefaultPriorWeight,args.NBPosWeight,args.NBDefVal,args.NBSinePrior,args.NBSineWeight) |
50220 | 102 |
modelFile = os.path.join(args.outputDir,'NB.pickle') |
103 |
elif args.snow: |
|
104 |
logger.info('Using naive bayes (SNoW) for learning.') |
|
105 |
model = SNoW() |
|
106 |
modelFile = os.path.join(args.outputDir,'SNoW.pickle') |
|
107 |
elif args.predef: |
|
108 |
logger.info('Using predefined predictions.') |
|
50399 | 109 |
#predictionFile = os.path.join(args.inputDir,'mash_meng_paulson_suggestions') |
110 |
predictionFile = os.path.join(args.inputDir,'mash_mepo_suggestions') |
|
50220 | 111 |
model = Predefined(predictionFile) |
50399 | 112 |
modelFile = os.path.join(args.outputDir,'mepo.pickle') |
50220 | 113 |
else: |
50441
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
114 |
logger.info('No algorithm specified. Using sparse Naive Bayes.') |
50840 | 115 |
model = sparseNBClassifier(args.NBDefaultPriorWeight,args.NBPosWeight,args.NBDefVal,args.NBSinePrior,args.NBSineWeight) |
50388 | 116 |
modelFile = os.path.join(args.outputDir,'NB.pickle') |
117 |
dictsFile = os.path.join(args.outputDir,'dicts.pickle') |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
118 |
theoryFile = os.path.join(args.outputDir,'theory.pickle') |
50388 | 119 |
|
50220 | 120 |
# Initializing model |
50388 | 121 |
if args.init: |
50220 | 122 |
logger.info('Initializing Model.') |
123 |
startTime = time() |
|
50388 | 124 |
|
125 |
# Load all data |
|
50220 | 126 |
dicts = Dictionaries() |
127 |
dicts.init_all(args.inputDir,depFileName=args.depFile) |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
128 |
|
50220 | 129 |
# Create Model |
130 |
trainData = dicts.featureDict.keys() |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
131 |
model.initializeModel(trainData,dicts) |
50388 | 132 |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
133 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
134 |
depFile = os.path.join(args.inputDir,args.depFile) |
50840 | 135 |
theoryModels = TheoryModels(args.theoryDefValPos,args.theoryDefValNeg,args.theoryPosWeight) |
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
136 |
theoryModels.init(depFile,dicts) |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
137 |
theoryModels.save(theoryFile) |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
138 |
|
50220 | 139 |
model.save(modelFile) |
140 |
dicts.save(dictsFile) |
|
141 |
||
142 |
logger.info('All Done. %s seconds needed.',round(time()-startTime,2)) |
|
143 |
return 0 |
|
50388 | 144 |
# Create predictions and/or update model |
50220 | 145 |
else: |
50399 | 146 |
lineCounter = 1 |
147 |
statementCounter = 1 |
|
148 |
computeStats = False |
|
50220 | 149 |
dicts = Dictionaries() |
50840 | 150 |
theoryModels = TheoryModels(args.theoryDefValPos,args.theoryDefValNeg,args.theoryPosWeight) |
50220 | 151 |
# Load Files |
152 |
if os.path.isfile(dictsFile): |
|
153 |
dicts.load(dictsFile) |
|
154 |
if os.path.isfile(modelFile): |
|
155 |
model.load(modelFile) |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
156 |
if os.path.isfile(theoryFile) and args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
157 |
theoryModels.load(theoryFile) |
50388 | 158 |
|
50220 | 159 |
# IO Streams |
50441
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
160 |
OS = open(args.predictions,'w') |
50220 | 161 |
IS = open(args.inputFile,'r') |
50388 | 162 |
|
50220 | 163 |
# Statistics |
164 |
if args.statistics: |
|
165 |
stats = Statistics(args.cutOff) |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
166 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
167 |
theoryStats = TheoryStatistics() |
50388 | 168 |
|
50220 | 169 |
predictions = None |
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
170 |
predictedTheories = None |
50220 | 171 |
#Reading Input File |
172 |
for line in IS: |
|
50399 | 173 |
# try: |
50220 | 174 |
if True: |
175 |
if line.startswith('!'): |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
176 |
problemId = dicts.parse_fact(line) |
50220 | 177 |
# Statistics |
50399 | 178 |
if args.statistics and computeStats: |
179 |
computeStats = False |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
180 |
# Assume '!' comes after '?' |
50220 | 181 |
if args.predef: |
50399 | 182 |
predictions = model.predict(problemId) |
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
183 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
184 |
tmp = [dicts.idNameDict[x] for x in dicts.dependenciesDict[problemId]] |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
185 |
usedTheories = set([x.split('.')[0] for x in tmp]) |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
186 |
theoryStats.update((dicts.idNameDict[problemId]).split('.')[0],predictedTheories,usedTheories) |
50399 | 187 |
stats.update(predictions,dicts.dependenciesDict[problemId],statementCounter) |
50220 | 188 |
if not stats.badPreds == []: |
189 |
bp = string.join([str(dicts.idNameDict[x]) for x in stats.badPreds], ',') |
|
50388 | 190 |
logger.debug('Bad predictions: %s',bp) |
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
191 |
|
50399 | 192 |
statementCounter += 1 |
50220 | 193 |
# Update Dependencies, p proves p |
194 |
dicts.dependenciesDict[problemId] = [problemId]+dicts.dependenciesDict[problemId] |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
195 |
if args.learnTheories: |
50827 | 196 |
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
|
197 |
if args.snow: |
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
198 |
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
|
199 |
else: |
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
200 |
model.update(problemId,dicts.featureDict[problemId],dicts.dependenciesDict[problemId]) |
50220 | 201 |
elif line.startswith('p'): |
202 |
# Overwrite old proof. |
|
203 |
problemId,newDependencies = dicts.parse_overwrite(line) |
|
204 |
newDependencies = [problemId]+newDependencies |
|
205 |
model.overwrite(problemId,newDependencies,dicts) |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
206 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
207 |
theoryModels.overwrite(problemId,newDependencies,dicts) |
50220 | 208 |
dicts.dependenciesDict[problemId] = newDependencies |
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
209 |
elif line.startswith('?'): |
50220 | 210 |
startTime = time() |
50399 | 211 |
computeStats = True |
50220 | 212 |
if args.predef: |
213 |
continue |
|
50827 | 214 |
name,features,accessibles,hints = dicts.parse_problem(line) |
50220 | 215 |
# Create predictions |
50388 | 216 |
logger.info('Starting computation for problem on line %s',lineCounter) |
50827 | 217 |
# Update Models with hints |
218 |
if not hints == []: |
|
219 |
if args.learnTheories: |
|
220 |
accessibleTheories = set([(dicts.idNameDict[x]).split('.')[0] for x in accessibles]) |
|
221 |
theoryModels.update_with_acc('hints',features,hints,dicts,accessibleTheories) |
|
222 |
if args.snow: |
|
223 |
pass |
|
224 |
else: |
|
225 |
model.update('hints',features,hints) |
|
226 |
||
227 |
# Predict premises |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
228 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
229 |
predictedTheories,accessibles = theoryModels.predict(features,accessibles,dicts) |
50827 | 230 |
predictions,predictionValues = model.predict(features,accessibles,dicts) |
50220 | 231 |
assert len(predictions) == len(predictionValues) |
50827 | 232 |
|
233 |
# Delete hints |
|
234 |
if not hints == []: |
|
235 |
if args.learnTheories: |
|
236 |
theoryModels.delete('hints',features,hints,dicts) |
|
237 |
if args.snow: |
|
238 |
pass |
|
239 |
else: |
|
240 |
model.delete('hints',features,hints) |
|
241 |
||
50220 | 242 |
logger.info('Done. %s seconds needed.',round(time()-startTime,2)) |
50399 | 243 |
# Output |
50220 | 244 |
predictionNames = [str(dicts.idNameDict[p]) for p in predictions[:args.numberOfPredictions]] |
50388 | 245 |
predictionValues = [str(x) for x in predictionValues[:args.numberOfPredictions]] |
246 |
predictionsStringList = ['%s=%s' % (predictionNames[i],predictionValues[i]) for i in range(len(predictionNames))] |
|
50220 | 247 |
predictionsString = string.join(predictionsStringList,' ') |
248 |
outString = '%s: %s' % (name,predictionsString) |
|
249 |
OS.write('%s\n' % outString) |
|
250 |
else: |
|
251 |
logger.warning('Unspecified input format: \n%s',line) |
|
252 |
sys.exit(-1) |
|
50399 | 253 |
lineCounter += 1 |
50220 | 254 |
""" |
255 |
except: |
|
256 |
logger.warning('An error occurred on line %s .',line) |
|
257 |
lineCounter += 1 |
|
258 |
continue |
|
50388 | 259 |
""" |
50220 | 260 |
OS.close() |
261 |
IS.close() |
|
50388 | 262 |
|
50220 | 263 |
# Statistics |
264 |
if args.statistics: |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
265 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
266 |
theoryStats.printAvg() |
50220 | 267 |
stats.printAvg() |
50388 | 268 |
|
50220 | 269 |
# Save |
270 |
if args.saveModel: |
|
271 |
model.save(modelFile) |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
272 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
273 |
theoryModels.save(theoryFile) |
50220 | 274 |
dicts.save(dictsFile) |
275 |
if not args.saveStats == None: |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
276 |
if args.learnTheories: |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
277 |
theoryStatsFile = os.path.join(args.outputDir,'theoryStats') |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
278 |
theoryStats.save(theoryStatsFile) |
50220 | 279 |
statsFile = os.path.join(args.outputDir,args.saveStats) |
280 |
stats.save(statsFile) |
|
281 |
return 0 |
|
282 |
||
283 |
if __name__ == '__main__': |
|
284 |
# Example: |
|
50827 | 285 |
# Auth |
286 |
# ISAR Theories |
|
287 |
#args = ['-l','testNB.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121227b/Auth/','--learnTheories'] |
|
288 |
#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'] |
|
289 |
# ISAR MePo |
|
290 |
#args = ['-l','testIsabelle.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121227b/Auth/','--predef'] |
|
291 |
#args = ['-i', '../data/20121227b/Auth/mash_commands','-p','../tmp/JinjaMePo.pred','-l','testIsabelle.log','--predef','-o','../tmp/','--statistics','--saveStats','../tmp/JinjaMePo.stats'] |
|
292 |
||
293 |
||
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
|
294 |
# Jinja |
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
295 |
# ISAR Theories |
50827 | 296 |
#args = ['-l','testNB.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121227b/Jinja/','--learnTheories'] |
297 |
#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
|
298 |
# ISAR NB |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
299 |
#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
|
300 |
#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
|
301 |
# ISAR MePo |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
302 |
#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
|
303 |
#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
|
304 |
# ISAR NB ATP |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
305 |
#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
|
306 |
#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
|
307 |
#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
|
308 |
#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
|
309 |
#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
|
310 |
#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
|
311 |
# ISAR Snow |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
312 |
#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
|
313 |
#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
|
314 |
|
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
315 |
|
50441
1e71f9d3cd57
more changes to MaSh Python program (by Daniel K.)
blanchet
parents:
50434
diff
changeset
|
316 |
|
50619
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
317 |
# Probability |
50827 | 318 |
# ISAR Theories |
319 |
#args = ['-l','testNB.log','-o','../tmp/','--statistics','--init','--inputDir','../data/20121213/Probability/','--learnTheories'] |
|
320 |
#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
|
321 |
# ISAR NB |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
322 |
#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
|
323 |
#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
|
324 |
# ISAR MePo |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
325 |
#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
|
326 |
#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
|
327 |
# ISAR NB ATP |
b958a94cf811
new version of MaSh, with theory-level reasoning
blanchet
parents:
50482
diff
changeset
|
328 |
#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
|
329 |
#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
|
330 |
#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
|
331 |
#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
|
332 |
#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
|
333 |
#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
|
334 |
|
50399 | 335 |
|
336 |
||
50220 | 337 |
#startTime = time() |
338 |
#sys.exit(main(args)) |
|
50388 | 339 |
#print 'New ' + str(round(time()-startTime,2)) |
50220 | 340 |
sys.exit(main()) |