A framework to enable object oriented programming in Prolog, with a focus on fast execution time and ease of use.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
example/shape
library
README

README

README for lojeme
================================================================================
Description

This is a framework to enable object oriented programming in Prolog. The focus
is on fast execution time and ease of use. Objects are implemented in a
parametric style. Currently only SWI Prolog is supported.

lojeme is
LOgic
obJEct
paraMEtrics

================================================================================
Try It Out

> cd example/shape
> swipl

?- [load].
%  library(lojeme) compiled 0.00 sec, 15,848 bytes
%  line_segment compiled 0.00 sec, 4,224 bytes
%  square compiled 0.01 sec, 4,480 bytes
%  cube compiled 0.00 sec, 4,712 bytes
% load compiled 0.01 sec, 32,544 bytes
true.

?- square.new(S, 10, red), S.color(Color), S.area(Area).
S = square(line_segment(10, red), red),
Color = red,
Area = 100 .

?- cube.new(C, 10), C.set_color(red), C.volume(Volume).
C = cube(line_segment(10, green), red),
Volume = 1000 .

================================================================================
Status

This project is currently EXPERIMENTAL, many things may change in future
updates.

================================================================================
License

For licensing details, see individual file headers.
Licensed under the Apache License, Version 2.0.