Kazoo
Kazoo is a part of TASTE tool-chain.
Contents
Input files
- InterfaceView.aadl
- DeploymentView.aadl
- DataView.aadl
- DataView.asn
- DataView.acn
Internal representation of system
Taste uses Ocarina library to parse input aadl files. The internal representation of system consists of thre major structures:
- InterfaceView
- DeploymentView
- ConcurrencyView
The InterfaceView representation contains of list of functions. Every function contains provided interfaces and required interfaces. Optionally a function may contain context parameters. The InterfaceView representation contains also connections between provided interfaces and required interfaces. The InterfaceView representation is used to create skeletons and glue code.
The DeploymentView constists of Nodes, Buses and connections between them. The Node contains Partitions, Processors and Drivers. The Partition contains a list of bounded functions. The DeploymentView is not directly used for code generation.
The ConcurrencyView is generated from DeploymentView. The ConcurrencyView consists of list of Nodes. Every Node consists of list of Partitions and list of Drivers. Every Partition consists of list of Threads. Every Thread has a list of assigned functions from InterfaceView.
The ConcurrencyView is used for generation of rest of glue code and also middleware integration.
build-script.sh generation
The file build-script.sh is generated from build-script.tmplt. The template files: build-script-gen.tmplt, build-script-func.tmplt and build-script-zip.tmplt are evaluated earlier, and the output is passed to main template as parameters.
Code skeletons generation
Kazoo skeletons templates are processed according to the presented algorithm in pseudocode:
for every function from InterfaceView: for every subdirectory evaluate template trigger.tmplt if result is equal to “TRUE” then evaluate template function-filename.tmplt if exists evaluate template makefile-filename.tmplt if exists evaluate template interface.tmplt for required interfaces of function evaluate template interface.tmplt for provided interfaces of function evaluate template makefile.tmplt and optionally save output to file evaluate template function.tmplt and optionally save output to file if function has context parameters then evaluate template context_parameters.tmplt and save the output to file
Glue code generation
Kazoo glue templates are processed according to the presented algorithm in pseudocode: Algorithm in pseudocode:
for every function from InterfaceView: for every subdirectory evaluate template trigger.tmplt if result is equal to “TRUE” then evaluate template function-filename.tmplt if exists evaluate template makefile-filename.tmplt if exists evaluate template interface.tmplt for required interfaces of function evaluate template interface.tmplt for provided interfaces of function evaluate template makefile.tmplt and optionally save output to file evaluate template function.tmplt and optionally save output to file
Concurrency View generation
Kazoo concurrency view templates are processed according to the presented algorithm in pseudocode:
for every subdirectory for every node from ConcurrencyView evaluate template filesys.tmplt evaluate template filenode.tmplt evaluate template trigger.tmplt if result is equal to “TRUE” then for every partition from node: evaluate template filepart.tmplt evaluate template thread.tmplt and optionally save output to the file evaluate template filethread.tmplt evaluate template fileblock.tmplt evaluate template pi.tmplt evaluate template pi.tmplt (with other parameters) evaluate template ri.tmplt evaluate template block.tmplt and optionally save output to file evaluate template partition.tmplt and optionally save output to file evaluate template node.tmplt and optionally save output to file evaluate template system.tmplt and optionally save output to file