4 ms·
IPLANG – an optimization-based language
- dj-wonk 12y agoThis is crazy; perhaps that's what makes it intriguing. In any case, I'm scratching my head. For example: > We can thus, for any Brainfuck program, create an integer optimization problem with 3n decision variables where the optimal solution is that program. Got it. Integer optimization is designed to solve numerical problems. Is there any reason or inspiration to suggest that use this technique is a productive way to write programs that satisfy certain constraints?
- idunning 12y agoMostly an exercise in using a tool for something not intended - art? You can definitely express any Brainfuck program as a integer program, and you can add constraints that will constrain what the program does/must do, but it isn't clear to me how to add useful constraints/objective that are still linear. It'd be an interesting exercise though, and something I'll be thinking about. Integer optimization does have some practical uses related to programming though - its use has been explored in compilers. E.g. http://www.sciencedirect.com/science/article/pii/S0898122197001843 http://www.sciencedirect.com/science/article/pii/S0898122197...
- termain 12y agoCan this be used as a BF supercompiler?
- idunning 12y agoIt might be possible. Consider adding new auxiliary variables that represent the state of memory after each operation. You may be then able to add (linear) constraints to those auxiliary variables that are meaningful. Including user input could be tricky though.
- nn3 12y agoWhat happens when there are multiple best solutions?
- scottfr 12y agoFor those looking for examples of actually used languages designed specifically for optimization problems, there are several out there. AMPL is one such language [1] [1] http://www.ampl.com/EXAMPLES/ http://www.ampl.com/EXAMPLES/
- idunning 12y agoThe language I used, JuMP [1], is quite similar to AMPL. In fact in [2] we do performance comparisons with it. Check it out if you have a chance. [1] https://github.com/JuliaOpt/JuMP.jl https://github.com/JuliaOpt/JuMP.jl [2] http://arxiv.org/abs/1312.1431 http://arxiv.org/abs/1312.1431