Program Analysis using Prolog or XSB.
Author Message
Program Analysis using Prolog or XSB.

Consider the following simple object-oriented logic program that uses an
extended Horn syntax:

rule 1 -        o1:p(X) <- q(X).
rule 2 -        o1:q(a).

rule 3 -        o2:q(b).

rule 4 -        o2<01.

The interpretation of the above rules are as follows: the predicate p(X)
is true in object o1 if q(X) is true in o1. Similarly, the predicate
q(a) is true in object o1, and q(b) in o2. Rule 4 says that o2 is an
instance/subclass of o1.

Sat, 03 Jul 1999 03:00:00 GMT
Program Analysis using Prolog or XSB.

Consider the following simple object-oriented logic program that uses an
extended Horn syntax:

rule 1 -        o1:p(X) <- q(X).
rule 2 -        o1:q(a).

rule 3 -        o2:q(b).

rule 4 -        o2<01.

The interpretation of the above rules are as follows: the predicate p(X)
is true in object o1 if q(X) is true in o1. Similarly, the predicate
q(a) is true in object o1, and q(b) in o2. Rule 4 says that o2 is an
instance/subclass of o1.

Does anyone know if Prolog or XSB can be used to analyze the program
above to conclude that a predicate p/1 (predicate p of arity 1) is
defined in o1 but not in o2. This perhaps requires inspection of the
syntactic properties of the program. Note that in absence of rule 2, p/1
is not true in o1 while it is defined in o1.

Any pointer to similar works will be appreciated.

Cheers,
- Hasan.

Sat, 03 Jul 1999 03:00:00 GMT
Program Analysis using Prolog or XSB.

Quote:
> Consider the following simple object-oriented logic program that uses an
> extended Horn syntax:
> Does anyone know if Prolog or XSB can be used to analyze the program

Of course.  Its a SMOP (simple matter of programming).  NUOO-Prolog does
similar analysis to translate the OO program into ordinary Prolog.  See
http://www.cs.mu.oz.au/~lee/src/oolp

lee

Sat, 03 Jul 1999 03:00:00 GMT

 Page 1 of 1 [ 3 post ]

Relevant Pages