Giter Club home page Giter Club logo

constellation's People

Contributors

cerieljacobs avatar jmaassen avatar sverhoeven avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

constellation's Issues

Should an OrActivityContext be a set, bag, or list ? A.k.a. is equals correct?

In the current implementation, the OrActivityContext behaves either like a bag or a list, depending on the value of the ordered parameter of the constructor. If ordered is true the order matters and the context is a list, if it is false it does not matter and the order is a bag.

The implementation of equals however seems to test for set equality in the worst case (slow path) implementation, but behaves differently in the fast path implementation. This is hard to trigger in a test, as several fast paths guarantee that this slow path is almost never reached.

One issue is the comparison in the occurrence of doubles values. In other words:

 (A, B) == (A, B, B) ?

The current implementation says no since their length is different. Are these the semantics we want ?

Similar problems occur with comparing ordered and not ordered, or does:

(B, A)[with order] == (A, B)[without order]

Again, the fast path in equals says no (by comparing their hash codes), the slow path says yes by testing set equality. Again, are these the semantics we want ?

OrActivityContext accepts null values

The OrActivityContext gets an array of UnitActivityContext as first parameter, but does not check in the constructor whether or not one of the array values is null. For example:

   new OrActivityContext(new UnitActivityContext[2], true)

is accepted without complaints. However, not all method can handle these null values. For example, hashcode can but equals cannot, and neither can the constructor with false as the last parameter instead of true.

This suggest the the null values should not be accepted in the first place. Alternatively, the array should be collapsed to not contain any null values anymore (as it is copied anyway).

Will fix this in the unittest branch.

Event.toString contains dead code

The Event.toString() contains dead code:

    String s = "source: ";
    if (getSource() != null) {
        s += getSource().toString();
    } else {
        s += "none";
    }
    s += "; target: ";
    if (getTarget() != null) {
        s += getTarget().toString();
    } else {
        s += "none";
    }

The getSource() and getTarget() calls will never return null since the source and target fields are used to invoke a method in the constructor of Event. As a result both else clauses are unreachable (also for tests).

StealStrategy too complicated

If there are now only two steal strategies left, why do we still need a public constructor? We could just do with the two public possible values. Other values are rejected now anyway.

API seperation seems confused

The API seperation of Constellation seems confused. For example, the top level API contains an ibis.constellation.ActivityIdentifier class that extends an ibis.constellation.impl.ActivityIdentifierImpl class in the implementation subpackage. This does not make sense?

Either the top level should truely be a separate API (and therefore not import things from the implementation), or the whole thing should be flattened ?

Do we need the separation between executor and activity contexts?

We currently have two types of contexts, ActivityContext and ExecutorContext. Both have the UnitContext and OrContext subtypes.

I'm wondering if we could replace this with a single Context implementation (keeping the Unit and Or subtypes).

I remember there was a reason for this split, but unfortunately don't remember the reason itself. It probably has to do with the ranges and matching, but I have the feeling there are more elegant solutions for this, like completely hiding the matching in the impl package.

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.