Project

General

Profile

Bug #21322

Undesirable protection inheritance

Added by Kyle Knoepfel about 1 year ago. Updated 12 months ago.

Status:
Accepted
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
11/06/2018
Due date:
% Done:

0%

Estimated time:
Duration:

Description

Pasha and I ran into a surprising feature of the protection system in FHiCL. Consider the following case:

BEGIN_PROLOG
global_time @protect_error: 400

experiment_config: {
  time: 300
}
END_PROLOG

module_config: {
  @table::experiment_config
  time: @local::global_time
}

In this case, the experiment has defined a parameter 'time' that has not been protected. The user would like to adjust this time to refer to a variable's value that is protected ('global_time'). However, the following error is encountered:

---- Parse error BEGIN
  Error in assignment:
  ---- Protection violation BEGIN
    Inserting name time would increase protection from NONE to PROTECT_ERROR
    (previous definition on line 22 of file "/home/knoepfel/test_protection.fcl")
  ---- Protection violation END
   at line 23, character 3, of file "/home/knoepfel/test_protection.fcl" 

    time: @local::global_time
    ^
---- Parse error END

The error can be more simply demonstrated with the following configuration:

global_time @protect_error: 400

time: 300
time: @local::global_time

This ends in a similar type of error. Is it really the intended behavior that if an unprotected parameter time refers to the value of a protected parameter global_time, then time inherits the protection?

History

#1 Updated by Kyle Knoepfel about 1 year ago

  • Status changed from New to Feedback

We will ask the stakeholders about the desired behavior for this syntax.

#2 Updated by Kyle Knoepfel 12 months ago

  • Status changed from Feedback to Accepted

After asking the original requesters of the @protect feature and discussing this at the Nov. 15, 2018 stakeholders meeting, the consensus is that the behavior should be changed so that the @protect syntax applies only to the name-value binding and not to the value itself.



Also available in: Atom PDF