Graphical and Incremental Type Inference: A Graph Transformation Approach

  • Silvia Clerici
  • Cristina Zoltan
  • Guillermo Prestigiacomo
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6546)


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.


type inference graphical language process networks type visualization 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    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)CrossRefGoogle Scholar
  2. 2.
    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)Google Scholar
  3. 3.
    AGG: Agg home page (2009),
  4. 4.
    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)Google Scholar
  5. 5.
    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)Google Scholar
  6. 6.
    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)CrossRefGoogle Scholar
  7. 7.
    NiMo: Nimo home page (2010),
  8. 8.
    König, B.: A general framework for types in graph rewriting. Acta Inf. 42(4), 349–388 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
  10. 10.
    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),
  11. 11.
    Church Project: System I (2010),
  12. 12.
    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)Google Scholar
  13. 13.
    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)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Silvia Clerici
    • 1
  • Cristina Zoltan
    • 1
  • Guillermo Prestigiacomo
    • 1
  1. 1.Dept. Llenguatges i Sistemes InformàticsUniversitat Politècnica de CatalunyaBarcelonaSpain

Personalised recommendations