Re: [eclipse-clp-users] List of Terms to Term

From: Christian Wirth <tyrion_at_...215...>
Date: Tue, 23 Feb 2010 19:07:02 +0100
Kish Shen schrieb:
> Christian Wirth wrote:
>
>> i want to convert a list of terms into a term:
>>
> I am not clear what you mean by this: a list of terms *is* a term itself.
Not every list, only when its correctly nested. I simply have a list 
where each element is a term: [pred(A,B),pred2(A,C),pred3(B,C)] is not a 
correct term, but a list of terms (, is the element seperation symbol, 
not the AND symbol)

>
>> my list is in cnf and looks like this: [pred(A,B),pred2(A,C)]. The 
>> resulting term has to be ListElement1 AND ListElement2 AND 
>> ListElement3 ....
>> variables have to be preserved as always, functor copy is not enough.
>>
>
> What is AND, and what are ListElements?
AND = ,
ListElement is a element of a list, in my example ListElement1=pred(A,B) 
(the result u would get with nth0(0,List,ListElement1))
>
> In any case, if you want to "preserve" a variable, you just need to
> refer to the variable in your source in both the original term, and in
> the new term you create. If you create a new term (using 'functor 
> copy'), you can then unify the new variables in your new term with the 
> variables you want to copy.
>
> Cheers,
>
> Kish
The problem i have is, i need to call \+(\+(List)) .. but i get an 
error:  type error in existing_file([d_role(Player, state), 'd_++'(_403, 
_478, state), 'd_++'(_403, _478, state), d_cell(_402, _478, state)], 
[".eco", "", ".ecl", ".pl"], [readable], _786)

cheers Christian

>
>
>> Anyone an idea ?
>>
>> best regards Christian Wirth
>>
>> ------------------------------------------------------------------------------ 
>>
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> ECLiPSe-CLP-Users mailing list
>> ECLiPSe-CLP-Users_at_lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users
>
>
Received on Tue Feb 23 2010 - 18:07:12 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 22 2024 - 18:13:20 CET