Kazunori Ueda
Department of Information and Computer Science
Waseda University
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.