Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prolog Rookie:Question on best method of representation

Status
Not open for further replies.

fear7

Programmer
May 5, 2003
2
US
Hi,

I've been asked to build something in prolog even though I have absolutely no experience. So this is my question. I am trying to model a graphical representation of a series of services in a workflow.

These services have a hierarchical structure with attributes inherited by lower classes of services. Between these services valid arcs exist if these attribute are equivalent (along with some other rules that are defined).

How best to represent these hierarchy of services? Is there a better method than just defining a relation for each service in which there are are series of terms that map to each possible service attribute?

i.e
assuming a hierarchicy of trees, that has the base attribute of color then a sub object with height and another sub object of tree that has leaf size. Instead of just having a relation structure containing (colour,height,leaf_size) for every tree instance even though only some of the instances will not require leaf_size.

Any thoughts from experience prolog junkies? I hope I have conveyed the circumstances sufficiently.

Thanks,

Nic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top