首页 | 官方网站   微博 | 高级检索  
     


Programming with partially specified aggregates in Java
Authors:F Bergenti  L Chiarabini  G Rossi [Author vitae]
Affiliation:Dipartimento di Matematica, Università degli Studi di Parma, Parco Area delle Scienze 53/A, 43100 Parma, Italy
Abstract:Various forms of data aggregates, e.g., arrays, lists, sets, etc., are usually provided by programming languages, either as primitive entities or as additional features made available by standard libraries. In conventional programming languages these data structures are usually specified by completely and precisely enumerating all their constituent elements. Conversely, in (constraint) logic programming languages it is common to deal with partially specified aggregates where either some elements or some parts of the aggregate are left unknown. In this paper we consider the case where partially specified aggregates can occur in a conventional O-O programming language. Specifically, we consider partially specified lists and sets as provided by the Java library JSetL. The definition of such data structures is strongly based on the notion of logical (or constrained) variable usually provided by languages and libraries to support constraint programming. We show through simple examples using Java and JSetL how partially specified lists and sets, along with a few basic constraints over them, can be conveniently exploited in a number of common programming problems.
Keywords:Logical variables  Constraints  Finite sets  Declarative programming
本文献已被 ScienceDirect 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号