% data structures
:- local struct(
	offset(
		value,
		sourcePoint
	)
).

:- local struct(
	point(
		name,
		offset
	)
).

% test data
point{
	name : testPoint,
	offset : offset{value : 9, sourcePoint : anotherPoint}
}.
point{
	name : anotherPoint
}.

% this predicate gives Offset and SourcePoint of a Point
pointValues(Point, Offset, SourcePoint) :-
	point{	name : Point,
			offset : offset{value : Offset, sourcePoint: SourcePoint}
	}
.

% call this to let ECLiPSe crash
% pointValues(testPoint, Offset, SourcePoint)
