Project

General

Profile

Feature #9624

Introducing FHiCL syntax for in-place insertion of table names

Added by Kyle Knoepfel over 4 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
07/15/2015
Due date:
% Done:

0%

Estimated time:
24.00 h
Scope:
Internal
Experiment:
-
SSI Package:
FHiCL
Co-Assignees:
Duration:

Description

Consider the following FHiCL file:

# Example 1
physics : {

  producers : {
    prod1 : { ... }
    prod2 : { ... }
    prod3 : { ... }
  }

  p1 : [ prod1, prod2, prod3 ] 

}

The @table and @sequence syntax allow for the above FHiCL file to be rewritten as:

# Example 2
BEGIN_PROLOG
default_producers : {
  prod1 : { ... }
  prod2 : { ... }
  prod3 : { ... }
}

default_prodList : [ prod1, prod2, prod3 ] 
END_PROLOG

physics : {

  producers : {
    @table::default_producers
  }

  p1 : [ @sequence::default_prodList ]

}

In most cases where this pattern is used in a FHiCL file, the user wants to include all module names (as specified in default_producers) in default_prodList. This introduces an extra point of maintenance since the user must specify a separate parameter that lists all desired modules. I propose introducing a new syntax (e.g.) @table_names where the following could be done:

# Example 3
BEGIN_PROLOG
default_producers : {
  prod1 : { ... }
  prod2 : { ... }
  prod3 : { ... }
}
END_PROLOG

physics : {

  producers : {
    @table::default_producers
  }

  p1 : [ @table_names::default_producers ]

}

The behavior would be equivalent to Example 2 in that the top-level names of default_producers would be expanded into a comma-separated sequence, thus removing the need for a separate default_prodList declaration.

History

#1 Updated by Christopher Green over 4 years ago

  • Status changed from New to Rejected
  • Estimated time set to 24.00 h

The niche nature of this feature, combined with the estimated effort to do something that would honor the parse order of the table contents rather than the post-insert-into-intermediate_table alphabetical order, lead us to reject this feature request without prejudice after consideration.



Also available in: Atom PDF