A Functional Implementation of the Formal Template Language

There has been growing interest in using the Z notation to describe design patterns and to encourage model driven development, but these are often expressed in terms of instances, rather than in a more general form. Instead of relying on the interpretation of instances, the Formal Template Language...

Full description

Bibliographic Details
Main Author: Wu, N
Format: Report
Published: OUCL 2009
_version_ 1797086522452738048
author Wu, N
author_facet Wu, N
author_sort Wu, N
collection OXFORD
description There has been growing interest in using the Z notation to describe design patterns and to encourage model driven development, but these are often expressed in terms of instances, rather than in a more general form. Instead of relying on the interpretation of instances, the Formal Template Language (FTL) has been used with Z as a means of capturing patterns in a framework that generates code on instantiation, thereby allowing reuse at the level of modelling and verification in a formal way. Until now, the instantiation of these templates has been manual. We present an implementation of the FTL in Haskell that allows the automatic generation of sentences from templates and evaluation environments. Our implementation uses Haskell and Happy (a functional parser generator for Haskell) to generate a parser that performs semantic analysis on given templates within specific environments to produce instantiations. By construction our implementation is faithful to the FTL specification in Z, by exploiting the commonalities between this specification and Haskell itself.
first_indexed 2024-03-07T02:23:17Z
format Report
id oxford-uuid:a4b11f07-cfef-4134-b44a-de4a38d435d8
institution University of Oxford
last_indexed 2024-03-07T02:23:17Z
publishDate 2009
publisher OUCL
record_format dspace
spelling oxford-uuid:a4b11f07-cfef-4134-b44a-de4a38d435d82022-03-27T02:35:35ZA Functional Implementation of the Formal Template LanguageReporthttp://purl.org/coar/resource_type/c_93fcuuid:a4b11f07-cfef-4134-b44a-de4a38d435d8Department of Computer ScienceOUCL2009Wu, NThere has been growing interest in using the Z notation to describe design patterns and to encourage model driven development, but these are often expressed in terms of instances, rather than in a more general form. Instead of relying on the interpretation of instances, the Formal Template Language (FTL) has been used with Z as a means of capturing patterns in a framework that generates code on instantiation, thereby allowing reuse at the level of modelling and verification in a formal way. Until now, the instantiation of these templates has been manual. We present an implementation of the FTL in Haskell that allows the automatic generation of sentences from templates and evaluation environments. Our implementation uses Haskell and Happy (a functional parser generator for Haskell) to generate a parser that performs semantic analysis on given templates within specific environments to produce instantiations. By construction our implementation is faithful to the FTL specification in Z, by exploiting the commonalities between this specification and Haskell itself.
spellingShingle Wu, N
A Functional Implementation of the Formal Template Language
title A Functional Implementation of the Formal Template Language
title_full A Functional Implementation of the Formal Template Language
title_fullStr A Functional Implementation of the Formal Template Language
title_full_unstemmed A Functional Implementation of the Formal Template Language
title_short A Functional Implementation of the Formal Template Language
title_sort functional implementation of the formal template language
work_keys_str_mv AT wun afunctionalimplementationoftheformaltemplatelanguage
AT wun functionalimplementationoftheformaltemplatelanguage