Abstract

Reference types are very useful structures enabling handling with dynamic memory. In this paper we extend categorical model of type system with reference data type. We illustrate our approach on simple functional programming language T-NBL extended with reference type. After constructing parametric algebraic specification we construct categorical model of reference type and we show how our results can be implemented in functional programming language Ocaml.

Highlights

  • Production rule: Programming languages deal with various data structures that can be classified and identified by their types

  • We extend known algebraic specification of this language by reference type and its operational specifications together with new equational axioms

  • We extend the syntax of Typed Number-Boolean Language (T-NBL) with reference type and its operations

Read more

Summary

Introduction

Production rule: Programming languages deal with various data structures that can be classified and identified by their types. Operations over reference type enable to allocate some memory space for data, to extract (dereference) data stored in this location and to write (assign) a new value to a referenced location. We extend known algebraic specification of this language by reference type and its operational specifications together with new equational axioms. We construct a model of this algebraic specification as a category of type representations where we concern mostly on modeling reference type operations. We note that this simple language has no variables, numerical values can be expressed only by using finite number of applications succ and/or pred operations.

Results
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call