Discussions related to Visual Prolog
Peter Muraya
VIP Member
Posts: 147
Joined: 5 Dec 2012 7:29

Definition of property as a predicate

Unread post by Peter Muraya »

Code: Select all

 /* interface test     domains          optimum_function = (real*)->real.       properties          optimum:optimum_function. end interface   class test:test end class   implement test     facts          optimum:optimum_function:=erroneous. end implement */     interface test     properties          optimum:(real*)->real. end interface   class test:test end class   implement test     facts          optimum:(real*)->real:=erroneous. end implement     implement main      clauses      run():-           console::init(),           succeed(). % place your own code here end implement main   goal     mainExe::run(main::run).
Mutall Data Management Technical Support
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

I believe there was a reason, but I have forgotten which. So we may change this in future releases.
Regards Thomas Linder Puls
PDC
Martin Meyer
VIP Member
Posts: 328
Joined: 14 Nov 2002 0:01

Unread post by Martin Meyer »

I suppose, such syntax cannot be allowed, because that leads to semantic ambiguity:

When a fact, which has a function type, could be declared in the way

Code: Select all

facts     optimum : (real*) -> real.
then it should work in the same way to declare a fact having a predicate type by

Code: Select all

facts     optimum : (real*).
The later fact declaration is indeed legal, but it has already an other meaning than a fact having a predicate type.

Regards
Martin
Peter Muraya
VIP Member
Posts: 147
Joined: 5 Dec 2012 7:29

Definition of property as a predicate

Unread post by Peter Muraya »

The point a semantic ambiguity makes sense. Thanks.
Mutall Data Management Technical Support
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

Yes, I believe that was in deed the reason.
Regards Thomas Linder Puls
PDC
Post Reply