[eclipse-clp-users] mapping between java and eclipse

From: carole dawood <carole.dawood_at_...6...>
Date: Fri, 23 Apr 2010 22:21:30 +0200
Hello,
In my CP code, i have a return from my query a list of lists of
terms however i can not display it in my java Code .
My query is :

?- solve(A, C, S, 32).

A = [[1 * 11.34], [1 * 11.34], [0 * 11.34], [0 * 11.34]]

C = []

S = [[1 * 14.5], [1 * 14.5], [0 * 14.5], [0 * 14.5]]

In Java i get it like this:

result.arg(2)->result1[[com.parctechnologies.eclipse.CompoundTermImpl with
[functor=* arity=2 arg(1)=1 arg(2)=11.34]],
[com.parctechnologies.eclipse.CompoundTermImpl with [functor=* arity=2
arg(1)=1 arg(2)=11.34]], [com.parctechnologies.eclipse.CompoundTermImpl with
[functor=* arity=2 arg(1)=0 arg(2)=11.34]],
[com.parctechnologies.eclipse.CompoundTermImpl with [functor=* arity=2
arg(1)=0 arg(2)=11.34]]]



result.arg(3)->result2[]



result.arg(4)->result3[[com.parctechnologies.eclipse.CompoundTermImpl with
[functor=* arity=2 arg(1)=1 arg(2)=14.5]],
[com.parctechnologies.eclipse.CompoundTermImpl with [functor=* arity=2
arg(1)=1 arg(2)=14.5]], [com.parctechnologies.eclipse.CompoundTermImpl with
[functor=* arity=2 arg(1)=0 arg(2)=14.5]],
[com.parctechnologies.eclipse.CompoundTermImpl with [functor=* arity=2
arg(1)=0 arg(2)=14.5]]]



However another list of lists is displayed normally in java with the same
code, i did not change anything in the code. Just instead of having a list
of lists of numbers which is the below CP code, i have a list of lists of
terms which is above and is not displayed properly..

?- solve(A, C, S, 32).

A = [[1], [1], [0], [0]]

C = []

S = [[1], [1], [0], [0]]

i normally get in java, a corresponding list of lists:

result.arg(2)->result1[[1], [1], [0], [0]]

result.arg(3)->result2[]

result.arg(4)->result3[[1], [1], [0], [0]]

Thank you a lot,

Carole Dawood

Computer Science and Engineering

German University in Cairo
Received on Fri Apr 23 2010 - 20:21:37 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST