Slashdot Mirror


Computer Program Fixes Old Code Faster Than Expert Engineers

An anonymous reader writes: Less than two weeks after one group of MIT researchers unveiled a system capable of repairing software bugs automatically, a different group has demonstrated another system called Helium, which "revamps and fine-tunes code without ever needing the original source, in a matter of hours or even minutes." The process works like this: "The team started with a simple building block of programming that's nevertheless extremely difficult to analyze: binary code that has been stripped of debug symbols, which represents the only piece of code that is available for proprietary software such as Photoshop. ... With Helium, the researchers are able to lift these kernels from a stripped binary and restructure them as high-level representations that are readable in Halide, a CSAIL-designed programming language geared towards image-processing. ... From there, the Helium system then replaces the original bit-rotted components with the re-optimized ones. The net result: Helium can improve the performance of certain Photoshop filters by 75 percent, and the performance of less optimized programs such as Microsoft Windows' IrfanView by 400 to 500 percent." Their full academic paper (PDF) is available online.

26 of 167 comments (clear)

  1. Improving the performance by more than 100% by Racemaniac · · Score: 2, Informative

    Does that mean the program responds in negative time? even before you click the button it's already done what you wanted? Sounds impractical...

    1. Re:Improving the performance by more than 100% by Bengie · · Score: 4, Informative

      100% faster just means 2x.

    2. Re:Improving the performance by more than 100% by randm.ca · · Score: 4, Insightful
      Am I having an English fail, or are they having a Math fail?

      Mr. Smith's salary has increased by 350% over the past 20 years. If his original salary was $22,000 per year, what is his current salary?
      First change 350% to a decimal: 350% = 3.5
      Next, multiply the original salary by the decimal number: (22000) x (3.5) = 77000
      After 20 years Mr. Smith's salary has increased from $22,000 to $77,000 per year.

      Didn't his salary increase by $77,000, from $22,000 to $99,000?

      To simplify it, if his salary had increased by 100% would that mean he was now making $22,000 (their logic) or $44,000 (my logic)?

    3. Re:Improving the performance by more than 100% by erebus2161 · · Score: 2

      You seem to be correct. Instead of saying his salary increased by 350%, they should have said his salary increased to 350% of his original salary.

  2. Re:Nirvana?! by JMJimmy · · Score: 5, Insightful

    Unemployment is a sort of nirvana.

    I just want to know why when they improve the speed of something by 75-500% it's considered research but when I do it it's considered a waste of time? Companies just don't appreciate efficiency.

  3. its been around for years. by nimbius · · Score: 5, Funny

    This kind of application has been ported to about half a dozen different operating systems. i use it on a regular basis but for those not familiar I find it works best with legacy PHP. the "rm" command (or as its known in windows "del") uses an advanced algorythm to determine the target codes age, total number of lines, and any optimizations that are required in order to make it fully web 4.0 SOAP, ROPE, and DOPE compliant. It then quickly converts the code to the updated version by changing the physical structure of the space it occupies on the disk. My coworkers always seem amazed when they see me break out my legacy optimizer. "What have you done?!" they exclaim, baffled at my efficiency. "holy crap do you know how important that was?!?" they remark in awe

    --
    Good people go to bed earlier.
  4. Re:Support and copyright ... by gstoddart · · Score: 4, Funny

    What? There is no law against modifying binaries on software you own.

    These days, copyright means whatever the hell corporations tell government it means, and it's a constantly moving target.

    I'm not convinced the BSA would agree.

    The quality of comments on this site continues to decline at a rapid pace...

    Yeah, it's full of snide assholes posting as Anonymous Coward who don't have anything intelligent to add.

    --
    Lost at C:>. Found at C.
  5. Inaccurate title by CustomSolvers2 · · Score: 5, Interesting

    The paper is not about automatic code optimisation in general. This program only fixes image-related algorithms (which most likely involve simple & repetitive modifications).
    In fact, there are quite a few references to Adobe in the associated links and the paper is signed by two Adobe guys. Thus, I guess that it is mostly focused on Adobe products, like Photoshop; and might not even be able to deal with any image-processing algorithm.

    PS: is it because of the summer-period lack of news or Slashdot is planning to make the move to pure sensationalism? Because a big proportion of the titles lately are quite unclear (to say it softly).

    --
    Custom Solvers 2.0 = Alvaro Carballo Garcia = varocarbas.
    1. Re:Inaccurate title by QuietLagoon · · Score: 2

      PS: is it because of the summer-period lack of news or Slashdot is planning to make the move to pure sensationalism? Because a big proportion of the titles lately are quite unclear (to say it softly).

      I think its a move towards sensationalism. Given that /. is now mirroring the article titles on social media (twitter, facebook?) it is looking more and more as if /. editors have been told to make the titles vague yet provocative.

      Keep in mind, as the page footer says, Slashdot is a DHI Service.

  6. Re:Support and copyright ... by angel'o'sphere · · Score: 2, Interesting

    Unfortunately you AC parent is right and you are just an asshole and an idiot.

    --
    Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  7. Re:Bit-rotted code by Deep+Esophagus · · Score: 2

    Is that even a thing? How do bits rot?

  8. How is this different from an optimizer? by T.E.D. · · Score: 2

    Most compilers, after code generation (and often after code analysis, while the code is in some machine-independent tree state that sounds much like their invented language here) perform their optimization runs.

    This just sounds like its doing that. Sure, its source-language independent. But so is gcc's backend. Basically its taking a "done" excecutable, reconstructing a form similar to the intermediate tree form the GCC backend uses, and then doing another optimization pass like GCC's backend does. What's new and unique here?

  9. So has it "fixed" itself? by Viol8 · · Score: 4, Interesting

    Well its the obvious question isn't it - presumably they've eaten their own dog food and run the program on its own binary , right?

  10. Re:Support and copyright ... by guruevi · · Score: 2

    There is a law against modifying the software you own (at least in the US and the EU), it's called the DMCA and it's European derivatives. The only exception the DMCA allows is for 'interoperability' where no other programs do the same things. With the availability of open source solutions, it's just not worth fixing old crap when you can just fix open source systems without legal issues.

    --
    Custom electronics and digital signage for your business: www.evcircuits.com
  11. Re:Nirvana?! by quantumghost · · Score: 5, Funny

    $ Helium -i Helium -o Helium2

    Program ran in 656.76s

    $ Helium2

    Welcome to SkyNET

  12. Remember Transmeta? by Anonymous Coward · · Score: 5, Informative

    When you read the actual paper, it seems to analyse the code, and take advantage of vectorization in modern hardware to do the equivalent act in a more parallel way increasing performance. So it strips off local optimization, analyses the action, then recreates it in a form better suited to the processor its compiled for, resulting in a speedup.

    Sort of reminds me of Transmeta, the processor Linus was involved with, that ran microcode, analysed the execution of the x86 code, and did little mini compiles of microcode to simulate that. aka 'Code Morphing',

    https://en.wikipedia.org/wiki/Transmeta

    It did well on Benchmarks (and filters) because of the repetitive nature of them, it could recreate those loops more efficiently.

    Interesting, pity its all full of boastful fluff, and vague bitrot claims, it sounds like a proper paper otherwise. Of course for most software if it has value, it is a competition and its worth re-optimizing for each new platform otherwise you lose market to competitors. So actual programmers would rework those parts of the code rather than a general tool hack.

    So this would only be a stopgap for dead end software you're locked into that isn't being maintained.

  13. Re:Support and copyright ... by mark-t · · Score: 5, Informative

    Actually, copyright is violated when you copy the work without permission and the purpose for copying the work does not otherwise make it exempt from infringement. If you don't distribute at all, and you do not profit from it in any way, then nobody else is necessarily even going to know you copied it, let alone want to prosecute you for it, but that does not necessarily mean it is necessarily legal (some jurisdictions even have private copying as exempt from infringement anyways, or for example, in Canada, have private-use copying exempt only so long as a mechanism for compensating at least some percentage private-use copies exists, such as levies on blank media where such copied content is considered by said controlling agencies to be likely to be copied onto).

    Distribution of unauthorized copies is usually taken as gold-bar standard proof of infringement, since it establishes, in an objectively verifiable way, a non-private-use purpose for making those copies which can be presented by the copyright holder as a basis for the claim against the infringer. The action of distributing unauthorized copies is generally considered illegal as well, a crime related to infringement and no less than at least evidence of conspiracy to commit copyright infringement, but is not technically copyright infringement, not is it absolutely required to commit infringement... at most it may only be required to be held accountable for infringement.

  14. Um, because this is a computer doing the work by rsilvergun · · Score: 2, Interesting

    It's practically free. Run the program, wait a bit and your done. A child or a well trained monkey could do it. You OTOH, cost dollars per hour. Seriously, is anyone else scared shirtless that something so abstract and complex as this can be automated? Is any job safe (outside of being a member of the ruling class)?

    --
    Hi! I make Firefox Plug-ins. Check 'em out @ https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/
    1. Re:Um, because this is a computer doing the work by Anonymous Coward · · Score: 2, Insightful

      It's practically free. Run the program, wait a bit and your done. A child or a well trained monkey could do it. You OTOH, cost dollars per hour. Seriously, is anyone else scared shirtless that something so abstract and complex as this can be automated? Is any job safe (outside of being a member of the ruling class)?

      Scared shirtless? Only if you're a uneducated loser. Compiler optimizations are just as complex as this (in fact, this is more or less the same thing, only it's being done after the fact). It has no bearing on the ability to create new software to meet a need.

    2. Re:Um, because this is a computer doing the work by Anonymous Coward · · Score: 5, Insightful

      If you look at how their system works, you can see that it is limited to certain types of algorithm, and even then it gives absolutely zero correctness guarantees. What they want to do is abstract and complex. What they're actually doing can be described in a 20-page paper. Your job is safe for right now. Strong AI still doesn't exist.

      Anyway, even if they automate some parts of your job, the part of your job that isn't automated will expand to fill that time. I'm not sure if there's a real law for that but it's a heuristic observation shared by many. Partial automation doesn't lead to declining workforces, it leads to expanded capability and larger workloads than could be imagined before. Even if they perfected this program it still couldn't write a new kernel, let alone a new application.

    3. Re:Um, because this is a computer doing the work by Grishnakh · · Score: 2

      Partial automation doesn't lead to declining workforces, it leads to expanded capability and larger workloads than could be imagined before.

      Not really. The problem is that automation replaces all the jobs at the low end of the skill spectrum; the easier and more mindless the job is, the easier it is to automate (usually). While this can expand the market overall, what are we supposed to do with the people who lost their jobs? Someone who can empty trashcans is not likely to be able to learn the skills necessary to repair the trash robot. More automation is creating more work for people whose work involves building, maintaining, and repairing the automation, but those are all highly skilled workers.

  15. It's a general purpose optimizer by Virtucon · · Score: 3, Informative

    Read the instructions, loop optimize, branch optimize etc. rinse repeat. It's not novel, I mean we've had JIT optimization and others for a few years now. It does nothing with "code" but with the binaries generated from code.

    --
    Harrison's Postulate - "For every action there is an equal and opposite criticism"
  16. Re:Bit-rotted code by swillden · · Score: 4, Informative

    Is that even a thing? How do bits rot?

    Yes, it's a thing. An important one, well-known to all software developers with a few years of experience.

    Barring some sort of hardware failure the bits themselves don't change, of course. What changes is the context in which the bits are used. The article seems to be focusing mostly on performance, and that's one area of bit rot, a minor one. As hardware changes, the best performance optimization methods change, but the bits don't. Updating the code can improve performance. More important forms of bit rot have to with supporting libraries, or even business context. Causes and effects vary, but at bottom some assumption made by the old code is no longer true. If the assumption was never true, or for some reason the developer should not have expected it to be true, we call this a bug. But sometimes the code did make perfect sense as it was... but no longer. It's a bug now, but was correct previously.

    That is bit rot.

    Wikipedia has a fairly decent article if you want to read more: https://en.wikipedia.org/wiki/...

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  17. Re:Support and copyright ... by Coren22 · · Score: 2

    Clearly he can't be an asshole as that is the absence of space, not the muscle around the absence.

    --
    APK likes to ask for responses to the same things over and over. Maybe he just likes the responses?
  18. Re:Support and copyright ... by mr_mischief · · Score: 2

    Contract law is law. Also, there's actual copyright statute that says you can't create and distribute a derivative work. This has often been interpreted by the courts to mean you can't make a tool that easily enables others to do so. While running this on your own copy of something is not against statute, it may be a breach of contract.

    If you think that statutes are all of the law, then you don't understand the concept of law in pretty much the entire former English colonies, most of which operate at least partly under common law and precedent.

  19. Microsoft Windows' IrfanView? by wonkey_monkey · · Score: 2

    Microsoft Windows' IrfanView

    Microsoft (or even "Microsoft Windows") doesn't own IrfanView.

    --
    systemd is Roko's Basilisk.