Modifications to intermediate representation

Some things here that we should probably discuss...

1. I'm confused why so many things are/were mutable. Do we actually need
mutable values for stuff like the attributes? I almost wrote some type
checking for those vs. the actual attributes defined in the type but
didnt since I feel like it would be better to set attributes on
construction and just not worry about them anymore. 

2. I made a change which gives nodes better ownership of their ports,
but I'm still not entirely satisfied with this. This partially ties in
with #1.

3. Made some changes to a few unit tests that were giving issues, using
the @Before junit annotation to get rid of some duplicate code.

4. We should add a task to refactor everything to use the Attribute
code.

5. Current serialization is actually broken since adding the parent node
introduced a cyclic dependency, causing a stack overflow :P That test is
on @Ignore for now until I write the actual serializer.
Do you mean the check not null? It will throw an exception (NPE). See http://code.google.com/p/guava-libraries/wiki/PreconditionsExplained                                                                                                                                                                                                                                                                          Sent from my mobile, please excuse any typos.                                                                                                                                                                                                                                        From: Murphy BerzishSent: Wednesday, June 25, 2014 9:11 AMTo: manifold-lang/manifoldReply To: manifold-lang/manifoldCc: Max Qitian ChenSubject: Re: [manifold] Modifications to intermediate representation (#109)In src/main/java/org/whdl/intermediate/Connection.java:
>      super(type);
>      this.attributes = new Attributes();
> +    this.portFrom = checkNotNull(from);

What happens as a result of this call if from is found to be NULL?

—Reply to this email directly or view it on GitHub.