[mercury-users] unification problem
Stefan Hinterstoisser
supersteveee at gmx.de
Thu Apr 29 18:17:22 AEST 2004
Hi!
I have the following predicate:
:- pred konto( string, string, string, string ).
:- mode konto( in, in, out, out ) is nondet.
:- mode konto( out, in, out, out ) is nondet.
:- mode konto( in, out, out, out ) is nondet.
:- mode konto( out, out, out, out ) is nondet.
konto( "Vater", "Mutter", "true", "konto(Vater,Mutter);" ).
konto( _, _, "false", "konto(false,false)" ).
what I want is that this predicate (although definied as nondet) behaves
like a predicate that always becomes true (and gave true and konto(Vater,
Mutter) back if it matches Vater and Mutter and else false and
konto(false,false) ). unfortunatly the wildcards dont fit because of missing
groundness (because of the mode definition). is there any way to get that
demanded behavior I described before without changing the modes (and note:
every mode type could also be used in the later program!)....I tried it with
if and else but than I get a scope error (because Mercury is not able to
bind a Variable in if else function - but that is demanded because of the
mode declarations.... what can I do???
Thanx in advance,
Stefan
--
NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/dsl
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list