Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000038Rosetta[All Projects] Bad Codingpublic2012-07-03 14:072012-07-03 15:31
Reportersmlewis 
Assigned To 
PrioritylowSeveritymajorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Fixed in Version 
Summary0000038: Executable-defined options cannot be namespaced
DescriptionThe option system allows you to define options in basic/options_rosetta.py. This works great. Options defined in this way have C++ namespaces, and "option namespaces" such that they are namespaced on command line (like the in and file in -in:file:s).

The options system forbids you from definition options elsewhere, mostly. This works great.

The options system allows you to define options in executable files that can be referenced only within the code in that same file (global variable, but scoped to that file). This only sort-of works. You CAN C++ namespace options, but they do NOT acquire "option namespace" options. Options created in an executable cannot have namespace prefixes when used, and as a consequence cannot name-clash with any other options already existing. If this is intended behavior, it may not be the best design choice, because it forces suboptimal option names in executable-defined options. If this is unintended, then it's a bug.

Example: AnchoredPDBCreator's options. The code defining the options namespaces them in text and in C++:
interface_design/anchored_design/AnchoredPDBCreator.cc
53-namespace basic{ namespace options{ namespace OptionKeys{
54-namespace AnchoredPDBCreator{
55:basic::options::FileOptionKey const scaffold_loop("AnchoredPDBCreator::scaffold_loop");
56:basic::options::FileOptionKey const scaffold_pdb("AnchoredPDBCreator::scaffold_pdb");
57:basic::options::FileOptionKey const anchor_pdb("AnchoredPDBCreator::anchor_pdb");
58:basic::options::FileOptionKey const target_pdb("AnchoredPDBCreator::target_pdb");
59:basic::options::IntegerOptionKey const APDBC_cycles("AnchoredPDBCreator::APDBC_cycles");
60-}//AnchoredPDBCreator
61-}}}//basic::options::OptionKeys

Despite this clear namespacing to an AnchoredPDBCreator "options namespace", ONLY -anchor_pdb is accepted by Rosetta; -AnchoredPDBCreator:anchor_pdb is not accepted as a valid option.

The second consequence of this unnamespaceability is that executable-defined options cannot have their name conflict with other existing options, as the options system is unable to discriminate them properly.
Steps To Reproducenamespace the options in the AnchoredPDBCreator integration test and watch it fail
TagsNo tags attached.
Application(s) Affectedany with executable-defined options; AnchoredPDBCreator is the first example I found
Command Line UsedAnchoredPDBCreator -AnchoredPDBCreator:anchor_pdb
Developer Options
Fixed in SVN Version
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2012-07-03 14:07 smlewis New Issue
2012-07-03 15:31 smlewis Application(s) Affected any => any with executable-defined options; AnchoredPDBCreator is the first example I found
2012-07-03 15:31 smlewis Command Line Used all => AnchoredPDBCreator -AnchoredPDBCreator:anchor_pdb
2012-07-03 15:31 smlewis Description Updated View Revisions
2012-07-03 15:31 smlewis Steps to Reproduce Updated View Revisions


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker