AITEC Contract Research Projects in FY1995 : Software

(4) KL1 Programming Support System

Dr. Kazunori Ueda, Associate Professor, Waseda University


KL1 Programming Support Tools


by

Kazunori Ueda
Department of Information and Computer Science
Waseda University



[Features of the Software]

klint, a mode analyzer for KL1 programs, analyses the communication protocols (= modes) used by predicate arguments and variables in a KL1 program using the ideas described in [1]. Well-modedness roughly means that the communication protocols used in a program are cooperative.

Mode analysis statically detects many of the program errors which would otherwise be detected only at run time [3]. So it is highly recommended to write your KL1 programs in a well-moded manner. An introductory article on mode analysis can be found in [2].

klint infers the protocols of each predicate and outputs the results in the form of a mode graph. You don't have to provide mode declarations to benefit from the mode system. When the program is non-well-moded, the current system reports what symbols finally caused a mode error. The next version will diagnose the reason for mode errors using the technique described in [4].

The klint system consists of two parts: a mode constraint generator (klint1) and a mode constraint solver (klint2). The mode constraint generator generates the mode constraints syntactically imposed by a given KL1 program. The mode constraint solver tries to solve the set S of mode constraints by forming a mode graph [1] to see if S is consistent (satisfiable). The mode graph thus formed is regarded as expressing the 'principal' (i.e., most general) mode of the program.

References
[1] Ueda, K. and Morita, M., Moded Flat GHC and Its Message-Oriented Implementation Technique. New Generation Computing, Vol.13, No.1 (1994), pp.3-43.
[2] Ueda, K., I/O Mode Analysis in Concurrent Logic Programming. In Theory and Practice of Parallel Programming, LNCS 907, Springer, 1995, pp.356-368.
[3] Ueda, K., Experiences with Strong Moding in Concurrent Logic/Constraint Programming. In Proc. Int. Workshop on Parallel Symbolic Languages and Systems (PSLS'95), T. Ito, R.H. Halstead, Jr., and C. Queinnec (eds.), LNCS 1068, Springer, 1996, pp.134-153.
[4] Cho, K. and Ueda, K., Diagnosing Non-Well-Moded Concurrent Logic Programs. To be presented at 1996 Joint International Conference and Symposium on Logic Programming (JICSLP'96), Bonn, Germany, September 1996.

[Required Environment]

The programs "klint1" and "klint2" are totally written in KL1 and can be compiled using KLIC. Use Makefile to install them. The command "klint" is defined as a shellscript.

[File Configuration]

README
File to read first
Makefile
Make file
advertise.txt
Japanese, plain text version of this file
klint
Top level defined in the Bourne shell
klint1-main.kl1
klint2-main.kl1
constraints.kl1
decode.kl1
findpath.kl1
graph.kl1
normalize.kl1
numberbuiltin.kl1
outmessage.kl1
read_program.kl1
reduce.kl1
stdinout.kl1
unify.kl1
Source program modules for klint1 and klint2

[FTP]




www-admin@icot.or.jp