Efficient type inference and coercion in computer algebra
Computer algebra systems of the new generation, like Scratchpad, are characterized by a very rich type concept, which models the relationship between mathematical domains of computation. To use these systems interactively, however, the user should be freed of type information. A type inference mechanism determines the appropriate function to call. All known models which allow to define a semantics for type inference cannot express the rich “mathematical” type structure, so presently type inference is done heuristically. The following paper defines a semantics for a subproblem therof, namely coercion, which is based on rewrite rules. From this definition, an efficient coercion algorithm for Scratchpad is constructed using graph techniques.
Unable to display preview. Download preview PDF.
- Buchberger, B., Collins, G.E., and Loos, R., “Computer Algebra, Symbolic and Algebraic Computation”, Springer Verlag, 1982.Google Scholar
- Jenks, R.D., Sutor, R.S., and Watt, S.M., “Scratchpad II: An Abstract Datatype System for Mathematical Computation”, in: Proceedings Trends in Computer Algebra, Bad Neuenahr, LNCS 296, Springer Verlag, 1987.Google Scholar
- Comon, H., Lugiez, D., and Schnoebelen, P., “Type Inference in Computer Algebra”, Proceedings EUROCAL 87, Leipzig, 1987.Google Scholar
- Jenks, R.D. and Trager, B.M., “A Language for Computational Algebra”, Proceedings of SYMSAC 81, Symposium on Symbolic and Algebraic Manipulation, Snowbird, Utah, August 1981. Also SIGPLAN Notices, New York: Association for Computing Machinery, November 1981, and IBM Research Report RC 8930 (Yorktown Heights, New York).Google Scholar
- Sutor, R.S., and Jenks, R.D., “The Type Inference and Coercion Facilities in the Scratchpad II Interpreter”, Proceedings of the SIGPLAN 87 Symposium on Interpreters and Interpretive Techniques, SIGPLAN Notices 22, 7, New York: Association for Computing Machinery, July 87, and IBM Research Report RC 12595 (Yorktown Heights, New York).Google Scholar