feldob / InPUT

A descriptive and programming language independent format and API for the simplified configuration, documentation, and design of computer experiments.
7 stars 25 forks source link

Chained dependencies between cousins are invalid #53

Open finkn opened 10 years ago

finkn commented 10 years ago

When inner parameters depend on each other such that a child of X depends on a child of Y, which has a child that depends on a child of X, but there is no cycle in the dependency graph, then parameters are not initialized properly.

Assume two structured parameters, X and Y. Each has two nested numeric parameters X.A, X.B and Y.C, Y.D. The following dependency graph has no cycles: X.B -> Y.C -> X.A

If (X.A depends on Y.C) ⇒ (X depends on Y), then this should simply be a circular dependency that should trigger an exception. Otherwise there is no circularity, and parameters should be initialized as expected.

See chainedDependenciesAreInvalid in https://github.com/finkn/InPUTspec/blob/master/main/src/net/finkn/inputspec/v050/NestedDependencyTest.java for details.