~srba/verifytapn/trunk

« back to all changes in this revision

Viewing changes to src/Core/ArgsParser.cpp

  • Committer: Morten Jacobsen
  • Date: 2011-06-14 13:52:39 UTC
  • Revision ID: morten.jacobsen.2k@gmail.com-20110614135239-3ht7mfn4qt3h5gim
Added Cover most and Random search strategies.

Show diffs side-by-side

added added

removed removed

Lines of Context:
139
139
                //       Each line in the description is assumed to fit within the remaining width
140
140
                //       of the console, so keep descriptions short, or implement manual word-wrapping :).
141
141
                parsers.push_back(boost::make_shared<SwitchWithArg>("k", KBOUND_OPTION, "Max tokens to use during exploration.",0));
142
 
                parsers.push_back(boost::make_shared<SwitchWithArg>("o", SEARCH_OPTION, "Specify the desired search strategy.\n - 0: BFS\n - 1: DFS",0));
 
142
                parsers.push_back(boost::make_shared<SwitchWithArg>("o", SEARCH_OPTION, "Specify the desired search strategy.\n - 0: BFS\n - 1: DFS\n - 2: Random\n - 3: Cover most",0));
143
143
                parsers.push_back(boost::make_shared<SwitchWithArg>("t", TRACE_OPTION, "Specify the desired trace option.\n - 0: none\n - 1: some",0));
144
144
 
145
145
                parsers.push_back(boost::make_shared<Switch>("g",MAX_CONSTANT_OPTION, "Use global maximum constant for \nextrapolation (as opposed to local \nconstants)."));
266
266
 
267
267
        SearchType intToSearchTypeEnum(int i) {
268
268
                switch(i){
269
 
                case 1:
270
 
                        return DEPTHFIRST;
 
269
                case 0: return BREADTHFIRST;
 
270
                case 1: return DEPTHFIRST;
 
271
                case 2: return RANDOM;
 
272
                case 3: return COVERMOST;
271
273
                default:
272
 
                        return BREADTHFIRST;
 
274
                        std::cout << "Unknown search strategy specified." << std::endl;
 
275
                        exit(1);
273
276
                }
274
277
        }
275
278
 
276
279
        Trace intToEnum(int i){
277
 
                switch(i){
278
 
                case 1:
279
 
                        return SOME;
 
280
                switch(i)
 
281
                {
 
282
                case 0: return NONE;
 
283
                case 1: return SOME;
280
284
                default:
281
 
                        return NONE;
 
285
                        std::cout << "Unknown trace option specified." << std::endl;
 
286
                        exit(1);
282
287
                }
283
288
        }
284
289
 
285
290
        Factory intToFactory(unsigned int i) {
286
291
                switch(i)
287
292
                {
288
 
                case 1:
289
 
                        return DISCRETE_INCLUSION;
290
 
                case 2:
291
 
                        return OLD_FACTORY;
 
293
                case 0: return DEFAULT;
 
294
                case 1: return DISCRETE_INCLUSION;
 
295
                case 2: return OLD_FACTORY;
292
296
                default:
293
 
                        return DEFAULT;
 
297
                        std::cout << "Unkown factory specified." << std::endl;
 
298
                        exit(1);
294
299
                }
295
300
        }
296
301