/* Subject 0440949. AI department, UvA. Assignment 4, knowledge systems: CSI
 * Andreas van Cranenburgh. Fri Nov  4 14:39:29 CET 2005.
 *
 * this is my first attempt at [somewhat] Literate Programming . . . (ie. first
 * document, then write code, documentation more important than code).
 *
 *	1. time and place, actors, actions and objects
 *
 * First we need a data representation. First thought:
 */
 
% event( Time, Place, [Subject, Action, Object] )
  
/* Coupled with the NOT operator (!), this makes it possible to do this: */

%event(lastnight, bed, [me, !sleeping, _).
%[but for now...]
event(time(sth), bed, [me, sleeping, _).
 
/* but we need to formalise more:
 *
 * - Time: represent as seconds since the epoch; with abstraction to human readable format */

time(23423.34).

% time(N, Str) :- N is /* een int */, rekenomStr(Str) --> 
%Fri Nov  4 14:44:53 CET 2005
%If possible, use libc's date functions. Either through prolog or through date(1).

/* better idea: purely represent strings, with relations for before, after and simultaneous; and special properties start and end */
time(event1, after(event2)).
time(event1, before(event2)).
time(event1, simultaneous(event2)).
time(event1, start(today(morning(nine)))).

/* - Place: represent as GPS? Add tree based structure for fine grained control over how much data we store: 
 * Example: */
 
%tree based view:
place(
	holland(
		amsterdam(
			nicolaasmaesstr(
				no93(
					basement(
						bed([3.2345, 4.23111, 4.5345] ) ) ) ) ) ) ).

%flat view:
place( holland( amsterdam( nicolaasmaesstr( no93(, basement( machineRoom([3.2343, 4.23112, 4.5341] ) ) ) ) ) ) ).

%[note to self: this is starting to look like LISP! Is that good or bad??]

/* - Subject: A list of property=value entries. Recognized properties: 
	- name		just a string, please quote this... no underscores allowed, period! :P
	- alias 	this property may occur multiple times?
	- fingerprint	contains data, dunno how I'd represent a fingerprint..
 * Example:
*/

subject([name='Andreas van Cranenburgh', alias='Secret Alias!', alias='Even More', fingerprint='032423569809823412039850123412349080']).


/* Action:
 *
 * matches an entry of pre-asserted values, which can be dynamically expanded
 * by asserting more. (eg. new forms of script-kiddie copycat crimes...)
 *
 * Example: */

action(foo).
action(bar).

%what other properties?

% is this the same?
object([name='Andreas van Cranenburgh', alias='Secret Alias!', alias='Even More', fingerprint='032423569809823412039850123412349080']).
