ECJ-INTEREST-L Archives

February 2014

ECJ-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Date:
Mon, 17 Feb 2014 18:42:14 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (84 lines)
Oh, sure we'll use eclipse or whatnot to refactor really big jobs.  This one I figured I could do by hand :-)

BTW, I've used FindBugs on both ECJ and MASON in the past (heck, my PhD is from U Maryland).  It finds a LOT of non-bugs.  But it's found little useful things here and there for us too.  We should go through it again.

Sean

On Feb 17, 2014, at 5:55 PM, Warren Henning <[log in to unmask]> wrote:

> By the way, a question: when you say you did the refactoring by hand, would it be more reliable to do it using an IDE's refactoring tools (e.g., IntelliJ's)? AFAIK IntelliJ has built-in support for this specific kind of refactoring: https://www.jetbrains.com/idea/webhelp/type-migration.html . They offer free licenses for open source projects.
> 
> Also, you could run the code through a static analysis tool like FindBugs ( http://findbugs.sourceforge.net/ ), which is integrated into all the major Java IDEs, before and after the refactor to see if the refactor introduces any easily-detectable bugs.
> 
> Warren
> 
> 
> On Mon, Feb 17, 2014 at 10:55 AM, Sean Luke <[log in to unmask]> wrote:
> Inspired by Raymond's discovery, I decided to pull the trigger and perform the long-awaited upgrade of all floats to doubles in Fitness classes.  This entailed:
> 
>         - Changing floats to doubles
>         - Changing various FLOAT.. to DOUBLE..
>         - Changing float literals (0.0f, etc.) to double just in case
>         - Removing unnecessary casts
>         - Slight tweaks to the documentation
> 
> This will be *sort* of non-backward compatible: you'll want to modify your applications so that you don't cast stuff to floats before setting the fitness or else you'll lose out on the extra expressivity.
> 
> It was a lot of by-hand refactoring and I'm sure I messed something up.  I'm a bit spooked about committing it, and haven't done so, unless I can get a few people to do some testing for me.  Here's the classes which were affected.  Can anyone volunteer for me?
> 
> Sean
> 
> 
> FITNESS METHODS
> ec/Fitness.java
> ec/simple/SimpleFitness.java
> ec/gp/koza/KozaFitness.java
> ec/multiobjective/MultiObjectiveFitness.java
> 
> SELECTION METHODS
> ec/select/BestSelection.java
> ec/select/BoltzmannSelection.java
> ec/select/FitProportionateSelection.java
> ec/select/GreedyOverselection.java
> ec/select/SUSSelection.java
> ec/select/SigmaScalingSelection.java
> ec/select/TournamentSelection.java
> 
> STATISTICS
> ec/multiobjective/MultiObjectiveStatistics.java
> 
> APPLICATION EXAMPLES
> ec/app/ant/Ant.java
> ec/app/bbob/BBOBenchmarks.java
> ec/app/coevolve1/CompetitiveMaxOnes.java
> ec/app/coevolve2/CoevolutionaryECSuite.java
> ec/app/ecsuite/ECSuite.java
> ec/app/edge/Edge.java
> ec/app/gpsemantics/Semantic.java
> ec/app/hiff/HIFF.java
> ec/app/klandscapes/KLandscapes.java
> ec/app/lawnmower/Lawnmower.java
> ec/app/lid/Lid.java
> ec/app/majority/MajorityGA.java
> ec/app/majority/MajorityGP.java
> ec/app/mona/Mona.java
> ec/app/moosuite/MooSuite.java
> ec/app/multiplexer/Multiplexer.java
> ec/app/multiplexerslow/Multiplexer.java
> ec/app/nk/NK.java
> ec/app/ordertree/OrderTree.java
> ec/app/parity/Parity.java
> ec/app/push/Regression.java
> ec/app/regression/Benchmarks.java
> ec/app/regression/Regression.java
> ec/app/regression/func/RegERC.java
> ec/app/royaltree/RoyalTree.java
> ec/app/sat/SAT.java
> ec/app/sum/Sum.java
> ec/app/tutorial1/MaxOnes.java
> ec/app/tutorial2/AddSubtract.java
> ec/app/tutorial3/OddRosenbrock.java
> ec/app/tutorial4/MultiValuedRegression.java
> ec/app/twobox/TwoBox.java
> 

ATOM RSS1 RSS2