Abstract
We show that overloading is NP-complete. This solves exercise 6.25 in the 1986 version of the Dragon book.
Keywords
- Constraint System
- 3SAT Problem
- Type Rule
- Type Inference
- Type Environment
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
This is a preview of subscription content, access via your institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Aho, A.V., Sethi, R.I., Ullman, J.D.: Compilers: Principles, Techniques, and Tools, 2nd edn. Addison-Wesley, Reading (1986)
Camarao, C., Figueiredo, L., Vasconcellos, C.: Constraint-set satisfiability for overloading. In: Proceedings of PPDP (2004)
Cardelli, L., Wegner, P.: On understanding types, data abstraction, and polymorphism. ACM Computing Surveys 17(4), 471–522 (1985)
Castagna, G., Ghelli, G., Longo, G.: A calculus for overloaded functions with subtyping. Information and Computation 117(1), 115–135 (1995)
Coppo, M., Dezani-Ciancaglini, M., Venneri, B.: Principal type schemes and lambda-calculus semantics. In: Seldin, J., Hindley, J. (eds.) To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, pp. 535–560. Academic Press (1980)
Garey, M.R., Johnson, D.S.: Computers and Intractability. Freeman (1979)
Gosling, J., Joy, B., Steele, G., Bracha, G.: Java Language Specification. 3rd edn. (2005), http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.4.9
Higham, D.J., Higham, N.J.: MATLAB Guide. 2nd edn. SIAM (2005)
Roger Hindley, J.: Types with intersection: An introduction. Formal Aspects of Computing 4, 470–486 (1991)
Kozen, D., Palsberg, J., Schwartzbach, M.I.: Efficient inference of partial types. Journal of Computer and System Sciences 49(2), 306–324 (1994); Preliminary version in Proceedings of FOCS 1992
Mathaikutty, D.A., Shukla, S.K.: Metamodeling-Driven IP Reuse for SoC Integration and Microprocessor Design. Artech House (2009)
MathWorks. Product documentation, matlab compiler (2011), http://www.mathworks.com/help/techdoc/matlab_prog/f2-38133.html
Paterson, M.S., Wegman, M.N.: Linear unification. Journal of Computer and System Sciences 16, 158–167 (1978)
Schaefer, T.J.: The complexity of satisfiability problems. In: Proceedings of the 10th Annual ACM Symposium on Theory of Computing (STOC 1995), pp. 216–226 (1978)
Smith, G.: Polymorphic Type Inference for Languages with Overloading and Subtyping. PhD thesis, Cornell University (1991)
Smith, G.S.: Principal type schemes for functional programs with overloading and subtyping. Science of Computer Programming 23, 197–226 (1994)
Vachharajani, M., Vachharajani, N., Malik, S., August, D.I.: Facilitating reuse in hardware models with enhanced type inference. In: Proceedings of IEEE/ACM/IFIP Second International Conference on Hardware/Software Codesign and System Synthesis (1994)
Volpano, D.: Haskell-style overloading is NP-hard. In: Proceedings of ICCL 1994, Fifth IEEE International Conference on Computer Languages, pp. 88–95 (May 1994)
Volpano, D.: Lower bounds on type checking overloading. Information Processing Letters 57, 9–14 (1996)
Volpano, D., Smith, G.: On the Complexity of ML Typability with Overloading. In: Hughes, J. (ed.) FPCA 1991. LNCS, vol. 523, pp. 15–28. Springer, Heidelberg (1991)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Palsberg, J. (2012). Overloading Is NP-Complete. In: Constable, R.L., Silva, A. (eds) Logic and Program Semantics. Lecture Notes in Computer Science, vol 7230. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-29485-3_13
Download citation
DOI: https://doi.org/10.1007/978-3-642-29485-3_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-29484-6
Online ISBN: 978-3-642-29485-3
eBook Packages: Computer ScienceComputer Science (R0)
