\documentclass[10pt,letterpaper]{article} %include polycode.fmt \usepackage[utf8]{inputenc} \usepackage{listings} \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small}}{} \author{Alexander Schaap} \title{Master Control Module} \begin{document} \maketitle Composes modules into architectures. \section{Thoughts on KWIC in General} \subsection{Incremental vs All-at-once transmission of data} \subsubsection{Implicit invocation} \begin{itemize} \item since storages notify on change, shifter and sorter (better name than alphabetizer, does not imply letters nor a strict order in which to sort) are called every time something is added by input \item this depends on the behaviour of input - if it only updates once, then it becomes like pipe and filter with storage inbetween, but this seems unlikely since input only makes use of the insert/add function/method, which could possibly be extended to insert ranges \end{itemize} \subsubsection{Pipe and Filter} \begin{itemize} \item since there is no storage (except possibly inside modules), it would seem more likely that everything is passed on all at once, but incrementally would be possible if the modules store data \item also depends on input, but since control is distributed, there is no way to let output know when to print and when not to in the case of incremental data \end{itemize} Input format is not specified - it could be incremental or all at once. \begin{code} {-# OPTIONS_GHC -Wall #-} --module MasterControl where import LineStorage import Word import Input (parse) import CircularShifter (shift) import Alphabetizer (sort_) import Output (print_) main :: IO () main = do sampleData <- parse "test.txt" :: IO (StorageMap (StorageMap WordString)) -- (StorageList (StorageList WordString)) let shifted = shift sampleData :: StorageMap (StorageMap (StorageMap WordString)) -- StorageList (StorageList (StorageList WordString)) sorted = sort_ shifted print_ sorted \end{code} \end{document}