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