Abstract
We present a graph grammar based type inference system for a totally graphic development language. NiMo (Nets in Motion) can be seen as a graphic equivalent to Haskell that acts as an on-line tracer and debugger. Programs are process networks that evolve giving total visibility of the execution state, and can be interactively completed, changed or stored at any step. In such a context, type inference must be incremental. During the net construction or modification only type safe connections are allowed. The user visualizes the type information evolution and, in case of conflict, can easily identify the causes. Though based on the same ideas, the type inference system has significant differences with its analogues in functional languages. Process types are a non-trivial generalization of functional types to handle multiple outputs, partial application in any order, and curried-uncurried coercion. Here we present the elements to model graphical inference, the notion of structural and non-structural equivalence of type graphs, and a graph unification and composition calculus for typing nets in an incremental way.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Turner, D.A.: Miranda: a non-strict functional language with polymorphic types. In: Jouannaud, J.-P. (ed.) FPCA 1985. LNCS, vol. 201, pp. 1–16. Springer, Heidelberg (1985)
Clerici, S., Zoltan, C.: A graphic functional-dataflow language. In: Loidl, H.W. (ed.) Trends in Functional Programming. Intellect, vol. 5, pp. 129–144 (2004)
AGG: Agg home page (2009), http://user.cs.tu-berlin.de/~gragra/agg/
Clerici, S., Zoltan, C.: A dynamically customizable process-centered evaluation model. In: PPDP 2009: Proceedings of the 11th ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, pp. 37–48. ACM, New York (2009)
Clerici, S., Zoltan, C.: Graphical type inference. a graph grammar definition. Technical Report LSI-07-24-R, Dept. Llenguatges i Sistemes Informàtics, Universitat Politècnica de Catalunya (July 2007)
Clerici, S., Zoltan, C., Prestigiacomo, G.: Nimotoons: a totally graphic workbench for program tuning and experimentation. Electr. Notes Theor. Comput. Sci. 258(1), 93–107 (2009)
NiMo: Nimo home page (2010), http://www.lsi.upc.edu/~nimo/Project
König, B.: A general framework for types in graph rewriting. Acta Inf. 42(4), 349–388 (2005)
Resources (2009), http://resources.businessobjects.com/labs/cal/gemcutter-techpaper.pdf
Simões, H., Florido, M.: TypeTool - a type inference visualization tool. In: Proceedings of the 13th International Workshop on Functional and (Constraint) Logic Programming (2004), http://www.dcc.fc.up.pt/typetool/cgi-bin/tt.pl
Church Project: System I (2010), http://types.bu.edu/modular/compositional/system-i/
Yang, J., Michaelson, G., Trinder, P., Wells, J.B.: Improved Type Error Reporting. In: Proceedings of 12th International Workshop on Implementation of Functional Languages, pp. 71–86 (2000)
McAdam, B.J.: Generalising techniques for type debugging. In: Trinder, P.W., Michaelson, G., Loidl, H.W. (eds.) Scottish Functional Programming Workshop. Trends in Functional Programming, Intellect, vol. 1, pp. 50–58 (1999)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Clerici, S., Zoltan, C., Prestigiacomo, G. (2011). Graphical and Incremental Type Inference: A Graph Transformation Approach. In: Page, R., Horváth, Z., Zsók, V. (eds) Trends in Functional Programming. TFP 2010. Lecture Notes in Computer Science, vol 6546. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22941-1_5
Download citation
DOI: https://doi.org/10.1007/978-3-642-22941-1_5
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-22940-4
Online ISBN: 978-3-642-22941-1
eBook Packages: Computer ScienceComputer Science (R0)