LTLL Linear and Temporal Logic Programming Language and its Compiler
LTLL is a logic programming language based on linear logic and on temporal logic too.
Main features of LTLL :
- Based on linear logic
-
Possible temporal logic model for certain problems
-
Arrays of facts
The compiler has been developed in operating system Windows (compiler has GUI).
Some example programs: (Source code is in two files - program (*.llp) and goal (*.llg))
- Knight's tour puzzle - program - goal
-
Knight's tour puzzle using temporal logic model - program - goal
Performance evaluation
Performance has been tested on five problems:
The first three problems have been programmed in three languages. The first language is LTLL. The second language is LLP. It is a linear logic language developed at Kobe University in Japan. Programs written in LLP have been executed by their LLPAM emulator. The third language is Prolog. SWI Prolog has been used for execution of programs.
Programs for the other two problems have been programmed in LTLL and Prolog. Programs written in LTLL use neither linear formulas nor temporal logic model. Programs in LLP has not been tested because language LLP is a superset of Prolog and programs not using linear formulas would be practically the same as the programs in Prolog.
All tests have been accomplished on a computer with processor 2.4 GHz Intel Core 2.
Knight's tour problem |
|||
Language |
Time (sec) |
Linear formulas |
Temporal logic model |
LTLL |
18 |
+ |
- |
LTLL |
4 |
+ |
+ |
LLP |
72 |
+ |
- |
Prolog |
541 |
- |
- |
Prolog (memberchk) |
359 |
- |
- |
The second program written in Prolog uses the predicate memberchk which is not part of ISO Prolog.
Hamiltonian cycle |
||||
Language |
1st graph (sec) |
2nd graph (sec) |
Linear formulas |
Temporal logic model |
LTLL |
21 |
36 |
+ |
- |
LTLL |
9 |
17 |
+ |
+ |
LLP |
35 |
63 |
+ |
- |
Prolog (memberchk) |
178 |
334 |
- |
- |
Dominating set |
||||
Language |
1st graph (sec) |
2nd graph (sec) |
Linear formulas |
Temporal logic model |
LTLL |
34 |
15 |
+ |
- |
LTLL |
5 |
2 |
+ |
+ |
LLP |
66 |
29 |
+ |
- |
Prolog (memberchk) |
421 |
197 |
- |
- |
Subset sum |
||
Language |
1st set (sec) |
2nd set (sec) |
LTLL |
82 |
31 |
Prolog |
345 |
135 |
Maximum capacity representatives |
||
Language |
1st set (sec) |
2nd set (sec) |
LTLL |
131 |
52 |
Prolog |
502 |
171 |
Arnost Vecerka 12 March, 2008