object-constraintprogramming provides a design to integrate constraints with dynamic, object-oriented programming languages. It allows developers to encode multi-way constraints over objects and object collections us...
详细信息
ISBN:
(纸本)9781450340335
object-constraintprogramming provides a design to integrate constraints with dynamic, object-oriented programming languages. It allows developers to encode multi-way constraints over objects and object collections using existing, object-oriented abstractions. These constraints are automatically maintained at run-time. One original goal of the Babelsberg-family of object-constraintprogramming languages was to allow users familiar with the imperative paradigm to quickly and efficiently make use of constraint solver capabilities. Yet, practical problems often require careful selection of solvers to find good solutions (or any at all). Furthermore, solver performance can vary and while most solvers come with various optimizations, developers have to have a good understanding of the solving process to use these optimizations effectively. This, however, is difficult to achieve if the solver is automatically selected by the system. In this work, we discuss three different implementations for automatic solver selection that we used in Babelsberg implementations. As a second step, we look at the performance potential of edit constraints that are available in some solvers such as Cassowary or DeltaBlue, and how they can be applied automatically to improve solver performance. We argue that these techniques make object constraint programming more practical by improving the quality and performance of solutions.
constraints provide a useful technique for ensuring that desired properties hold in an application. As a result, they have been used in a wide range of applications, including graphical layout, simulation, scheduling,...
详细信息
ISBN:
(纸本)9783662442029;9783662442012
constraints provide a useful technique for ensuring that desired properties hold in an application. As a result, they have been used in a wide range of applications, including graphical layout, simulation, scheduling, and problem-solving. We describe the design and implementation of an object constraint programming language, an object-oriented language that cleanly integrates constraints with the underlying language in a way that respects encapsulation and standard object-oriented programming techniques, and that runs in browser-based applications. Prior work on object constraint programming languages has relied on modifying the underlying Virtual Machine, but that is not an option for web-based applications, which have become increasingly prominent. In this paper, we present an approach to implementing object constraint programming without Virtual Machine support, along with an implementation as a JavaScript extension. We demonstrate the resulting language, Babelsberg/JS, on a number of applications and provide performance measurements. Programs without constraints in Babelsberg/JS run at the same speed as pure JavaScript versions, while programs that do have constraints can still be run efficiently. Our design and implementation also incorporate incremental re-solving to support interaction, as well as a cooperating solvers architecture that allows multiple solvers to work together to solve more difficult problems.
暂无评论