DocumentCode
555315
Title
Unifying execution of imperative and declarative code
Author
Milicevic, Aleksandar ; Rayside, Derek ; Yessenov, Kuat ; Jackson, Daniel
Author_Institution
Comput. Sci. & Artificial Intell. Lab., Massachusetts Inst. of Technol., Cambridge, MA, USA
fYear
2011
fDate
21-28 May 2011
Firstpage
511
Lastpage
520
Abstract
We present a unified environment for running declarative specifications in the context of an imperative object-Oriented programming language. Specifications are Alloy-like, written in first-order relational logic with transitive closure, and the imperative language is Java. By being able to mix imperative code with executable declarative specifications, the user can easily express constraint problems in place, i.e., in terms of the existing data structures and objects on the heap. After a solution is found, the heap is updated to reflect the solution, so the user can continue to manipulate the program heap in the usual imperative way. We show that this approach is not only convenient, but, for certain problems can also outperform a standard imperative implementation. We also present an optimization technique that allowed us to run our tool on heaps with almost 2000 objects.
Keywords
formal specification; object-oriented languages; object-oriented programming; Java; data structures; declarative code execution; executable declarative specification; first-order relational logic; imperative code execution; imperative language; imperative object-oriented programming language; transitive closure; Algebra; Arrays; Context; Encoding; Java; Upper bound; constraint-based languages; declarative programming; executable specifications; formal methods;
fLanguage
English
Publisher
ieee
Conference_Titel
Software Engineering (ICSE), 2011 33rd International Conference on
Conference_Location
Honolulu, HI
ISSN
0270-5257
Print_ISBN
978-1-4503-0445-0
Electronic_ISBN
0270-5257
Type
conf
DOI
10.1145/1985793.1985863
Filename
6032490
Link To Document