Code Monkey home page Code Monkey logo

input's People

Contributors

andreimatveyeu avatar basketigge avatar emst1110 avatar feldob avatar frst1110 avatar hammar83 avatar huckleberryfinn avatar hugolm84 avatar juppe69 avatar kaasen avatar kimno029 avatar labbinator avatar lindentwig avatar martinssonj avatar saad1203 avatar scared-bunny avatar toerndev avatar uipo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

input's Issues

Multi-ranges with mismatching limits should be illegal

There is no way to make sense of a multi-range definition that has differing numbers of min and max limits. InPUT4j should check for this and throw an explicit exception (or take some other appropriate and decisive action).

Right now, missing min limits immediately cause an ArrayIndexOutOfBoundsException. While the error message isn't helpful, at least InPUT4j refuses to use the configuration and fails early. However, missing max limits fail late and completely at random. It is possible to use the configuration, but an (unhelpful) ArrayIndexOutOfBoundsException may or may not be thrown based on chance.

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

Min and max are swapped when the range is empty

If a parameter is defined using expressions in such a way that the range is empty, the result is that min and max are swapped. This also interacts in surprising ways with exclusive limits. They end up extending the range rather than restricting it.

See https://github.com/finkn/InPUTspec/blob/master/main/src/net/finkn/inputspec/v050/AdvancedSingleRangeNextTest.java. Particularly limitsAreSwappedForEmptyInclusiveRange and emptyExclusiveRangeIsExtendedWhenSwapped.

"same" bug

Undesired behavior in InPUT4j IDesign.getValue:

Design design1, design2;
Design design1 = new Design("testDesign.xml");
Design design2 = design1.clone("clone");

// before reading value X= 8.0
design1.getValue("EA.EliteCount");
// after reading value X= 8

As a consequence, the two designs are not "same" anymore:
design1.same(design2) -> false

Improper scoping causes ID collisions

It is no surprise that equal absolute IDs can collide. Relative IDs in the same scope also have the same absolute IDs. So that's merely another interpretation of the same situation. However, relative IDs in different scopes can also collide. All collisions are silently ignored, but the effects can be quite serious.

These collisions explain the scoping problems that were observed in the past. Rather than outer parameters overshadowing inner parameters, the IDs are considered to be duplicates, even though the parameters have different absolute IDs, and the order in which the parameters occur in the configuration means that one parameter overrides the other.

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

Chained dependencies between cousins are invalid

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.

scoping

Received question:

"I just have a short question. When I have a parameter X, and I have a
structured parameter Point that has an inner parameter X ("Point.X"),
then constructor="X" will use the outer rather than the inner X, and the
initialization will not be consistent. Is this kind of scoping intentional?"

This is not intentional, scoping should be inside out.

Exclusive endpoints are not excluded for floats

When defining a floating point parameter with exclusive limits, those limits aren't actually excluded. DesignSpace.next() will generate them (when float, but not double), and Design.setValue() will accept them (whether float or double).

See exclusiveFloatIsInclusive in https://github.com/finkn/InPUTspec/blob/master/main/src/net/finkn/inputspec/v050/SimpleSingleRangeNextTest.java and https://github.com/finkn/InPUTspec/blob/master/main/src/net/finkn/inputspec/v050/RangeTest.java for details.

export of SChoiceType missing

The SChoiceType parameters are not exported, which can lead to failures in mappings. For instance, a type "P" is inherited in a design space by parameter "B.P". The code mapping is bound to "P", not to "B.P"; the rest InPUT takes care of. Now, if SChoiceType is not exported, the "P" mapping is unbound, and so are all parameters "B.P".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.