论文标题

使用JSETL在Java中使用强度集的声明性编程

Declarative Programming with Intensional Sets in Java Using JSetL

论文作者

Cristiá, Maximiliano, Fois, Andrea, Rossi, Gianfranco

论文摘要

强度集是由属性给出的集合,而不是列举其元素。在以前的工作中,我们为一阶逻辑语言提出了一个决策程序,该语言提供了有限的强度集(RIS),即,一组副类集合,保证表示有限的 - 尽管无界的 - - 集合。在本文中,我们展示了如何在常规环境中(即命令式的O-O语言Java)中利用RIS作为便捷的编程工具。我们通过考虑一个称为JSETL的Java库来完成此操作,该库集成了逻辑变量的概念,(设置)统一和约束逻辑编程语言典型的统一和约束,以纳入Java语言。我们展示了JSETL如何自然扩展以适应RIS和RIS约束,以及如何利用该扩展名来支持更具声明性的编程风格,另一方面,可以有效增强图书馆提供的约束语言的表达能力。

Intensional sets are sets given by a property rather than by enumerating their elements. In previous work, we have proposed a decision procedure for a first-order logic language which provides Restricted Intensional Sets (RIS), i.e., a sub-class of intensional sets that are guaranteed to denote finite---though unbounded---sets. In this paper we show how RIS can be exploited as a convenient programming tool also in a conventional setting, namely, the imperative O-O language Java. We do this by considering a Java library, called JSetL, that integrates the notions of logical variable, (set) unification and constraints that are typical of constraint logic programming languages into the Java language. We show how JSetL is naturally extended to accommodate for RIS and RIS constraints, and how this extension can be exploited, on the one hand, to support a more declarative style of programming and, on the other hand, to effectively enhance the expressive power of the constraint language provided by the library.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源