Datalog (DLV) question

From: <andrew_at_acooke.org>
Date: 24 Dec 2006 13:41:48 -0800
Message-ID: <1166996508.913034.249980_at_n51g2000cwc.googlegroups.com>



Hi,

I am a software engineer trying to describe a system of interacting services and the messages they send, in an attempt to better understand and improve the messaging.

I started by defining my system in SQL, but have problems due to the lack of recursion. Prolog seems rather complex, so I thought I might be best using Datalog. Via Wikipedia I found DLV.

However, I am now stuck. I hope this might be a suitable place to ask for help. I want to make sure that every "call" predicate (which describes a message being sent) has a first argument which is a process. I used:

:- call(P, _, _, _, _), not process(P, _).

as a strong constraint, but this is unsafe. Some example data:

application(des, "Data Entry Service").
application(fis, "File Information Service"). process(p_des, "Data enters the system"). method(fis, fis_regfile, "registerFileInformation"). call(p_des, des_fis_regfile, des, fis_regfile, "register new data").
return(p_des, des_fis_regfile).
follow(p_des, des_nmg_newname, des_fis_regfile).

which indicates that during process "p_des", a message (labelled des_fis_regfile) is sent from "des" (a service) to "fis_regfile" (a method on a service).

How do I express this constraint (I am worried that I have errors in my data and want to detect them)?

Am I crazy?! :o) Any help appreciated - I know some computing theory (mainly type theory related to functional programming), but have never used a completely declarative system before.

Thanks,
Andrew Received on Sun Dec 24 2006 - 22:41:48 CET

Original text of this message