diff --git a/.github/workflows/codacy.yml b/.github/workflows/codacy.yml
new file mode 100644
index 000000000..7a846cc0f
--- /dev/null
+++ b/.github/workflows/codacy.yml
@@ -0,0 +1,60 @@
+# This workflow uses actions that are not certified by GitHub.
+# They are provided by a third-party and are governed by
+# separate terms of service, privacy policy, and support
+# documentation.
+
+# This workflow checks out code, performs a Codacy security scan
+# and integrates the results with the
+# GitHub Advanced Security code scanning feature. For more information on
+# the Codacy security scan action usage and parameters, see
+# https://github.com/codacy/codacy-analysis-cli-action.
+# For more information on Codacy Analysis CLI in general, see
+# https://github.com/codacy/codacy-analysis-cli.
+
+name: Codacy Security Scan
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ master ]
+ schedule:
+ - cron: '36 4 * * 2'
+
+permissions:
+ contents: read
+
+jobs:
+ codacy-security-scan:
+ permissions:
+ contents: read # for actions/checkout to fetch code
+ security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
+ name: Codacy Security Scan
+ runs-on: ubuntu-latest
+ steps:
+ # Checkout the repository to the GitHub Actions runner
+ - name: Checkout code
+ uses: actions/checkout@v3
+
+ # Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
+ - name: Run Codacy Analysis CLI
+ uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
+ with:
+ # Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
+ # You can also omit the token and run the tools that support default configurations
+ project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
+ verbose: true
+ output: results.sarif
+ format: sarif
+ # Adjust severity of non-security issues
+ gh-code-scanning-compat: true
+ # Force 0 exit code to allow SARIF file generation
+ # This will handover control about PR rejection to the GitHub side
+ max-allowed-issues: 2147483647
+
+ # Upload the SARIF file generated in the previous step
+ - name: Upload SARIF results file
+ uses: github/codeql-action/upload-sarif@v2
+ with:
+ sarif_file: results.sarif
diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml
new file mode 100644
index 000000000..18ba13f88
--- /dev/null
+++ b/.github/workflows/greetings.yml
@@ -0,0 +1,16 @@
+name: Greetings
+
+on: [pull_request_target, issues]
+
+jobs:
+ greeting:
+ runs-on: ubuntu-latest
+ permissions:
+ issues: write
+ pull-requests: write
+ steps:
+ - uses: actions/first-interaction@v1
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ issue-message: 'Message that will be displayed on users first issue'
+ pr-message: 'Message that will be displayed on users first pull request'
diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml
new file mode 100644
index 000000000..25f7fa6b3
--- /dev/null
+++ b/.github/workflows/haskell.yml
@@ -0,0 +1,43 @@
+name: Haskell CI
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-haskell@v1
+ with:
+ ghc-version: '8.10.3'
+ cabal-version: '3.2'
+
+ - name: Cache
+ uses: actions/cache@v3
+ env:
+ cache-name: cache-cabal
+ with:
+ path: ~/.cabal
+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
+ restore-keys: |
+ ${{ runner.os }}-build-${{ env.cache-name }}-
+ ${{ runner.os }}-build-
+ ${{ runner.os }}-
+
+ - name: Install dependencies
+ run: |
+ cabal update
+ cabal build --only-dependencies --enable-tests --enable-benchmarks
+ - name: Build
+ run: cabal build --enable-tests --enable-benchmarks all
+ - name: Run tests
+ run: cabal test all
diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml
new file mode 100644
index 000000000..5732d6d59
--- /dev/null
+++ b/.github/workflows/jekyll.yml
@@ -0,0 +1,20 @@
+name: Jekyll site CI
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Build the site in the jekyll/builder container
+ run: |
+ docker run \
+ -v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
+ jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml
new file mode 100644
index 000000000..a8a1bd725
--- /dev/null
+++ b/.github/workflows/label.yml
@@ -0,0 +1,22 @@
+# This workflow will triage pull requests and apply a label based on the
+# paths that are modified in the pull request.
+#
+# To use this workflow, you will need to set up a .github/labeler.yml
+# file with configuration. For more information, see:
+# https://github.com/actions/labeler
+
+name: Labeler
+on: [pull_request]
+
+jobs:
+ label:
+
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ pull-requests: write
+
+ steps:
+ - uses: actions/labeler@v4
+ with:
+ repo-token: "${{ secrets.GITHUB_TOKEN }}"
diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml
new file mode 100644
index 000000000..47f24e11f
--- /dev/null
+++ b/.github/workflows/manual.yml
@@ -0,0 +1,30 @@
+# This is a basic workflow that is manually triggered
+
+name: Manual workflow
+
+# Controls when the action will run. Workflow runs when manually triggered using the UI
+# or API.
+on:
+ workflow_dispatch:
+ # Inputs the workflow accepts.
+ inputs:
+ name:
+ # Friendly description to be shown in the UI instead of 'name'
+ description: 'Person to greet'
+ # Default value if no value is explicitly provided
+ default: 'World'
+ # Input has to be provided for the workflow to run
+ required: true
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+ # This workflow contains a single job called "greet"
+ greet:
+ # The type of runner that the job will run on
+ runs-on: ubuntu-latest
+
+ # Steps represent a sequence of tasks that will be executed as part of the job
+ steps:
+ # Runs a single command using the runners shell
+ - name: Send greeting
+ run: echo "Hello ${{ github.event.inputs.name }}"
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
new file mode 100644
index 000000000..51f7955b6
--- /dev/null
+++ b/.github/workflows/stale.yml
@@ -0,0 +1,30 @@
+# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
+#
+# You can adjust the behavior by modifying this file.
+# For more information, see:
+# https://github.com/actions/stale
+name: Mark stale issues and pull requests
+
+on:
+ schedule:
+ - cron: '37 8 * * *'
+
+jobs:
+ stale:
+
+ runs-on: ubuntu-latest
+ permissions:
+ issues: write
+ pull-requests: write
+
+ steps:
+ - uses: actions/stale@v5
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ days-before-stale: 365
+ days-before-close: 365
+ stale-issue-message: 'Stale issue message'
+ stale-pr-message: 'Stale pull request message'
+ stale-issue-label: 'no-issue-activity'
+ stale-pr-label: 'no-pr-activity'
+ operations-per-run: 1
diff --git a/.output/actual/bf/eval/logged/tree/Int16Type/99botles.logged b/.output/actual/bf/eval/logged/tree/Int16Type/99botles.logged
index c562a1386..d1180fbc0 100644
--- a/.output/actual/bf/eval/logged/tree/Int16Type/99botles.logged
+++ b/.output/actual/bf/eval/logged/tree/Int16Type/99botles.logged
@@ -13,19 +13,19 @@ dump: Unit
, [ <+++++++++++>- ]
, <
,
- [ > [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] > [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.>>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>>>++++ [ <++++++>- ] <--.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++++ [ <---------->- ] <-.---.>+++++++ [ <++++++++++>- ] <++++.+++++++++++++.++++++++++.------.>+++++++ [ <---------->- ] <+.>++++++++ [ <++++++++++>- ] <-.-.---------.>+++++++ [ <---------->- ] <+.>+++++++ [ <++++++++++>- ] <--.+++++++++++.++++++++.---------.>++++++++ [ <---------->- ] <++.>+++++ [ <+++++++++++++>- ] <.+++++++++++++.----------.>+++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <.>+++ [ <----->- ] <.>+++ [ <++++++>- ] <..>+++++++++ [ <--------->- ] <--.>+++++++ [ <++++++++++>- ] <+++.+++++++++++.>++++++++ [ <----------->- ] <++++.>+++++ [ <+++++++++++++>- ] <.>+++ [ <++++++>- ] <-.---.++++++.-------.----------.>++++++++ [ <----------->- ] <+.---. [ - ] <<<-> [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>>++++[ <++++++>- ]<--.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++++[ <---------->- ]<-.---.>+++++++[ <++++++++++>- ]<++++.+++++++++++++.++++++++++.------.>+++++++[ <---------->- ]<+.>++++++++[ <++++++++++>- ]<-.-.---------.>+++++++[ <---------->- ]<+.>+++++++[ <++++++++++>- ]<--.+++++++++++.++++++++.---------.>++++++++[ <---------->- ]<++.>+++++[ <+++++++++++++>- ]<.+++++++++++++.----------.>+++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<.>+++[ <----->- ]<.>+++[ <++++++>- ]<..>+++++++++[ <--------->- ]<--.>+++++++[ <++++++++++>- ]<+++.+++++++++++.>++++++++[ <----------->- ]<++++.>+++++[ <+++++++++++++>- ]<.>+++[ <++++++>- ]<-.---.++++++.-------.----------.>++++++++[ <----------->- ]<+.---.[ - ]<<<->[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] <>> [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.+++.---. [ - ] <<<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<>>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.+++.---.[ - ]<<<
]
] 14
, unitTape =
diff --git a/.output/actual/bf/eval/logged/tree/Int16Type/fascistHelloWorld.logged b/.output/actual/bf/eval/logged/tree/Int16Type/fascistHelloWorld.logged
index b997657fb..20377a10f 100644
--- a/.output/actual/bf/eval/logged/tree/Int16Type/fascistHelloWorld.logged
+++ b/.output/actual/bf/eval/logged/tree/Int16Type/fascistHelloWorld.logged
@@ -28,7 +28,7 @@ dump: Unit
, +
, +
,
- [ > [ ->+++<<+++> ] << ]
+ [ >[ ->+++<<+++> ]<< ]
, >
, -
, -
@@ -55,7 +55,7 @@ dump: Unit
, <
, +
,
- [ > [ +>+ ] >> ]
+ [ >[ +>+ ]>> ]
, <
, -
, -
diff --git a/.output/actual/bf/eval/logged/tree/Int16Type/helloWorld.logged b/.output/actual/bf/eval/logged/tree/Int16Type/helloWorld.logged
index b0e55304f..a5491570c 100644
--- a/.output/actual/bf/eval/logged/tree/Int16Type/helloWorld.logged
+++ b/.output/actual/bf/eval/logged/tree/Int16Type/helloWorld.logged
@@ -9,7 +9,7 @@ dump: Unit
, +
, +
,
- [ >++++ [ >++>+++>+++>+<<<<- ] >+>+>->>+ [ < ] <- ]
+ [ >++++[ >++>+++>+++>+<<<<- ]>+>+>->>+[ < ]<- ]
, >
, >
, .
diff --git a/.output/actual/bf/eval/logged/tree/Int16Type/triangle.logged b/.output/actual/bf/eval/logged/tree/Int16Type/triangle.logged
index 17b1b2373..2639c54c6 100644
--- a/.output/actual/bf/eval/logged/tree/Int16Type/triangle.logged
+++ b/.output/actual/bf/eval/logged/tree/Int16Type/triangle.logged
@@ -40,13 +40,13 @@ dump: Unit
, <
, <
,
- [ - [ ->+< ] > [ -<+>>>.<< ] >>>
+ [ -[ ->+< ]>[ -<+>>>.<< ]>>>
[
- [ ->++++++++ [ >++++<- ] >.<< [ ->+< ] +> [ ->++++++++++<<+> ] >. [ - ] > ]
- ] +<<<
- [ - [ ->+< ] +>
- [ -<+>>>- [ ->+< ] ++> [ -<-> ] <<< ] <<<<
- ] ++++++++++.+++. [ - ] <
+ [ ->++++++++[ >++++<- ]>.<<[ ->+< ]+>[ ->++++++++++<<+> ]>.[ - ]> ]
+ ]+<<<
+ [ -[ ->+< ]+>
+ [ -<+>>>-[ ->+< ]++>[ -<-> ]<<< ]<<<<
+ ]++++++++++.+++.[ - ]<
]
, +
, +
diff --git a/.output/actual/bf/eval/logged/tree/Int8Type/99botles.logged b/.output/actual/bf/eval/logged/tree/Int8Type/99botles.logged
index c562a1386..d1180fbc0 100644
--- a/.output/actual/bf/eval/logged/tree/Int8Type/99botles.logged
+++ b/.output/actual/bf/eval/logged/tree/Int8Type/99botles.logged
@@ -13,19 +13,19 @@ dump: Unit
, [ <+++++++++++>- ]
, <
,
- [ > [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] > [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.>>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>>>++++ [ <++++++>- ] <--.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++++ [ <---------->- ] <-.---.>+++++++ [ <++++++++++>- ] <++++.+++++++++++++.++++++++++.------.>+++++++ [ <---------->- ] <+.>++++++++ [ <++++++++++>- ] <-.-.---------.>+++++++ [ <---------->- ] <+.>+++++++ [ <++++++++++>- ] <--.+++++++++++.++++++++.---------.>++++++++ [ <---------->- ] <++.>+++++ [ <+++++++++++++>- ] <.+++++++++++++.----------.>+++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <.>+++ [ <----->- ] <.>+++ [ <++++++>- ] <..>+++++++++ [ <--------->- ] <--.>+++++++ [ <++++++++++>- ] <+++.+++++++++++.>++++++++ [ <----------->- ] <++++.>+++++ [ <+++++++++++++>- ] <.>+++ [ <++++++>- ] <-.---.++++++.-------.----------.>++++++++ [ <----------->- ] <+.---. [ - ] <<<-> [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>>++++[ <++++++>- ]<--.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++++[ <---------->- ]<-.---.>+++++++[ <++++++++++>- ]<++++.+++++++++++++.++++++++++.------.>+++++++[ <---------->- ]<+.>++++++++[ <++++++++++>- ]<-.-.---------.>+++++++[ <---------->- ]<+.>+++++++[ <++++++++++>- ]<--.+++++++++++.++++++++.---------.>++++++++[ <---------->- ]<++.>+++++[ <+++++++++++++>- ]<.+++++++++++++.----------.>+++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<.>+++[ <----->- ]<.>+++[ <++++++>- ]<..>+++++++++[ <--------->- ]<--.>+++++++[ <++++++++++>- ]<+++.+++++++++++.>++++++++[ <----------->- ]<++++.>+++++[ <+++++++++++++>- ]<.>+++[ <++++++>- ]<-.---.++++++.-------.----------.>++++++++[ <----------->- ]<+.---.[ - ]<<<->[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] <>> [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.+++.---. [ - ] <<<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<>>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.+++.---.[ - ]<<<
]
] 14
, unitTape =
diff --git a/.output/actual/bf/eval/logged/tree/Int8Type/fascistHelloWorld.logged b/.output/actual/bf/eval/logged/tree/Int8Type/fascistHelloWorld.logged
index b997657fb..20377a10f 100644
--- a/.output/actual/bf/eval/logged/tree/Int8Type/fascistHelloWorld.logged
+++ b/.output/actual/bf/eval/logged/tree/Int8Type/fascistHelloWorld.logged
@@ -28,7 +28,7 @@ dump: Unit
, +
, +
,
- [ > [ ->+++<<+++> ] << ]
+ [ >[ ->+++<<+++> ]<< ]
, >
, -
, -
@@ -55,7 +55,7 @@ dump: Unit
, <
, +
,
- [ > [ +>+ ] >> ]
+ [ >[ +>+ ]>> ]
, <
, -
, -
diff --git a/.output/actual/bf/eval/logged/tree/Int8Type/fibonacci.logged b/.output/actual/bf/eval/logged/tree/Int8Type/fibonacci.logged
index 2f9af11ef..91b73fe52 100644
--- a/.output/actual/bf/eval/logged/tree/Int8Type/fibonacci.logged
+++ b/.output/actual/bf/eval/logged/tree/Int8Type/fibonacci.logged
@@ -104,17 +104,17 @@ dump: Unit
, <
, <
,
- [ > [ >>>>>>+>+<<<<<<<- ] >>>>>>> [ <<<<<<<+>>>>>>>- ] <
+ [ >[ >>>>>>+>+<<<<<<<- ]>>>>>>>[ <<<<<<<+>>>>>>>- ]<
[ >++++++++++
- [ -<- [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ << [ >>>+<<<- ] >> [ - ] ] <<
- ] >>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ <<+>> [ - ] ] <<<<<<<
- ] >>>>>
- [ ++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] ] ++++++++++< [ ->-< ] >++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] <<<<<<<<<<<< [ >>>+>+<<<<- ] >>>> [ <<<<+>>>>- ] <-
- [ >>.>.<<< [ - ] ] << [ >>+>+<<<- ] >>> [ <<<+>>>- ] << [ <+>- ] > [ <+>- ] <<<-
+ [ -<-[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<[ >>>+<<<- ]>>[ - ] ]<<
+ ]>>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<+>>[ - ] ]<<<<<<<
+ ]>>>>>
+ [ ++++++++++++++++++++++++++++++++++++++++++++++++.[ - ] ]++++++++++<[ ->-< ]>++++++++++++++++++++++++++++++++++++++++++++++++.[ - ]<<<<<<<<<<<<[ >>>+>+<<<<- ]>>>>[ <<<<+>>>>- ]<-
+ [ >>.>.<<<[ - ] ]<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<<[ <+>- ]>[ <+>- ]<<<-
]
, +
, +
@@ -217,17 +217,17 @@ dump: Unit
, <
, <
,
- [ > [ >>>>>>+>+<<<<<<<- ] >>>>>>> [ <<<<<<<+>>>>>>>- ] <
+ [ >[ >>>>>>+>+<<<<<<<- ]>>>>>>>[ <<<<<<<+>>>>>>>- ]<
[ >++++++++++
- [ -<- [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ << [ >>>+<<<- ] >> [ - ] ] <<
- ] >>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ <<+>> [ - ] ] <<<<<<<
- ] >>>>>
- [ ++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] ] ++++++++++< [ ->-< ] >++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] <<<<<<<<<<<< [ >>>+>+<<<<- ] >>>> [ <<<<+>>>>- ] <-
- [ >>.>.<<< [ - ] ] << [ >>+>+<<<- ] >>> [ <<<+>>>- ] << [ <+>- ] > [ <+>- ] <<<-
+ [ -<-[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<[ >>>+<<<- ]>>[ - ] ]<<
+ ]>>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<+>>[ - ] ]<<<<<<<
+ ]>>>>>
+ [ ++++++++++++++++++++++++++++++++++++++++++++++++.[ - ] ]++++++++++<[ ->-< ]>++++++++++++++++++++++++++++++++++++++++++++++++.[ - ]<<<<<<<<<<<<[ >>>+>+<<<<- ]>>>>[ <<<<+>>>>- ]<-
+ [ >>.>.<<<[ - ] ]<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<<[ <+>- ]>[ <+>- ]<<<-
]
] 209
, unitTape =
diff --git a/.output/actual/bf/eval/logged/tree/Int8Type/helloWorld.logged b/.output/actual/bf/eval/logged/tree/Int8Type/helloWorld.logged
index b0e55304f..a5491570c 100644
--- a/.output/actual/bf/eval/logged/tree/Int8Type/helloWorld.logged
+++ b/.output/actual/bf/eval/logged/tree/Int8Type/helloWorld.logged
@@ -9,7 +9,7 @@ dump: Unit
, +
, +
,
- [ >++++ [ >++>+++>+++>+<<<<- ] >+>+>->>+ [ < ] <- ]
+ [ >++++[ >++>+++>+++>+<<<<- ]>+>+>->>+[ < ]<- ]
, >
, >
, .
diff --git a/.output/actual/bf/eval/logged/tree/Int8Type/padHelloWorld.logged b/.output/actual/bf/eval/logged/tree/Int8Type/padHelloWorld.logged
index fef92cb5c..6b942abb4 100644
--- a/.output/actual/bf/eval/logged/tree/Int8Type/padHelloWorld.logged
+++ b/.output/actual/bf/eval/logged/tree/Int8Type/padHelloWorld.logged
@@ -8,7 +8,7 @@ dump: Unit
, <
, +
,
- [ + [ <+>--->->->-<<< ] > ]
+ [ +[ <+>--->->->-<<< ]> ]
, <
, <
, -
@@ -69,7 +69,7 @@ dump: Unit
, 0
, 0
, 87
- , - 74
+ , -74
, 0
]
,
@@ -77,216 +77,216 @@ dump: Unit
, 114
, 44
, 7
- , - 126
- , - 9
+ , -126
+ , -9
, 115
, 17
- , - 104
- , - 1
+ , -104
+ , -1
, 55
, 3
- , - 54
- , - 113
- , - 97
+ , -54
+ , -113
+ , -97
, 117
, 64
, 111
- , - 13
- , - 33
- , - 30
+ , -13
+ , -33
+ , -30
, 103
, 27
- , - 39
- , - 40
- , - 1
- , - 97
- , - 37
- , - 118
- , - 65
+ , -39
+ , -40
+ , -1
+ , -97
+ , -37
+ , -118
+ , -65
, 39
, 125
, 32
- , - 17
+ , -17
, 123
, 55
- , - 126
- , - 41
+ , -126
+ , -41
, 3
- , - 95
- , - 40
+ , -95
+ , -40
, 127
- , - 57
+ , -57
, 51
- , - 118
- , - 17
- , - 17
- , - 123
- , - 64
- , - 17
- , - 61
+ , -118
+ , -17
+ , -17
+ , -123
+ , -64
+ , -17
+ , -61
, 15
, 98
, 71
, 43
, 105
- , - 104
+ , -104
, 127
- , - 81
+ , -81
, 11
- , - 54
+ , -54
, 31
- , - 9
- , - 115
+ , -9
+ , -115
, 32
, 111
- , - 53
+ , -53
, 103
- , - 126
- , - 73
- , - 109
+ , -126
+ , -73
+ , -109
, 49
, 24
- , - 1
+ , -1
, 87
, 99
, 74
, 79
, 63
- , - 107
+ , -107
, 64
, 111
- , - 109
+ , -109
, 63
- , - 30
+ , -30
, 39
, 59
- , - 7
+ , -7
, 88
- , - 1
- , - 65
+ , -1
+ , -65
, 59
, 10
, 127
- , - 57
- , - 99
+ , -57
+ , -99
, 32
- , - 17
+ , -17
, 27
- , - 105
- , - 126
- , - 105
+ , -105
+ , -126
+ , -105
, 35
- , - 63
+ , -63
, 88
, 127
- , - 25
- , - 109
+ , -25
+ , -109
, 10
- , - 81
- , - 113
- , - 91
- , - 64
- , - 17
+ , -81
+ , -113
+ , -91
+ , -64
+ , -17
, 99
, 111
, 98
, 7
, 75
- , - 119
+ , -119
, 24
, 127
- , - 49
+ , -49
, 107
, 74
- , - 33
- , - 105
- , - 83
+ , -33
+ , -105
+ , -83
, 32
, 111
, 107
- , - 57
- , - 126
+ , -57
+ , -126
, 119
- , - 77
+ , -77
, 81
- , - 104
- , - 1
+ , -104
+ , -1
, 119
- , - 61
- , - 54
+ , -61
+ , -54
, 15
- , - 33
- , - 75
+ , -33
+ , -75
, 64
, 111
, 51
- , - 97
- , - 30
- , - 25
+ , -97
+ , -30
+ , -25
, 91
, 25
- , - 40
- , - 1
- , - 33
- , - 101
- , - 118
+ , -40
+ , -1
+ , -33
+ , -101
+ , -118
, 63
, 103
- , - 67
+ , -67
, 32
- , - 17
- , - 69
- , - 9
- , - 126
+ , -17
+ , -69
+ , -9
+ , -126
, 87
, 67
- , - 31
- , - 40
+ , -31
+ , -40
, 127
, 7
- , - 13
- , - 118
+ , -13
+ , -118
, 111
, 47
- , - 59
- , - 64
- , - 17
+ , -59
+ , -64
+ , -17
, 3
- , - 49
+ , -49
, 98
- , - 57
+ , -57
, 107
- , - 87
- , - 104
+ , -87
+ , -104
, 127
- , - 17
- , - 53
- , - 54
- , - 97
+ , -17
+ , -53
+ , -54
+ , -97
, 55
- , - 51
+ , -51
, 32
, 111
, 11
, 39
- , - 126
+ , -126
, 55
- , - 45
+ , -45
, 113
, 24
- , - 1
- , - 105
+ , -1
+ , -105
, 35
, 74
- , - 49
+ , -49
, 127
- , - 43
+ , -43
, 64
, 111
- , - 45
- , - 1
- , - 30
- , - 89
+ , -45
+ , -1
+ , -30
+ , -89
, 123
, 57
, 86
diff --git a/.output/actual/bf/eval/logged/tree/Int8Type/theShortestHelloWorld.logged b/.output/actual/bf/eval/logged/tree/Int8Type/theShortestHelloWorld.logged
index 79b087918..2f621c8f9 100644
--- a/.output/actual/bf/eval/logged/tree/Int8Type/theShortestHelloWorld.logged
+++ b/.output/actual/bf/eval/logged/tree/Int8Type/theShortestHelloWorld.logged
@@ -2,7 +2,7 @@ dump: Unit
{ unitUI = IU
[ +
,
- [ -->- [ >>+>-----<< ] <--<--- ]
+ [ -->-[ >>+>-----<< ]<--<--- ]
, >
, -
, .
@@ -56,9 +56,9 @@ dump: Unit
[ 33
, 44
, 108
- , - 84
+ , -84
, 100
- , - 103
+ , -103
, 0
, 72
, 0
diff --git a/.output/actual/bf/eval/logged/tree/Int8Type/triangle.logged b/.output/actual/bf/eval/logged/tree/Int8Type/triangle.logged
index 17b1b2373..2639c54c6 100644
--- a/.output/actual/bf/eval/logged/tree/Int8Type/triangle.logged
+++ b/.output/actual/bf/eval/logged/tree/Int8Type/triangle.logged
@@ -40,13 +40,13 @@ dump: Unit
, <
, <
,
- [ - [ ->+< ] > [ -<+>>>.<< ] >>>
+ [ -[ ->+< ]>[ -<+>>>.<< ]>>>
[
- [ ->++++++++ [ >++++<- ] >.<< [ ->+< ] +> [ ->++++++++++<<+> ] >. [ - ] > ]
- ] +<<<
- [ - [ ->+< ] +>
- [ -<+>>>- [ ->+< ] ++> [ -<-> ] <<< ] <<<<
- ] ++++++++++.+++. [ - ] <
+ [ ->++++++++[ >++++<- ]>.<<[ ->+< ]+>[ ->++++++++++<<+> ]>.[ - ]> ]
+ ]+<<<
+ [ -[ ->+< ]+>
+ [ -<+>>>-[ ->+< ]++>[ -<-> ]<<< ]<<<<
+ ]++++++++++.+++.[ - ]<
]
, +
, +
diff --git a/.output/actual/bf/eval/logged/tree/Int8Type/value256.logged b/.output/actual/bf/eval/logged/tree/Int8Type/value256.logged
index 6e9e468ea..b692c3a42 100644
--- a/.output/actual/bf/eval/logged/tree/Int8Type/value256.logged
+++ b/.output/actual/bf/eval/logged/tree/Int8Type/value256.logged
@@ -14,13 +14,13 @@ dump: Unit
, +
, <
,
- [ >-< [ >++++<- ] > [ <++++++++>- ] < [ >++++++++<- ] +>
- [ >++++++++++ [ >+++++<- ] >+.-. [ - ] << [ - ] <-> ] <
- [ >>+++++++ [ >+++++++<- ] >.+++++. [ - ] <<<- ]
+ [ >-<[ >++++<- ]>[ <++++++++>- ]<[ >++++++++<- ]+>
+ [ >++++++++++[ >+++++<- ]>+.-.[ - ]<<[ - ]<-> ]<
+ [ >>+++++++[ >+++++++<- ]>.+++++.[ - ]<<<- ]
]
, >
,
- [ >++++++++ [ >+++++++<- ] >. [ - ] <<- ]
+ [ >++++++++[ >+++++++<- ]>.[ - ]<<- ]
, <
, +
, +
@@ -85,7 +85,7 @@ dump: Unit
, -
, .
,
- [ [ - ] < ]
+ [ [ - ]< ]
] 81
, unitTape =
(
diff --git a/.output/actual/bf/eval/logged/tree/Word16Type/99botles.logged b/.output/actual/bf/eval/logged/tree/Word16Type/99botles.logged
index c562a1386..d1180fbc0 100644
--- a/.output/actual/bf/eval/logged/tree/Word16Type/99botles.logged
+++ b/.output/actual/bf/eval/logged/tree/Word16Type/99botles.logged
@@ -13,19 +13,19 @@ dump: Unit
, [ <+++++++++++>- ]
, <
,
- [ > [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] > [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.>>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>>>++++ [ <++++++>- ] <--.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++++ [ <---------->- ] <-.---.>+++++++ [ <++++++++++>- ] <++++.+++++++++++++.++++++++++.------.>+++++++ [ <---------->- ] <+.>++++++++ [ <++++++++++>- ] <-.-.---------.>+++++++ [ <---------->- ] <+.>+++++++ [ <++++++++++>- ] <--.+++++++++++.++++++++.---------.>++++++++ [ <---------->- ] <++.>+++++ [ <+++++++++++++>- ] <.+++++++++++++.----------.>+++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <.>+++ [ <----->- ] <.>+++ [ <++++++>- ] <..>+++++++++ [ <--------->- ] <--.>+++++++ [ <++++++++++>- ] <+++.+++++++++++.>++++++++ [ <----------->- ] <++++.>+++++ [ <+++++++++++++>- ] <.>+++ [ <++++++>- ] <-.---.++++++.-------.----------.>++++++++ [ <----------->- ] <+.---. [ - ] <<<-> [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>>++++[ <++++++>- ]<--.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++++[ <---------->- ]<-.---.>+++++++[ <++++++++++>- ]<++++.+++++++++++++.++++++++++.------.>+++++++[ <---------->- ]<+.>++++++++[ <++++++++++>- ]<-.-.---------.>+++++++[ <---------->- ]<+.>+++++++[ <++++++++++>- ]<--.+++++++++++.++++++++.---------.>++++++++[ <---------->- ]<++.>+++++[ <+++++++++++++>- ]<.+++++++++++++.----------.>+++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<.>+++[ <----->- ]<.>+++[ <++++++>- ]<..>+++++++++[ <--------->- ]<--.>+++++++[ <++++++++++>- ]<+++.+++++++++++.>++++++++[ <----------->- ]<++++.>+++++[ <+++++++++++++>- ]<.>+++[ <++++++>- ]<-.---.++++++.-------.----------.>++++++++[ <----------->- ]<+.---.[ - ]<<<->[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] <>> [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.+++.---. [ - ] <<<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<>>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.+++.---.[ - ]<<<
]
] 14
, unitTape =
diff --git a/.output/actual/bf/eval/logged/tree/Word16Type/fascistHelloWorld.logged b/.output/actual/bf/eval/logged/tree/Word16Type/fascistHelloWorld.logged
index b997657fb..20377a10f 100644
--- a/.output/actual/bf/eval/logged/tree/Word16Type/fascistHelloWorld.logged
+++ b/.output/actual/bf/eval/logged/tree/Word16Type/fascistHelloWorld.logged
@@ -28,7 +28,7 @@ dump: Unit
, +
, +
,
- [ > [ ->+++<<+++> ] << ]
+ [ >[ ->+++<<+++> ]<< ]
, >
, -
, -
@@ -55,7 +55,7 @@ dump: Unit
, <
, +
,
- [ > [ +>+ ] >> ]
+ [ >[ +>+ ]>> ]
, <
, -
, -
diff --git a/.output/actual/bf/eval/logged/tree/Word16Type/helloWorld.logged b/.output/actual/bf/eval/logged/tree/Word16Type/helloWorld.logged
index b0e55304f..a5491570c 100644
--- a/.output/actual/bf/eval/logged/tree/Word16Type/helloWorld.logged
+++ b/.output/actual/bf/eval/logged/tree/Word16Type/helloWorld.logged
@@ -9,7 +9,7 @@ dump: Unit
, +
, +
,
- [ >++++ [ >++>+++>+++>+<<<<- ] >+>+>->>+ [ < ] <- ]
+ [ >++++[ >++>+++>+++>+<<<<- ]>+>+>->>+[ < ]<- ]
, >
, >
, .
diff --git a/.output/actual/bf/eval/logged/tree/Word16Type/triangle.logged b/.output/actual/bf/eval/logged/tree/Word16Type/triangle.logged
index 17b1b2373..2639c54c6 100644
--- a/.output/actual/bf/eval/logged/tree/Word16Type/triangle.logged
+++ b/.output/actual/bf/eval/logged/tree/Word16Type/triangle.logged
@@ -40,13 +40,13 @@ dump: Unit
, <
, <
,
- [ - [ ->+< ] > [ -<+>>>.<< ] >>>
+ [ -[ ->+< ]>[ -<+>>>.<< ]>>>
[
- [ ->++++++++ [ >++++<- ] >.<< [ ->+< ] +> [ ->++++++++++<<+> ] >. [ - ] > ]
- ] +<<<
- [ - [ ->+< ] +>
- [ -<+>>>- [ ->+< ] ++> [ -<-> ] <<< ] <<<<
- ] ++++++++++.+++. [ - ] <
+ [ ->++++++++[ >++++<- ]>.<<[ ->+< ]+>[ ->++++++++++<<+> ]>.[ - ]> ]
+ ]+<<<
+ [ -[ ->+< ]+>
+ [ -<+>>>-[ ->+< ]++>[ -<-> ]<<< ]<<<<
+ ]++++++++++.+++.[ - ]<
]
, +
, +
diff --git a/.output/actual/bf/eval/logged/tree/Word8Type/99botles.logged b/.output/actual/bf/eval/logged/tree/Word8Type/99botles.logged
index c562a1386..d1180fbc0 100644
--- a/.output/actual/bf/eval/logged/tree/Word8Type/99botles.logged
+++ b/.output/actual/bf/eval/logged/tree/Word8Type/99botles.logged
@@ -13,19 +13,19 @@ dump: Unit
, [ <+++++++++++>- ]
, <
,
- [ > [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] > [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.>>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>>>++++ [ <++++++>- ] <--.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++++ [ <---------->- ] <-.---.>+++++++ [ <++++++++++>- ] <++++.+++++++++++++.++++++++++.------.>+++++++ [ <---------->- ] <+.>++++++++ [ <++++++++++>- ] <-.-.---------.>+++++++ [ <---------->- ] <+.>+++++++ [ <++++++++++>- ] <--.+++++++++++.++++++++.---------.>++++++++ [ <---------->- ] <++.>+++++ [ <+++++++++++++>- ] <.+++++++++++++.----------.>+++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <.>+++ [ <----->- ] <.>+++ [ <++++++>- ] <..>+++++++++ [ <--------->- ] <--.>+++++++ [ <++++++++++>- ] <+++.+++++++++++.>++++++++ [ <----------->- ] <++++.>+++++ [ <+++++++++++++>- ] <.>+++ [ <++++++>- ] <-.---.++++++.-------.----------.>++++++++ [ <----------->- ] <+.---. [ - ] <<<-> [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>>++++[ <++++++>- ]<--.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++++[ <---------->- ]<-.---.>+++++++[ <++++++++++>- ]<++++.+++++++++++++.++++++++++.------.>+++++++[ <---------->- ]<+.>++++++++[ <++++++++++>- ]<-.-.---------.>+++++++[ <---------->- ]<+.>+++++++[ <++++++++++>- ]<--.+++++++++++.++++++++.---------.>++++++++[ <---------->- ]<++.>+++++[ <+++++++++++++>- ]<.+++++++++++++.----------.>+++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<.>+++[ <----->- ]<.>+++[ <++++++>- ]<..>+++++++++[ <--------->- ]<--.>+++++++[ <++++++++++>- ]<+++.+++++++++++.>++++++++[ <----------->- ]<++++.>+++++[ <+++++++++++++>- ]<.>+++[ <++++++>- ]<-.---.++++++.-------.----------.>++++++++[ <----------->- ]<+.---.[ - ]<<<->[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] <>> [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.+++.---. [ - ] <<<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<>>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.+++.---.[ - ]<<<
]
] 14
, unitTape =
diff --git a/.output/actual/bf/eval/logged/tree/Word8Type/fascistHelloWorld.logged b/.output/actual/bf/eval/logged/tree/Word8Type/fascistHelloWorld.logged
index b997657fb..20377a10f 100644
--- a/.output/actual/bf/eval/logged/tree/Word8Type/fascistHelloWorld.logged
+++ b/.output/actual/bf/eval/logged/tree/Word8Type/fascistHelloWorld.logged
@@ -28,7 +28,7 @@ dump: Unit
, +
, +
,
- [ > [ ->+++<<+++> ] << ]
+ [ >[ ->+++<<+++> ]<< ]
, >
, -
, -
@@ -55,7 +55,7 @@ dump: Unit
, <
, +
,
- [ > [ +>+ ] >> ]
+ [ >[ +>+ ]>> ]
, <
, -
, -
diff --git a/.output/actual/bf/eval/logged/tree/Word8Type/fibonacci.logged b/.output/actual/bf/eval/logged/tree/Word8Type/fibonacci.logged
index 2f9af11ef..91b73fe52 100644
--- a/.output/actual/bf/eval/logged/tree/Word8Type/fibonacci.logged
+++ b/.output/actual/bf/eval/logged/tree/Word8Type/fibonacci.logged
@@ -104,17 +104,17 @@ dump: Unit
, <
, <
,
- [ > [ >>>>>>+>+<<<<<<<- ] >>>>>>> [ <<<<<<<+>>>>>>>- ] <
+ [ >[ >>>>>>+>+<<<<<<<- ]>>>>>>>[ <<<<<<<+>>>>>>>- ]<
[ >++++++++++
- [ -<- [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ << [ >>>+<<<- ] >> [ - ] ] <<
- ] >>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ <<+>> [ - ] ] <<<<<<<
- ] >>>>>
- [ ++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] ] ++++++++++< [ ->-< ] >++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] <<<<<<<<<<<< [ >>>+>+<<<<- ] >>>> [ <<<<+>>>>- ] <-
- [ >>.>.<<< [ - ] ] << [ >>+>+<<<- ] >>> [ <<<+>>>- ] << [ <+>- ] > [ <+>- ] <<<-
+ [ -<-[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<[ >>>+<<<- ]>>[ - ] ]<<
+ ]>>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<+>>[ - ] ]<<<<<<<
+ ]>>>>>
+ [ ++++++++++++++++++++++++++++++++++++++++++++++++.[ - ] ]++++++++++<[ ->-< ]>++++++++++++++++++++++++++++++++++++++++++++++++.[ - ]<<<<<<<<<<<<[ >>>+>+<<<<- ]>>>>[ <<<<+>>>>- ]<-
+ [ >>.>.<<<[ - ] ]<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<<[ <+>- ]>[ <+>- ]<<<-
]
, +
, +
@@ -217,17 +217,17 @@ dump: Unit
, <
, <
,
- [ > [ >>>>>>+>+<<<<<<<- ] >>>>>>> [ <<<<<<<+>>>>>>>- ] <
+ [ >[ >>>>>>+>+<<<<<<<- ]>>>>>>>[ <<<<<<<+>>>>>>>- ]<
[ >++++++++++
- [ -<- [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ << [ >>>+<<<- ] >> [ - ] ] <<
- ] >>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ <<+>> [ - ] ] <<<<<<<
- ] >>>>>
- [ ++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] ] ++++++++++< [ ->-< ] >++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] <<<<<<<<<<<< [ >>>+>+<<<<- ] >>>> [ <<<<+>>>>- ] <-
- [ >>.>.<<< [ - ] ] << [ >>+>+<<<- ] >>> [ <<<+>>>- ] << [ <+>- ] > [ <+>- ] <<<-
+ [ -<-[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<[ >>>+<<<- ]>>[ - ] ]<<
+ ]>>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<+>>[ - ] ]<<<<<<<
+ ]>>>>>
+ [ ++++++++++++++++++++++++++++++++++++++++++++++++.[ - ] ]++++++++++<[ ->-< ]>++++++++++++++++++++++++++++++++++++++++++++++++.[ - ]<<<<<<<<<<<<[ >>>+>+<<<<- ]>>>>[ <<<<+>>>>- ]<-
+ [ >>.>.<<<[ - ] ]<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<<[ <+>- ]>[ <+>- ]<<<-
]
] 209
, unitTape =
diff --git a/.output/actual/bf/eval/logged/tree/Word8Type/helloWorld.logged b/.output/actual/bf/eval/logged/tree/Word8Type/helloWorld.logged
index b0e55304f..a5491570c 100644
--- a/.output/actual/bf/eval/logged/tree/Word8Type/helloWorld.logged
+++ b/.output/actual/bf/eval/logged/tree/Word8Type/helloWorld.logged
@@ -9,7 +9,7 @@ dump: Unit
, +
, +
,
- [ >++++ [ >++>+++>+++>+<<<<- ] >+>+>->>+ [ < ] <- ]
+ [ >++++[ >++>+++>+++>+<<<<- ]>+>+>->>+[ < ]<- ]
, >
, >
, .
diff --git a/.output/actual/bf/eval/logged/tree/Word8Type/padHelloWorld.logged b/.output/actual/bf/eval/logged/tree/Word8Type/padHelloWorld.logged
index 514bd5bd0..28677a5cd 100644
--- a/.output/actual/bf/eval/logged/tree/Word8Type/padHelloWorld.logged
+++ b/.output/actual/bf/eval/logged/tree/Word8Type/padHelloWorld.logged
@@ -8,7 +8,7 @@ dump: Unit
, <
, +
,
- [ + [ <+>--->->->-<<< ] > ]
+ [ +[ <+>--->->->-<<< ]> ]
, <
, <
, -
diff --git a/.output/actual/bf/eval/logged/tree/Word8Type/theShortestHelloWorld.logged b/.output/actual/bf/eval/logged/tree/Word8Type/theShortestHelloWorld.logged
index cbe627633..dc354e6b2 100644
--- a/.output/actual/bf/eval/logged/tree/Word8Type/theShortestHelloWorld.logged
+++ b/.output/actual/bf/eval/logged/tree/Word8Type/theShortestHelloWorld.logged
@@ -2,7 +2,7 @@ dump: Unit
{ unitUI = IU
[ +
,
- [ -->- [ >>+>-----<< ] <--<--- ]
+ [ -->-[ >>+>-----<< ]<--<--- ]
, >
, -
, .
diff --git a/.output/actual/bf/eval/logged/tree/Word8Type/triangle.logged b/.output/actual/bf/eval/logged/tree/Word8Type/triangle.logged
index 17b1b2373..2639c54c6 100644
--- a/.output/actual/bf/eval/logged/tree/Word8Type/triangle.logged
+++ b/.output/actual/bf/eval/logged/tree/Word8Type/triangle.logged
@@ -40,13 +40,13 @@ dump: Unit
, <
, <
,
- [ - [ ->+< ] > [ -<+>>>.<< ] >>>
+ [ -[ ->+< ]>[ -<+>>>.<< ]>>>
[
- [ ->++++++++ [ >++++<- ] >.<< [ ->+< ] +> [ ->++++++++++<<+> ] >. [ - ] > ]
- ] +<<<
- [ - [ ->+< ] +>
- [ -<+>>>- [ ->+< ] ++> [ -<-> ] <<< ] <<<<
- ] ++++++++++.+++. [ - ] <
+ [ ->++++++++[ >++++<- ]>.<<[ ->+< ]+>[ ->++++++++++<<+> ]>.[ - ]> ]
+ ]+<<<
+ [ -[ ->+< ]+>
+ [ -<+>>>-[ ->+< ]++>[ -<-> ]<<< ]<<<<
+ ]++++++++++.+++.[ - ]<
]
, +
, +
diff --git a/.output/actual/bf/eval/logged/tree/Word8Type/value256.logged b/.output/actual/bf/eval/logged/tree/Word8Type/value256.logged
index 6e9e468ea..b692c3a42 100644
--- a/.output/actual/bf/eval/logged/tree/Word8Type/value256.logged
+++ b/.output/actual/bf/eval/logged/tree/Word8Type/value256.logged
@@ -14,13 +14,13 @@ dump: Unit
, +
, <
,
- [ >-< [ >++++<- ] > [ <++++++++>- ] < [ >++++++++<- ] +>
- [ >++++++++++ [ >+++++<- ] >+.-. [ - ] << [ - ] <-> ] <
- [ >>+++++++ [ >+++++++<- ] >.+++++. [ - ] <<<- ]
+ [ >-<[ >++++<- ]>[ <++++++++>- ]<[ >++++++++<- ]+>
+ [ >++++++++++[ >+++++<- ]>+.-.[ - ]<<[ - ]<-> ]<
+ [ >>+++++++[ >+++++++<- ]>.+++++.[ - ]<<<- ]
]
, >
,
- [ >++++++++ [ >+++++++<- ] >. [ - ] <<- ]
+ [ >++++++++[ >+++++++<- ]>.[ - ]<<- ]
, <
, +
, +
@@ -85,7 +85,7 @@ dump: Unit
, -
, .
,
- [ [ - ] < ]
+ [ [ - ]< ]
] 81
, unitTape =
(
diff --git a/.output/actual/sq/eval/logged/esolangs/helloWorld.logged b/.output/actual/sq/eval/logged/esolangs/helloWorld.logged
index 953788ee0..b866e5a24 100644
--- a/.output/actual/sq/eval/logged/esolangs/helloWorld.logged
+++ b/.output/actual/sq/eval/logged/esolangs/helloWorld.logged
@@ -1,5 +1,5 @@
dump: Unit
- { unitIU = - 1
+ { unitIU = -1
, unitRAM =
[ 12
, 12
@@ -14,7 +14,7 @@ dump: Unit
, 37
, 12
, 0
- , - 1
+ , -1
, 15
, 38
, 36
@@ -33,13 +33,13 @@ dump: Unit
, 30
, 36
, 12
- , - 1
+ , -1
, 37
, 37
, 0
, 53
, 0
- , - 1
+ , -1
, 72
, 101
, 108
diff --git a/.output/actual/sq/eval/logged/hello.logged b/.output/actual/sq/eval/logged/hello.logged
index e1c8ab42f..de835a2da 100644
--- a/.output/actual/sq/eval/logged/hello.logged
+++ b/.output/actual/sq/eval/logged/hello.logged
@@ -1,23 +1,23 @@
dump: Unit
- { unitIU = - 1
+ { unitIU = -1
, unitRAM =
[ 15
, 31
- , - 1
+ , -1
, 31
- , - 1
- , - 1
+ , -1
+ , -1
, 16
, 1
- , - 1
+ , -1
, 16
, 3
- , - 1
+ , -1
, 15
, 15
, 0
, 0
- , - 1
+ , -1
, 72
, 101
, 108
diff --git a/.output/actual/sq/eval/logged/longHello.logged b/.output/actual/sq/eval/logged/longHello.logged
index e1c8ab42f..de835a2da 100644
--- a/.output/actual/sq/eval/logged/longHello.logged
+++ b/.output/actual/sq/eval/logged/longHello.logged
@@ -1,23 +1,23 @@
dump: Unit
- { unitIU = - 1
+ { unitIU = -1
, unitRAM =
[ 15
, 31
- , - 1
+ , -1
, 31
- , - 1
- , - 1
+ , -1
+ , -1
, 16
, 1
- , - 1
+ , -1
, 16
, 3
- , - 1
+ , -1
, 15
, 15
, 0
, 0
- , - 1
+ , -1
, 72
, 101
, 108
diff --git a/.output/actual/sq/eval/logged/mazonka/factorial.logged b/.output/actual/sq/eval/logged/mazonka/factorial.logged
index 10b4c2571..91442e7b7 100644
--- a/.output/actual/sq/eval/logged/mazonka/factorial.logged
+++ b/.output/actual/sq/eval/logged/mazonka/factorial.logged
@@ -1,5 +1,5 @@
dump: Unit
- { unitIU = - 1
+ { unitIU = -1
, unitRAM =
[ 0
, 0
@@ -2887,7 +2887,7 @@ dump: Unit
, 8865
, 2885
, 8865
- , - 1
+ , -1
, 2888
, 8870
, 8870
@@ -3016,7 +3016,7 @@ dump: Unit
, 8867
, 3020
, 8851
- , - 1
+ , -1
, 3017
, 8870
, 8870
@@ -3223,7 +3223,7 @@ dump: Unit
, 8865
, 3221
, 8865
- , - 1
+ , -1
, 3224
, 8870
, 8870
@@ -5618,7 +5618,7 @@ dump: Unit
, 8864
, 5616
, 8864
- , - 1
+ , -1
, 5619
, 8870
, 8870
@@ -6020,7 +6020,7 @@ dump: Unit
, 8865
, 6160
, 8853
- , - 1
+ , -1
, 6021
, 8864
, 8864
@@ -6337,7 +6337,7 @@ dump: Unit
, 8870
, 6347
, 8854
- , - 1
+ , -1
, 6338
, 8872
, 8872
@@ -8653,7 +8653,7 @@ dump: Unit
, 8864
, 8651
, 8864
- , - 1
+ , -1
, 8654
, 8864
, 8864
@@ -8841,10 +8841,10 @@ dump: Unit
, 8838
, 8870
, 8870
- , - 1
- , - 2
- , - 3
- , - 4
+ , -1
+ , -2
+ , -3
+ , -4
, 0
, 10
, 100
@@ -8870,223 +8870,223 @@ dump: Unit
, 0
, 0
, 0
- , - 1
+ , -1
, 0
, 1
- , - 13
+ , -13
, 0
- , - 8874
- , - 8835
+ , -8874
+ , -8835
, 0
, 0
, 479001600
, 8861
- , - 763
- , - 8876
+ , -763
+ , -8876
, 13
, 1
- , - 479001600
+ , -479001600
, 0
, 0
, 0
, 479001600
- , - 3814
- , - 8881
- , - 479001600
+ , -3814
+ , -8881
+ , -479001600
, 479001600
, 1
- , - 8878
+ , -8878
, 479001600
- , - 6317
- , - 8890
+ , -6317
+ , -8890
, 8
, 0
, 479001600
- , - 8888
- , - 479001600
+ , -8888
+ , -479001600
, 47900160
- , - 8537
- , - 8897
+ , -8537
+ , -8897
, 7
, 0
, 47900160
- , - 8898
- , - 47900160
+ , -8898
+ , -47900160
, 4790016
- , - 8537
- , - 8905
+ , -8537
+ , -8905
, 6
, 6
, 4790016
- , - 8906
- , - 4790016
+ , -8906
+ , -4790016
, 479001
- , - 8537
- , - 8913
+ , -8537
+ , -8913
, 5
, 1
, 479001
- , - 8914
- , - 479001
+ , -8914
+ , -479001
, 47900
- , - 8537
- , - 8921
+ , -8537
+ , -8921
, 4
, 0
, 47900
- , - 8922
- , - 47900
+ , -8922
+ , -47900
, 4790
- , - 8537
- , - 8929
+ , -8537
+ , -8929
, 3
, 0
, 4790
- , - 8930
- , - 4790
+ , -8930
+ , -4790
, 479
- , - 8537
- , - 8937
+ , -8537
+ , -8937
, 2
, 9
, 479
- , - 8938
- , - 479
+ , -8938
+ , -479
, 47
- , - 8537
- , - 8945
+ , -8537
+ , -8945
, 1
, 7
, 47
- , - 8946
- , - 47
+ , -8946
+ , -47
, 4
- , - 8537
- , - 8953
+ , -8537
+ , -8953
, 0
, 4
, 4
- , - 8954
- , - 4
+ , -8954
+ , -4
, 0
- , - 8537
- , - 8961
- , - 8377
- , - 8961
+ , -8537
+ , -8961
+ , -8377
+ , -8961
, 0
- , - 8962
+ , -8962
, 0
, 7
- , - 8959
+ , -8959
, 4
- , - 4
- , - 479001600
+ , -4
+ , -479001600
, 0
, 79
, 40
- , - 7
- , - 4
- , - 47
- , - 40
+ , -7
+ , -4
+ , -47
+ , -40
, 4
, 80
- , - 79
- , - 8
- , - 159
- , - 80
+ , -79
+ , -8
+ , -159
+ , -80
, 8947
, 10
, 39
- , - 7875
- , - 8983
+ , -7875
+ , -8983
, 40
, 4
, 20
, 2
, 40
- , - 39
- , - 4
- , - 79
- , - 40
+ , -39
+ , -4
+ , -79
+ , -40
, 8947
, 10
, 19
- , - 7875
- , - 8997
+ , -7875
+ , -8997
, 20
, 2
, 10
, 1
, 20
- , - 19
- , - 2
- , - 39
- , - 20
+ , -19
+ , -2
+ , -39
+ , -20
, 8947
, 10
, 9
- , - 7875
- , - 9011
- , - 80
+ , -7875
+ , -9011
+ , -80
, 8939
, 10
, 30
, 10
- , - 9
- , - 1
- , - 19
- , - 10
+ , -9
+ , -1
+ , -19
+ , -10
, 2
, 40
- , - 30
- , - 4
- , - 70
- , - 40
+ , -30
+ , -4
+ , -70
+ , -40
, 8939
, 10
, 10
- , - 7875
- , - 9031
+ , -7875
+ , -9031
, 20
, 2
, 10
, 1
, 20
- , - 10
- , - 2
- , - 30
- , - 20
+ , -10
+ , -2
+ , -30
+ , -20
, 8939
, 10
, 0
- , - 7875
- , - 9045
+ , -7875
+ , -9045
, 10
, 16
, 40
- , - 1
+ , -1
, 10
, 0
- , - 1
- , - 10
- , - 10
- , - 16
- , - 8
- , - 96
- , - 80
+ , -1
+ , -10
+ , -10
+ , -16
+ , -8
+ , -96
+ , -80
, 8915
, 10
, 6
- , - 7875
- , - 9063
+ , -7875
+ , -9063
, 0
, 0
, 0
, 0
, 10
- , - 6
- , - 1
- , - 16
- , - 10
+ , -6
+ , -1
+ , -16
+ , -10
]
}
diff --git a/.output/actual/sq/eval/logged/mazonka/helloWorld.logged b/.output/actual/sq/eval/logged/mazonka/helloWorld.logged
index 953788ee0..b866e5a24 100644
--- a/.output/actual/sq/eval/logged/mazonka/helloWorld.logged
+++ b/.output/actual/sq/eval/logged/mazonka/helloWorld.logged
@@ -1,5 +1,5 @@
dump: Unit
- { unitIU = - 1
+ { unitIU = -1
, unitRAM =
[ 12
, 12
@@ -14,7 +14,7 @@ dump: Unit
, 37
, 12
, 0
- , - 1
+ , -1
, 15
, 38
, 36
@@ -33,13 +33,13 @@ dump: Unit
, 30
, 36
, 12
- , - 1
+ , -1
, 37
, 37
, 0
, 53
, 0
- , - 1
+ , -1
, 72
, 101
, 108
diff --git a/.output/actual/sq/eval/logged/mazonka/hi.logged b/.output/actual/sq/eval/logged/mazonka/hi.logged
index f06a96fc8..4167effe6 100644
--- a/.output/actual/sq/eval/logged/mazonka/hi.logged
+++ b/.output/actual/sq/eval/logged/mazonka/hi.logged
@@ -1,15 +1,15 @@
dump: Unit
- { unitIU = - 1
+ { unitIU = -1
, unitRAM =
[ 0
- , - 1
+ , -1
, 3
, 10
- , - 1
+ , -1
, 6
, 0
, 0
- , - 1
+ , -1
, 72
, 105
]
diff --git "a/.output/actual/ws/eval/logged/stn/asciiOff/original/calc-1\n.logged" "b/.output/actual/ws/eval/logged/stn/asciiOff/original/calc-1\n.logged"
index 39178b0e9..c181b45e4 100644
--- "a/.output/actual/ws/eval/logged/stn/asciiOff/original/calc-1\n.logged"
+++ "b/.output/actual/ws/eval/logged/stn/asciiOff/original/calc-1\n.logged"
@@ -307,7 +307,7 @@ dump: Unit
, IAL Dup
, IAL
( Cons
- ( - 1 )
+ ( -1 )
)
, IAL ( Binary Sub )
, IControl
@@ -502,6 +502,6 @@ dump: Unit
, 0
, 0
, 0
- , - 1
+ , -1
]
}
diff --git "a/.output/actual/ws/eval/logged/stn/asciiOn/original/calc-1\n.logged" "b/.output/actual/ws/eval/logged/stn/asciiOn/original/calc-1\n.logged"
index 25a1fee0d..7e55fbefc 100644
--- "a/.output/actual/ws/eval/logged/stn/asciiOn/original/calc-1\n.logged"
+++ "b/.output/actual/ws/eval/logged/stn/asciiOn/original/calc-1\n.logged"
@@ -307,7 +307,7 @@ dump: Unit
, IAL Dup
, IAL
( Cons
- ( - 1 )
+ ( -1 )
)
, IAL ( Binary Sub )
, IControl
@@ -502,6 +502,6 @@ dump: Unit
, 0
, 0
, 0
- , - 1
+ , -1
]
}
diff --git "a/.output/actual/ws/eval/logged/ws/asciiOff/original/calc-1\n.logged" "b/.output/actual/ws/eval/logged/ws/asciiOff/original/calc-1\n.logged"
index 39178b0e9..c181b45e4 100644
--- "a/.output/actual/ws/eval/logged/ws/asciiOff/original/calc-1\n.logged"
+++ "b/.output/actual/ws/eval/logged/ws/asciiOff/original/calc-1\n.logged"
@@ -307,7 +307,7 @@ dump: Unit
, IAL Dup
, IAL
( Cons
- ( - 1 )
+ ( -1 )
)
, IAL ( Binary Sub )
, IControl
@@ -502,6 +502,6 @@ dump: Unit
, 0
, 0
, 0
- , - 1
+ , -1
]
}
diff --git "a/.output/actual/ws/eval/logged/ws/asciiOn/original/calc-1\n.logged" "b/.output/actual/ws/eval/logged/ws/asciiOn/original/calc-1\n.logged"
index 25a1fee0d..7e55fbefc 100644
--- "a/.output/actual/ws/eval/logged/ws/asciiOn/original/calc-1\n.logged"
+++ "b/.output/actual/ws/eval/logged/ws/asciiOn/original/calc-1\n.logged"
@@ -307,7 +307,7 @@ dump: Unit
, IAL Dup
, IAL
( Cons
- ( - 1 )
+ ( -1 )
)
, IAL ( Binary Sub )
, IControl
@@ -502,6 +502,6 @@ dump: Unit
, 0
, 0
, 0
- , - 1
+ , -1
]
}
diff --git a/.output/actual/ws/il/original/calc.il b/.output/actual/ws/il/original/calc.il
index 8d899f03e..98e7e427b 100644
--- a/.output/actual/ws/il/original/calc.il
+++ b/.output/actual/ws/il/original/calc.il
@@ -304,7 +304,7 @@
, IAL Dup
, IAL
( Cons
- ( - 1 )
+ ( -1 )
)
, IAL ( Binary Sub )
, IControl
diff --git a/.output/golden/bf/eval/logged/tree/Int16Type/99botles.logged b/.output/golden/bf/eval/logged/tree/Int16Type/99botles.logged
index c562a1386..d1180fbc0 100644
--- a/.output/golden/bf/eval/logged/tree/Int16Type/99botles.logged
+++ b/.output/golden/bf/eval/logged/tree/Int16Type/99botles.logged
@@ -13,19 +13,19 @@ dump: Unit
, [ <+++++++++++>- ]
, <
,
- [ > [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] > [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.>>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>>>++++ [ <++++++>- ] <--.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++++ [ <---------->- ] <-.---.>+++++++ [ <++++++++++>- ] <++++.+++++++++++++.++++++++++.------.>+++++++ [ <---------->- ] <+.>++++++++ [ <++++++++++>- ] <-.-.---------.>+++++++ [ <---------->- ] <+.>+++++++ [ <++++++++++>- ] <--.+++++++++++.++++++++.---------.>++++++++ [ <---------->- ] <++.>+++++ [ <+++++++++++++>- ] <.+++++++++++++.----------.>+++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <.>+++ [ <----->- ] <.>+++ [ <++++++>- ] <..>+++++++++ [ <--------->- ] <--.>+++++++ [ <++++++++++>- ] <+++.+++++++++++.>++++++++ [ <----------->- ] <++++.>+++++ [ <+++++++++++++>- ] <.>+++ [ <++++++>- ] <-.---.++++++.-------.----------.>++++++++ [ <----------->- ] <+.---. [ - ] <<<-> [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>>++++[ <++++++>- ]<--.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++++[ <---------->- ]<-.---.>+++++++[ <++++++++++>- ]<++++.+++++++++++++.++++++++++.------.>+++++++[ <---------->- ]<+.>++++++++[ <++++++++++>- ]<-.-.---------.>+++++++[ <---------->- ]<+.>+++++++[ <++++++++++>- ]<--.+++++++++++.++++++++.---------.>++++++++[ <---------->- ]<++.>+++++[ <+++++++++++++>- ]<.+++++++++++++.----------.>+++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<.>+++[ <----->- ]<.>+++[ <++++++>- ]<..>+++++++++[ <--------->- ]<--.>+++++++[ <++++++++++>- ]<+++.+++++++++++.>++++++++[ <----------->- ]<++++.>+++++[ <+++++++++++++>- ]<.>+++[ <++++++>- ]<-.---.++++++.-------.----------.>++++++++[ <----------->- ]<+.---.[ - ]<<<->[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] <>> [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.+++.---. [ - ] <<<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<>>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.+++.---.[ - ]<<<
]
] 14
, unitTape =
diff --git a/.output/golden/bf/eval/logged/tree/Int16Type/fascistHelloWorld.logged b/.output/golden/bf/eval/logged/tree/Int16Type/fascistHelloWorld.logged
index b997657fb..20377a10f 100644
--- a/.output/golden/bf/eval/logged/tree/Int16Type/fascistHelloWorld.logged
+++ b/.output/golden/bf/eval/logged/tree/Int16Type/fascistHelloWorld.logged
@@ -28,7 +28,7 @@ dump: Unit
, +
, +
,
- [ > [ ->+++<<+++> ] << ]
+ [ >[ ->+++<<+++> ]<< ]
, >
, -
, -
@@ -55,7 +55,7 @@ dump: Unit
, <
, +
,
- [ > [ +>+ ] >> ]
+ [ >[ +>+ ]>> ]
, <
, -
, -
diff --git a/.output/golden/bf/eval/logged/tree/Int16Type/helloWorld.logged b/.output/golden/bf/eval/logged/tree/Int16Type/helloWorld.logged
index b0e55304f..a5491570c 100644
--- a/.output/golden/bf/eval/logged/tree/Int16Type/helloWorld.logged
+++ b/.output/golden/bf/eval/logged/tree/Int16Type/helloWorld.logged
@@ -9,7 +9,7 @@ dump: Unit
, +
, +
,
- [ >++++ [ >++>+++>+++>+<<<<- ] >+>+>->>+ [ < ] <- ]
+ [ >++++[ >++>+++>+++>+<<<<- ]>+>+>->>+[ < ]<- ]
, >
, >
, .
diff --git a/.output/golden/bf/eval/logged/tree/Int16Type/triangle.logged b/.output/golden/bf/eval/logged/tree/Int16Type/triangle.logged
index 17b1b2373..2639c54c6 100644
--- a/.output/golden/bf/eval/logged/tree/Int16Type/triangle.logged
+++ b/.output/golden/bf/eval/logged/tree/Int16Type/triangle.logged
@@ -40,13 +40,13 @@ dump: Unit
, <
, <
,
- [ - [ ->+< ] > [ -<+>>>.<< ] >>>
+ [ -[ ->+< ]>[ -<+>>>.<< ]>>>
[
- [ ->++++++++ [ >++++<- ] >.<< [ ->+< ] +> [ ->++++++++++<<+> ] >. [ - ] > ]
- ] +<<<
- [ - [ ->+< ] +>
- [ -<+>>>- [ ->+< ] ++> [ -<-> ] <<< ] <<<<
- ] ++++++++++.+++. [ - ] <
+ [ ->++++++++[ >++++<- ]>.<<[ ->+< ]+>[ ->++++++++++<<+> ]>.[ - ]> ]
+ ]+<<<
+ [ -[ ->+< ]+>
+ [ -<+>>>-[ ->+< ]++>[ -<-> ]<<< ]<<<<
+ ]++++++++++.+++.[ - ]<
]
, +
, +
diff --git a/.output/golden/bf/eval/logged/tree/Int8Type/99botles.logged b/.output/golden/bf/eval/logged/tree/Int8Type/99botles.logged
index c562a1386..d1180fbc0 100644
--- a/.output/golden/bf/eval/logged/tree/Int8Type/99botles.logged
+++ b/.output/golden/bf/eval/logged/tree/Int8Type/99botles.logged
@@ -13,19 +13,19 @@ dump: Unit
, [ <+++++++++++>- ]
, <
,
- [ > [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] > [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.>>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>>>++++ [ <++++++>- ] <--.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++++ [ <---------->- ] <-.---.>+++++++ [ <++++++++++>- ] <++++.+++++++++++++.++++++++++.------.>+++++++ [ <---------->- ] <+.>++++++++ [ <++++++++++>- ] <-.-.---------.>+++++++ [ <---------->- ] <+.>+++++++ [ <++++++++++>- ] <--.+++++++++++.++++++++.---------.>++++++++ [ <---------->- ] <++.>+++++ [ <+++++++++++++>- ] <.+++++++++++++.----------.>+++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <.>+++ [ <----->- ] <.>+++ [ <++++++>- ] <..>+++++++++ [ <--------->- ] <--.>+++++++ [ <++++++++++>- ] <+++.+++++++++++.>++++++++ [ <----------->- ] <++++.>+++++ [ <+++++++++++++>- ] <.>+++ [ <++++++>- ] <-.---.++++++.-------.----------.>++++++++ [ <----------->- ] <+.---. [ - ] <<<-> [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>>++++[ <++++++>- ]<--.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++++[ <---------->- ]<-.---.>+++++++[ <++++++++++>- ]<++++.+++++++++++++.++++++++++.------.>+++++++[ <---------->- ]<+.>++++++++[ <++++++++++>- ]<-.-.---------.>+++++++[ <---------->- ]<+.>+++++++[ <++++++++++>- ]<--.+++++++++++.++++++++.---------.>++++++++[ <---------->- ]<++.>+++++[ <+++++++++++++>- ]<.+++++++++++++.----------.>+++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<.>+++[ <----->- ]<.>+++[ <++++++>- ]<..>+++++++++[ <--------->- ]<--.>+++++++[ <++++++++++>- ]<+++.+++++++++++.>++++++++[ <----------->- ]<++++.>+++++[ <+++++++++++++>- ]<.>+++[ <++++++>- ]<-.---.++++++.-------.----------.>++++++++[ <----------->- ]<+.---.[ - ]<<<->[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] <>> [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.+++.---. [ - ] <<<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<>>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.+++.---.[ - ]<<<
]
] 14
, unitTape =
diff --git a/.output/golden/bf/eval/logged/tree/Int8Type/fascistHelloWorld.logged b/.output/golden/bf/eval/logged/tree/Int8Type/fascistHelloWorld.logged
index b997657fb..20377a10f 100644
--- a/.output/golden/bf/eval/logged/tree/Int8Type/fascistHelloWorld.logged
+++ b/.output/golden/bf/eval/logged/tree/Int8Type/fascistHelloWorld.logged
@@ -28,7 +28,7 @@ dump: Unit
, +
, +
,
- [ > [ ->+++<<+++> ] << ]
+ [ >[ ->+++<<+++> ]<< ]
, >
, -
, -
@@ -55,7 +55,7 @@ dump: Unit
, <
, +
,
- [ > [ +>+ ] >> ]
+ [ >[ +>+ ]>> ]
, <
, -
, -
diff --git a/.output/golden/bf/eval/logged/tree/Int8Type/fibonacci.logged b/.output/golden/bf/eval/logged/tree/Int8Type/fibonacci.logged
index 2f9af11ef..91b73fe52 100644
--- a/.output/golden/bf/eval/logged/tree/Int8Type/fibonacci.logged
+++ b/.output/golden/bf/eval/logged/tree/Int8Type/fibonacci.logged
@@ -104,17 +104,17 @@ dump: Unit
, <
, <
,
- [ > [ >>>>>>+>+<<<<<<<- ] >>>>>>> [ <<<<<<<+>>>>>>>- ] <
+ [ >[ >>>>>>+>+<<<<<<<- ]>>>>>>>[ <<<<<<<+>>>>>>>- ]<
[ >++++++++++
- [ -<- [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ << [ >>>+<<<- ] >> [ - ] ] <<
- ] >>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ <<+>> [ - ] ] <<<<<<<
- ] >>>>>
- [ ++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] ] ++++++++++< [ ->-< ] >++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] <<<<<<<<<<<< [ >>>+>+<<<<- ] >>>> [ <<<<+>>>>- ] <-
- [ >>.>.<<< [ - ] ] << [ >>+>+<<<- ] >>> [ <<<+>>>- ] << [ <+>- ] > [ <+>- ] <<<-
+ [ -<-[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<[ >>>+<<<- ]>>[ - ] ]<<
+ ]>>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<+>>[ - ] ]<<<<<<<
+ ]>>>>>
+ [ ++++++++++++++++++++++++++++++++++++++++++++++++.[ - ] ]++++++++++<[ ->-< ]>++++++++++++++++++++++++++++++++++++++++++++++++.[ - ]<<<<<<<<<<<<[ >>>+>+<<<<- ]>>>>[ <<<<+>>>>- ]<-
+ [ >>.>.<<<[ - ] ]<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<<[ <+>- ]>[ <+>- ]<<<-
]
, +
, +
@@ -217,17 +217,17 @@ dump: Unit
, <
, <
,
- [ > [ >>>>>>+>+<<<<<<<- ] >>>>>>> [ <<<<<<<+>>>>>>>- ] <
+ [ >[ >>>>>>+>+<<<<<<<- ]>>>>>>>[ <<<<<<<+>>>>>>>- ]<
[ >++++++++++
- [ -<- [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ << [ >>>+<<<- ] >> [ - ] ] <<
- ] >>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ <<+>> [ - ] ] <<<<<<<
- ] >>>>>
- [ ++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] ] ++++++++++< [ ->-< ] >++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] <<<<<<<<<<<< [ >>>+>+<<<<- ] >>>> [ <<<<+>>>>- ] <-
- [ >>.>.<<< [ - ] ] << [ >>+>+<<<- ] >>> [ <<<+>>>- ] << [ <+>- ] > [ <+>- ] <<<-
+ [ -<-[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<[ >>>+<<<- ]>>[ - ] ]<<
+ ]>>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<+>>[ - ] ]<<<<<<<
+ ]>>>>>
+ [ ++++++++++++++++++++++++++++++++++++++++++++++++.[ - ] ]++++++++++<[ ->-< ]>++++++++++++++++++++++++++++++++++++++++++++++++.[ - ]<<<<<<<<<<<<[ >>>+>+<<<<- ]>>>>[ <<<<+>>>>- ]<-
+ [ >>.>.<<<[ - ] ]<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<<[ <+>- ]>[ <+>- ]<<<-
]
] 209
, unitTape =
diff --git a/.output/golden/bf/eval/logged/tree/Int8Type/helloWorld.logged b/.output/golden/bf/eval/logged/tree/Int8Type/helloWorld.logged
index b0e55304f..a5491570c 100644
--- a/.output/golden/bf/eval/logged/tree/Int8Type/helloWorld.logged
+++ b/.output/golden/bf/eval/logged/tree/Int8Type/helloWorld.logged
@@ -9,7 +9,7 @@ dump: Unit
, +
, +
,
- [ >++++ [ >++>+++>+++>+<<<<- ] >+>+>->>+ [ < ] <- ]
+ [ >++++[ >++>+++>+++>+<<<<- ]>+>+>->>+[ < ]<- ]
, >
, >
, .
diff --git a/.output/golden/bf/eval/logged/tree/Int8Type/padHelloWorld.logged b/.output/golden/bf/eval/logged/tree/Int8Type/padHelloWorld.logged
index fef92cb5c..6b942abb4 100644
--- a/.output/golden/bf/eval/logged/tree/Int8Type/padHelloWorld.logged
+++ b/.output/golden/bf/eval/logged/tree/Int8Type/padHelloWorld.logged
@@ -8,7 +8,7 @@ dump: Unit
, <
, +
,
- [ + [ <+>--->->->-<<< ] > ]
+ [ +[ <+>--->->->-<<< ]> ]
, <
, <
, -
@@ -69,7 +69,7 @@ dump: Unit
, 0
, 0
, 87
- , - 74
+ , -74
, 0
]
,
@@ -77,216 +77,216 @@ dump: Unit
, 114
, 44
, 7
- , - 126
- , - 9
+ , -126
+ , -9
, 115
, 17
- , - 104
- , - 1
+ , -104
+ , -1
, 55
, 3
- , - 54
- , - 113
- , - 97
+ , -54
+ , -113
+ , -97
, 117
, 64
, 111
- , - 13
- , - 33
- , - 30
+ , -13
+ , -33
+ , -30
, 103
, 27
- , - 39
- , - 40
- , - 1
- , - 97
- , - 37
- , - 118
- , - 65
+ , -39
+ , -40
+ , -1
+ , -97
+ , -37
+ , -118
+ , -65
, 39
, 125
, 32
- , - 17
+ , -17
, 123
, 55
- , - 126
- , - 41
+ , -126
+ , -41
, 3
- , - 95
- , - 40
+ , -95
+ , -40
, 127
- , - 57
+ , -57
, 51
- , - 118
- , - 17
- , - 17
- , - 123
- , - 64
- , - 17
- , - 61
+ , -118
+ , -17
+ , -17
+ , -123
+ , -64
+ , -17
+ , -61
, 15
, 98
, 71
, 43
, 105
- , - 104
+ , -104
, 127
- , - 81
+ , -81
, 11
- , - 54
+ , -54
, 31
- , - 9
- , - 115
+ , -9
+ , -115
, 32
, 111
- , - 53
+ , -53
, 103
- , - 126
- , - 73
- , - 109
+ , -126
+ , -73
+ , -109
, 49
, 24
- , - 1
+ , -1
, 87
, 99
, 74
, 79
, 63
- , - 107
+ , -107
, 64
, 111
- , - 109
+ , -109
, 63
- , - 30
+ , -30
, 39
, 59
- , - 7
+ , -7
, 88
- , - 1
- , - 65
+ , -1
+ , -65
, 59
, 10
, 127
- , - 57
- , - 99
+ , -57
+ , -99
, 32
- , - 17
+ , -17
, 27
- , - 105
- , - 126
- , - 105
+ , -105
+ , -126
+ , -105
, 35
- , - 63
+ , -63
, 88
, 127
- , - 25
- , - 109
+ , -25
+ , -109
, 10
- , - 81
- , - 113
- , - 91
- , - 64
- , - 17
+ , -81
+ , -113
+ , -91
+ , -64
+ , -17
, 99
, 111
, 98
, 7
, 75
- , - 119
+ , -119
, 24
, 127
- , - 49
+ , -49
, 107
, 74
- , - 33
- , - 105
- , - 83
+ , -33
+ , -105
+ , -83
, 32
, 111
, 107
- , - 57
- , - 126
+ , -57
+ , -126
, 119
- , - 77
+ , -77
, 81
- , - 104
- , - 1
+ , -104
+ , -1
, 119
- , - 61
- , - 54
+ , -61
+ , -54
, 15
- , - 33
- , - 75
+ , -33
+ , -75
, 64
, 111
, 51
- , - 97
- , - 30
- , - 25
+ , -97
+ , -30
+ , -25
, 91
, 25
- , - 40
- , - 1
- , - 33
- , - 101
- , - 118
+ , -40
+ , -1
+ , -33
+ , -101
+ , -118
, 63
, 103
- , - 67
+ , -67
, 32
- , - 17
- , - 69
- , - 9
- , - 126
+ , -17
+ , -69
+ , -9
+ , -126
, 87
, 67
- , - 31
- , - 40
+ , -31
+ , -40
, 127
, 7
- , - 13
- , - 118
+ , -13
+ , -118
, 111
, 47
- , - 59
- , - 64
- , - 17
+ , -59
+ , -64
+ , -17
, 3
- , - 49
+ , -49
, 98
- , - 57
+ , -57
, 107
- , - 87
- , - 104
+ , -87
+ , -104
, 127
- , - 17
- , - 53
- , - 54
- , - 97
+ , -17
+ , -53
+ , -54
+ , -97
, 55
- , - 51
+ , -51
, 32
, 111
, 11
, 39
- , - 126
+ , -126
, 55
- , - 45
+ , -45
, 113
, 24
- , - 1
- , - 105
+ , -1
+ , -105
, 35
, 74
- , - 49
+ , -49
, 127
- , - 43
+ , -43
, 64
, 111
- , - 45
- , - 1
- , - 30
- , - 89
+ , -45
+ , -1
+ , -30
+ , -89
, 123
, 57
, 86
diff --git a/.output/golden/bf/eval/logged/tree/Int8Type/theShortestHelloWorld.logged b/.output/golden/bf/eval/logged/tree/Int8Type/theShortestHelloWorld.logged
index 79b087918..2f621c8f9 100644
--- a/.output/golden/bf/eval/logged/tree/Int8Type/theShortestHelloWorld.logged
+++ b/.output/golden/bf/eval/logged/tree/Int8Type/theShortestHelloWorld.logged
@@ -2,7 +2,7 @@ dump: Unit
{ unitUI = IU
[ +
,
- [ -->- [ >>+>-----<< ] <--<--- ]
+ [ -->-[ >>+>-----<< ]<--<--- ]
, >
, -
, .
@@ -56,9 +56,9 @@ dump: Unit
[ 33
, 44
, 108
- , - 84
+ , -84
, 100
- , - 103
+ , -103
, 0
, 72
, 0
diff --git a/.output/golden/bf/eval/logged/tree/Int8Type/triangle.logged b/.output/golden/bf/eval/logged/tree/Int8Type/triangle.logged
index 17b1b2373..2639c54c6 100644
--- a/.output/golden/bf/eval/logged/tree/Int8Type/triangle.logged
+++ b/.output/golden/bf/eval/logged/tree/Int8Type/triangle.logged
@@ -40,13 +40,13 @@ dump: Unit
, <
, <
,
- [ - [ ->+< ] > [ -<+>>>.<< ] >>>
+ [ -[ ->+< ]>[ -<+>>>.<< ]>>>
[
- [ ->++++++++ [ >++++<- ] >.<< [ ->+< ] +> [ ->++++++++++<<+> ] >. [ - ] > ]
- ] +<<<
- [ - [ ->+< ] +>
- [ -<+>>>- [ ->+< ] ++> [ -<-> ] <<< ] <<<<
- ] ++++++++++.+++. [ - ] <
+ [ ->++++++++[ >++++<- ]>.<<[ ->+< ]+>[ ->++++++++++<<+> ]>.[ - ]> ]
+ ]+<<<
+ [ -[ ->+< ]+>
+ [ -<+>>>-[ ->+< ]++>[ -<-> ]<<< ]<<<<
+ ]++++++++++.+++.[ - ]<
]
, +
, +
diff --git a/.output/golden/bf/eval/logged/tree/Int8Type/value256.logged b/.output/golden/bf/eval/logged/tree/Int8Type/value256.logged
index 6e9e468ea..b692c3a42 100644
--- a/.output/golden/bf/eval/logged/tree/Int8Type/value256.logged
+++ b/.output/golden/bf/eval/logged/tree/Int8Type/value256.logged
@@ -14,13 +14,13 @@ dump: Unit
, +
, <
,
- [ >-< [ >++++<- ] > [ <++++++++>- ] < [ >++++++++<- ] +>
- [ >++++++++++ [ >+++++<- ] >+.-. [ - ] << [ - ] <-> ] <
- [ >>+++++++ [ >+++++++<- ] >.+++++. [ - ] <<<- ]
+ [ >-<[ >++++<- ]>[ <++++++++>- ]<[ >++++++++<- ]+>
+ [ >++++++++++[ >+++++<- ]>+.-.[ - ]<<[ - ]<-> ]<
+ [ >>+++++++[ >+++++++<- ]>.+++++.[ - ]<<<- ]
]
, >
,
- [ >++++++++ [ >+++++++<- ] >. [ - ] <<- ]
+ [ >++++++++[ >+++++++<- ]>.[ - ]<<- ]
, <
, +
, +
@@ -85,7 +85,7 @@ dump: Unit
, -
, .
,
- [ [ - ] < ]
+ [ [ - ]< ]
] 81
, unitTape =
(
diff --git a/.output/golden/bf/eval/logged/tree/Word16Type/99botles.logged b/.output/golden/bf/eval/logged/tree/Word16Type/99botles.logged
index c562a1386..d1180fbc0 100644
--- a/.output/golden/bf/eval/logged/tree/Word16Type/99botles.logged
+++ b/.output/golden/bf/eval/logged/tree/Word16Type/99botles.logged
@@ -13,19 +13,19 @@ dump: Unit
, [ <+++++++++++>- ]
, <
,
- [ > [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] > [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.>>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>>>++++ [ <++++++>- ] <--.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++++ [ <---------->- ] <-.---.>+++++++ [ <++++++++++>- ] <++++.+++++++++++++.++++++++++.------.>+++++++ [ <---------->- ] <+.>++++++++ [ <++++++++++>- ] <-.-.---------.>+++++++ [ <---------->- ] <+.>+++++++ [ <++++++++++>- ] <--.+++++++++++.++++++++.---------.>++++++++ [ <---------->- ] <++.>+++++ [ <+++++++++++++>- ] <.+++++++++++++.----------.>+++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <.>+++ [ <----->- ] <.>+++ [ <++++++>- ] <..>+++++++++ [ <--------->- ] <--.>+++++++ [ <++++++++++>- ] <+++.+++++++++++.>++++++++ [ <----------->- ] <++++.>+++++ [ <+++++++++++++>- ] <.>+++ [ <++++++>- ] <-.---.++++++.-------.----------.>++++++++ [ <----------->- ] <+.---. [ - ] <<<-> [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>>++++[ <++++++>- ]<--.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++++[ <---------->- ]<-.---.>+++++++[ <++++++++++>- ]<++++.+++++++++++++.++++++++++.------.>+++++++[ <---------->- ]<+.>++++++++[ <++++++++++>- ]<-.-.---------.>+++++++[ <---------->- ]<+.>+++++++[ <++++++++++>- ]<--.+++++++++++.++++++++.---------.>++++++++[ <---------->- ]<++.>+++++[ <+++++++++++++>- ]<.+++++++++++++.----------.>+++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<.>+++[ <----->- ]<.>+++[ <++++++>- ]<..>+++++++++[ <--------->- ]<--.>+++++++[ <++++++++++>- ]<+++.+++++++++++.>++++++++[ <----------->- ]<++++.>+++++[ <+++++++++++++>- ]<.>+++[ <++++++>- ]<-.---.++++++.-------.----------.>++++++++[ <----------->- ]<+.---.[ - ]<<<->[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] <>> [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.+++.---. [ - ] <<<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<>>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.+++.---.[ - ]<<<
]
] 14
, unitTape =
diff --git a/.output/golden/bf/eval/logged/tree/Word16Type/fascistHelloWorld.logged b/.output/golden/bf/eval/logged/tree/Word16Type/fascistHelloWorld.logged
index b997657fb..20377a10f 100644
--- a/.output/golden/bf/eval/logged/tree/Word16Type/fascistHelloWorld.logged
+++ b/.output/golden/bf/eval/logged/tree/Word16Type/fascistHelloWorld.logged
@@ -28,7 +28,7 @@ dump: Unit
, +
, +
,
- [ > [ ->+++<<+++> ] << ]
+ [ >[ ->+++<<+++> ]<< ]
, >
, -
, -
@@ -55,7 +55,7 @@ dump: Unit
, <
, +
,
- [ > [ +>+ ] >> ]
+ [ >[ +>+ ]>> ]
, <
, -
, -
diff --git a/.output/golden/bf/eval/logged/tree/Word16Type/helloWorld.logged b/.output/golden/bf/eval/logged/tree/Word16Type/helloWorld.logged
index b0e55304f..a5491570c 100644
--- a/.output/golden/bf/eval/logged/tree/Word16Type/helloWorld.logged
+++ b/.output/golden/bf/eval/logged/tree/Word16Type/helloWorld.logged
@@ -9,7 +9,7 @@ dump: Unit
, +
, +
,
- [ >++++ [ >++>+++>+++>+<<<<- ] >+>+>->>+ [ < ] <- ]
+ [ >++++[ >++>+++>+++>+<<<<- ]>+>+>->>+[ < ]<- ]
, >
, >
, .
diff --git a/.output/golden/bf/eval/logged/tree/Word16Type/triangle.logged b/.output/golden/bf/eval/logged/tree/Word16Type/triangle.logged
index 17b1b2373..2639c54c6 100644
--- a/.output/golden/bf/eval/logged/tree/Word16Type/triangle.logged
+++ b/.output/golden/bf/eval/logged/tree/Word16Type/triangle.logged
@@ -40,13 +40,13 @@ dump: Unit
, <
, <
,
- [ - [ ->+< ] > [ -<+>>>.<< ] >>>
+ [ -[ ->+< ]>[ -<+>>>.<< ]>>>
[
- [ ->++++++++ [ >++++<- ] >.<< [ ->+< ] +> [ ->++++++++++<<+> ] >. [ - ] > ]
- ] +<<<
- [ - [ ->+< ] +>
- [ -<+>>>- [ ->+< ] ++> [ -<-> ] <<< ] <<<<
- ] ++++++++++.+++. [ - ] <
+ [ ->++++++++[ >++++<- ]>.<<[ ->+< ]+>[ ->++++++++++<<+> ]>.[ - ]> ]
+ ]+<<<
+ [ -[ ->+< ]+>
+ [ -<+>>>-[ ->+< ]++>[ -<-> ]<<< ]<<<<
+ ]++++++++++.+++.[ - ]<
]
, +
, +
diff --git a/.output/golden/bf/eval/logged/tree/Word8Type/99botles.logged b/.output/golden/bf/eval/logged/tree/Word8Type/99botles.logged
index c562a1386..d1180fbc0 100644
--- a/.output/golden/bf/eval/logged/tree/Word8Type/99botles.logged
+++ b/.output/golden/bf/eval/logged/tree/Word8Type/99botles.logged
@@ -13,19 +13,19 @@ dump: Unit
, [ <+++++++++++>- ]
, <
,
- [ > [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] > [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.>>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>>>++++ [ <++++++>- ] <--.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++++ [ <---------->- ] <-.---.>+++++++ [ <++++++++++>- ] <++++.+++++++++++++.++++++++++.------.>+++++++ [ <---------->- ] <+.>++++++++ [ <++++++++++>- ] <-.-.---------.>+++++++ [ <---------->- ] <+.>+++++++ [ <++++++++++>- ] <--.+++++++++++.++++++++.---------.>++++++++ [ <---------->- ] <++.>+++++ [ <+++++++++++++>- ] <.+++++++++++++.----------.>+++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <.>+++ [ <----->- ] <.>+++ [ <++++++>- ] <..>+++++++++ [ <--------->- ] <--.>+++++++ [ <++++++++++>- ] <+++.+++++++++++.>++++++++ [ <----------->- ] <++++.>+++++ [ <+++++++++++++>- ] <.>+++ [ <++++++>- ] <-.---.++++++.-------.----------.>++++++++ [ <----------->- ] <+.---. [ - ] <<<-> [ - ] > [ - ] << [ >+>+<<- ] >> [ <<+>>- ] >>> [ - ] <<<+++++++++<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>>++++[ <++++++>- ]<--.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++++[ <---------->- ]<-.---.>+++++++[ <++++++++++>- ]<++++.+++++++++++++.++++++++++.------.>+++++++[ <---------->- ]<+.>++++++++[ <++++++++++>- ]<-.-.---------.>+++++++[ <---------->- ]<+.>+++++++[ <++++++++++>- ]<--.+++++++++++.++++++++.---------.>++++++++[ <---------->- ]<++.>+++++[ <+++++++++++++>- ]<.+++++++++++++.----------.>+++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<.>+++[ <----->- ]<.>+++[ <++++++>- ]<..>+++++++++[ <--------->- ]<--.>+++++++[ <++++++++++>- ]<+++.+++++++++++.>++++++++[ <----------->- ]<++++.>+++++[ <+++++++++++++>- ]<.>+++[ <++++++>- ]<-.---.++++++.-------.----------.>++++++++[ <----------->- ]<+.---.[ - ]<<<->[ - ]>[ - ]<<[ >+>+<<- ]>>[ <<+>>- ]>>>[ - ]<<<+++++++++<
[ >>>+<<
- [ >+> [ - ] <<- ] > [ <+>- ] > [ <<++++++++++>>>+<- ] <<-<-
- ] +++++++++> [ <->- ] >>+>
- [ < [ - ] <<+>>>- ] > [ - ] +<< [ >+>-<<- ] <<< [ >>+>+<<<- ] >>> [ <<<+>>>- ] <>> [ <+>- ] <<-
- [ > [ - ] < [ - ] ] >>+<
- [ > [ - ] <- ] <++++++++ [ <++++++<++++++>>- ] >>> [ >+>+<<- ] >> [ <<+>>- ] < [ <<<<<.>>>>>- ] <<<<<<.>> [ - ] > [ - ] ++++ [ <++++++++>- ] <.>++++ [ <++++++++>- ] <++.>+++++ [ <+++++++++>- ] <.><+++++..--------.-------.>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] < [ <<<<++++++++++++++.>>>>- ] <<<< [ - ] >++++ [ <++++++++>- ] <.>+++++++++ [ <+++++++++>- ] <--.---------.>+++++++ [ <---------->- ] <.>++++++ [ <+++++++++++>- ] <.+++..+++++++++++++.>++++++++ [ <---------->- ] <--.>+++++++++ [ <+++++++++>- ] <--.-.>++++++++ [ <---------->- ] <++.>++++++++ [ <++++++++++>- ] <++++.------------.---.>+++++++ [ <---------->- ] <+.>++++++++ [ <+++++++++++>- ] <-.>++ [ <----------->- ] <.+++++++++++..>+++++++++ [ <---------->- ] <-----.---.+++.---. [ - ] <<<
+ [ >+>[ - ]<<- ]>[ <+>- ]>[ <<++++++++++>>>+<- ]<<-<-
+ ]+++++++++>[ <->- ]>>+>
+ [ <[ - ]<<+>>>- ]>[ - ]+<<[ >+>-<<- ]<<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<>>[ <+>- ]<<-
+ [ >[ - ]<[ - ] ]>>+<
+ [ >[ - ]<- ]<++++++++[ <++++++<++++++>>- ]>>>[ >+>+<<- ]>>[ <<+>>- ]<[ <<<<<.>>>>>- ]<<<<<<.>>[ - ]>[ - ]++++[ <++++++++>- ]<.>++++[ <++++++++>- ]<++.>+++++[ <+++++++++>- ]<.><+++++..--------.-------.>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]<[ <<<<++++++++++++++.>>>>- ]<<<<[ - ]>++++[ <++++++++>- ]<.>+++++++++[ <+++++++++>- ]<--.---------.>+++++++[ <---------->- ]<.>++++++[ <+++++++++++>- ]<.+++..+++++++++++++.>++++++++[ <---------->- ]<--.>+++++++++[ <+++++++++>- ]<--.-.>++++++++[ <---------->- ]<++.>++++++++[ <++++++++++>- ]<++++.------------.---.>+++++++[ <---------->- ]<+.>++++++++[ <+++++++++++>- ]<-.>++[ <----------->- ]<.+++++++++++..>+++++++++[ <---------->- ]<-----.---.+++.---.[ - ]<<<
]
] 14
, unitTape =
diff --git a/.output/golden/bf/eval/logged/tree/Word8Type/fascistHelloWorld.logged b/.output/golden/bf/eval/logged/tree/Word8Type/fascistHelloWorld.logged
index b997657fb..20377a10f 100644
--- a/.output/golden/bf/eval/logged/tree/Word8Type/fascistHelloWorld.logged
+++ b/.output/golden/bf/eval/logged/tree/Word8Type/fascistHelloWorld.logged
@@ -28,7 +28,7 @@ dump: Unit
, +
, +
,
- [ > [ ->+++<<+++> ] << ]
+ [ >[ ->+++<<+++> ]<< ]
, >
, -
, -
@@ -55,7 +55,7 @@ dump: Unit
, <
, +
,
- [ > [ +>+ ] >> ]
+ [ >[ +>+ ]>> ]
, <
, -
, -
diff --git a/.output/golden/bf/eval/logged/tree/Word8Type/fibonacci.logged b/.output/golden/bf/eval/logged/tree/Word8Type/fibonacci.logged
index 2f9af11ef..91b73fe52 100644
--- a/.output/golden/bf/eval/logged/tree/Word8Type/fibonacci.logged
+++ b/.output/golden/bf/eval/logged/tree/Word8Type/fibonacci.logged
@@ -104,17 +104,17 @@ dump: Unit
, <
, <
,
- [ > [ >>>>>>+>+<<<<<<<- ] >>>>>>> [ <<<<<<<+>>>>>>>- ] <
+ [ >[ >>>>>>+>+<<<<<<<- ]>>>>>>>[ <<<<<<<+>>>>>>>- ]<
[ >++++++++++
- [ -<- [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ << [ >>>+<<<- ] >> [ - ] ] <<
- ] >>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ <<+>> [ - ] ] <<<<<<<
- ] >>>>>
- [ ++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] ] ++++++++++< [ ->-< ] >++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] <<<<<<<<<<<< [ >>>+>+<<<<- ] >>>> [ <<<<+>>>>- ] <-
- [ >>.>.<<< [ - ] ] << [ >>+>+<<<- ] >>> [ <<<+>>>- ] << [ <+>- ] > [ <+>- ] <<<-
+ [ -<-[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<[ >>>+<<<- ]>>[ - ] ]<<
+ ]>>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<+>>[ - ] ]<<<<<<<
+ ]>>>>>
+ [ ++++++++++++++++++++++++++++++++++++++++++++++++.[ - ] ]++++++++++<[ ->-< ]>++++++++++++++++++++++++++++++++++++++++++++++++.[ - ]<<<<<<<<<<<<[ >>>+>+<<<<- ]>>>>[ <<<<+>>>>- ]<-
+ [ >>.>.<<<[ - ] ]<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<<[ <+>- ]>[ <+>- ]<<<-
]
, +
, +
@@ -217,17 +217,17 @@ dump: Unit
, <
, <
,
- [ > [ >>>>>>+>+<<<<<<<- ] >>>>>>> [ <<<<<<<+>>>>>>>- ] <
+ [ >[ >>>>>>+>+<<<<<<<- ]>>>>>>>[ <<<<<<<+>>>>>>>- ]<
[ >++++++++++
- [ -<- [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ << [ >>>+<<<- ] >> [ - ] ] <<
- ] >>> [ >>+>+<<<- ] >>> [ <<<+>>>- ] +<
- [ > [ - ] < [ - ] ] >
- [ <<+>> [ - ] ] <<<<<<<
- ] >>>>>
- [ ++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] ] ++++++++++< [ ->-< ] >++++++++++++++++++++++++++++++++++++++++++++++++. [ - ] <<<<<<<<<<<< [ >>>+>+<<<<- ] >>>> [ <<<<+>>>>- ] <-
- [ >>.>.<<< [ - ] ] << [ >>+>+<<<- ] >>> [ <<<+>>>- ] << [ <+>- ] > [ <+>- ] <<<-
+ [ -<-[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<[ >>>+<<<- ]>>[ - ] ]<<
+ ]>>>[ >>+>+<<<- ]>>>[ <<<+>>>- ]+<
+ [ >[ - ]<[ - ] ]>
+ [ <<+>>[ - ] ]<<<<<<<
+ ]>>>>>
+ [ ++++++++++++++++++++++++++++++++++++++++++++++++.[ - ] ]++++++++++<[ ->-< ]>++++++++++++++++++++++++++++++++++++++++++++++++.[ - ]<<<<<<<<<<<<[ >>>+>+<<<<- ]>>>>[ <<<<+>>>>- ]<-
+ [ >>.>.<<<[ - ] ]<<[ >>+>+<<<- ]>>>[ <<<+>>>- ]<<[ <+>- ]>[ <+>- ]<<<-
]
] 209
, unitTape =
diff --git a/.output/golden/bf/eval/logged/tree/Word8Type/helloWorld.logged b/.output/golden/bf/eval/logged/tree/Word8Type/helloWorld.logged
index b0e55304f..a5491570c 100644
--- a/.output/golden/bf/eval/logged/tree/Word8Type/helloWorld.logged
+++ b/.output/golden/bf/eval/logged/tree/Word8Type/helloWorld.logged
@@ -9,7 +9,7 @@ dump: Unit
, +
, +
,
- [ >++++ [ >++>+++>+++>+<<<<- ] >+>+>->>+ [ < ] <- ]
+ [ >++++[ >++>+++>+++>+<<<<- ]>+>+>->>+[ < ]<- ]
, >
, >
, .
diff --git a/.output/golden/bf/eval/logged/tree/Word8Type/padHelloWorld.logged b/.output/golden/bf/eval/logged/tree/Word8Type/padHelloWorld.logged
index 514bd5bd0..28677a5cd 100644
--- a/.output/golden/bf/eval/logged/tree/Word8Type/padHelloWorld.logged
+++ b/.output/golden/bf/eval/logged/tree/Word8Type/padHelloWorld.logged
@@ -8,7 +8,7 @@ dump: Unit
, <
, +
,
- [ + [ <+>--->->->-<<< ] > ]
+ [ +[ <+>--->->->-<<< ]> ]
, <
, <
, -
diff --git a/.output/golden/bf/eval/logged/tree/Word8Type/theShortestHelloWorld.logged b/.output/golden/bf/eval/logged/tree/Word8Type/theShortestHelloWorld.logged
index cbe627633..dc354e6b2 100644
--- a/.output/golden/bf/eval/logged/tree/Word8Type/theShortestHelloWorld.logged
+++ b/.output/golden/bf/eval/logged/tree/Word8Type/theShortestHelloWorld.logged
@@ -2,7 +2,7 @@ dump: Unit
{ unitUI = IU
[ +
,
- [ -->- [ >>+>-----<< ] <--<--- ]
+ [ -->-[ >>+>-----<< ]<--<--- ]
, >
, -
, .
diff --git a/.output/golden/bf/eval/logged/tree/Word8Type/triangle.logged b/.output/golden/bf/eval/logged/tree/Word8Type/triangle.logged
index 17b1b2373..2639c54c6 100644
--- a/.output/golden/bf/eval/logged/tree/Word8Type/triangle.logged
+++ b/.output/golden/bf/eval/logged/tree/Word8Type/triangle.logged
@@ -40,13 +40,13 @@ dump: Unit
, <
, <
,
- [ - [ ->+< ] > [ -<+>>>.<< ] >>>
+ [ -[ ->+< ]>[ -<+>>>.<< ]>>>
[
- [ ->++++++++ [ >++++<- ] >.<< [ ->+< ] +> [ ->++++++++++<<+> ] >. [ - ] > ]
- ] +<<<
- [ - [ ->+< ] +>
- [ -<+>>>- [ ->+< ] ++> [ -<-> ] <<< ] <<<<
- ] ++++++++++.+++. [ - ] <
+ [ ->++++++++[ >++++<- ]>.<<[ ->+< ]+>[ ->++++++++++<<+> ]>.[ - ]> ]
+ ]+<<<
+ [ -[ ->+< ]+>
+ [ -<+>>>-[ ->+< ]++>[ -<-> ]<<< ]<<<<
+ ]++++++++++.+++.[ - ]<
]
, +
, +
diff --git a/.output/golden/bf/eval/logged/tree/Word8Type/value256.logged b/.output/golden/bf/eval/logged/tree/Word8Type/value256.logged
index 6e9e468ea..b692c3a42 100644
--- a/.output/golden/bf/eval/logged/tree/Word8Type/value256.logged
+++ b/.output/golden/bf/eval/logged/tree/Word8Type/value256.logged
@@ -14,13 +14,13 @@ dump: Unit
, +
, <
,
- [ >-< [ >++++<- ] > [ <++++++++>- ] < [ >++++++++<- ] +>
- [ >++++++++++ [ >+++++<- ] >+.-. [ - ] << [ - ] <-> ] <
- [ >>+++++++ [ >+++++++<- ] >.+++++. [ - ] <<<- ]
+ [ >-<[ >++++<- ]>[ <++++++++>- ]<[ >++++++++<- ]+>
+ [ >++++++++++[ >+++++<- ]>+.-.[ - ]<<[ - ]<-> ]<
+ [ >>+++++++[ >+++++++<- ]>.+++++.[ - ]<<<- ]
]
, >
,
- [ >++++++++ [ >+++++++<- ] >. [ - ] <<- ]
+ [ >++++++++[ >+++++++<- ]>.[ - ]<<- ]
, <
, +
, +
@@ -85,7 +85,7 @@ dump: Unit
, -
, .
,
- [ [ - ] < ]
+ [ [ - ]< ]
] 81
, unitTape =
(
diff --git a/.output/golden/sq/eval/logged/esolangs/helloWorld.logged b/.output/golden/sq/eval/logged/esolangs/helloWorld.logged
index 953788ee0..b866e5a24 100644
--- a/.output/golden/sq/eval/logged/esolangs/helloWorld.logged
+++ b/.output/golden/sq/eval/logged/esolangs/helloWorld.logged
@@ -1,5 +1,5 @@
dump: Unit
- { unitIU = - 1
+ { unitIU = -1
, unitRAM =
[ 12
, 12
@@ -14,7 +14,7 @@ dump: Unit
, 37
, 12
, 0
- , - 1
+ , -1
, 15
, 38
, 36
@@ -33,13 +33,13 @@ dump: Unit
, 30
, 36
, 12
- , - 1
+ , -1
, 37
, 37
, 0
, 53
, 0
- , - 1
+ , -1
, 72
, 101
, 108
diff --git a/.output/golden/sq/eval/logged/hello.logged b/.output/golden/sq/eval/logged/hello.logged
index e1c8ab42f..de835a2da 100644
--- a/.output/golden/sq/eval/logged/hello.logged
+++ b/.output/golden/sq/eval/logged/hello.logged
@@ -1,23 +1,23 @@
dump: Unit
- { unitIU = - 1
+ { unitIU = -1
, unitRAM =
[ 15
, 31
- , - 1
+ , -1
, 31
- , - 1
- , - 1
+ , -1
+ , -1
, 16
, 1
- , - 1
+ , -1
, 16
, 3
- , - 1
+ , -1
, 15
, 15
, 0
, 0
- , - 1
+ , -1
, 72
, 101
, 108
diff --git a/.output/golden/sq/eval/logged/longHello.logged b/.output/golden/sq/eval/logged/longHello.logged
index e1c8ab42f..de835a2da 100644
--- a/.output/golden/sq/eval/logged/longHello.logged
+++ b/.output/golden/sq/eval/logged/longHello.logged
@@ -1,23 +1,23 @@
dump: Unit
- { unitIU = - 1
+ { unitIU = -1
, unitRAM =
[ 15
, 31
- , - 1
+ , -1
, 31
- , - 1
- , - 1
+ , -1
+ , -1
, 16
, 1
- , - 1
+ , -1
, 16
, 3
- , - 1
+ , -1
, 15
, 15
, 0
, 0
- , - 1
+ , -1
, 72
, 101
, 108
diff --git a/.output/golden/sq/eval/logged/mazonka/factorial.logged b/.output/golden/sq/eval/logged/mazonka/factorial.logged
index 10b4c2571..91442e7b7 100644
--- a/.output/golden/sq/eval/logged/mazonka/factorial.logged
+++ b/.output/golden/sq/eval/logged/mazonka/factorial.logged
@@ -1,5 +1,5 @@
dump: Unit
- { unitIU = - 1
+ { unitIU = -1
, unitRAM =
[ 0
, 0
@@ -2887,7 +2887,7 @@ dump: Unit
, 8865
, 2885
, 8865
- , - 1
+ , -1
, 2888
, 8870
, 8870
@@ -3016,7 +3016,7 @@ dump: Unit
, 8867
, 3020
, 8851
- , - 1
+ , -1
, 3017
, 8870
, 8870
@@ -3223,7 +3223,7 @@ dump: Unit
, 8865
, 3221
, 8865
- , - 1
+ , -1
, 3224
, 8870
, 8870
@@ -5618,7 +5618,7 @@ dump: Unit
, 8864
, 5616
, 8864
- , - 1
+ , -1
, 5619
, 8870
, 8870
@@ -6020,7 +6020,7 @@ dump: Unit
, 8865
, 6160
, 8853
- , - 1
+ , -1
, 6021
, 8864
, 8864
@@ -6337,7 +6337,7 @@ dump: Unit
, 8870
, 6347
, 8854
- , - 1
+ , -1
, 6338
, 8872
, 8872
@@ -8653,7 +8653,7 @@ dump: Unit
, 8864
, 8651
, 8864
- , - 1
+ , -1
, 8654
, 8864
, 8864
@@ -8841,10 +8841,10 @@ dump: Unit
, 8838
, 8870
, 8870
- , - 1
- , - 2
- , - 3
- , - 4
+ , -1
+ , -2
+ , -3
+ , -4
, 0
, 10
, 100
@@ -8870,223 +8870,223 @@ dump: Unit
, 0
, 0
, 0
- , - 1
+ , -1
, 0
, 1
- , - 13
+ , -13
, 0
- , - 8874
- , - 8835
+ , -8874
+ , -8835
, 0
, 0
, 479001600
, 8861
- , - 763
- , - 8876
+ , -763
+ , -8876
, 13
, 1
- , - 479001600
+ , -479001600
, 0
, 0
, 0
, 479001600
- , - 3814
- , - 8881
- , - 479001600
+ , -3814
+ , -8881
+ , -479001600
, 479001600
, 1
- , - 8878
+ , -8878
, 479001600
- , - 6317
- , - 8890
+ , -6317
+ , -8890
, 8
, 0
, 479001600
- , - 8888
- , - 479001600
+ , -8888
+ , -479001600
, 47900160
- , - 8537
- , - 8897
+ , -8537
+ , -8897
, 7
, 0
, 47900160
- , - 8898
- , - 47900160
+ , -8898
+ , -47900160
, 4790016
- , - 8537
- , - 8905
+ , -8537
+ , -8905
, 6
, 6
, 4790016
- , - 8906
- , - 4790016
+ , -8906
+ , -4790016
, 479001
- , - 8537
- , - 8913
+ , -8537
+ , -8913
, 5
, 1
, 479001
- , - 8914
- , - 479001
+ , -8914
+ , -479001
, 47900
- , - 8537
- , - 8921
+ , -8537
+ , -8921
, 4
, 0
, 47900
- , - 8922
- , - 47900
+ , -8922
+ , -47900
, 4790
- , - 8537
- , - 8929
+ , -8537
+ , -8929
, 3
, 0
, 4790
- , - 8930
- , - 4790
+ , -8930
+ , -4790
, 479
- , - 8537
- , - 8937
+ , -8537
+ , -8937
, 2
, 9
, 479
- , - 8938
- , - 479
+ , -8938
+ , -479
, 47
- , - 8537
- , - 8945
+ , -8537
+ , -8945
, 1
, 7
, 47
- , - 8946
- , - 47
+ , -8946
+ , -47
, 4
- , - 8537
- , - 8953
+ , -8537
+ , -8953
, 0
, 4
, 4
- , - 8954
- , - 4
+ , -8954
+ , -4
, 0
- , - 8537
- , - 8961
- , - 8377
- , - 8961
+ , -8537
+ , -8961
+ , -8377
+ , -8961
, 0
- , - 8962
+ , -8962
, 0
, 7
- , - 8959
+ , -8959
, 4
- , - 4
- , - 479001600
+ , -4
+ , -479001600
, 0
, 79
, 40
- , - 7
- , - 4
- , - 47
- , - 40
+ , -7
+ , -4
+ , -47
+ , -40
, 4
, 80
- , - 79
- , - 8
- , - 159
- , - 80
+ , -79
+ , -8
+ , -159
+ , -80
, 8947
, 10
, 39
- , - 7875
- , - 8983
+ , -7875
+ , -8983
, 40
, 4
, 20
, 2
, 40
- , - 39
- , - 4
- , - 79
- , - 40
+ , -39
+ , -4
+ , -79
+ , -40
, 8947
, 10
, 19
- , - 7875
- , - 8997
+ , -7875
+ , -8997
, 20
, 2
, 10
, 1
, 20
- , - 19
- , - 2
- , - 39
- , - 20
+ , -19
+ , -2
+ , -39
+ , -20
, 8947
, 10
, 9
- , - 7875
- , - 9011
- , - 80
+ , -7875
+ , -9011
+ , -80
, 8939
, 10
, 30
, 10
- , - 9
- , - 1
- , - 19
- , - 10
+ , -9
+ , -1
+ , -19
+ , -10
, 2
, 40
- , - 30
- , - 4
- , - 70
- , - 40
+ , -30
+ , -4
+ , -70
+ , -40
, 8939
, 10
, 10
- , - 7875
- , - 9031
+ , -7875
+ , -9031
, 20
, 2
, 10
, 1
, 20
- , - 10
- , - 2
- , - 30
- , - 20
+ , -10
+ , -2
+ , -30
+ , -20
, 8939
, 10
, 0
- , - 7875
- , - 9045
+ , -7875
+ , -9045
, 10
, 16
, 40
- , - 1
+ , -1
, 10
, 0
- , - 1
- , - 10
- , - 10
- , - 16
- , - 8
- , - 96
- , - 80
+ , -1
+ , -10
+ , -10
+ , -16
+ , -8
+ , -96
+ , -80
, 8915
, 10
, 6
- , - 7875
- , - 9063
+ , -7875
+ , -9063
, 0
, 0
, 0
, 0
, 10
- , - 6
- , - 1
- , - 16
- , - 10
+ , -6
+ , -1
+ , -16
+ , -10
]
}
diff --git a/.output/golden/sq/eval/logged/mazonka/helloWorld.logged b/.output/golden/sq/eval/logged/mazonka/helloWorld.logged
index 953788ee0..b866e5a24 100644
--- a/.output/golden/sq/eval/logged/mazonka/helloWorld.logged
+++ b/.output/golden/sq/eval/logged/mazonka/helloWorld.logged
@@ -1,5 +1,5 @@
dump: Unit
- { unitIU = - 1
+ { unitIU = -1
, unitRAM =
[ 12
, 12
@@ -14,7 +14,7 @@ dump: Unit
, 37
, 12
, 0
- , - 1
+ , -1
, 15
, 38
, 36
@@ -33,13 +33,13 @@ dump: Unit
, 30
, 36
, 12
- , - 1
+ , -1
, 37
, 37
, 0
, 53
, 0
- , - 1
+ , -1
, 72
, 101
, 108
diff --git a/.output/golden/sq/eval/logged/mazonka/hi.logged b/.output/golden/sq/eval/logged/mazonka/hi.logged
index f06a96fc8..4167effe6 100644
--- a/.output/golden/sq/eval/logged/mazonka/hi.logged
+++ b/.output/golden/sq/eval/logged/mazonka/hi.logged
@@ -1,15 +1,15 @@
dump: Unit
- { unitIU = - 1
+ { unitIU = -1
, unitRAM =
[ 0
- , - 1
+ , -1
, 3
, 10
- , - 1
+ , -1
, 6
, 0
, 0
- , - 1
+ , -1
, 72
, 105
]
diff --git "a/.output/golden/ws/eval/logged/stn/asciiOff/original/calc-1\n.logged" "b/.output/golden/ws/eval/logged/stn/asciiOff/original/calc-1\n.logged"
index 39178b0e9..c181b45e4 100644
--- "a/.output/golden/ws/eval/logged/stn/asciiOff/original/calc-1\n.logged"
+++ "b/.output/golden/ws/eval/logged/stn/asciiOff/original/calc-1\n.logged"
@@ -307,7 +307,7 @@ dump: Unit
, IAL Dup
, IAL
( Cons
- ( - 1 )
+ ( -1 )
)
, IAL ( Binary Sub )
, IControl
@@ -502,6 +502,6 @@ dump: Unit
, 0
, 0
, 0
- , - 1
+ , -1
]
}
diff --git "a/.output/golden/ws/eval/logged/stn/asciiOn/original/calc-1\n.logged" "b/.output/golden/ws/eval/logged/stn/asciiOn/original/calc-1\n.logged"
index 25a1fee0d..7e55fbefc 100644
--- "a/.output/golden/ws/eval/logged/stn/asciiOn/original/calc-1\n.logged"
+++ "b/.output/golden/ws/eval/logged/stn/asciiOn/original/calc-1\n.logged"
@@ -307,7 +307,7 @@ dump: Unit
, IAL Dup
, IAL
( Cons
- ( - 1 )
+ ( -1 )
)
, IAL ( Binary Sub )
, IControl
@@ -502,6 +502,6 @@ dump: Unit
, 0
, 0
, 0
- , - 1
+ , -1
]
}
diff --git "a/.output/golden/ws/eval/logged/ws/asciiOff/original/calc-1\n.logged" "b/.output/golden/ws/eval/logged/ws/asciiOff/original/calc-1\n.logged"
index 39178b0e9..c181b45e4 100644
--- "a/.output/golden/ws/eval/logged/ws/asciiOff/original/calc-1\n.logged"
+++ "b/.output/golden/ws/eval/logged/ws/asciiOff/original/calc-1\n.logged"
@@ -307,7 +307,7 @@ dump: Unit
, IAL Dup
, IAL
( Cons
- ( - 1 )
+ ( -1 )
)
, IAL ( Binary Sub )
, IControl
@@ -502,6 +502,6 @@ dump: Unit
, 0
, 0
, 0
- , - 1
+ , -1
]
}
diff --git "a/.output/golden/ws/eval/logged/ws/asciiOn/original/calc-1\n.logged" "b/.output/golden/ws/eval/logged/ws/asciiOn/original/calc-1\n.logged"
index 25a1fee0d..7e55fbefc 100644
--- "a/.output/golden/ws/eval/logged/ws/asciiOn/original/calc-1\n.logged"
+++ "b/.output/golden/ws/eval/logged/ws/asciiOn/original/calc-1\n.logged"
@@ -307,7 +307,7 @@ dump: Unit
, IAL Dup
, IAL
( Cons
- ( - 1 )
+ ( -1 )
)
, IAL ( Binary Sub )
, IControl
@@ -502,6 +502,6 @@ dump: Unit
, 0
, 0
, 0
- , - 1
+ , -1
]
}
diff --git a/.output/golden/ws/il/original/calc.il b/.output/golden/ws/il/original/calc.il
index 8d899f03e..98e7e427b 100644
--- a/.output/golden/ws/il/original/calc.il
+++ b/.output/golden/ws/il/original/calc.il
@@ -304,7 +304,7 @@
, IAL Dup
, IAL
( Cons
- ( - 1 )
+ ( -1 )
)
, IAL ( Binary Sub )
, IControl
diff --git a/Makefile b/Makefile
index 7605d3dfc..862290ad9 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: all bench build check clean configure exec fast golden haddock hlint main output repl report run stan stylish test tix update
+.PHONY: all bench build check check-whitespace clean configure exec fast golden haddock hlint hpack install main output repl report run sdist stan stylish test tix update
all: update fast bench
@@ -12,6 +12,9 @@ build:
check:
cabal check
+check-whitespace:
+ git check-whitespace
+
clean:
cabal new-clean
if test -d .cabal-sandbox; then cabal sandbox delete; fi
@@ -26,7 +29,7 @@ exec:
make tix
cabal new-exec --jobs helma
-fast: main report
+fast: main report sdist install
golden:
if test -d .output/golden; then rm -r .output/golden; fi
@@ -37,6 +40,12 @@ haddock:
hlint:
./hlint.sh
+hpack:
+ curl -sSL https://github.com/sol/hpack/raw/main/get-hpack.sh | bash
+
+install:
+ cabal install all --overwrite-policy=always
+
main:
make stylish configure check build test
@@ -48,15 +57,21 @@ repl:
report:
make haddock stan hlint
+ ./report.sh
run:
make tix
cabal new-run --jobs helma
+sdist:
+ cabal sdist
+
stan:
./stan.sh
+ mv stan.html docs/reports
stylish:
+ #curl -sL https://raw.github.com/haskell/stylish-haskell/master/scripts/latest.sh | sh -s "-r -v -i hs"
stylish-haskell -r -v -i hs
test:
diff --git "a/\\" "b/\\"
deleted file mode 100644
index 273b8f7c1..000000000
--- "a/\\"
+++ /dev/null
@@ -1,28 +0,0 @@
-p 3fc1b51 Add Common Instruction List
-f 35794df WIP
-
-# Rebase 3b8e123..35794df onto 3b8e123 (2 commands)
-#
-# Commands:
-# p, f = use commit
-# r, reword = use commit, but edit the commit message
-# e, edit = use commit, but stop for amending
-# s, squash = use commit, but meld into previous commit
-# f, fixup = like "squash", but discard this commit's log message
-# x, exec = run command (the rest of the line) using shell
-# b, break = stop here (continue rebase later with 'git rebase --continue')
-# d, drop = remove commit
-# l, label = label current HEAD with a name
-# t, reset = reset HEAD to a label
-# m, merge [-C | -c ] [# ]
-# . create a merge commit using the original merge commit's
-# . message (or the oneline, if no original merge commit was
-# . specified). Use -c to reword the commit message.
-#
-# These lines can be re-ordered; they are executed from top to bottom.
-#
-# If you remove a line here THAT COMMIT WILL BE LOST.
-#
-# However, if you remove everything, the rebase will be aborted.
-#
-# Note that empty commits are commented out
diff --git a/cabal.project b/cabal.project
new file mode 100644
index 000000000..c15dcb086
--- /dev/null
+++ b/cabal.project
@@ -0,0 +1,7 @@
+packages: *.cabal
+
+source-repository-package
+ type: git
+ location: https://github.com/helvm/helio.git
+ branch: master
+ tag: 0.1.0.2
diff --git a/check-whitespace.sh b/check-whitespace.sh
deleted file mode 100755
index a7effb52b..000000000
--- a/check-whitespace.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-git check-whitespace
diff --git a/docs/NEWS.md b/docs/NEWS.md
deleted file mode 100644
index e0eb77063..000000000
--- a/docs/NEWS.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# 📰 NEWS
-
-**New interpreters and features.**
-
-Currently, **🔧 🎨 HelMA** interpret:
-* 🌈 BrainFuck
-* ❤️ [ETA](http://www.miketaylor.org.uk/tech/eta/doc/)
-* 💙 [SubLeq](http://mazonka.com/subleq/)
-* 🤍 [WhiteSpace](https://helvm.github.io/wspace/tutorial.html)
-
-[comment]: <> (* 💛 Malbolge)
-[comment]: <> (* 💚 Piet)
-
-For more see [CHANGELOG](CHANGELOG.md).
-
-## 🌈 ❤️ 💛 💚 💙 🤍 🖤 🦄
diff --git a/docs/README.md b/docs/README.md
index db8446160..de64b127d 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,3 +1,27 @@
+![haskell workflow](https://github.com/helvm/helma/actions/workflows/haskell.yml/badge.svg)
+![jekyll workflow](https://github.com/helvm/helma/actions/workflows/jekyll.yml/badge.svg)
+
+![watchers](https://img.shields.io/github/watchers/helvm/helma?style=social)
+![forks](https://img.shields.io/github/forks/helvm/helma?style=social)
+![stars](https://img.shields.io/github/stars/helvm/helma?style=social)
+
+![issues](https://img.shields.io/github/issues/helvm/helma)
+![issues closed](https://img.shields.io/github/issues-closed/helvm/helma)
+![issues pr](https://img.shields.io/github/issues-pr/helvm/helma)
+![issues pr closed](https://img.shields.io/github/issues-pr-closed/helvm/helma)
+
+![discussions](https://img.shields.io/github/discussions/helvm/helma)
+![release](https://img.shields.io/github/v/release/helvm/helma)
+![release-date](https://img.shields.io/github/release-date/helvm/helma)
+![tag](https://img.shields.io/github/v/tag/helvm/helma)
+![last-commit](https://img.shields.io/github/last-commit/helvm/helma)
+
+![languages count](https://img.shields.io/github/languages/count/helvm/helma)
+![languages code size](https://img.shields.io/github/languages/code-size/helvm/helma)
+![repo size](https://img.shields.io/github/repo-size/helvm/helma)
+![downloads](https://img.shields.io/github/downloads/helvm/helma/total)
+![licanse](https://img.shields.io/github/license/helvm/helma)
+
# 🔧 🎨 HelMA - Haskellish Esoteric Limited Minimal Automaton for Esoteric Languages implemented in Haskell
*One Automaton to rule them all, One Automaton to find them, One Automaton to bring them all and in the rainbow bind them.*
@@ -16,39 +40,45 @@ THAT is an Evaluator and an Interpreter for Esoteric Languages (EsoAutomata)
```
## Features
-Currently, **🔧 🎨 HelMA** can interpret:
-* 🌈 BrainFuck
-* ❤️ [ETA](http://www.miketaylor.org.uk/tech/eta/doc/)
-* 💙 [SubLeq](http://mazonka.com/subleq/)
-* 🤍 [WhiteSpace](https://helvm.github.io/wspace/tutorial.html)
-* 🦄 Zot
+Currently, **🔧 🎨 HelMA** can:
+* calculate:
+ * 🦄 Zot
+* interpret:
+ * 🌈 BrainFuck
+ * ❤️ [ETA](http://www.miketaylor.org.uk/tech/eta/doc/)
+ * 💙 [SubLeq](http://mazonka.com/subleq/)
+ * 🤍 [WhiteSpace](https://helvm.github.io/wspace/tutorial.html)
+[comment]: <> (* 🦄 BLC)
+[comment]: <> (* 🦄 Crazy L)
+[comment]: <> (* 🦄 DBLC)
+[comment]: <> (* 🦄 Lazy K)
[comment]: <> (* 💛 Malbolge)
[comment]: <> (* 💚 Piet)
-## For User
-* [INSTALL](INSTALL.md) - How to download, test and run.
-* [TODO](TODO.md) - Interpreter and features to do.
-* [NEWS](NEWS.md) - New interpreter and features.
-* [BUGS](BUGS.md) - Know bugs to fix.
-* [FAQ](FAQ.md) - Frequently Asked Questions & Frequently Given Answers.
-* [Blog](https://writeonly.github.io/projects/helma) - in Polish.
+## For Users
+* [INSTALL](users/INSTALL.md) - How to download and run
+* [AUTHORS](users/AUTHORS.md) - List of authors
+* [THANKS](users/THANKS.md) - Thanks for inspiration
+* [TODO](users/TODO.md) - Features and to do for all projects
+* [NEWS](users/NEWS.md) - New features
+* [FAQ](users/FAQ.md) - Frequently Asked Questions & Frequently Given Answers
## For Developers
-
-* [THANKS](THANKS.md)
-* [AUTHORS](AUTHORS.md)
-* [ROADMAP](ROADMAP.md)
-* [CHANGELOG](CHANGELOG.md)
-* [ARCHITECTURE](ARCHITECTURE.md)
-* [CONTRIBUTING](CONTRIBUTING.md)
-* [CODE OF CONDUCT](CODE_OF_CONDUCT.md)
+* [BUGS](developers/BUGS.md) - Know bugs to fix
+* [ROADMAP](developers/ROADMAP.md) - Long versions of [TODO](users/TODO.md)
+* [CHANGELOG](developers/CHANGELOG.md) - Long versions of [NEWS](users/NEWS.md)
+* [ARCHITECTURE](developers/ARCHITECTURE.md) - List of libraries
+* [CONTRIBUTING](developers/CONTRIBUTING.md)
+* [CODE OF CONDUCT](developers/CODE_OF_CONDUCT.md)
## Reports
-* [hlint](reports/hlint.html)
-* [stan](reports/stan.html)
+* [hadock](reports/doc/index.html) - A documentation
+* [hlint](reports/hlint.html) - Source code suggestions report
+* [hpc](reports/hpc/helma-test/hpc_index_fun.html) - Haskell program coverage report
+* [stan](reports/stan.html) - Haskell STatic ANalyser report
-## 🌈 ❤️ 💛 💚 💙 🤍 🖤 🦄
+## 🦄 🌈 ❤️ 💛 💚 💙 🤍 🖤
[Low-level]: https://en.wikipedia.org/wiki/Low-level_programming_language
[First-generation]: https://en.wikipedia.org/wiki/First-generation_programming_language
diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md
deleted file mode 100644
index 97d5779aa..000000000
--- a/docs/ROADMAP.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# 🛣️ ROADMAP
-
-**Planned features.**
-
-See [Issues](https://github.com/helvm/helma/issues).
-
-For short version see [TODO](TODO.md).
-
-## 🌈 ❤️ 💛 💚 💙 🤍 🖤 🦄
diff --git a/docs/TODO.md b/docs/TODO.md
deleted file mode 100644
index 03323fea7..000000000
--- a/docs/TODO.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# ✔️ TODO
-
-**Future Features**
-
-Features to implemented in Haskell:
-* [x] 🌈 BrainFuck Interpreter
-* [x] ❤️ [ETA](http://www.miketaylor.org.uk/tech/eta/doc/) Interpreter
-* [ ] 💛 [Malbolge](https://lutter.cc/malbolge/) Interpreter
-* [ ] 💚 [Piet](https://www.dangermouse.net/esoteric/piet.html) Interpreter
-* [x] 💙 [SubLeq](http://mazonka.com/subleq/) Interpreter
-* [x] 🤍 [WhiteSpace](https://helvm.github.io/WSpace/tutorial.html) Interpreter
-* [x] 🦄 [Zot](https://github.com/helvm/zot_haskell) Interpreter
-
-You can propose feature by [GitHub](https://github.com/helvm/helma/issues).
-
-For more see [ROADMAP](ROADMAP.md).
-
-## 🌈 ❤️ 💛 💚 💙 🤍 🖤 🦄
diff --git a/docs/_config.yml b/docs/_config.yml
index ec3a1f643..63d12e55d 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -119,11 +119,12 @@ edit:
extention : md
header_pages:
- - INSTALL.md
- - TODO.md
- - NEWS.md
- - BUGS.md
- - FAQ.md
+ - users/INSTALL.md
+ - users/AUTHORS.md
+ - users/THANKS.md
+ - users/TODO.md
+ - users/NEWS.md
+ - users/FAQ.md
minima:
# skin: solarized-dark
diff --git a/docs/ARCHITECTURE.md b/docs/developers/ARCHITECTURE.md
similarity index 98%
rename from docs/ARCHITECTURE.md
rename to docs/developers/ARCHITECTURE.md
index e903345d0..89904ce43 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/developers/ARCHITECTURE.md
@@ -43,4 +43,4 @@ Tools and libraries:
* [x] [filepath](https://github.com/haskell/filepath#readme) for manipulating FilePaths in a cross platform way.
* [x] [pretty-simple](https://github.com/cdepillabout/pretty-simple) for data types with a 'Show' instance
-## 🌈 ❤️ 💛 💚 💙 🤍 🖤 🦄
+## 🦄 🌈 ❤️ 💛 💚 💙 🤍 🖤
diff --git a/docs/BUGS.md b/docs/developers/BUGS.md
similarity index 61%
rename from docs/BUGS.md
rename to docs/developers/BUGS.md
index 102cdaed0..86cf66d4c 100644
--- a/docs/BUGS.md
+++ b/docs/developers/BUGS.md
@@ -1,11 +1,11 @@
# 🐛 BUGS
-Know bugs.
+**Know bugs.**
-*We do not have any know bugs.*
+[List of bugs](https://github.com/helvm/helma/labels/bug).
New bugs report by [Github Issues](https://github.com/writeonly/helma/issues).
If you want to fix bug read [CONTRIBUTING](CONTRIBUTING.md) and [COC](CODE_OF_CONDUCT.md).
-## 🌈 ❤️ 💛 💚 💙 🤍 🖤 🦄
+## 🦄 🌈 ❤️ 💛 💚 💙 🤍 🖤
diff --git a/docs/CHANGELOG.md b/docs/developers/CHANGELOG.md
similarity index 92%
rename from docs/CHANGELOG.md
rename to docs/developers/CHANGELOG.md
index a480dbb05..914e6a4c1 100644
--- a/docs/CHANGELOG.md
+++ b/docs/developers/CHANGELOG.md
@@ -1,5 +1,10 @@
# 📅 Revision history for HelMA
+## 0.7.2.1 -- 2022-09-09
+
+* Extract HelIO
+* Upgrade documentations
+
## 0.7.2.0 -- 2022-02-22
* Extract `Automaton` from `Evaluator`
@@ -70,7 +75,7 @@
* Use `Safe`, remove `error` calls
* Replace `String` by `Text`
-* Extract `HelVM.Common` and `HelVM.Common.Digit` packages
+* Extract `HelVM.HelIO` and `HelVM.HelIO.Digit` packages
## 0.6.7.0 -- 2021-06-11
@@ -132,4 +137,4 @@
* First version. Released on an unsuspecting world.
-## 🌈 ❤️ 💛 💚 💙 🤍 🖤 🦄
+## 🦄 🌈 ❤️ 💛 💚 💙 🤍 🖤
diff --git a/docs/CODE_OF_CONDUCT.md b/docs/developers/CODE_OF_CONDUCT.md
similarity index 70%
rename from docs/CODE_OF_CONDUCT.md
rename to docs/developers/CODE_OF_CONDUCT.md
index 2ee98b1cc..42e99b821 100644
--- a/docs/CODE_OF_CONDUCT.md
+++ b/docs/developers/CODE_OF_CONDUCT.md
@@ -5,4 +5,4 @@ I'm a teapot.
The Celestial Teapot.
And this is my `Contributor Covenant Code of Conduct`.
-## 🌈 ❤️ 💛 💚 💙 🤍 🖤 🦄
+## 🦄 🌈 ❤️ 💛 💚 💙 🤍 🖤
diff --git a/docs/CONTRIBUTING.md b/docs/developers/CONTRIBUTING.md
similarity index 62%
rename from docs/CONTRIBUTING.md
rename to docs/developers/CONTRIBUTING.md
index c2c096b87..7715cf3a0 100644
--- a/docs/CONTRIBUTING.md
+++ b/docs/developers/CONTRIBUTING.md
@@ -1,11 +1,11 @@
-# CONTRIBUTING
+# 💗 CONTRIBUTING
## License
Licensed under either of
- * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
+* Apache License, Version 2.0, ([LICENSE-APACHE](../license/LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
+* MIT license ([LICENSE-MIT](../license/LICENSE-MIT) or http://opensource.org/licenses/MIT
### Contribution
@@ -22,4 +22,4 @@ We use `HLint`
curl -sSL https://raw.github.com/ndmitchell/hlint/master/misc/run.sh | sh -s .
```
-## 🌈 ❤️ 💛 💚 💙 🤍 🖤 🦄
+## 🦄 🌈 ❤️ 💛 💚 💙 🤍 🖤
diff --git a/docs/developers/ROADMAP.md b/docs/developers/ROADMAP.md
new file mode 100644
index 000000000..bf6498b35
--- /dev/null
+++ b/docs/developers/ROADMAP.md
@@ -0,0 +1,11 @@
+# 🛣️ ROADMAP
+
+**Milestones**:
+
+1. [Combinatory Automata](https://github.com/helvm/helma/milestone/1)
+2. [Word Automata](https://github.com/helvm/helma/milestone/2)
+3. [Bit Automata](https://github.com/helvm/helma/milestone/3)
+
+For planned features see [TODO](../users/TODO.md).
+
+## 🦄 🌈 ❤️ 💛 💚 💙 🤍 🖤
diff --git a/docs/LICENSE b/docs/license/LICENSE
similarity index 87%
rename from docs/LICENSE
rename to docs/license/LICENSE
index 37d145893..7a2aa3108 100644
--- a/docs/LICENSE
+++ b/docs/license/LICENSE
@@ -1,4 +1,4 @@
-Copyright 2020 WriteOnly Developers
+Copyright 2020-2022 WriteOnly Developers
Licensed under the Apache License, Version 2.0, or the MIT license HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Automaton-TreeAutomaton.html b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Automaton-TreeAutomaton.html
new file mode 100644
index 000000000..cb97bfcd0
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Automaton-TreeAutomaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Automaton.html b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Automaton.html
new file mode 100644
index 000000000..12b205f1f
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Automaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Automaton
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Instruction-FlatInstruction.html b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Instruction-FlatInstruction.html
new file mode 100644
index 000000000..70c8f05b7
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Instruction-FlatInstruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Instruction-SimpleInstruction.html b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Instruction-SimpleInstruction.html
new file mode 100644
index 000000000..31ee6ce72
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Instruction-SimpleInstruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Instruction-TreeInstruction.html b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Instruction-TreeInstruction.html
new file mode 100644
index 000000000..180dd9e60
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Instruction-TreeInstruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Lexer.html b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Lexer.html
new file mode 100644
index 000000000..1b22e2206
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Lexer.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Lexer
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Parser.html b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Parser.html
new file mode 100644
index 000000000..f8f17d777
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Parser.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Parser
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Symbol.html b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Symbol.html
new file mode 100644
index 000000000..c627d9548
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-Symbol.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Symbol
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-TableOfInstructions.html b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-TableOfInstructions.html
new file mode 100644
index 000000000..2995e34a8
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-TableOfInstructions.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.TableOfInstructions
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-TapeOfSymbols.html b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-TapeOfSymbols.html
new file mode 100644
index 000000000..2fe528bdb
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-BrainFuck-TapeOfSymbols.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-Cat-Automaton.html b/docs/reports/doc/HelVM-HelMA-Automata-Cat-Automaton.html
new file mode 100644
index 000000000..881e0c721
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-Cat-Automaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.Cat.Automaton
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-ETA-Addressing.html b/docs/reports/doc/HelVM-HelMA-Automata-ETA-Addressing.html
new file mode 100644
index 000000000..93c458f7e
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-ETA-Addressing.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.ETA.Addressing
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-ETA-Automaton.html b/docs/reports/doc/HelVM-HelMA-Automata-ETA-Automaton.html
new file mode 100644
index 000000000..3a863372f
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-ETA-Automaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.ETA.Automaton
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-ETA-Evaluator.html b/docs/reports/doc/HelVM-HelMA-Automata-ETA-Evaluator.html
new file mode 100644
index 000000000..d0245ec37
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-ETA-Evaluator.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.ETA.Evaluator
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-ETA-Lexer.html b/docs/reports/doc/HelVM-HelMA-Automata-ETA-Lexer.html
new file mode 100644
index 000000000..31ca6194e
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-ETA-Lexer.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.ETA.Lexer
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-ETA-OperandParsers.html b/docs/reports/doc/HelVM-HelMA-Automata-ETA-OperandParsers.html
new file mode 100644
index 000000000..74053c4c5
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-ETA-OperandParsers.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.ETA.OperandParsers
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-ETA-Symbol.html b/docs/reports/doc/HelVM-HelMA-Automata-ETA-Symbol.html
new file mode 100644
index 000000000..3c0df56ee
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-ETA-Symbol.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.ETA.Symbol
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-ETA-Token.html b/docs/reports/doc/HelVM-HelMA-Automata-ETA-Token.html
new file mode 100644
index 000000000..1b7629981
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-ETA-Token.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.ETA.Token Documentation data Token #
Instances Instances details
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-Rev-Automaton.html b/docs/reports/doc/HelVM-HelMA-Automata-Rev-Automaton.html
new file mode 100644
index 000000000..904a04227
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-Rev-Automaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.Rev.Automaton
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-SubLeq-Automaton.html b/docs/reports/doc/HelVM-HelMA-Automata-SubLeq-Automaton.html
new file mode 100644
index 000000000..1db4ac52d
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-SubLeq-Automaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.SubLeq.Automaton
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-SubLeq-Evaluator.html b/docs/reports/doc/HelVM-HelMA-Automata-SubLeq-Evaluator.html
new file mode 100644
index 000000000..cc136673a
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-SubLeq-Evaluator.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.SubLeq.Evaluator
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-SubLeq-Lexer.html b/docs/reports/doc/HelVM-HelMA-Automata-SubLeq-Lexer.html
new file mode 100644
index 000000000..da3e4dcc5
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-SubLeq-Lexer.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.SubLeq.Lexer Documentation newtype Symbols #
Instances Instances details
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-SubLeq-Symbol.html b/docs/reports/doc/HelVM-HelMA-Automata-SubLeq-Symbol.html
new file mode 100644
index 000000000..26c3eaa5c
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-SubLeq-Symbol.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.SubLeq.Symbol
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Automaton.html b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Automaton.html
new file mode 100644
index 000000000..30c1c6696
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Automaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.Automaton
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Evaluator.html b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Evaluator.html
new file mode 100644
index 000000000..18c71a4cb
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Evaluator.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.Evaluator
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Lexer.html b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Lexer.html
new file mode 100644
index 000000000..6f7dafe75
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Lexer.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.Lexer
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-OperandParsers.html b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-OperandParsers.html
new file mode 100644
index 000000000..6689537f3
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-OperandParsers.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.OperandParsers
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Parser.html b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Parser.html
new file mode 100644
index 000000000..97f0357bf
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Parser.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.Parser
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-SimpleParams.html b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-SimpleParams.html
new file mode 100644
index 000000000..4332455d5
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-SimpleParams.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.SimpleParams
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Symbol.html b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Symbol.html
new file mode 100644
index 000000000..ab46d605a
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Symbol.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.Symbol
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Token.html b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Token.html
new file mode 100644
index 000000000..b7729c539
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-WhiteSpace-Token.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.Token Documentation data Token #
Instances Instances details
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-Zot-Automaton.html b/docs/reports/doc/HelVM-HelMA-Automata-Zot-Automaton.html
new file mode 100644
index 000000000..224cde737
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-Zot-Automaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.Zot.Automaton
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-Zot-Evaluator.html b/docs/reports/doc/HelVM-HelMA-Automata-Zot-Evaluator.html
new file mode 100644
index 000000000..93a892292
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-Zot-Evaluator.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.Zot.Evaluator
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-Zot-Expression.html b/docs/reports/doc/HelVM-HelMA-Automata-Zot-Expression.html
new file mode 100644
index 000000000..5641bb6cb
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-Zot-Expression.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.Zot.Expression
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automata-Zot-Parser.html b/docs/reports/doc/HelVM-HelMA-Automata-Zot-Parser.html
new file mode 100644
index 000000000..36d922fd2
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automata-Zot-Parser.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.Zot.Parser
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-API-EvalParams.html b/docs/reports/doc/HelVM-HelMA-Automaton-API-EvalParams.html
new file mode 100644
index 000000000..e434a8d9c
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-API-EvalParams.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.API.EvalParams
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-API-IOTypes.html b/docs/reports/doc/HelVM-HelMA-Automaton-API-IOTypes.html
new file mode 100644
index 000000000..642581b77
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-API-IOTypes.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.API.IOTypes
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-API-TypeOptions.html b/docs/reports/doc/HelVM-HelMA-Automaton-API-TypeOptions.html
new file mode 100644
index 000000000..673c4fae0
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-API-TypeOptions.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.API.TypeOptions
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-IO-BusinessIO.html b/docs/reports/doc/HelVM-HelMA-Automaton-IO-BusinessIO.html
new file mode 100644
index 000000000..ff281e3ae
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-IO-BusinessIO.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.IO.BusinessIO
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-IO-EvaluatorIO.html b/docs/reports/doc/HelVM-HelMA-Automaton-IO-EvaluatorIO.html
new file mode 100644
index 000000000..3d151f93f
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-IO-EvaluatorIO.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.IO.EvaluatorIO
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-IO-FreeIO.html b/docs/reports/doc/HelVM-HelMA-Automaton-IO-FreeIO.html
new file mode 100644
index 000000000..db45aa4e4
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-IO-FreeIO.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.IO.FreeIO
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-IO-MockIO.html b/docs/reports/doc/HelVM-HelMA-Automaton-IO-MockIO.html
new file mode 100644
index 000000000..5feb641f9
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-IO-MockIO.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.IO.MockIO
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Instruction-ALInstruction.html b/docs/reports/doc/HelVM-HelMA-Automaton-Instruction-ALInstruction.html
new file mode 100644
index 000000000..f630986b6
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Instruction-ALInstruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Instruction.ALInstruction
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Instruction-ControlInstruction.html b/docs/reports/doc/HelVM-HelMA-Automaton-Instruction-ControlInstruction.html
new file mode 100644
index 000000000..f224ce3ea
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Instruction-ControlInstruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Instruction.ControlInstruction
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Instruction-IOInstruction.html b/docs/reports/doc/HelVM-HelMA-Automaton-Instruction-IOInstruction.html
new file mode 100644
index 000000000..9ea274e10
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Instruction-IOInstruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Instruction.IOInstruction
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Instruction-LSInstruction.html b/docs/reports/doc/HelVM-HelMA-Automaton-Instruction-LSInstruction.html
new file mode 100644
index 000000000..83f953a6e
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Instruction-LSInstruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Instruction.LSInstruction
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Instruction.html b/docs/reports/doc/HelVM-HelMA-Automaton-Instruction.html
new file mode 100644
index 000000000..36e2b72da
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Instruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Instruction
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Types-CellType.html b/docs/reports/doc/HelVM-HelMA-Automaton-Types-CellType.html
new file mode 100644
index 000000000..8103c0b67
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Types-CellType.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Types.CellType
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Types-DumpType.html b/docs/reports/doc/HelVM-HelMA-Automaton-Types-DumpType.html
new file mode 100644
index 000000000..1b18e1fa1
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Types-DumpType.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Types.DumpType
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Types-IntCellType.html b/docs/reports/doc/HelVM-HelMA-Automaton-Types-IntCellType.html
new file mode 100644
index 000000000..4858ccf2d
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Types-IntCellType.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Types.IntCellType
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Types-RAMType.html b/docs/reports/doc/HelVM-HelMA-Automaton-Types-RAMType.html
new file mode 100644
index 000000000..fe8627337
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Types-RAMType.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Types.RAMType Documentation data RAMType #
Instances Instances details
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Types-StackType.html b/docs/reports/doc/HelVM-HelMA-Automaton-Types-StackType.html
new file mode 100644
index 000000000..a3b350219
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Types-StackType.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Types.StackType
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Types-TokenType.html b/docs/reports/doc/HelVM-HelMA-Automaton-Types-TokenType.html
new file mode 100644
index 000000000..763ad8e7c
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Types-TokenType.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Types.TokenType
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Units-ALU.html b/docs/reports/doc/HelVM-HelMA-Automaton-Units-ALU.html
new file mode 100644
index 000000000..e146b6e8f
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Units-ALU.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Units.ALU Synopsis doOutputChar2 :: ALU m ll element => ll -> m lldoInputChar2 :: ALU m ll element => ll -> m lldoInputDec2 :: ALU m ll element => ll -> m lldivMod :: ALU m ll element => ll -> m llsub :: ALU m ll element => ll -> m llbinaryInstruction :: ALU m ll element => BinaryInstruction -> ll -> m llbinaryInstructions :: ALU m ll element => [BinaryInstruction ] -> ll -> m llhalibut :: ALU m ll element => ll -> m llalInstruction :: ALU m ll element => ALInstruction -> ll -> m llmove :: ALU m ll element => Index -> ll -> m llswap :: ALU m ll element => ll -> m lldiscard :: (MonadSafe m, ListLike full item) => full -> m fullslide :: ALU m ll element => Index -> ll -> m lldup :: ALU m ll element => ll -> m llcopy :: ALU m ll element => Index -> ll -> m llflipPush1 :: Stack ll element => ll -> element -> llcharPush1 :: (Num element, Stack ll element) => Char -> ll -> llgenericPush1 :: (Integral v, Num element, Stack ll element) => v -> ll -> llpop1 :: ALU m ll element => ll -> m (element, ll)pop2 :: ALU m ll element => ll -> m (element, element, ll)push1 :: Stack ll element => element -> ll -> llpush2 :: Stack ll element => element -> element -> ll -> llsplitAt :: ListLike full item => Int -> full -> (full, full)drop :: ListLike full item => Int -> full -> fulltype ALU m ll element = (BIO m, Stack ll element, Integral element)type Stack ll element = (Show ll, ListLike ll element, IndexSafe ll element)Documentation sub :: ALU m ll element => ll -> m ll #
halibut :: ALU m ll element => ll -> m ll #
Halibut and Pick instructions
move :: ALU m ll element => Index -> ll -> m ll #
swap :: ALU m ll element => ll -> m ll #
discard :: (MonadSafe m, ListLike full item) => full -> m full #
slide :: ALU m ll element => Index -> ll -> m ll #
dup :: ALU m ll element => ll -> m ll #
copy :: ALU m ll element => Index -> ll -> m ll #
pop1 :: ALU m ll element => ll -> m (element, ll) #
pop2 :: ALU m ll element => ll -> m (element, element, ll) #
push2 :: Stack ll element => element -> element -> ll -> ll #
splitAt :: ListLike full item => Int -> full -> (full, full) #
drop :: ListLike full item => Int -> full -> full #
type Stack ll element = (Show ll, ListLike ll element, IndexSafe ll element) #
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Units-CPU.html b/docs/reports/doc/HelVM-HelMA-Automaton-Units-CPU.html
new file mode 100644
index 000000000..ad208312e
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Units-CPU.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Units.CPU
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Units-LSU.html b/docs/reports/doc/HelVM-HelMA-Automaton-Units-LSU.html
new file mode 100644
index 000000000..61d1519ed
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Units-LSU.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Units.LSU Documentation type LSU m s r element = (ALU m s element, RAM r element) #
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Units-RAM.html b/docs/reports/doc/HelVM-HelMA-Automaton-Units-RAM.html
new file mode 100644
index 000000000..16efca178
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Units-RAM.html
@@ -0,0 +1,2 @@
+HelVM.HelMA.Automaton.Units.RAM Documentation load :: RAM ll element => ll -> Address -> element #
type RAM ll element = (Show ll, Default element, II ll element) #
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-Units-Unit.html b/docs/reports/doc/HelVM-HelMA-Automaton-Units-Unit.html
new file mode 100644
index 000000000..1311ac4e4
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-Units-Unit.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Units.Unit Documentation data Unit s r #
Instances Instances details
\ No newline at end of file
diff --git a/docs/reports/doc/HelVM-HelMA-Automaton-WrapTokenList.html b/docs/reports/doc/HelVM-HelMA-Automaton-WrapTokenList.html
new file mode 100644
index 000000000..598b8ddbe
--- /dev/null
+++ b/docs/reports/doc/HelVM-HelMA-Automaton-WrapTokenList.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.WrapTokenList
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-A.html b/docs/reports/doc/doc-index-A.html
new file mode 100644
index 000000000..e9c347694
--- /dev/null
+++ b/docs/reports/doc/doc-index-A.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - A)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-All.html b/docs/reports/doc/doc-index-All.html
new file mode 100644
index 000000000..10094edcf
--- /dev/null
+++ b/docs/reports/doc/doc-index-All.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-B.html b/docs/reports/doc/doc-index-B.html
new file mode 100644
index 000000000..03a59bd10
--- /dev/null
+++ b/docs/reports/doc/doc-index-B.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - B)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-C.html b/docs/reports/doc/doc-index-C.html
new file mode 100644
index 000000000..08b60857b
--- /dev/null
+++ b/docs/reports/doc/doc-index-C.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - C)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-D.html b/docs/reports/doc/doc-index-D.html
new file mode 100644
index 000000000..c3992d813
--- /dev/null
+++ b/docs/reports/doc/doc-index-D.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - D)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-E.html b/docs/reports/doc/doc-index-E.html
new file mode 100644
index 000000000..24e2b1a3d
--- /dev/null
+++ b/docs/reports/doc/doc-index-E.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - E)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-F.html b/docs/reports/doc/doc-index-F.html
new file mode 100644
index 000000000..4578b19e0
--- /dev/null
+++ b/docs/reports/doc/doc-index-F.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - F)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-G.html b/docs/reports/doc/doc-index-G.html
new file mode 100644
index 000000000..6e074b149
--- /dev/null
+++ b/docs/reports/doc/doc-index-G.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - G)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-H.html b/docs/reports/doc/doc-index-H.html
new file mode 100644
index 000000000..dd1ef44a8
--- /dev/null
+++ b/docs/reports/doc/doc-index-H.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - H)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-I.html b/docs/reports/doc/doc-index-I.html
new file mode 100644
index 000000000..a28a37f44
--- /dev/null
+++ b/docs/reports/doc/doc-index-I.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - I)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-J.html b/docs/reports/doc/doc-index-J.html
new file mode 100644
index 000000000..d5c8ec0d4
--- /dev/null
+++ b/docs/reports/doc/doc-index-J.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - J)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-L.html b/docs/reports/doc/doc-index-L.html
new file mode 100644
index 000000000..d2f4f485f
--- /dev/null
+++ b/docs/reports/doc/doc-index-L.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - L)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-M.html b/docs/reports/doc/doc-index-M.html
new file mode 100644
index 000000000..148128ec5
--- /dev/null
+++ b/docs/reports/doc/doc-index-M.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - M)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-N.html b/docs/reports/doc/doc-index-N.html
new file mode 100644
index 000000000..8166fa6b6
--- /dev/null
+++ b/docs/reports/doc/doc-index-N.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - N)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-O.html b/docs/reports/doc/doc-index-O.html
new file mode 100644
index 000000000..3c8edaa8f
--- /dev/null
+++ b/docs/reports/doc/doc-index-O.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - O)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-P.html b/docs/reports/doc/doc-index-P.html
new file mode 100644
index 000000000..c06a1bba2
--- /dev/null
+++ b/docs/reports/doc/doc-index-P.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - P)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-R.html b/docs/reports/doc/doc-index-R.html
new file mode 100644
index 000000000..362fd292a
--- /dev/null
+++ b/docs/reports/doc/doc-index-R.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - R)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-S.html b/docs/reports/doc/doc-index-S.html
new file mode 100644
index 000000000..d1b6ba7e6
--- /dev/null
+++ b/docs/reports/doc/doc-index-S.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - S)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-T.html b/docs/reports/doc/doc-index-T.html
new file mode 100644
index 000000000..af0929a00
--- /dev/null
+++ b/docs/reports/doc/doc-index-T.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - T)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-U.html b/docs/reports/doc/doc-index-U.html
new file mode 100644
index 000000000..ba5ad3cde
--- /dev/null
+++ b/docs/reports/doc/doc-index-U.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - U)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-V.html b/docs/reports/doc/doc-index-V.html
new file mode 100644
index 000000000..b139b4ae3
--- /dev/null
+++ b/docs/reports/doc/doc-index-V.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - V)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-W.html b/docs/reports/doc/doc-index-W.html
new file mode 100644
index 000000000..3c236db3b
--- /dev/null
+++ b/docs/reports/doc/doc-index-W.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - W)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index-Z.html b/docs/reports/doc/doc-index-Z.html
new file mode 100644
index 000000000..5f567893f
--- /dev/null
+++ b/docs/reports/doc/doc-index-Z.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - Z)
\ No newline at end of file
diff --git a/docs/reports/doc/doc-index.html b/docs/reports/doc/doc-index.html
new file mode 100644
index 000000000..1fb0f27e1
--- /dev/null
+++ b/docs/reports/doc/doc-index.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index)
\ No newline at end of file
diff --git a/docs/reports/doc/haddock-bundle.min.js b/docs/reports/doc/haddock-bundle.min.js
new file mode 100644
index 000000000..45adda985
--- /dev/null
+++ b/docs/reports/doc/haddock-bundle.min.js
@@ -0,0 +1,2 @@
+!function i(s,a,l){function c(t,e){if(!a[t]){if(!s[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}var r=a[t]={exports:{}};s[t][0].call(r.exports,function(e){return c(s[t][1][e]||e)},r,r.exports,i,s,a,l)}return a[t].exports}for(var u="function"==typeof require&&require,e=0;e element with id '"+e+"'");return t}function x(){return u.defaultInstanceState==i.Open}function w(e){for(var t=S(e.target.id),n=t.element.open,o=0,r=t.toggles;owindow.innerHeight?this.searchResults.scrollTop+=e.bottom-window.innerHeight+80:e.topn)return u(e,this.pattern,o);var r=this.options,i=r.location,s=r.distance,a=r.threshold,l=r.findAllMatches,c=r.minMatchCharLength;return d(e,this.pattern,this.patternAlphabet,{location:i,distance:s,threshold:a,findAllMatches:l,minMatchCharLength:c})}}]),y}();e.exports=r},function(e,t,n){"use strict";var u=n(0);e.exports=function(e,t){return function e(t,n,o){if(n){var r=n.indexOf("."),i=n,s=null;-1!==r&&(i=n.slice(0,r),s=n.slice(r+1));var a=t[i];if(null!=a)if(s||"string"!=typeof a&&"number"!=typeof a)if(u(a))for(var l=0,c=a.length;l 0 and <= 1");p=p.name}else a[p]={weight:1};this._analyze({key:p,value:this.options.getFn(u,p),record:u,index:l},{resultMap:o,results:r,tokenSearchers:e,fullSearcher:t})}return{weights:a,results:r}}},{key:"_analyze",value:function(e,t){var n=e.key,o=e.arrayIndex,r=void 0===o?-1:o,i=e.value,s=e.record,a=e.index,l=t.tokenSearchers,c=void 0===l?[]:l,u=t.fullSearcher,d=void 0===u?[]:u,h=t.resultMap,p=void 0===h?{}:h,f=t.results,v=void 0===f?[]:f;if(null!=i){var g=!1,m=-1,y=0;if("string"==typeof i){this._log("\nKey: "+(""===n?"-":n));var _=d.search(i);if(this._log('Full text: "'+i+'", score: '+_.score),this.options.tokenize){for(var b=i.split(this.options.tokenSeparator),k=[],S=0;S=c.length;if(this._log("\nCheck Matches: "+T),(g||_.isMatch)&&T){var N=p[a];N?N.output.push({key:n,arrayIndex:r,value:i,score:A,matchedIndices:_.matchedIndices}):(p[a]={item:s,output:[{key:n,arrayIndex:r,value:i,score:A,matchedIndices:_.matchedIndices}]},v.push(p[a]))}}else if(V(i))for(var P=0,j=i.length;PHelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Automaton-TreeAutomaton.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Automaton-TreeAutomaton.html
new file mode 100644
index 000000000..3831bb1a0
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Automaton-TreeAutomaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Automaton.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Automaton.html
new file mode 100644
index 000000000..efd80406c
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Automaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Automaton
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Instruction-FlatInstruction.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Instruction-FlatInstruction.html
new file mode 100644
index 000000000..2d901431f
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Instruction-FlatInstruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Instruction-SimpleInstruction.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Instruction-SimpleInstruction.html
new file mode 100644
index 000000000..cea029d91
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Instruction-SimpleInstruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Instruction-TreeInstruction.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Instruction-TreeInstruction.html
new file mode 100644
index 000000000..266a30779
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Instruction-TreeInstruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Lexer.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Lexer.html
new file mode 100644
index 000000000..a9b4a236a
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Lexer.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Lexer
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Parser.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Parser.html
new file mode 100644
index 000000000..bc5bba076
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Parser.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Parser
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Symbol.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Symbol.html
new file mode 100644
index 000000000..dcfedfc40
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-Symbol.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.Symbol
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-TableOfInstructions.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-TableOfInstructions.html
new file mode 100644
index 000000000..28a9f3d34
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-TableOfInstructions.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.TableOfInstructions
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-TapeOfSymbols.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-TapeOfSymbols.html
new file mode 100644
index 000000000..d6bb611a8
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-BrainFuck-TapeOfSymbols.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-Cat-Automaton.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-Cat-Automaton.html
new file mode 100644
index 000000000..b6f40274e
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-Cat-Automaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.Cat.Automaton
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Addressing.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Addressing.html
new file mode 100644
index 000000000..880c3fa3e
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Addressing.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.ETA.Addressing
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Automaton.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Automaton.html
new file mode 100644
index 000000000..a8c80450e
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Automaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.ETA.Automaton
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Evaluator.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Evaluator.html
new file mode 100644
index 000000000..b843e6c25
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Evaluator.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.ETA.Evaluator
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Lexer.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Lexer.html
new file mode 100644
index 000000000..9260b3afd
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Lexer.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.ETA.Lexer
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-OperandParsers.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-OperandParsers.html
new file mode 100644
index 000000000..fd376b474
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-OperandParsers.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.ETA.OperandParsers
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Symbol.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Symbol.html
new file mode 100644
index 000000000..6aa889f0f
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Symbol.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.ETA.Symbol
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Token.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Token.html
new file mode 100644
index 000000000..1b02ff53e
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-ETA-Token.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.ETA.Token Documentation data Token #
Instances Instances details
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-Rev-Automaton.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-Rev-Automaton.html
new file mode 100644
index 000000000..bfa09e7c2
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-Rev-Automaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.Rev.Automaton
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-SubLeq-Automaton.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-SubLeq-Automaton.html
new file mode 100644
index 000000000..e6ffe222c
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-SubLeq-Automaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.SubLeq.Automaton
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-SubLeq-Evaluator.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-SubLeq-Evaluator.html
new file mode 100644
index 000000000..da27d13bd
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-SubLeq-Evaluator.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.SubLeq.Evaluator
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-SubLeq-Lexer.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-SubLeq-Lexer.html
new file mode 100644
index 000000000..342bb8bbd
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-SubLeq-Lexer.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.SubLeq.Lexer Documentation newtype Symbols #
Instances Instances details
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-SubLeq-Symbol.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-SubLeq-Symbol.html
new file mode 100644
index 000000000..62bc9412c
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-SubLeq-Symbol.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.SubLeq.Symbol
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Automaton.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Automaton.html
new file mode 100644
index 000000000..9d74fd384
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Automaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.Automaton
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Evaluator.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Evaluator.html
new file mode 100644
index 000000000..c48f27a6b
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Evaluator.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.Evaluator
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Lexer.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Lexer.html
new file mode 100644
index 000000000..b334cfe5f
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Lexer.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.Lexer
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-OperandParsers.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-OperandParsers.html
new file mode 100644
index 000000000..336791398
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-OperandParsers.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.OperandParsers
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Parser.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Parser.html
new file mode 100644
index 000000000..8f87b54b0
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Parser.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.Parser
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-SimpleParams.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-SimpleParams.html
new file mode 100644
index 000000000..d0f9b9697
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-SimpleParams.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.SimpleParams
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Symbol.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Symbol.html
new file mode 100644
index 000000000..5cbe66826
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Symbol.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.Symbol
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Token.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Token.html
new file mode 100644
index 000000000..95e985bec
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-WhiteSpace-Token.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.WhiteSpace.Token Documentation data Token #
Instances Instances details
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-Zot-Automaton.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-Zot-Automaton.html
new file mode 100644
index 000000000..fb9a6ee93
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-Zot-Automaton.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.Zot.Automaton
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-Zot-Evaluator.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-Zot-Evaluator.html
new file mode 100644
index 000000000..ab0e3fad8
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-Zot-Evaluator.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.Zot.Evaluator
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-Zot-Expression.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-Zot-Expression.html
new file mode 100644
index 000000000..624a43e97
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-Zot-Expression.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.Zot.Expression
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automata-Zot-Parser.html b/docs/reports/doc/helma/HelVM-HelMA-Automata-Zot-Parser.html
new file mode 100644
index 000000000..125cb736e
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automata-Zot-Parser.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automata.Zot.Parser
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-API-EvalParams.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-API-EvalParams.html
new file mode 100644
index 000000000..1ca71e244
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-API-EvalParams.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.API.EvalParams
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-API-IOTypes.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-API-IOTypes.html
new file mode 100644
index 000000000..5506032e2
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-API-IOTypes.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.API.IOTypes
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-API-TypeOptions.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-API-TypeOptions.html
new file mode 100644
index 000000000..3ae28af28
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-API-TypeOptions.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.API.TypeOptions
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-IO-BusinessIO.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-IO-BusinessIO.html
new file mode 100644
index 000000000..6ae3e45b1
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-IO-BusinessIO.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.IO.BusinessIO
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-IO-EvaluatorIO.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-IO-EvaluatorIO.html
new file mode 100644
index 000000000..31e5702b7
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-IO-EvaluatorIO.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.IO.EvaluatorIO
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-IO-FreeIO.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-IO-FreeIO.html
new file mode 100644
index 000000000..8547c32eb
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-IO-FreeIO.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.IO.FreeIO
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-IO-MockIO.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-IO-MockIO.html
new file mode 100644
index 000000000..a209850df
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-IO-MockIO.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.IO.MockIO
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction-ALInstruction.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction-ALInstruction.html
new file mode 100644
index 000000000..9a8cfecec
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction-ALInstruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Instruction.ALInstruction
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction-ControlInstruction.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction-ControlInstruction.html
new file mode 100644
index 000000000..442752f83
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction-ControlInstruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Instruction.ControlInstruction
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction-IOInstruction.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction-IOInstruction.html
new file mode 100644
index 000000000..f90faf833
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction-IOInstruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Instruction.IOInstruction
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction-LSInstruction.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction-LSInstruction.html
new file mode 100644
index 000000000..fb47a9c8d
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction-LSInstruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Instruction.LSInstruction
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction.html
new file mode 100644
index 000000000..dd2eff82d
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Instruction.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Instruction
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-CellType.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-CellType.html
new file mode 100644
index 000000000..4ad6a5507
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-CellType.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Types.CellType
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-DumpType.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-DumpType.html
new file mode 100644
index 000000000..a08c2e30d
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-DumpType.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Types.DumpType
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-IntCellType.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-IntCellType.html
new file mode 100644
index 000000000..c803e208b
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-IntCellType.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Types.IntCellType
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-RAMType.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-RAMType.html
new file mode 100644
index 000000000..a1bc9500f
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-RAMType.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Types.RAMType Documentation data RAMType #
Instances Instances details
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-StackType.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-StackType.html
new file mode 100644
index 000000000..54258cc92
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-StackType.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Types.StackType
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-TokenType.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-TokenType.html
new file mode 100644
index 000000000..53f7a5b72
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Types-TokenType.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Types.TokenType
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-ALU.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-ALU.html
new file mode 100644
index 000000000..1ab40dd25
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-ALU.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Units.ALU Synopsis doOutputChar2 :: ALU m ll element => ll -> m lldoInputChar2 :: ALU m ll element => ll -> m lldoInputDec2 :: ALU m ll element => ll -> m lldivMod :: ALU m ll element => ll -> m llsub :: ALU m ll element => ll -> m llbinaryInstruction :: ALU m ll element => BinaryInstruction -> ll -> m llbinaryInstructions :: ALU m ll element => [BinaryInstruction ] -> ll -> m llhalibut :: ALU m ll element => ll -> m llalInstruction :: ALU m ll element => ALInstruction -> ll -> m llmove :: ALU m ll element => Index -> ll -> m llswap :: ALU m ll element => ll -> m lldiscard :: (MonadSafe m, ListLike full item) => full -> m fullslide :: ALU m ll element => Index -> ll -> m lldup :: ALU m ll element => ll -> m llcopy :: ALU m ll element => Index -> ll -> m llflipPush1 :: Stack ll element => ll -> element -> llcharPush1 :: (Num element, Stack ll element) => Char -> ll -> llgenericPush1 :: (Integral v, Num element, Stack ll element) => v -> ll -> llpop1 :: ALU m ll element => ll -> m (element, ll)pop2 :: ALU m ll element => ll -> m (element, element, ll)push1 :: Stack ll element => element -> ll -> llpush2 :: Stack ll element => element -> element -> ll -> llsplitAt :: ListLike full item => Int -> full -> (full, full)drop :: ListLike full item => Int -> full -> fulltype ALU m ll element = (BIO m, Stack ll element, Integral element)type Stack ll element = (Show ll, ListLike ll element, IndexSafe ll element)Documentation sub :: ALU m ll element => ll -> m ll #
halibut :: ALU m ll element => ll -> m ll #
Halibut and Pick instructions
move :: ALU m ll element => Index -> ll -> m ll #
swap :: ALU m ll element => ll -> m ll #
discard :: (MonadSafe m, ListLike full item) => full -> m full #
slide :: ALU m ll element => Index -> ll -> m ll #
dup :: ALU m ll element => ll -> m ll #
copy :: ALU m ll element => Index -> ll -> m ll #
pop1 :: ALU m ll element => ll -> m (element, ll) #
pop2 :: ALU m ll element => ll -> m (element, element, ll) #
push2 :: Stack ll element => element -> element -> ll -> ll #
splitAt :: ListLike full item => Int -> full -> (full, full) #
drop :: ListLike full item => Int -> full -> full #
type Stack ll element = (Show ll, ListLike ll element, IndexSafe ll element) #
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-CPU.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-CPU.html
new file mode 100644
index 000000000..e4a9bdfa6
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-CPU.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Units.CPU
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-LSU.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-LSU.html
new file mode 100644
index 000000000..f0732a607
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-LSU.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Units.LSU Documentation type LSU m s r element = (ALU m s element, RAM r element) #
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-RAM.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-RAM.html
new file mode 100644
index 000000000..7b9a080bc
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-RAM.html
@@ -0,0 +1,2 @@
+HelVM.HelMA.Automaton.Units.RAM Documentation load :: RAM ll element => ll -> Address -> element #
type RAM ll element = (Show ll, Default element, II ll element) #
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-Unit.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-Unit.html
new file mode 100644
index 000000000..e9ddd93ec
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-Units-Unit.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.Units.Unit Documentation data Unit s r #
Instances Instances details
\ No newline at end of file
diff --git a/docs/reports/doc/helma/HelVM-HelMA-Automaton-WrapTokenList.html b/docs/reports/doc/helma/HelVM-HelMA-Automaton-WrapTokenList.html
new file mode 100644
index 000000000..7435e7eb1
--- /dev/null
+++ b/docs/reports/doc/helma/HelVM-HelMA-Automaton-WrapTokenList.html
@@ -0,0 +1 @@
+HelVM.HelMA.Automaton.WrapTokenList
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-A.html b/docs/reports/doc/helma/doc-index-A.html
new file mode 100644
index 000000000..83abe87f1
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-A.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - A)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-All.html b/docs/reports/doc/helma/doc-index-All.html
new file mode 100644
index 000000000..f30db7c18
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-All.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-B.html b/docs/reports/doc/helma/doc-index-B.html
new file mode 100644
index 000000000..dee62d2d3
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-B.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - B)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-C.html b/docs/reports/doc/helma/doc-index-C.html
new file mode 100644
index 000000000..6546989f0
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-C.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - C)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-D.html b/docs/reports/doc/helma/doc-index-D.html
new file mode 100644
index 000000000..1afd6602e
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-D.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - D)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-E.html b/docs/reports/doc/helma/doc-index-E.html
new file mode 100644
index 000000000..894e552d0
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-E.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - E)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-F.html b/docs/reports/doc/helma/doc-index-F.html
new file mode 100644
index 000000000..27120dc5f
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-F.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - F)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-G.html b/docs/reports/doc/helma/doc-index-G.html
new file mode 100644
index 000000000..16507830d
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-G.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - G)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-H.html b/docs/reports/doc/helma/doc-index-H.html
new file mode 100644
index 000000000..8c4d07751
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-H.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - H)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-I.html b/docs/reports/doc/helma/doc-index-I.html
new file mode 100644
index 000000000..34e11d789
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-I.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - I)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-J.html b/docs/reports/doc/helma/doc-index-J.html
new file mode 100644
index 000000000..cdba18e2a
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-J.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - J)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-L.html b/docs/reports/doc/helma/doc-index-L.html
new file mode 100644
index 000000000..32e7c2d56
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-L.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - L)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-M.html b/docs/reports/doc/helma/doc-index-M.html
new file mode 100644
index 000000000..b015d9465
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-M.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - M)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-N.html b/docs/reports/doc/helma/doc-index-N.html
new file mode 100644
index 000000000..a3d82f703
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-N.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - N)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-O.html b/docs/reports/doc/helma/doc-index-O.html
new file mode 100644
index 000000000..57d0e36c5
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-O.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - O)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-P.html b/docs/reports/doc/helma/doc-index-P.html
new file mode 100644
index 000000000..95d093346
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-P.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - P)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-R.html b/docs/reports/doc/helma/doc-index-R.html
new file mode 100644
index 000000000..a9e8dc5b9
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-R.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - R)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-S.html b/docs/reports/doc/helma/doc-index-S.html
new file mode 100644
index 000000000..5e6af4d80
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-S.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - S)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-T.html b/docs/reports/doc/helma/doc-index-T.html
new file mode 100644
index 000000000..c6a82b629
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-T.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - T)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-U.html b/docs/reports/doc/helma/doc-index-U.html
new file mode 100644
index 000000000..2dd215c18
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-U.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - U)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-V.html b/docs/reports/doc/helma/doc-index-V.html
new file mode 100644
index 000000000..fb82accbc
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-V.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - V)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-W.html b/docs/reports/doc/helma/doc-index-W.html
new file mode 100644
index 000000000..03552f934
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-W.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - W)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index-Z.html b/docs/reports/doc/helma/doc-index-Z.html
new file mode 100644
index 000000000..5e3b2e85b
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index-Z.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index - Z)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/doc-index.html b/docs/reports/doc/helma/doc-index.html
new file mode 100644
index 000000000..15fc83162
--- /dev/null
+++ b/docs/reports/doc/helma/doc-index.html
@@ -0,0 +1 @@
+helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton (Index)
\ No newline at end of file
diff --git a/docs/reports/doc/helma/haddock-bundle.min.js b/docs/reports/doc/helma/haddock-bundle.min.js
new file mode 100644
index 000000000..45adda985
--- /dev/null
+++ b/docs/reports/doc/helma/haddock-bundle.min.js
@@ -0,0 +1,2 @@
+!function i(s,a,l){function c(t,e){if(!a[t]){if(!s[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);var o=new Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}var r=a[t]={exports:{}};s[t][0].call(r.exports,function(e){return c(s[t][1][e]||e)},r,r.exports,i,s,a,l)}return a[t].exports}for(var u="function"==typeof require&&require,e=0;e element with id '"+e+"'");return t}function x(){return u.defaultInstanceState==i.Open}function w(e){for(var t=S(e.target.id),n=t.element.open,o=0,r=t.toggles;owindow.innerHeight?this.searchResults.scrollTop+=e.bottom-window.innerHeight+80:e.topn)return u(e,this.pattern,o);var r=this.options,i=r.location,s=r.distance,a=r.threshold,l=r.findAllMatches,c=r.minMatchCharLength;return d(e,this.pattern,this.patternAlphabet,{location:i,distance:s,threshold:a,findAllMatches:l,minMatchCharLength:c})}}]),y}();e.exports=r},function(e,t,n){"use strict";var u=n(0);e.exports=function(e,t){return function e(t,n,o){if(n){var r=n.indexOf("."),i=n,s=null;-1!==r&&(i=n.slice(0,r),s=n.slice(r+1));var a=t[i];if(null!=a)if(s||"string"!=typeof a&&"number"!=typeof a)if(u(a))for(var l=0,c=a.length;l 0 and <= 1");p=p.name}else a[p]={weight:1};this._analyze({key:p,value:this.options.getFn(u,p),record:u,index:l},{resultMap:o,results:r,tokenSearchers:e,fullSearcher:t})}return{weights:a,results:r}}},{key:"_analyze",value:function(e,t){var n=e.key,o=e.arrayIndex,r=void 0===o?-1:o,i=e.value,s=e.record,a=e.index,l=t.tokenSearchers,c=void 0===l?[]:l,u=t.fullSearcher,d=void 0===u?[]:u,h=t.resultMap,p=void 0===h?{}:h,f=t.results,v=void 0===f?[]:f;if(null!=i){var g=!1,m=-1,y=0;if("string"==typeof i){this._log("\nKey: "+(""===n?"-":n));var _=d.search(i);if(this._log('Full text: "'+i+'", score: '+_.score),this.options.tokenize){for(var b=i.split(this.options.tokenSeparator),k=[],S=0;S=c.length;if(this._log("\nCheck Matches: "+T),(g||_.isMatch)&&T){var N=p[a];N?N.output.push({key:n,arrayIndex:r,value:i,score:A,matchedIndices:_.matchedIndices}):(p[a]={item:s,output:[{key:n,arrayIndex:r,value:i,score:A,matchedIndices:_.matchedIndices}]},v.push(p[a]))}}else if(V(i))for(var P=0,j=i.length;Phelma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton helma-0.7.2.1: HELMA - Haskellish Esoteric Limited Minimal Automaton Modules
HelVM Submodules HelMA Submodules Automata Submodules BrainFuck Submodules Cat Submodules ETA Submodules Rev Submodules SubLeq Submodules WhiteSpace Submodules Zot Submodules Automaton Submodules
\ No newline at end of file
diff --git a/docs/reports/doc/helma/linuwial.css b/docs/reports/doc/helma/linuwial.css
new file mode 100644
index 000000000..cbb58a038
--- /dev/null
+++ b/docs/reports/doc/helma/linuwial.css
@@ -0,0 +1,877 @@
+/* @group Fundamentals */
+
+* { margin: 0; padding: 0 }
+
+/* Is this portable? */
+html {
+ background-color: white;
+ width: 100%;
+ height: 100%;
+}
+
+body {
+ background: #fefefe;
+ color: #111;
+ text-align: left;
+ min-height: 100vh;
+ position: relative;
+ -webkit-text-size-adjust: 100%;
+ -webkit-font-feature-settings: "kern" 1, "liga" 0;
+ -moz-font-feature-settings: "kern" 1, "liga" 0;
+ -o-font-feature-settings: "kern" 1, "liga" 0;
+ font-feature-settings: "kern" 1, "liga" 0;
+ letter-spacing: 0.0015rem;
+}
+
+#content a {
+ overflow-wrap: break-word;
+}
+
+p {
+ margin: 0.8em 0;
+}
+
+ul, ol {
+ margin: 0.8em 0 0.8em 2em;
+}
+
+dl {
+ margin: 0.8em 0;
+}
+
+dt {
+ font-weight: bold;
+}
+dd {
+ margin-left: 2em;
+}
+
+a { text-decoration: none; }
+a[href]:link { color: #9E358F; }
+a[href]:visited {color: #6F5F9C; }
+a[href]:hover { text-decoration:underline; }
+
+a[href].def:link, a[href].def:visited { color: rgba(69, 59, 97, 0.8); }
+a[href].def:hover { color: rgb(78, 98, 114); }
+
+/* @end */
+
+/* @group Show and hide with JS */
+
+body.js-enabled .hide-when-js-enabled {
+ display: none;
+}
+
+/* @end */
+
+
+/* @group responsive */
+
+#package-header .caption {
+ margin: 0px 1em 0 2em;
+}
+
+@media only screen and (min-width: 1280px) {
+ #content {
+ width: 63vw;
+ max-width: 1450px;
+ }
+
+ #table-of-contents {
+ position: fixed;
+ max-width: 10vw;
+ top: 10.2em;
+ left: 2em;
+ bottom: 1em;
+ overflow-y: auto;
+ }
+
+ #synopsis {
+ display: block;
+ position: fixed;
+ float: left;
+ top: 5em;
+ bottom: 1em;
+ right: 0;
+ max-width: 65vw;
+ overflow-y: auto;
+ /* Ensure that synopsis covers everything (including MathJAX markup) */
+ z-index: 1;
+ }
+
+ #synopsis .show {
+ border: 1px solid #5E5184;
+ padding: 0.7em;
+ max-height: 65vh;
+ }
+
+}
+
+@media only screen and (max-width: 1279px) {
+ #content {
+ width: 80vw;
+ }
+
+ #synopsis {
+ display: block;
+ padding: 0;
+ position: relative;
+ margin: 0;
+ width: 100%;
+ }
+}
+
+@media only screen and (max-width: 999px) {
+ #content {
+ width: 93vw;
+ }
+}
+
+
+/* menu for wider screens
+
+ Display the package name at the left and the menu links at the right,
+ inline with each other:
+ The package name Source . Contents . Index
+*/
+@media only screen and (min-width: 1000px) {
+ #package-header {
+ text-align: left;
+ white-space: nowrap;
+ height: 40px;
+ padding: 4px 1.5em 0px 1.5em;
+ overflow: visible;
+
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ #package-header .caption {
+ display: inline-block;
+ margin: 0;
+ }
+
+ #package-header ul.links {
+ margin: 0;
+ display: inline-table;
+ }
+
+ #package-header .caption + ul.links {
+ margin-left: 1em;
+ }
+}
+
+/* menu for smaller screens
+
+Display the package name on top of the menu links and center both elements:
+ The package name
+ Source . Contents . Index
+*/
+@media only screen and (max-width: 999px) {
+ #package-header {
+ text-align: center;
+ padding: 6px 0 4px 0;
+ overflow: hidden;
+ }
+
+ #package-header ul.links {
+ display: block;
+ text-align: center;
+ margin: 0;
+
+ /* Hide scrollbar but allow scrolling menu links horizontally */
+ white-space: nowrap;
+ overflow-x: auto;
+ overflow-y: hidden;
+ margin-bottom: -17px;
+ height: 50px;
+ }
+
+ #package-header .caption {
+ display: block;
+ margin: 4px 0;
+ text-align: center;
+ }
+
+ #package-header ul.links::-webkit-scrollbar {
+ display: none;
+ }
+
+ #package-header ul.links li:first-of-type {
+ padding-left: 1em;
+ }
+
+ #package-header ul.links li:last-of-type {
+ /*
+ The last link of the menu should offer the same distance to the right
+ as the #package-header enforces at the left.
+ */
+ padding-right: 1em;
+ }
+
+ #package-header .caption + ul.links {
+ padding-top: 9px;
+ }
+
+ #module-header table.info {
+ float: none;
+ top: 0;
+ margin: 0 auto;
+ overflow: hidden;
+ max-width: 80vw;
+ }
+}
+
+/* @end */
+
+
+/* @group Fonts & Sizes */
+
+/* Basic technique & IE workarounds from YUI 3
+ For reasons, see:
+ http://yui.yahooapis.com/3.1.1/build/cssfonts/fonts.css
+ */
+
+ body, button {
+ font: 400 14px/1.4 'PT Sans',
+ /* Fallback Font Stack */
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ Oxygen-Sans,
+ Cantarell,
+ 'Helvetica Neue',
+ sans-serif;
+ *font-size: medium; /* for IE */
+ *font:x-small; /* for IE in quirks mode */
+ }
+
+h1 { font-size: 146.5%; /* 19pt */ }
+h2 { font-size: 131%; /* 17pt */ }
+h3 { font-size: 116%; /* 15pt */ }
+h4 { font-size: 100%; /* 13pt */ }
+h5 { font-size: 100%; /* 13pt */ }
+
+table {
+ font-size:inherit;
+ font:100%;
+}
+
+pre, code, kbd, samp, tt, .src {
+ font-family:monospace;
+}
+
+.links, .link {
+ font-size: 85%; /* 11pt */
+}
+
+#module-header .caption {
+ font-size: 182%; /* 24pt */
+}
+
+#module-header .caption sup {
+ font-size: 80%;
+ font-weight: normal;
+}
+
+#package-header #page-menu a:link, #package-header #page-menu a:visited { color: white; }
+
+
+.info {
+ font-size: 90%;
+}
+
+
+/* @end */
+
+/* @group Common */
+
+.caption, h1, h2, h3, h4, h5, h6, summary {
+ font-weight: bold;
+ color: #5E5184;
+ margin: 1.5em 0 1em 0;
+}
+
+
+* + h1, * + h2, * + h3, * + h4, * + h5, * + h6 {
+ margin-top: 2em;
+}
+
+h1 + h2, h2 + h3, h3 + h4, h4 + h5, h5 + h6 {
+ margin-top: inherit;
+}
+
+ul li + li {
+ margin-top: 0.2rem;
+}
+
+ul + p {
+ margin-top: 0.93em;
+}
+
+p + ul {
+ margin-top: 0.5em;
+}
+
+p {
+ margin-top: 0.7rem;
+}
+
+ul, ol {
+ margin: 0.8em 0 0.8em 2em;
+}
+
+ul.links {
+ list-style: none;
+ text-align: left;
+ font-size: 0.95em;
+}
+
+#package-header ul.links, #package-header ul.links button {
+ font-size: 1rem;
+}
+
+ul.links li {
+ display: inline;
+ white-space: nowrap;
+ padding: 0;
+}
+
+ul.links > li + li:before {
+ content: '\00B7';
+}
+
+ul.links li a {
+ padding: 0.2em 0.5em;
+}
+
+.hide { display: none; }
+.show { display: inherit; }
+.clear { clear: both; }
+
+.collapser:before, .expander:before, .noexpander:before {
+ font-size: 1.2em;
+ color: #9C5791;
+ display: inline-block;
+ padding-right: 7px;
+}
+
+.collapser:before {
+ content: '▿';
+}
+.expander:before {
+ content: '▹';
+}
+.noexpander:before {
+ content: '▿';
+ visibility: hidden;
+}
+
+.collapser, .expander {
+ cursor: pointer;
+}
+
+.instance.collapser, .instance.expander {
+ margin-left: 0px;
+ background-position: left center;
+ min-width: 9px;
+ min-height: 9px;
+}
+
+summary {
+ cursor: pointer;
+ outline: none;
+}
+
+pre {
+ padding: 0.5rem 1rem;
+ margin: 1em 0 0 0;
+ background-color: #f7f7f7;
+ overflow: auto;
+ border: 1px solid #ddd;
+ border-radius: 0.3em;
+}
+
+pre + p {
+ margin-top: 1em;
+}
+
+pre + pre {
+ margin-top: 0.5em;
+}
+
+blockquote {
+ border-left: 3px solid #c7a5d3;
+ background-color: #eee4f1;
+ margin: 0.5em;
+ padding: 0.0005em 0.3em 0.5em 0.5em;
+}
+
+.src {
+ background: #f2f2f2;
+ padding: 0.2em 0.5em;
+}
+
+.keyword { font-weight: normal; }
+.def { font-weight: bold; }
+
+@media print {
+ #footer { display: none; }
+}
+
+/* @end */
+
+/* @group Page Structure */
+
+#content {
+ margin: 3em auto 6em auto;
+ padding: 0;
+}
+
+#package-header {
+ background: #5E5184;
+ border-bottom: 5px solid rgba(69, 59, 97, 0.5);
+ color: #ddd;
+ position: relative;
+ font-size: 1.2em;
+ text-align: left;
+ margin: 0 auto;
+}
+
+#package-header .caption {
+ color: white;
+ font-style: normal;
+ font-size: 1rem;
+ font-weight: bold;
+}
+
+#module-header .caption {
+ font-weight: bold;
+ border-bottom: 1px solid #ddd;
+}
+
+table.info {
+ float: right;
+ padding: 0.5em 1em;
+ border: 1px solid #ddd;
+ color: rgb(78,98,114);
+ background-color: #fff;
+ max-width: 60%;
+ border-spacing: 0;
+ position: relative;
+ top: -0.78em;
+ margin: 0 0 0 2em;
+}
+
+.info th {
+ padding: 0 1em 0 0;
+ text-align: right;
+}
+
+#style-menu li {
+ display: block;
+ border-style: none;
+ list-style-type: none;
+}
+
+#footer {
+ background: #ededed;
+ border-top: 1px solid #aaa;
+ padding: 0.5em 0;
+ color: #222;
+ text-align: center;
+ width: 100%;
+ height: 3em;
+ margin-top: 3em;
+ position: relative;
+ clear: both;
+}
+
+/* @end */
+
+/* @group Front Matter */
+
+#synopsis .caption,
+#contents-list .caption {
+ font-size: 1rem;
+}
+
+#synopsis, #table-of-contents {
+ font-size: 16px;
+}
+
+#contents-list {
+ background: #f4f4f4;
+ padding: 1em;
+ margin: 0;
+}
+
+#contents-list .caption {
+ text-align: left;
+ margin: 0;
+}
+
+#contents-list ul {
+ list-style: none;
+ margin: 0;
+ margin-top: 10px;
+ font-size: 14px;
+}
+
+#contents-list ul ul {
+ margin-left: 1.5em;
+}
+
+#description .caption {
+ display: none;
+}
+
+#synopsis summary {
+ display: block;
+ float: right;
+ width: 29px;
+ color: rgba(255,255,255,0);
+ height: 110px;
+ margin: 0;
+ font-size: 1px;
+ padding: 0;
+ background: url(synopsis.png) no-repeat 0px -8px;
+}
+
+#synopsis details[open] > summary {
+ background: url(synopsis.png) no-repeat -75px -8px;
+}
+
+#synopsis ul {
+ height: 100%;
+ overflow: auto;
+ padding: 0.5em;
+ margin: 0;
+}
+
+#synopsis ul ul {
+ overflow: hidden;
+}
+
+#synopsis ul,
+#synopsis ul li.src {
+ background-color: rgb(250,247,224);
+ white-space: nowrap;
+ list-style: none;
+ margin-left: 0;
+}
+
+#interface td.src {
+ white-space: nowrap;
+}
+
+/* @end */
+
+/* @group Main Content */
+
+#interface div.top + div.top {
+ margin-top: 1.5em;
+}
+
+#interface p + div.top,
+#interface h1 + div.top,
+#interface h2 + div.top,
+#interface h3 + div.top,
+#interface h4 + div.top,
+#interface h5 + div.top {
+ margin-top: 1em;
+}
+#interface .src .selflink,
+#interface .src .link {
+ float: right;
+ color: #888;
+ padding: 0 7px;
+ -moz-user-select: none;
+ font-weight: bold;
+ line-height: 30px;
+}
+#interface .src .selflink {
+ margin: 0 -0.5em 0 0.5em;
+}
+
+#interface span.fixity {
+ color: #919191;
+ border-left: 1px solid #919191;
+ padding: 0.2em 0.5em 0.2em 0.5em;
+ margin: 0 -1em 0 1em;
+}
+
+#interface span.rightedge {
+ border-left: 1px solid #919191;
+ padding: 0.2em 0 0.2em 0;
+ margin: 0 0 0 1em;
+}
+
+#interface table { border-spacing: 2px; }
+#interface td {
+ vertical-align: top;
+ padding-left: 0.5em;
+}
+
+#interface td.doc p {
+ margin: 0;
+}
+#interface td.doc p + p {
+ margin-top: 0.8em;
+}
+
+.doc table {
+ border-collapse: collapse;
+ border-spacing: 0px;
+}
+
+.doc th,
+.doc td {
+ padding: 5px;
+ border: 1px solid #ddd;
+}
+
+.doc th {
+ background-color: #f0f0f0;
+}
+
+.clearfix:after {
+ clear: both;
+ content: " ";
+ display: block;
+ height: 0;
+ visibility: hidden;
+}
+
+.subs, .top > .doc, .subs > .doc {
+ padding-left: 1em;
+ border-left: 1px solid gainsboro;
+ margin-bottom: 1em;
+}
+
+.top .subs {
+ margin-bottom: 0.6em;
+}
+
+.subs.fields ul {
+ list-style: none;
+ display: table;
+ margin: 0;
+}
+
+.subs.fields ul li {
+ display: table-row;
+}
+
+.subs ul li dfn {
+ display: table-cell;
+ font-style: normal;
+ font-weight: bold;
+ margin: 1px 0;
+ white-space: nowrap;
+}
+
+.subs ul li > .doc {
+ display: table-cell;
+ padding-left: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+.subs ul li > .doc p {
+ margin: 0;
+}
+
+.subs .subs p.src {
+ border: none;
+ background-color: #f8f8f8;
+}
+
+.subs .subs .caption {
+ margin-top: 1em ;
+ margin-bottom: 0px;
+}
+
+.subs p.caption {
+ margin-top: 0;
+}
+
+.subs .subs .caption + .src {
+ margin: 0px;
+ margin-top: 8px;
+}
+
+.subs .subs .src + .src {
+ margin: 7px 0 0 0;
+}
+
+/* Render short-style data instances */
+.inst ul {
+ height: 100%;
+ padding: 0.5em;
+ margin: 0;
+}
+
+.inst, .inst li {
+ list-style: none;
+ margin-left: 1em;
+}
+
+/* Workaround for bug in Firefox (issue #384) */
+.inst-left {
+ float: left;
+}
+
+.top p.src {
+ border-bottom: 3px solid #e5e5e5;
+ line-height: 2rem;
+ margin-bottom: 1em;
+}
+
+.warning {
+ color: red;
+}
+
+.arguments {
+ margin-top: -0.4em;
+}
+.arguments .caption {
+ display: none;
+}
+
+.fields { padding-left: 1em; }
+
+.fields .caption { display: none; }
+
+.fields p { margin: 0 0; }
+
+/* this seems bulky to me
+.methods, .constructors {
+ background: #f8f8f8;
+ border: 1px solid #eee;
+}
+*/
+
+/* @end */
+
+/* @group Auxillary Pages */
+
+
+.extension-list {
+ list-style-type: none;
+ margin-left: 0;
+}
+
+#mini {
+ margin: 0 auto;
+ padding: 0 1em 1em;
+}
+
+#mini > * {
+ font-size: 93%; /* 12pt */
+}
+
+#mini #module-list .caption,
+#mini #module-header .caption {
+ font-size: 125%; /* 15pt */
+}
+
+#mini #interface h1,
+#mini #interface h2,
+#mini #interface h3,
+#mini #interface h4 {
+ font-size: 109%; /* 13pt */
+ margin: 1em 0 0;
+}
+
+#mini #interface .top,
+#mini #interface .src {
+ margin: 0;
+}
+
+#mini #module-list ul {
+ list-style: none;
+ margin: 0;
+}
+
+#alphabet ul {
+ list-style: none;
+ padding: 0;
+ margin: 0.5em 0 0;
+ text-align: center;
+}
+
+#alphabet li {
+ display: inline;
+ margin: 0 0.25em;
+}
+
+#alphabet a {
+ font-weight: bold;
+}
+
+#index .caption,
+#module-list .caption { font-size: 131%; /* 17pt */ }
+
+#index table {
+ margin-left: 2em;
+}
+
+#index .src {
+ font-weight: bold;
+}
+#index .alt {
+ font-size: 77%; /* 10pt */
+ font-style: italic;
+ padding-left: 2em;
+}
+
+#index td + td {
+ padding-left: 1em;
+}
+
+#module-list ul {
+ list-style: none;
+ margin: 0 0 0 2em;
+}
+
+#module-list li {
+ clear: right;
+}
+
+#module-list span.collapser,
+#module-list span.expander {
+ background-position: 0 0.3em;
+}
+
+#module-list .package {
+ float: right;
+}
+
+:target {
+ background: -webkit-linear-gradient(top, transparent 0%, transparent 65%, #fbf36d 60%, #fbf36d 100%);
+ background: -moz-linear-gradient(top, transparent 0%, transparent 65%, #fbf36d 60%, #fbf36d 100%);
+ background: -o-linear-gradient(top, transparent 0%, transparent 65%, #fbf36d 60%, #fbf36d 100%);
+ background: -ms-linear-gradient(top, transparent 0%, transparent 65%, #fbf36d 60%, #fbf36d 100%);
+ background: linear-gradient(to bottom, transparent 0%, transparent 65%, #fbf36d 60%, #fbf36d 100%);
+}
+
+:target:hover {
+ background: -webkit-linear-gradient(top, transparent 0%, transparent 0%, #fbf36d 0%, #fbf36d 100%);
+ background: -moz-linear-gradient(top, transparent 0%, transparent 0%, #fbf36d 0%, #fbf36d 100%);
+ background: -o-linear-gradient(top, transparent 0%, transparent 0%, #fbf36d 0%, #fbf36d 100%);
+ background: -ms-linear-gradient(top, transparent 0%, transparent 0%, #fbf36d 0%, #fbf36d 100%);
+ background: linear-gradient(to bottom, transparent 0%, transparent 0%, #fbf36d 0%, #fbf36d 100%);
+}
+
+/* @end */
+
+/* @group Dropdown menus */
+
+#preferences-menu, #style-menu {
+ width: 25em;
+ overflow-y: auto;
+}
+
+/* @end */
diff --git a/docs/reports/doc/helma/meta.json b/docs/reports/doc/helma/meta.json
new file mode 100644
index 000000000..6cb919cc5
--- /dev/null
+++ b/docs/reports/doc/helma/meta.json
@@ -0,0 +1 @@
+{"haddock_version":"2.24.2"}
\ No newline at end of file
diff --git a/docs/reports/doc/helma/quick-jump.css b/docs/reports/doc/helma/quick-jump.css
new file mode 100644
index 000000000..d656f51c7
--- /dev/null
+++ b/docs/reports/doc/helma/quick-jump.css
@@ -0,0 +1,222 @@
+/* @group Fundamentals */
+
+.hidden {
+ display: none;
+}
+
+/* @end */
+
+/* @group Search box layout */
+
+#search {
+ position: fixed;
+ top: 3.2em;
+ bottom: 0;
+ left: calc(50% - 22em);
+ width: 44em;
+ z-index: 1000;
+ pointer-events: none;
+ overflow-y: auto;
+}
+
+@media only screen and (max-width: 999px) {
+ #search {
+ top: 5.7em;
+ }
+}
+
+#search-form, #search-results {
+ box-shadow: 2px 2px 6px rgb(199, 204, 208);
+ pointer-events: all;
+}
+
+#search-form input {
+ font-size: 1.25em; line-height: 2.3em; height: 2.4em;
+ display: block;
+ box-sizing: border-box;
+ width: 100%;
+ margin: 0;
+ padding: 0 0.75em;
+ border: 0.05em solid rgb(151, 179, 202);
+}
+
+#search input:focus {
+ outline: none;
+}
+
+#search p.error {
+ color: rgb(107, 24, 24);
+ font-weight: bold;
+}
+
+#search-results {
+ box-sizing: border-box;
+ border: 0.05em solid #b2d5fb;
+ background: #e8f3ff;
+ max-height: 80%;
+ overflow: scroll;
+}
+
+#search-form input + #search-results {
+ border-top: none;
+ top: 3em;
+ max-height: calc(100% - 3em);
+}
+
+/* @end */
+
+/* @group search results */
+
+#search-results > ul {
+ margin: 0;
+ list-style: none;
+}
+
+#search-results > ul > li,
+#search-results > p,
+#search-results > table {
+ padding: 0.5em 1em;
+ margin: 0;
+}
+
+#search-results > ul > li {
+ border-bottom: 1px solid #b2d5fb;
+}
+
+#search-results > ul > li > ul {
+ list-style: none;
+}
+
+.search-module h4 {
+ margin: 0;
+}
+
+.search-module > ul {
+ margin: 0.5em 0 0.5em 2em;
+}
+
+.search-module > ul > li > a[href] {
+ display: block;
+ color: inherit;
+ padding: 0.25em 0.5em;
+}
+
+.search-module > ul > li > a[href].active-link {
+ background: #faf9dc;
+}
+
+.search-module a[href]:hover {
+ text-decoration: none;
+}
+
+.search-result a a {
+ pointer-events: none;
+}
+
+.search-result ul.subs {
+ display: inline-block;
+ margin: 0; padding: 0;
+}
+
+.search-result ul.subs li {
+ display: none;
+}
+
+.search-result ul.subs::after {
+ display: inline-block;
+ content: "...";
+ color: rgb(78,98,114);
+ margin: 0 0.25em;
+}
+
+.more-results {
+ color: rgb(99, 141, 173);
+ position: relative;
+}
+
+.more-results::before {
+ content: "+";
+ display: inline-block;
+ color: #b2d5fb;
+ font-weight: bold;
+ font-size: 1.25em; line-height: inherit;
+ position: absolute;
+ left: -1em;
+}
+
+/* @end */
+
+/* @group Keyboard shortcuts table */
+
+.keyboard-shortcuts {
+ line-height: 1.6em;
+}
+
+.keyboard-shortcuts th {
+ color: rgb(78,98,114);
+}
+
+.keyboard-shortcuts td:first-child,
+.keyboard-shortcuts th:first-child {
+ text-align: right;
+ padding-right: 0.6em;
+}
+
+.key {
+ display: inline-block;
+ font-size: 0.9em;
+ min-width: 0.8em; line-height: 1.2em;
+ text-align: center;
+ background: #b2d5fb;
+ border: 1px solid #74a3d6;
+ padding: 0 0.2em;
+ margin: 0 0.1em;
+}
+
+/* @end */
+
+/* @group Dropdown menus */
+
+/* Based on #search styling above. */
+
+.dropdown-menu {
+ position: fixed;
+ /* Not robust to window size changes. */
+ top: 3.2em;
+ right: 0;
+ /* To display on top of synopsis menu on right side. */
+ z-index: 1000;
+ border: 0.05em solid #b2d5fb;
+ background: #e8f3ff;
+}
+
+@media only screen and (max-width: 999px) {
+ .dropdown-menu {
+ top: 5.7em;
+ }
+}
+
+.dropdown-menu * {
+ margin: 0.1em;
+}
+
+.dropdown-menu button {
+ border: 1px #5E5184 solid;
+ border-radius: 3px;
+ background: #5E5184;
+ padding: 3px;
+ color: #f4f4f4;
+ min-width: 6em;
+}
+
+.dropdown-menu button:hover {
+ color: #5E5184;
+ background: #f4f4f4;
+}
+
+.dropdown-menu button:active {
+ color: #f4f4f4;
+ background: #5E5184;
+}
+
+/* @end */
diff --git a/docs/reports/doc/helma/synopsis.png b/docs/reports/doc/helma/synopsis.png
new file mode 100644
index 000000000..85fb86ec8
Binary files /dev/null and b/docs/reports/doc/helma/synopsis.png differ
diff --git a/docs/reports/doc/index.html b/docs/reports/doc/index.html
new file mode 100644
index 000000000..62abab1d2
--- /dev/null
+++ b/docs/reports/doc/index.html
@@ -0,0 +1 @@
+helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton helma-0.7.2.0: HELMA - Haskellish Esoteric Limited Minimal Automaton Modules
HelVM Submodules HelMA Submodules Automata Submodules BrainFuck Submodules Cat Submodules ETA Submodules Rev Submodules SubLeq Submodules WhiteSpace Submodules Zot Submodules Automaton Submodules
\ No newline at end of file
diff --git a/docs/reports/doc/linuwial.css b/docs/reports/doc/linuwial.css
new file mode 100644
index 000000000..cbb58a038
--- /dev/null
+++ b/docs/reports/doc/linuwial.css
@@ -0,0 +1,877 @@
+/* @group Fundamentals */
+
+* { margin: 0; padding: 0 }
+
+/* Is this portable? */
+html {
+ background-color: white;
+ width: 100%;
+ height: 100%;
+}
+
+body {
+ background: #fefefe;
+ color: #111;
+ text-align: left;
+ min-height: 100vh;
+ position: relative;
+ -webkit-text-size-adjust: 100%;
+ -webkit-font-feature-settings: "kern" 1, "liga" 0;
+ -moz-font-feature-settings: "kern" 1, "liga" 0;
+ -o-font-feature-settings: "kern" 1, "liga" 0;
+ font-feature-settings: "kern" 1, "liga" 0;
+ letter-spacing: 0.0015rem;
+}
+
+#content a {
+ overflow-wrap: break-word;
+}
+
+p {
+ margin: 0.8em 0;
+}
+
+ul, ol {
+ margin: 0.8em 0 0.8em 2em;
+}
+
+dl {
+ margin: 0.8em 0;
+}
+
+dt {
+ font-weight: bold;
+}
+dd {
+ margin-left: 2em;
+}
+
+a { text-decoration: none; }
+a[href]:link { color: #9E358F; }
+a[href]:visited {color: #6F5F9C; }
+a[href]:hover { text-decoration:underline; }
+
+a[href].def:link, a[href].def:visited { color: rgba(69, 59, 97, 0.8); }
+a[href].def:hover { color: rgb(78, 98, 114); }
+
+/* @end */
+
+/* @group Show and hide with JS */
+
+body.js-enabled .hide-when-js-enabled {
+ display: none;
+}
+
+/* @end */
+
+
+/* @group responsive */
+
+#package-header .caption {
+ margin: 0px 1em 0 2em;
+}
+
+@media only screen and (min-width: 1280px) {
+ #content {
+ width: 63vw;
+ max-width: 1450px;
+ }
+
+ #table-of-contents {
+ position: fixed;
+ max-width: 10vw;
+ top: 10.2em;
+ left: 2em;
+ bottom: 1em;
+ overflow-y: auto;
+ }
+
+ #synopsis {
+ display: block;
+ position: fixed;
+ float: left;
+ top: 5em;
+ bottom: 1em;
+ right: 0;
+ max-width: 65vw;
+ overflow-y: auto;
+ /* Ensure that synopsis covers everything (including MathJAX markup) */
+ z-index: 1;
+ }
+
+ #synopsis .show {
+ border: 1px solid #5E5184;
+ padding: 0.7em;
+ max-height: 65vh;
+ }
+
+}
+
+@media only screen and (max-width: 1279px) {
+ #content {
+ width: 80vw;
+ }
+
+ #synopsis {
+ display: block;
+ padding: 0;
+ position: relative;
+ margin: 0;
+ width: 100%;
+ }
+}
+
+@media only screen and (max-width: 999px) {
+ #content {
+ width: 93vw;
+ }
+}
+
+
+/* menu for wider screens
+
+ Display the package name at the left and the menu links at the right,
+ inline with each other:
+ The package name Source . Contents . Index
+*/
+@media only screen and (min-width: 1000px) {
+ #package-header {
+ text-align: left;
+ white-space: nowrap;
+ height: 40px;
+ padding: 4px 1.5em 0px 1.5em;
+ overflow: visible;
+
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+
+ #package-header .caption {
+ display: inline-block;
+ margin: 0;
+ }
+
+ #package-header ul.links {
+ margin: 0;
+ display: inline-table;
+ }
+
+ #package-header .caption + ul.links {
+ margin-left: 1em;
+ }
+}
+
+/* menu for smaller screens
+
+Display the package name on top of the menu links and center both elements:
+ The package name
+ Source . Contents . Index
+*/
+@media only screen and (max-width: 999px) {
+ #package-header {
+ text-align: center;
+ padding: 6px 0 4px 0;
+ overflow: hidden;
+ }
+
+ #package-header ul.links {
+ display: block;
+ text-align: center;
+ margin: 0;
+
+ /* Hide scrollbar but allow scrolling menu links horizontally */
+ white-space: nowrap;
+ overflow-x: auto;
+ overflow-y: hidden;
+ margin-bottom: -17px;
+ height: 50px;
+ }
+
+ #package-header .caption {
+ display: block;
+ margin: 4px 0;
+ text-align: center;
+ }
+
+ #package-header ul.links::-webkit-scrollbar {
+ display: none;
+ }
+
+ #package-header ul.links li:first-of-type {
+ padding-left: 1em;
+ }
+
+ #package-header ul.links li:last-of-type {
+ /*
+ The last link of the menu should offer the same distance to the right
+ as the #package-header enforces at the left.
+ */
+ padding-right: 1em;
+ }
+
+ #package-header .caption + ul.links {
+ padding-top: 9px;
+ }
+
+ #module-header table.info {
+ float: none;
+ top: 0;
+ margin: 0 auto;
+ overflow: hidden;
+ max-width: 80vw;
+ }
+}
+
+/* @end */
+
+
+/* @group Fonts & Sizes */
+
+/* Basic technique & IE workarounds from YUI 3
+ For reasons, see:
+ http://yui.yahooapis.com/3.1.1/build/cssfonts/fonts.css
+ */
+
+ body, button {
+ font: 400 14px/1.4 'PT Sans',
+ /* Fallback Font Stack */
+ -apple-system,
+ BlinkMacSystemFont,
+ 'Segoe UI',
+ Roboto,
+ Oxygen-Sans,
+ Cantarell,
+ 'Helvetica Neue',
+ sans-serif;
+ *font-size: medium; /* for IE */
+ *font:x-small; /* for IE in quirks mode */
+ }
+
+h1 { font-size: 146.5%; /* 19pt */ }
+h2 { font-size: 131%; /* 17pt */ }
+h3 { font-size: 116%; /* 15pt */ }
+h4 { font-size: 100%; /* 13pt */ }
+h5 { font-size: 100%; /* 13pt */ }
+
+table {
+ font-size:inherit;
+ font:100%;
+}
+
+pre, code, kbd, samp, tt, .src {
+ font-family:monospace;
+}
+
+.links, .link {
+ font-size: 85%; /* 11pt */
+}
+
+#module-header .caption {
+ font-size: 182%; /* 24pt */
+}
+
+#module-header .caption sup {
+ font-size: 80%;
+ font-weight: normal;
+}
+
+#package-header #page-menu a:link, #package-header #page-menu a:visited { color: white; }
+
+
+.info {
+ font-size: 90%;
+}
+
+
+/* @end */
+
+/* @group Common */
+
+.caption, h1, h2, h3, h4, h5, h6, summary {
+ font-weight: bold;
+ color: #5E5184;
+ margin: 1.5em 0 1em 0;
+}
+
+
+* + h1, * + h2, * + h3, * + h4, * + h5, * + h6 {
+ margin-top: 2em;
+}
+
+h1 + h2, h2 + h3, h3 + h4, h4 + h5, h5 + h6 {
+ margin-top: inherit;
+}
+
+ul li + li {
+ margin-top: 0.2rem;
+}
+
+ul + p {
+ margin-top: 0.93em;
+}
+
+p + ul {
+ margin-top: 0.5em;
+}
+
+p {
+ margin-top: 0.7rem;
+}
+
+ul, ol {
+ margin: 0.8em 0 0.8em 2em;
+}
+
+ul.links {
+ list-style: none;
+ text-align: left;
+ font-size: 0.95em;
+}
+
+#package-header ul.links, #package-header ul.links button {
+ font-size: 1rem;
+}
+
+ul.links li {
+ display: inline;
+ white-space: nowrap;
+ padding: 0;
+}
+
+ul.links > li + li:before {
+ content: '\00B7';
+}
+
+ul.links li a {
+ padding: 0.2em 0.5em;
+}
+
+.hide { display: none; }
+.show { display: inherit; }
+.clear { clear: both; }
+
+.collapser:before, .expander:before, .noexpander:before {
+ font-size: 1.2em;
+ color: #9C5791;
+ display: inline-block;
+ padding-right: 7px;
+}
+
+.collapser:before {
+ content: '▿';
+}
+.expander:before {
+ content: '▹';
+}
+.noexpander:before {
+ content: '▿';
+ visibility: hidden;
+}
+
+.collapser, .expander {
+ cursor: pointer;
+}
+
+.instance.collapser, .instance.expander {
+ margin-left: 0px;
+ background-position: left center;
+ min-width: 9px;
+ min-height: 9px;
+}
+
+summary {
+ cursor: pointer;
+ outline: none;
+}
+
+pre {
+ padding: 0.5rem 1rem;
+ margin: 1em 0 0 0;
+ background-color: #f7f7f7;
+ overflow: auto;
+ border: 1px solid #ddd;
+ border-radius: 0.3em;
+}
+
+pre + p {
+ margin-top: 1em;
+}
+
+pre + pre {
+ margin-top: 0.5em;
+}
+
+blockquote {
+ border-left: 3px solid #c7a5d3;
+ background-color: #eee4f1;
+ margin: 0.5em;
+ padding: 0.0005em 0.3em 0.5em 0.5em;
+}
+
+.src {
+ background: #f2f2f2;
+ padding: 0.2em 0.5em;
+}
+
+.keyword { font-weight: normal; }
+.def { font-weight: bold; }
+
+@media print {
+ #footer { display: none; }
+}
+
+/* @end */
+
+/* @group Page Structure */
+
+#content {
+ margin: 3em auto 6em auto;
+ padding: 0;
+}
+
+#package-header {
+ background: #5E5184;
+ border-bottom: 5px solid rgba(69, 59, 97, 0.5);
+ color: #ddd;
+ position: relative;
+ font-size: 1.2em;
+ text-align: left;
+ margin: 0 auto;
+}
+
+#package-header .caption {
+ color: white;
+ font-style: normal;
+ font-size: 1rem;
+ font-weight: bold;
+}
+
+#module-header .caption {
+ font-weight: bold;
+ border-bottom: 1px solid #ddd;
+}
+
+table.info {
+ float: right;
+ padding: 0.5em 1em;
+ border: 1px solid #ddd;
+ color: rgb(78,98,114);
+ background-color: #fff;
+ max-width: 60%;
+ border-spacing: 0;
+ position: relative;
+ top: -0.78em;
+ margin: 0 0 0 2em;
+}
+
+.info th {
+ padding: 0 1em 0 0;
+ text-align: right;
+}
+
+#style-menu li {
+ display: block;
+ border-style: none;
+ list-style-type: none;
+}
+
+#footer {
+ background: #ededed;
+ border-top: 1px solid #aaa;
+ padding: 0.5em 0;
+ color: #222;
+ text-align: center;
+ width: 100%;
+ height: 3em;
+ margin-top: 3em;
+ position: relative;
+ clear: both;
+}
+
+/* @end */
+
+/* @group Front Matter */
+
+#synopsis .caption,
+#contents-list .caption {
+ font-size: 1rem;
+}
+
+#synopsis, #table-of-contents {
+ font-size: 16px;
+}
+
+#contents-list {
+ background: #f4f4f4;
+ padding: 1em;
+ margin: 0;
+}
+
+#contents-list .caption {
+ text-align: left;
+ margin: 0;
+}
+
+#contents-list ul {
+ list-style: none;
+ margin: 0;
+ margin-top: 10px;
+ font-size: 14px;
+}
+
+#contents-list ul ul {
+ margin-left: 1.5em;
+}
+
+#description .caption {
+ display: none;
+}
+
+#synopsis summary {
+ display: block;
+ float: right;
+ width: 29px;
+ color: rgba(255,255,255,0);
+ height: 110px;
+ margin: 0;
+ font-size: 1px;
+ padding: 0;
+ background: url(synopsis.png) no-repeat 0px -8px;
+}
+
+#synopsis details[open] > summary {
+ background: url(synopsis.png) no-repeat -75px -8px;
+}
+
+#synopsis ul {
+ height: 100%;
+ overflow: auto;
+ padding: 0.5em;
+ margin: 0;
+}
+
+#synopsis ul ul {
+ overflow: hidden;
+}
+
+#synopsis ul,
+#synopsis ul li.src {
+ background-color: rgb(250,247,224);
+ white-space: nowrap;
+ list-style: none;
+ margin-left: 0;
+}
+
+#interface td.src {
+ white-space: nowrap;
+}
+
+/* @end */
+
+/* @group Main Content */
+
+#interface div.top + div.top {
+ margin-top: 1.5em;
+}
+
+#interface p + div.top,
+#interface h1 + div.top,
+#interface h2 + div.top,
+#interface h3 + div.top,
+#interface h4 + div.top,
+#interface h5 + div.top {
+ margin-top: 1em;
+}
+#interface .src .selflink,
+#interface .src .link {
+ float: right;
+ color: #888;
+ padding: 0 7px;
+ -moz-user-select: none;
+ font-weight: bold;
+ line-height: 30px;
+}
+#interface .src .selflink {
+ margin: 0 -0.5em 0 0.5em;
+}
+
+#interface span.fixity {
+ color: #919191;
+ border-left: 1px solid #919191;
+ padding: 0.2em 0.5em 0.2em 0.5em;
+ margin: 0 -1em 0 1em;
+}
+
+#interface span.rightedge {
+ border-left: 1px solid #919191;
+ padding: 0.2em 0 0.2em 0;
+ margin: 0 0 0 1em;
+}
+
+#interface table { border-spacing: 2px; }
+#interface td {
+ vertical-align: top;
+ padding-left: 0.5em;
+}
+
+#interface td.doc p {
+ margin: 0;
+}
+#interface td.doc p + p {
+ margin-top: 0.8em;
+}
+
+.doc table {
+ border-collapse: collapse;
+ border-spacing: 0px;
+}
+
+.doc th,
+.doc td {
+ padding: 5px;
+ border: 1px solid #ddd;
+}
+
+.doc th {
+ background-color: #f0f0f0;
+}
+
+.clearfix:after {
+ clear: both;
+ content: " ";
+ display: block;
+ height: 0;
+ visibility: hidden;
+}
+
+.subs, .top > .doc, .subs > .doc {
+ padding-left: 1em;
+ border-left: 1px solid gainsboro;
+ margin-bottom: 1em;
+}
+
+.top .subs {
+ margin-bottom: 0.6em;
+}
+
+.subs.fields ul {
+ list-style: none;
+ display: table;
+ margin: 0;
+}
+
+.subs.fields ul li {
+ display: table-row;
+}
+
+.subs ul li dfn {
+ display: table-cell;
+ font-style: normal;
+ font-weight: bold;
+ margin: 1px 0;
+ white-space: nowrap;
+}
+
+.subs ul li > .doc {
+ display: table-cell;
+ padding-left: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+.subs ul li > .doc p {
+ margin: 0;
+}
+
+.subs .subs p.src {
+ border: none;
+ background-color: #f8f8f8;
+}
+
+.subs .subs .caption {
+ margin-top: 1em ;
+ margin-bottom: 0px;
+}
+
+.subs p.caption {
+ margin-top: 0;
+}
+
+.subs .subs .caption + .src {
+ margin: 0px;
+ margin-top: 8px;
+}
+
+.subs .subs .src + .src {
+ margin: 7px 0 0 0;
+}
+
+/* Render short-style data instances */
+.inst ul {
+ height: 100%;
+ padding: 0.5em;
+ margin: 0;
+}
+
+.inst, .inst li {
+ list-style: none;
+ margin-left: 1em;
+}
+
+/* Workaround for bug in Firefox (issue #384) */
+.inst-left {
+ float: left;
+}
+
+.top p.src {
+ border-bottom: 3px solid #e5e5e5;
+ line-height: 2rem;
+ margin-bottom: 1em;
+}
+
+.warning {
+ color: red;
+}
+
+.arguments {
+ margin-top: -0.4em;
+}
+.arguments .caption {
+ display: none;
+}
+
+.fields { padding-left: 1em; }
+
+.fields .caption { display: none; }
+
+.fields p { margin: 0 0; }
+
+/* this seems bulky to me
+.methods, .constructors {
+ background: #f8f8f8;
+ border: 1px solid #eee;
+}
+*/
+
+/* @end */
+
+/* @group Auxillary Pages */
+
+
+.extension-list {
+ list-style-type: none;
+ margin-left: 0;
+}
+
+#mini {
+ margin: 0 auto;
+ padding: 0 1em 1em;
+}
+
+#mini > * {
+ font-size: 93%; /* 12pt */
+}
+
+#mini #module-list .caption,
+#mini #module-header .caption {
+ font-size: 125%; /* 15pt */
+}
+
+#mini #interface h1,
+#mini #interface h2,
+#mini #interface h3,
+#mini #interface h4 {
+ font-size: 109%; /* 13pt */
+ margin: 1em 0 0;
+}
+
+#mini #interface .top,
+#mini #interface .src {
+ margin: 0;
+}
+
+#mini #module-list ul {
+ list-style: none;
+ margin: 0;
+}
+
+#alphabet ul {
+ list-style: none;
+ padding: 0;
+ margin: 0.5em 0 0;
+ text-align: center;
+}
+
+#alphabet li {
+ display: inline;
+ margin: 0 0.25em;
+}
+
+#alphabet a {
+ font-weight: bold;
+}
+
+#index .caption,
+#module-list .caption { font-size: 131%; /* 17pt */ }
+
+#index table {
+ margin-left: 2em;
+}
+
+#index .src {
+ font-weight: bold;
+}
+#index .alt {
+ font-size: 77%; /* 10pt */
+ font-style: italic;
+ padding-left: 2em;
+}
+
+#index td + td {
+ padding-left: 1em;
+}
+
+#module-list ul {
+ list-style: none;
+ margin: 0 0 0 2em;
+}
+
+#module-list li {
+ clear: right;
+}
+
+#module-list span.collapser,
+#module-list span.expander {
+ background-position: 0 0.3em;
+}
+
+#module-list .package {
+ float: right;
+}
+
+:target {
+ background: -webkit-linear-gradient(top, transparent 0%, transparent 65%, #fbf36d 60%, #fbf36d 100%);
+ background: -moz-linear-gradient(top, transparent 0%, transparent 65%, #fbf36d 60%, #fbf36d 100%);
+ background: -o-linear-gradient(top, transparent 0%, transparent 65%, #fbf36d 60%, #fbf36d 100%);
+ background: -ms-linear-gradient(top, transparent 0%, transparent 65%, #fbf36d 60%, #fbf36d 100%);
+ background: linear-gradient(to bottom, transparent 0%, transparent 65%, #fbf36d 60%, #fbf36d 100%);
+}
+
+:target:hover {
+ background: -webkit-linear-gradient(top, transparent 0%, transparent 0%, #fbf36d 0%, #fbf36d 100%);
+ background: -moz-linear-gradient(top, transparent 0%, transparent 0%, #fbf36d 0%, #fbf36d 100%);
+ background: -o-linear-gradient(top, transparent 0%, transparent 0%, #fbf36d 0%, #fbf36d 100%);
+ background: -ms-linear-gradient(top, transparent 0%, transparent 0%, #fbf36d 0%, #fbf36d 100%);
+ background: linear-gradient(to bottom, transparent 0%, transparent 0%, #fbf36d 0%, #fbf36d 100%);
+}
+
+/* @end */
+
+/* @group Dropdown menus */
+
+#preferences-menu, #style-menu {
+ width: 25em;
+ overflow-y: auto;
+}
+
+/* @end */
diff --git a/docs/reports/doc/meta.json b/docs/reports/doc/meta.json
new file mode 100644
index 000000000..6cb919cc5
--- /dev/null
+++ b/docs/reports/doc/meta.json
@@ -0,0 +1 @@
+{"haddock_version":"2.24.2"}
\ No newline at end of file
diff --git a/docs/reports/doc/quick-jump.css b/docs/reports/doc/quick-jump.css
new file mode 100644
index 000000000..d656f51c7
--- /dev/null
+++ b/docs/reports/doc/quick-jump.css
@@ -0,0 +1,222 @@
+/* @group Fundamentals */
+
+.hidden {
+ display: none;
+}
+
+/* @end */
+
+/* @group Search box layout */
+
+#search {
+ position: fixed;
+ top: 3.2em;
+ bottom: 0;
+ left: calc(50% - 22em);
+ width: 44em;
+ z-index: 1000;
+ pointer-events: none;
+ overflow-y: auto;
+}
+
+@media only screen and (max-width: 999px) {
+ #search {
+ top: 5.7em;
+ }
+}
+
+#search-form, #search-results {
+ box-shadow: 2px 2px 6px rgb(199, 204, 208);
+ pointer-events: all;
+}
+
+#search-form input {
+ font-size: 1.25em; line-height: 2.3em; height: 2.4em;
+ display: block;
+ box-sizing: border-box;
+ width: 100%;
+ margin: 0;
+ padding: 0 0.75em;
+ border: 0.05em solid rgb(151, 179, 202);
+}
+
+#search input:focus {
+ outline: none;
+}
+
+#search p.error {
+ color: rgb(107, 24, 24);
+ font-weight: bold;
+}
+
+#search-results {
+ box-sizing: border-box;
+ border: 0.05em solid #b2d5fb;
+ background: #e8f3ff;
+ max-height: 80%;
+ overflow: scroll;
+}
+
+#search-form input + #search-results {
+ border-top: none;
+ top: 3em;
+ max-height: calc(100% - 3em);
+}
+
+/* @end */
+
+/* @group search results */
+
+#search-results > ul {
+ margin: 0;
+ list-style: none;
+}
+
+#search-results > ul > li,
+#search-results > p,
+#search-results > table {
+ padding: 0.5em 1em;
+ margin: 0;
+}
+
+#search-results > ul > li {
+ border-bottom: 1px solid #b2d5fb;
+}
+
+#search-results > ul > li > ul {
+ list-style: none;
+}
+
+.search-module h4 {
+ margin: 0;
+}
+
+.search-module > ul {
+ margin: 0.5em 0 0.5em 2em;
+}
+
+.search-module > ul > li > a[href] {
+ display: block;
+ color: inherit;
+ padding: 0.25em 0.5em;
+}
+
+.search-module > ul > li > a[href].active-link {
+ background: #faf9dc;
+}
+
+.search-module a[href]:hover {
+ text-decoration: none;
+}
+
+.search-result a a {
+ pointer-events: none;
+}
+
+.search-result ul.subs {
+ display: inline-block;
+ margin: 0; padding: 0;
+}
+
+.search-result ul.subs li {
+ display: none;
+}
+
+.search-result ul.subs::after {
+ display: inline-block;
+ content: "...";
+ color: rgb(78,98,114);
+ margin: 0 0.25em;
+}
+
+.more-results {
+ color: rgb(99, 141, 173);
+ position: relative;
+}
+
+.more-results::before {
+ content: "+";
+ display: inline-block;
+ color: #b2d5fb;
+ font-weight: bold;
+ font-size: 1.25em; line-height: inherit;
+ position: absolute;
+ left: -1em;
+}
+
+/* @end */
+
+/* @group Keyboard shortcuts table */
+
+.keyboard-shortcuts {
+ line-height: 1.6em;
+}
+
+.keyboard-shortcuts th {
+ color: rgb(78,98,114);
+}
+
+.keyboard-shortcuts td:first-child,
+.keyboard-shortcuts th:first-child {
+ text-align: right;
+ padding-right: 0.6em;
+}
+
+.key {
+ display: inline-block;
+ font-size: 0.9em;
+ min-width: 0.8em; line-height: 1.2em;
+ text-align: center;
+ background: #b2d5fb;
+ border: 1px solid #74a3d6;
+ padding: 0 0.2em;
+ margin: 0 0.1em;
+}
+
+/* @end */
+
+/* @group Dropdown menus */
+
+/* Based on #search styling above. */
+
+.dropdown-menu {
+ position: fixed;
+ /* Not robust to window size changes. */
+ top: 3.2em;
+ right: 0;
+ /* To display on top of synopsis menu on right side. */
+ z-index: 1000;
+ border: 0.05em solid #b2d5fb;
+ background: #e8f3ff;
+}
+
+@media only screen and (max-width: 999px) {
+ .dropdown-menu {
+ top: 5.7em;
+ }
+}
+
+.dropdown-menu * {
+ margin: 0.1em;
+}
+
+.dropdown-menu button {
+ border: 1px #5E5184 solid;
+ border-radius: 3px;
+ background: #5E5184;
+ padding: 3px;
+ color: #f4f4f4;
+ min-width: 6em;
+}
+
+.dropdown-menu button:hover {
+ color: #5E5184;
+ background: #f4f4f4;
+}
+
+.dropdown-menu button:active {
+ color: #f4f4f4;
+ background: #5E5184;
+}
+
+/* @end */
diff --git a/docs/reports/doc/synopsis.png b/docs/reports/doc/synopsis.png
new file mode 100644
index 000000000..85fb86ec8
Binary files /dev/null and b/docs/reports/doc/synopsis.png differ
diff --git a/docs/reports/hlint.html b/docs/reports/hlint.html
index 845a85acc..fd663e88b 100644
--- a/docs/reports/hlint.html
+++ b/docs/reports/hlint.html
@@ -166,7 +166,7 @@
All files
@@ -178,7 +178,7 @@
-./hs/test/HelVM/Common/Collections/MapListSpec.hs:50:11: Suggestion: Reduce duplication
+./dist-newstyle/src/helio-47df7eb819007334/hs/test/HelVM/HelIO/Collections/MapListSpec.hs:50:11: Suggestion: Reduce duplication
Found
it "mapListToList . fromIntIndexedList" $
( mapListToList . fromIntIndexedList ) input `shouldBe` output
@@ -188,7 +188,7 @@
( LL.toList . fromIntIndexedList ) input `shouldBe` output
Perhaps
-
Combine with ./ hs / test / HelVM / Common / Collections / MapListSpec.hs : 59 : 11
+
Combine with ./ dist newstyle / src / helio 47 df7eb819007334 / hs / test / HelVM / HelIO / Collections / MapListSpec.hs : 59 : 11
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html
new file mode 100644
index 000000000..4360f2d7c
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton (
+ 2 evalSource,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 6 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 7 import HelVM.HelMA.Automata.BrainFuck.Lexer
+ 8 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 9 import HelVM.HelMA.Automata.BrainFuck.TableOfInstructions
+ 10 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 11
+ 12 import HelVM.HelMA.Automaton.API.IOTypes
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14 import HelVM.HelMA.Automaton.Types.DumpType
+ 15
+ 16 import Control.Type.Operator
+ 17
+ 18 evalSource :: (BIO m , Symbol e) => Source -> FullTape e -> DumpType -> m ()
+ 19 evalSource source tape dt = logDump dt =<< doInstruction ([] , tokenize source) tape
+ 20
+ 21 doInstruction :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 22 doInstruction table@(_ , Simple MoveR : _) tape = doInstruction (nextInst table) (moveHeadRight tape)
+ 23 doInstruction table@(_ , Simple MoveL : _) tape = doInstruction (nextInst table) (moveHeadLeft tape)
+ 24 doInstruction table@(_ , Simple Inc : _) tape = doInstruction (nextInst table) (wNextSymbol tape)
+ 25 doInstruction table@(_ , Simple Dec : _) tape = doInstruction (nextInst table) (wPrevSymbol tape)
+ 26 doInstruction table@(_ , Simple Output : _) tape = doOutputChar table tape
+ 27 doInstruction table@(_ , Simple Input : _) tape = doInputChar table tape
+ 28 doInstruction table@(_ , JmpPast : _) tape = doJmpPast table tape
+ 29 doInstruction table@(_ , JmpBack : _) tape = doJmpBack table tape
+ 30 doInstruction table@(_ , [] ) tape = doEnd table tape
+ 31
+ 32 doJmpPast :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 33 doJmpPast table tape@(_ , 0 : _) = doInstruction (jumpPast table) tape
+ 34 doJmpPast table tape = doInstruction (nextInst table) tape
+ 35
+ 36 doJmpBack :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 37 doJmpBack table tape@(_ , 0 : _) = doInstruction (nextInst table) tape
+ 38 doJmpBack table tape = doInstruction (jumpBack table) tape
+ 39
+ 40 -- | IO instructions
+ 41 doOutputChar :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 42 doOutputChar _ (_ , []) = error "Illegal State"
+ 43 doOutputChar table tape@(_ , e : _) = wPutChar (toChar e) *> doInstruction (nextInst table) tape
+ 44
+ 45 doInputChar :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 46 doInputChar table tape = (doInstruction (nextInst table) . flip writeSymbol tape) =<< wGetChar
+ 47
+ 48 -- | Terminate instruction
+ 49 doEnd :: BIO m => Table -> FullTape e -> m $ Unit e
+ 50 doEnd table tape = pure $ Unit table tape
+ 51
+ 52 -- | Types
+ 53 data Unit e = Unit
+ 54 { unitTable :: Table
+ 55 , unitTape :: FullTape e
+ 56 }
+ 57 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html
new file mode 100644
index 000000000..b5ff9ec69
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton (
+ 2 evalSource,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 6 import HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction
+ 7 import HelVM.HelMA.Automata.BrainFuck.Parser
+ 8 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 9 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 10
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 13 import HelVM.HelMA.Automaton.Types.DumpType
+ 14
+ 15 import HelVM.HelIO.Containers.LLIndexSafe
+ 16
+ 17 import Control.Type.Operator
+ 18
+ 19 evalSource :: (BIO m , Symbol e) => Source -> FullTape e -> DumpType -> m ()
+ 20 evalSource source tape dt = logDump dt =<< flip evalVector tape =<< parseAsVector source
+ 21
+ 22 evalVector :: (BIO m , Symbol e) => TreeInstructionVector -> FullTape e -> m $ Unit e
+ 23 evalVector iv = nextStep (IU iv 0)
+ 24
+ 25 nextStep :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 26 nextStep (IU iv ic) = doInstruction (iv `indexMaybe` ic) (IU iv $ ic + 1)
+ 27
+ 28 doInstruction :: (BIO m , Symbol e) => Maybe TreeInstruction -> InstructionUnit -> FullTape e -> m $ Unit e
+ 29 doInstruction (Just (Simple MoveR )) table tape = nextStep table (moveHeadRight tape)
+ 30 doInstruction (Just (Simple MoveL )) table tape = nextStep table (moveHeadLeft tape)
+ 31 doInstruction (Just (Simple Inc )) table tape = nextStep table (wNextSymbol tape)
+ 32 doInstruction (Just (Simple Dec )) table tape = nextStep table (wPrevSymbol tape)
+ 33 doInstruction (Just (Simple Output )) table tape = doOutputChar table tape
+ 34 doInstruction (Just (Simple Input )) table tape = doInputChar table tape
+ 35 doInstruction (Just (While iv )) table tape = doWhile iv table tape
+ 36 doInstruction Nothing table tape = doEnd table tape
+ 37
+ 38 doWhile :: (BIO m , Symbol e) => TreeInstructionVector -> InstructionUnit -> FullTape e -> m $ Unit e
+ 39 doWhile _ table tape@(_ , 0:_) = nextStep table tape
+ 40 doWhile iv table tape = doWhileWithTape =<< evalVector iv tape where
+ 41 doWhileWithTape :: (BIO m , Symbol e) => Unit e -> m $ Unit e
+ 42 doWhileWithTape = doWhile iv table . unitTape
+ 43
+ 44 -- | IO instructions
+ 45 doOutputChar :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 46 doOutputChar _ (_ , []) = error "Illegal State"
+ 47 doOutputChar table tape@(_ , e:_) = wPutChar (toChar e) *> nextStep table tape
+ 48
+ 49 doInputChar :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 50 doInputChar table tape = (nextStep table . flip writeSymbol tape) =<< wGetChar
+ 51
+ 52 -- | Terminate instruction
+ 53 doEnd :: BIO m => InstructionUnit -> FullTape e -> m $ Unit e
+ 54 doEnd iu tape = pure $ Unit iu tape
+ 55
+ 56 -- | Types
+ 57 data Unit e = Unit
+ 58 { unitUI :: InstructionUnit
+ 59 , unitTape :: FullTape e
+ 60 }
+ 61 deriving stock (Eq , Show )
+ 62
+ 63 data InstructionUnit = IU !TreeInstructionVector !InstructionCounter
+ 64 deriving stock (Eq , Show )
+ 65
+ 66 type InstructionCounter = Int
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html
new file mode 100644
index 000000000..05adcb87b
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton where
+ 2
+ 3 import qualified HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton as Flat
+ 4 import qualified HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton as Tree
+ 5
+ 6 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 7 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 8
+ 9 import HelVM.HelMA.Automaton.API.EvalParams
+ 10 import HelVM.HelMA.Automaton.API.IOTypes
+ 11 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 12
+ 13 import HelVM.HelMA.Automaton.Types.CellType
+ 14 import HelVM.HelMA.Automaton.Types.DumpType
+ 15
+ 16 simpleEval :: BIO m => (Bool , Source , CellType) -> m ()
+ 17 simpleEval (c , s , t) = eval c s t Pretty
+ 18
+ 19 ----
+ 20
+ 21 evalParams :: BIO m => EvalParams -> m ()
+ 22 evalParams p = eval (compile p) (source p) (cellTypeOptions p) (dumpTypeOptions p)
+ 23
+ 24 eval :: BIO m => Bool -> Source -> CellType -> DumpType -> m ()
+ 25 eval c s Int8Type = evalSource c s (newTape :: FullTape Int8)
+ 26 eval c s Word8Type = evalSource c s (newTape :: FullTape Word8)
+ 27 eval c s Int16Type = evalSource c s (newTape :: FullTape Int16)
+ 28 eval c s Word16Type = evalSource c s (newTape :: FullTape Word16)
+ 29 eval c s Int32Type = evalSource c s (newTape :: FullTape Int32)
+ 30 eval c s Word32Type = evalSource c s (newTape :: FullTape Word32)
+ 31 eval c s Int64Type = evalSource c s (newTape :: FullTape Int64)
+ 32 eval c s Word64Type = evalSource c s (newTape :: FullTape Word64)
+ 33
+ 34 evalSource :: (BIO m , Symbol e) => Bool -> Source -> FullTape e -> DumpType -> m ()
+ 35 evalSource False = Flat.evalSource
+ 36 evalSource True = Tree.evalSource
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html
new file mode 100644
index 000000000..bdb30e3fe
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 4
+ 5 import Text.Read
+ 6
+ 7 import qualified Text.Show
+ 8
+ 9 data FlatInstruction =
+ 10 Simple SimpleInstruction
+ 11 | JmpPast
+ 12 | JmpBack
+ 13 deriving stock (Eq )
+ 14
+ 15 type FlatTreeInstructionList = [FlatInstruction]
+ 16
+ 17 instance Show FlatInstruction where
+ 18 show (Simple i) = show i
+ 19 show JmpPast = "["
+ 20 show JmpBack = "]"
+ 21
+ 22 instance Read FlatInstruction where
+ 23 readsPrec _ ">" = [( Simple MoveR , "")]
+ 24 readsPrec _ "<" = [( Simple MoveL , "")]
+ 25 readsPrec _ "+" = [( Simple Inc , "")]
+ 26 readsPrec _ "-" = [( Simple Dec , "")]
+ 27 readsPrec _ "." = [( Simple Output , "")]
+ 28 readsPrec _ "," = [( Simple Input , "")]
+ 29 readsPrec _ "[" = [( JmpPast , "")]
+ 30 readsPrec _ "]" = [( JmpBack , "")]
+ 31 readsPrec _ _ = []
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html
new file mode 100644
index 000000000..d40c09792
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction where
+ 2
+ 3 import Text.Read
+ 4 import qualified Text.Show
+ 5
+ 6 data SimpleInstruction =
+ 7 MoveR
+ 8 | MoveL
+ 9 | Inc
+ 10 | Dec
+ 11 | Output
+ 12 | Input
+ 13 deriving stock (Bounded , Enum , Eq )
+ 14
+ 15 instance Show SimpleInstruction where
+ 16 show MoveR = ">"
+ 17 show MoveL = "<"
+ 18 show Inc = "+"
+ 19 show Dec = "-"
+ 20 show Output = "."
+ 21 show Input = ","
+ 22
+ 23 instance Read SimpleInstruction where
+ 24 readsPrec _ ">" = [( MoveR , "")]
+ 25 readsPrec _ "<" = [( MoveL , "")]
+ 26 readsPrec _ "+" = [( Inc , "")]
+ 27 readsPrec _ "-" = [( Dec , "")]
+ 28 readsPrec _ "." = [( Output , "")]
+ 29 readsPrec _ "," = [( Input , "")]
+ 30 readsPrec _ _ = []
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html
new file mode 100644
index 000000000..f7c5c74b9
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 4
+ 5 import Data.DList
+ 6 import qualified Data.ListLike as LL
+ 7 import Data.Vector
+ 8
+ 9 import qualified Text.Show
+ 10
+ 11 data TreeInstruction =
+ 12 Simple SimpleInstruction
+ 13 | While !TreeInstructionVector
+ 14 deriving stock (Eq )
+ 15
+ 16 type TreeInstructionList = [TreeInstruction]
+ 17 type TreeInstructionDList = DList TreeInstruction
+ 18 type TreeInstructionVector = Vector TreeInstruction
+ 19
+ 20 instance Show TreeInstruction where
+ 21 show (Simple i) = show i
+ 22 show (While il) = "[" <> (show =<< LL.toList il) <> "]"
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html
new file mode 100644
index 000000000..7987dc7b9
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelMA.Automaton.API.IOTypes
+ 7 import HelVM.HelMA.Automaton.WrapTokenList
+ 8
+ 9 -- | Lexer
+ 10 tokenize :: Source -> FlatTreeInstructionList
+ 11 tokenize = unWrapTokenList . readTokens
+ 12
+ 13 readTokens :: Source -> Tokens
+ 14 readTokens source = readTextUnsafe source :: Tokens
+ 15
+ 16 type Tokens = WrapTokenList FlatTreeInstructionList
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html
new file mode 100644
index 000000000..88eb4e52f
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Parser where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction as Flat
+ 4 import HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction as Tree
+ 5 import HelVM.HelMA.Automata.BrainFuck.Lexer
+ 6
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8
+ 9 import HelVM.HelIO.Control.Safe
+ 10 import HelVM.HelIO.ListLikeUtil
+ 11
+ 12 import Data.ListLike hiding (show)
+ 13
+ 14 import qualified Data.DList as D
+ 15
+ 16 type OperandParser m a = FlatTreeInstructionList -> m (a , FlatTreeInstructionList)
+ 17
+ 18 parseAsVector :: MonadSafe m => Source -> m TreeInstructionVector
+ 19 parseAsVector = parseFILAsVector . tokenize
+ 20
+ 21 parseFILAsVector :: MonadSafe m => FlatTreeInstructionList -> m TreeInstructionVector
+ 22 parseFILAsVector fil = fromList <$> parseFIL fil
+ 23
+ 24 parseFIL :: MonadSafe m => FlatTreeInstructionList -> m TreeInstructionList
+ 25 parseFIL (Flat.Simple i : fil) = (Tree.Simple i : ) <$> parseFIL fil
+ 26 parseFIL [] = pure []
+ 27 parseFIL (Flat.JmpBack : fil) = liftErrorWithPrefix "JmpBack" $ show fil
+ 28 parseFIL (Flat.JmpPast : fil) = addWhile =<< parseWhile fil where
+ 29 addWhile (i , fil') = (i : ) <$> parseFIL fil'
+ 30
+ 31 parseWhile :: MonadSafe m => OperandParser m TreeInstruction
+ 32 parseWhile fil = buildWhile <$> parseWhileD fil where
+ 33 buildWhile :: (TreeInstructionDList , FlatTreeInstructionList) -> (TreeInstruction , FlatTreeInstructionList)
+ 34 buildWhile (idl , fil') = (buildWhileFromDList idl , fil')
+ 35
+ 36 buildWhileFromDList :: TreeInstructionDList -> TreeInstruction
+ 37 buildWhileFromDList = Tree.While . convert
+ 38
+ 39 parseWhileD :: MonadSafe m => OperandParser m TreeInstructionDList
+ 40 parseWhileD = go D.empty where
+ 41 go :: MonadSafe m => TreeInstructionDList -> FlatTreeInstructionList -> m (TreeInstructionDList , FlatTreeInstructionList)
+ 42 go acc (Flat.Simple i : fil) = go (acc `snoc` Tree.Simple i ) fil
+ 43 go acc [] = liftErrorWithPrefix "End of List" $ show acc
+ 44 go acc (Flat.JmpBack : fil) = pure (acc , fil)
+ 45 go acc (Flat.JmpPast : fil) = snocInstruction =<< parseWhile fil where
+ 46 snocInstruction :: MonadSafe m => (TreeInstruction , FlatTreeInstructionList) -> m (TreeInstructionDList , FlatTreeInstructionList)
+ 47 snocInstruction (i , fil') = go (acc `snoc` i) fil'
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html
new file mode 100644
index 000000000..e276c86f8
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Symbol (
+ 2 Symbol,
+ 3 def,
+ 4 next,
+ 5 prev,
+ 6 fromChar,
+ 7 toChar
+ 8 ) where
+ 9
+ 10 import Data.Default (Default)
+ 11
+ 12 import qualified Data.Default as Default
+ 13 import qualified Relude.Extra as Extra
+ 14
+ 15 def :: Symbol e => e
+ 16 def = Default.def
+ 17
+ 18 next :: Symbol e => e -> e
+ 19 next = Extra.next
+ 20
+ 21 prev :: Symbol e => e -> e
+ 22 prev = Extra.prev
+ 23
+ 24 class (Bounded e , Default e , Enum e , Eq e , Num e , Show e) => Symbol e where
+ 25 fromChar :: Char -> e
+ 26 toChar :: e -> Char
+ 27
+ 28 --
+ 29
+ 30 instance Symbol Int where
+ 31 fromChar = ord
+ 32 toChar = chr
+ 33
+ 34 instance Symbol Word where
+ 35 fromChar = fromIntegral . ord
+ 36 toChar = chr . fromIntegral
+ 37
+ 38 instance Symbol Int8 where
+ 39 fromChar = fromIntegral . ord
+ 40 toChar = chr . normalizeMod . fromIntegral
+ 41
+ 42 instance Symbol Word8 where
+ 43 fromChar = fromIntegral . ord
+ 44 toChar = chr . fromIntegral
+ 45
+ 46 instance Symbol Int16 where
+ 47 fromChar = fromIntegral . ord
+ 48 toChar = chr . normalizeMod . fromIntegral
+ 49
+ 50 instance Symbol Word16 where
+ 51 fromChar = fromIntegral . ord
+ 52 toChar = chr . fromIntegral
+ 53
+ 54 instance Symbol Int32 where
+ 55 fromChar = fromIntegral . ord
+ 56 toChar = chr . normalizeMod . fromIntegral
+ 57
+ 58 instance Symbol Word32 where
+ 59 fromChar = fromIntegral . ord
+ 60 toChar = chr . fromIntegral
+ 61
+ 62 instance Symbol Int64 where
+ 63 fromChar = fromIntegral . ord
+ 64 toChar = chr . normalizeMod . fromIntegral
+ 65
+ 66 instance Symbol Word64 where
+ 67 fromChar = fromIntegral . ord
+ 68 toChar = chr . fromIntegral
+ 69 --
+ 70
+ 71 countSymbols :: (Integral e) => e
+ 72 countSymbols = 256
+ 73
+ 74 modifyMod :: (Integral e) => (e -> e) -> e -> e
+ 75 modifyMod f i = f (i + countSymbols) `mod` countSymbols
+ 76
+ 77 normalizeMod :: (Integral e) => e -> e
+ 78 normalizeMod = modifyMod id
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html
new file mode 100644
index 000000000..78fc0f8ac
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.TableOfInstructions where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 4
+ 5 type HalfTable = FlatTreeInstructionList
+ 6 type Table = (HalfTable , HalfTable)
+ 7 type TableD = Table -> Table
+ 8
+ 9 prevInst :: TableD
+ 10 prevInst (inst : prev , next) = (prev , inst : next)
+ 11 prevInst ([] , _) = error "End of the table"
+ 12
+ 13 nextInst :: TableD
+ 14 nextInst (prev , inst : next) = (inst : prev , next)
+ 15 nextInst (_ , []) = error "End of the table"
+ 16
+ 17 matchPrevJmp :: TableD
+ 18 matchPrevJmp table@(JmpPast : _ , _) = table
+ 19 matchPrevJmp table@(JmpBack : _ , _) = (matchPrevJmp . prevInst . jumpBack) table
+ 20 matchPrevJmp table = jumpBack table
+ 21
+ 22 matchNextJmp :: TableD
+ 23 matchNextJmp table@(_ , JmpBack : _) = nextInst table
+ 24 matchNextJmp table@(_ , JmpPast : _) = (matchNextJmp . jumpPast) table
+ 25 matchNextJmp table = jumpPast table
+ 26
+ 27 jumpPast :: TableD
+ 28 jumpPast = matchNextJmp . nextInst
+ 29
+ 30 jumpBack :: TableD
+ 31 jumpBack = matchPrevJmp . prevInst
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html
new file mode 100644
index 000000000..df2083506
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols (
+ 2 FullTape,
+ 3 newTape,
+ 4 moveHeadRight,
+ 5 moveHeadLeft,
+ 6 wNextSymbol,
+ 7 wPrevSymbol,
+ 8 writeSymbol
+ 9 ) where
+ 10
+ 11 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 12
+ 13 ----
+ 14
+ 15 type D a = a -> a
+ 16 type FullTape e = (HalfTape e , HalfTape e)
+ 17 type FullTapeD e = D (FullTape e)
+ 18
+ 19 type HalfTape e = [e]
+ 20
+ 21 ----
+ 22
+ 23 newTape :: (Symbol e) => FullTape e
+ 24 newTape = ([def] , [def])
+ 25
+ 26 moveHeadRight :: (Symbol e) => FullTapeD e
+ 27 moveHeadRight (cell:left , right) = pad (left , cell:right)
+ 28 moveHeadRight ([] , _) = error "End of the Tape"
+ 29
+ 30 moveHeadLeft :: (Symbol e) => FullTapeD e
+ 31 moveHeadLeft (left , cell:right) = pad (cell:left , right)
+ 32 moveHeadLeft (_ , []) = error "End of the Tape"
+ 33
+ 34 pad :: (Symbol e) => FullTapeD e
+ 35 pad ([] , []) = newTape
+ 36 pad ([] , right) = ([def] , right)
+ 37 pad (left , []) = (left , [def])
+ 38 pad tape = tape
+ 39
+ 40 ----
+ 41
+ 42 wNextSymbol :: (Symbol e) => FullTapeD e
+ 43 wNextSymbol = modifyCell next
+ 44
+ 45 wPrevSymbol :: (Symbol e) => FullTapeD e
+ 46 wPrevSymbol = modifyCell prev
+ 47
+ 48 writeSymbol :: (Symbol e) => Char -> FullTapeD e
+ 49 writeSymbol symbol = modifyCell (const $ fromChar symbol)
+ 50
+ 51 modifyCell :: D e -> FullTapeD e
+ 52 modifyCell f (left , cell:right) = (left , f cell:right)
+ 53 modifyCell _ (_ , []) = error "End of the Tape"
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html
new file mode 100644
index 000000000..378891022
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Cat.Automaton (
+ 2 evalParams,
+ 3 eval
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automaton.API.EvalParams
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 9
+ 10 evalParams :: BIO m => EvalParams -> m ()
+ 11 evalParams = eval . source
+ 12
+ 13 eval :: BusinessIO m => Source -> m ()
+ 14 eval = wPutStr
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html
new file mode 100644
index 000000000..277ad958a
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Addressing (
+ 2 genericFindAddress,
+ 3 findAddress,
+ 4 genericNextLabel,
+ 5 nextLabel
+ 6 ) where
+ 7
+ 8 import HelVM.HelMA.Automata.ETA.Symbol
+ 9 import HelVM.HelMA.Automata.ETA.Token
+ 10
+ 11 import HelVM.HelIO.Containers.LLIndexSafe
+ 12
+ 13 import HelVM.HelIO.Control.Safe
+ 14
+ 15 import Data.ListLike hiding (show)
+ 16
+ 17 import Prelude hiding (length, splitAt)
+ 18
+ 19 import qualified Data.Vector as Vector
+ 20
+ 21 ----
+ 22
+ 23 genericFindAddress :: (MonadSafe m , Integral cell) => Vector.Vector Token -> cell -> m InstructionAddress
+ 24 genericFindAddress il = findAddress il . fromIntegral
+ 25
+ 26 findAddress :: MonadSafe m => Vector.Vector Token -> Int -> m InstructionAddress
+ 27 findAddress _ 1 = pure 0
+ 28 findAddress il address = appendErrorTupleList [("il" , show il) , ("address" , show address)] ((+1) <$> indexSafe (Vector.elemIndices R il) (address-2))
+ 29
+ 30 ----
+ 31
+ 32 genericNextLabel :: Integral cell => Vector.Vector Token -> InstructionAddress -> cell
+ 33 genericNextLabel il = fromIntegral . nextLabel il
+ 34
+ 35 nextLabel :: Vector.Vector Token -> InstructionAddress -> Int
+ 36 nextLabel il ic = length (Vector.elemIndices R il') + 2 where (il' , _) = splitAt ic il
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html
new file mode 100644
index 000000000..281881e0e
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 ) where
+ 6
+ 7 import HelVM.HelMA.Automata.ETA.Evaluator
+ 8 import HelVM.HelMA.Automata.ETA.Lexer
+ 9 import HelVM.HelMA.Automata.ETA.OperandParsers
+ 10 import HelVM.HelMA.Automata.ETA.Symbol
+ 11 import HelVM.HelMA.Automata.ETA.Token
+ 12
+ 13 import HelVM.HelMA.Automaton.API.EvalParams
+ 14 import HelVM.HelMA.Automaton.API.IOTypes
+ 15
+ 16 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 17 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 18
+ 19 import HelVM.HelMA.Automaton.Types.DumpType
+ 20 import HelVM.HelMA.Automaton.Types.StackType
+ 21
+ 22 import HelVM.HelIO.Collections.SList as SList
+ 23
+ 24 import Prelude hiding (divMod)
+ 25
+ 26 import qualified Data.Sequence as Seq
+ 27 import qualified Data.Vector as Vector
+ 28
+ 29 simpleEval :: BIO m => (Bool , Source , StackType) -> m ()
+ 30 simpleEval (c , s , t) = eval c s t Pretty
+ 31
+ 32 ----
+ 33
+ 34 evalParams :: BIO m => EvalParams -> m ()
+ 35 evalParams p = eval (compile p) (source p) (stackTypeOptions p) (dumpTypeOptions p)
+ 36
+ 37 eval :: (Evaluator Symbol m) => Bool -> Source -> StackType -> DumpType -> m ()
+ 38 eval compile source = evalTL compile (tokenize source)
+ 39
+ 40 evalTL :: (Evaluator Symbol m) => Bool -> TokenList -> StackType -> DumpType -> m ()
+ 41 evalTL c tl ListStackType = start c tl []
+ 42 evalTL c tl SeqStackType = start c tl Seq.empty
+ 43 evalTL c tl SListStackType = start c tl SList.sListEmpty
+ 44
+ 45 start :: (SEvaluator Symbol s m) => Bool -> TokenList -> s -> DumpType -> m ()
+ 46 start _ tl s dt = logDump dt =<< next (IU (Vector.fromList tl) 0) s
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html
new file mode 100644
index 000000000..50abd12dd
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Evaluator (
+ 2 next,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.ETA.Addressing
+ 6 import HelVM.HelMA.Automata.ETA.OperandParsers
+ 7 import HelVM.HelMA.Automata.ETA.Token
+ 8
+ 9 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 10
+ 11 import HelVM.HelMA.Automaton.Units.ALU as Stack
+ 12
+ 13 import Control.Type.Operator
+ 14
+ 15 import Prelude hiding (divMod)
+ 16
+ 17 next :: (SEvaluator e s m) => InstructionUnit -> s -> m $ Unit s
+ 18 next iu s = doInstruction' =<< nextIU iu where doInstruction' (t , iu') = doInstruction t iu' s
+ 19
+ 20 doInstruction :: (SEvaluator e s m) => Maybe Token -> InstructionUnit -> s -> m $ Unit s
+ 21 -- | IO instructions
+ 22 doInstruction (Just O) iu s = next iu =<< doOutputChar2 s
+ 23 doInstruction (Just I) iu s = next iu =<< doInputChar2 s
+ 24
+ 25 -- | Stack instructions
+ 26 doInstruction (Just N) iu s = next' =<< parseNumber iu where next' (symbol , iu') = next iu' (push1 symbol s)
+ 27 doInstruction (Just H) iu s = next iu =<< halibut s
+ 28
+ 29 -- | Arithmetic
+ 30 doInstruction (Just S) iu s = next iu =<< sub s
+ 31 doInstruction (Just E) iu s = next iu =<< divMod s
+ 32
+ 33 -- | Control
+ 34 doInstruction (Just R) iu s = next iu s
+ 35 doInstruction (Just A) iu@(IU il ic) s = (next iu . flipPush1 s . genericNextLabel il) ic
+ 36 doInstruction (Just T) iu@(IU il _ ) s = transfer =<< pop2 s where
+ 37 transfer (_ , 0 , s') = next iu s'
+ 38 transfer (0 , _ , _ ) = doEnd iu s
+ 39 transfer (l , _ , s') = next' =<< genericFindAddress il l where next' address = next (IU il address) s'
+ 40 doInstruction Nothing iu s = doEnd iu s
+ 41
+ 42 -- | Terminate instruction
+ 43 doEnd :: (SEvaluator e s m) => InstructionUnit -> s -> m $ Unit s
+ 44 doEnd iu s = pure $ Unit iu s
+ 45
+ 46 -- | Types
+ 47
+ 48 data Unit s = Unit
+ 49 { unitIU :: !InstructionUnit
+ 50 , unitStack :: s
+ 51 }
+ 52 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html
new file mode 100644
index 000000000..cdb64831c
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.ETA.Token
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelIO.Util
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.WrapTokenList
+ 9
+ 10 -- | Lexer
+ 11 tokenize :: Source -> TokenList
+ 12 tokenize = whiteTokenListToTokenList . unWrapTokenList . readTokens
+ 13
+ 14 readTokens :: Source -> WhiteTokens
+ 15 readTokens source = (readTextUnsafe . toUppers) source :: WhiteTokens
+ 16
+ 17 -- | Types
+ 18 type WhiteTokens = WrapTokenList WhiteTokenList
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html
new file mode 100644
index 000000000..b04a053b3
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.OperandParsers where
+ 2
+ 3 import HelVM.HelMA.Automata.ETA.Symbol
+ 4 import HelVM.HelMA.Automata.ETA.Token
+ 5
+ 6 import HelVM.HelIO.Containers.LLIndexSafe
+ 7 import HelVM.HelIO.Control.Safe
+ 8 import HelVM.HelIO.Digit.ToDigit
+ 9
+ 10 import qualified Data.Vector as Vector
+ 11
+ 12 parseNumber :: (MonadSafe m , Integral a) => OperandIUParser m a
+ 13 parseNumber iu = go [] =<< nextIU iu where
+ 14 go :: (MonadSafe m , Integral a) => TokenList -> (Maybe Token, InstructionUnit) -> m (a, InstructionUnit)
+ 15 go acc (Nothing , iu') = ( , iu') <$> makeIntegral7FromList acc
+ 16 go acc (Just E , iu') = ( , iu') <$> makeIntegral7FromList acc
+ 17 go acc (Just R , iu') = go acc =<< nextIU iu'
+ 18 go acc (Just t , iu') = go (t : acc) =<< nextIU iu'
+ 19
+ 20 nextIU :: MonadSafe m => OperandIUParser m (Maybe Token)
+ 21 nextIU iu@(IU il ic)
+ 22 | ic < Vector.length il = wrap <$> indexSafe il ic
+ 23 | otherwise = pure (Nothing , iu)
+ 24 where wrap i = (Just i, IU il (ic+1))
+ 25
+ 26 -- | Types
+ 27 data InstructionUnit = IU !TokenVector !InstructionCounter
+ 28 deriving stock (Eq , Read , Show )
+ 29
+ 30 type OperandIUParser m a = InstructionUnit -> m (a , InstructionUnit)
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html
new file mode 100644
index 000000000..ee376a36d
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Token where
+ 2
+ 3 import HelVM.HelIO.Control.Safe
+ 4 import HelVM.HelIO.Digit.ToDigit
+ 5
+ 6 import Data.Vector as Vector
+ 7
+ 8 import qualified Text.Read
+ 9 import qualified Text.Show
+ 10
+ 11 data Token = E | T | A | O | I | N | S | H | R
+ 12 deriving stock (Bounded , Enum , Eq , Read , Show )
+ 13
+ 14 type TokenList = [Token]
+ 15 type TokenVector = Vector Token
+ 16
+ 17 instance ToDigit Token where
+ 18 toDigit H = pure 0
+ 19 toDigit T = pure 1
+ 20 toDigit A = pure 2
+ 21 toDigit O = pure 3
+ 22 toDigit I = pure 4
+ 23 toDigit N = pure 5
+ 24 toDigit S = pure 6
+ 25 toDigit t = liftErrorWithPrefix "Wrong token" $ show t
+ 26
+ 27 ----
+ 28
+ 29 newtype WhiteToken = WhiteToken { unWhiteToken :: Token}
+ 30 deriving stock (Eq )
+ 31
+ 32 type WhiteTokenList = [WhiteToken]
+ 33
+ 34 instance Show WhiteToken where
+ 35 show (WhiteToken R) = "\n"
+ 36 show (WhiteToken t) = show t
+ 37
+ 38 -- | Scanner
+ 39 instance Read WhiteToken where
+ 40 readsPrec _ "\n" = [( WhiteToken R , "")]
+ 41 readsPrec _ "E" = [( WhiteToken E , "")]
+ 42 readsPrec _ "T" = [( WhiteToken T , "")]
+ 43 readsPrec _ "A" = [( WhiteToken A , "")]
+ 44 readsPrec _ "O" = [( WhiteToken O , "")]
+ 45 readsPrec _ "I" = [( WhiteToken I , "")]
+ 46 readsPrec _ "N" = [( WhiteToken N , "")]
+ 47 readsPrec _ "S" = [( WhiteToken S , "")]
+ 48 readsPrec _ "H" = [( WhiteToken H , "")]
+ 49 readsPrec _ _ = []
+ 50
+ 51 tokenToWhiteTokenPair :: Token -> (WhiteToken , String)
+ 52 tokenToWhiteTokenPair t = (WhiteToken t , "")
+ 53
+ 54 whiteTokenListToTokenList :: WhiteTokenList -> TokenList
+ 55 whiteTokenListToTokenList = fmap unWhiteToken
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html
new file mode 100644
index 000000000..89e5d37a4
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Rev.Automaton (
+ 2 evalParams,
+ 3 eval
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automaton.API.EvalParams
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 9
+ 10 import qualified Data.Text as Text
+ 11
+ 12 evalParams :: BIO m => EvalParams -> m ()
+ 13 evalParams = eval . source
+ 14
+ 15 eval :: BusinessIO m => Source -> m ()
+ 16 eval = evalLines . lines
+ 17
+ 18 evalLines :: BusinessIO m => [Source] -> m ()
+ 19 evalLines ll = doOutput $ unlines $ Text.reverse <$> ll
+ 20
+ 21 doOutput :: BusinessIO m => Source -> m ()
+ 22 doOutput = wPutStr
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html
new file mode 100644
index 000000000..f8508b74b
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 ) where
+ 6
+ 7 import HelVM.HelMA.Automata.SubLeq.Evaluator
+ 8 import HelVM.HelMA.Automata.SubLeq.Lexer
+ 9
+ 10 import HelVM.HelMA.Automaton.API.EvalParams
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 15
+ 16 import HelVM.HelMA.Automaton.Types.DumpType
+ 17 import HelVM.HelMA.Automaton.Types.RAMType
+ 18
+ 19 import qualified HelVM.HelIO.Collections.MapList as MapList
+ 20 import qualified HelVM.HelIO.Collections.SList as SList
+ 21
+ 22 import qualified Data.Sequence as Seq
+ 23
+ 24 simpleEval :: BIO m => RAMType -> Source -> m ()
+ 25 simpleEval rt s = eval s rt Pretty
+ 26
+ 27 ----
+ 28
+ 29 evalParams :: BIO m => EvalParams -> m ()
+ 30 evalParams p = eval (source p) (ramTypeOptions p) (dumpTypeOptions p)
+ 31
+ 32 eval :: BIO m => Source -> RAMType -> DumpType -> m ()
+ 33 eval source = evalIL $ tokenize source
+ 34
+ 35 evalIL :: Evaluator e m => [e] -> RAMType -> DumpType -> m ()
+ 36 evalIL = flip evalIL'
+ 37
+ 38 evalIL' :: Evaluator e m => RAMType -> [e] -> DumpType -> m ()
+ 39 evalIL' ListRAMType = start
+ 40 evalIL' SeqRAMType = start . Seq.fromList
+ 41 evalIL' SListRAMType = start . SList.sListFromList
+ 42 evalIL' MapListRAMType = start . MapList.mapListFromList
+ 43
+ 44 start :: REvaluator e r m => r -> DumpType -> m ()
+ 45 start r dt = logDump dt =<< doInstruction 0 r
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html
new file mode 100644
index 000000000..d442c9f2e
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Evaluator (
+ 2 doInstruction,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 6 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 7
+ 8 import HelVM.HelMA.Automaton.Units.RAM as RAM
+ 9
+ 10 import Control.Type.Operator
+ 11
+ 12 doInstruction :: REvaluator e r m => e -> r -> m $ Unit e r
+ 13 doInstruction ic ram
+ 14 | ic < 0 = doEnd ic ram
+ 15 | src < 0 = doInputChar dst ic ram
+ 16 | dst < 0 = doOutputChar src ic ram
+ 17 | otherwise = doInstruction ic' $ store dst diff ram
+ 18 where
+ 19 src = genericLoad ram ic
+ 20 dst = genericLoad ram $ ic + 1
+ 21 diff = genericLoad ram dst - genericLoad ram src
+ 22 ic'
+ 23 | diff <= 0 = genericLoad ram $ ic + 2
+ 24 | otherwise = ic + 3
+ 25
+ 26 -- | IO instructions
+ 27 doOutputChar :: REvaluator e r m => e -> e -> r -> m $ Unit e r
+ 28 doOutputChar address ic ram = wPutAsChar (genericLoad ram address) *> doInstruction (ic+3) ram
+ 29
+ 30 doInputChar :: REvaluator e r m => e -> e -> r -> m $ Unit e r
+ 31 doInputChar address ic ram = doInputChar' =<< wGetChar where
+ 32 doInputChar' char = doInstruction (ic+3) $ storeChar address char ram
+ 33
+ 34 -- | Terminate instruction
+ 35 doEnd :: REvaluator e r m => e -> r -> m $ Unit e r
+ 36 doEnd ic ram = pure $ Unit ic ram
+ 37
+ 38 -- | Types
+ 39 data Unit ic ram = Unit
+ 40 { unitIU :: ic
+ 41 , unitRAM :: ram
+ 42 }
+ 43 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html
new file mode 100644
index 000000000..beead8144
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.SubLeq.Symbol
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelIO.Util
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8
+ 9 import qualified Text.Read as Read
+ 10 import qualified Text.Show as Show
+ 11
+ 12 tokenize :: Source -> SymbolList
+ 13 tokenize source = (maybeToList . readTextMaybe) =<< splitOneOf " \t\n" source
+ 14
+ 15 readSymbols :: Source -> Symbols
+ 16 readSymbols source = readTextUnsafe source :: Symbols
+ 17
+ 18 ----
+ 19
+ 20 newtype Symbols = Symbols SymbolList
+ 21
+ 22 instance Show Symbols where
+ 23 show (Symbols symbols) = toString $ unwords $ shows symbols
+ 24
+ 25 instance Read Symbols where
+ 26 readsPrec _ source = [( Symbols $ tokenize $ toText source , "")]
+ 27
+ 28 ----
+ 29
+ 30 shows :: SymbolList -> [Text]
+ 31 shows symbols = show <$> symbols
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html
new file mode 100644
index 000000000..758410503
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 evalIL,
+ 6 evalTL,
+ 7 start,
+ 8 ) where
+ 9
+ 10 import HelVM.HelMA.Automata.WhiteSpace.Evaluator
+ 11 import HelVM.HelMA.Automata.WhiteSpace.Lexer
+ 12 import HelVM.HelMA.Automata.WhiteSpace.Parser
+ 13 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 14 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 15
+ 16 import HelVM.HelMA.Automaton.API.EvalParams
+ 17 import HelVM.HelMA.Automaton.API.IOTypes
+ 18
+ 19 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 20 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 21
+ 22 import HelVM.HelMA.Automaton.Instruction
+ 23
+ 24 import HelVM.HelMA.Automaton.Units.CPU as CPU
+ 25
+ 26 import HelVM.HelMA.Automaton.Types.DumpType
+ 27 import HelVM.HelMA.Automaton.Types.RAMType
+ 28 import HelVM.HelMA.Automaton.Types.StackType
+ 29 import HelVM.HelMA.Automaton.Types.TokenType
+ 30
+ 31 import HelVM.HelIO.Control.Safe
+ 32
+ 33 import Prelude hiding (swap)
+ 34
+ 35 import qualified HelVM.HelMA.Automata.WhiteSpace.SimpleParams as S
+ 36
+ 37 import qualified HelVM.HelIO.Collections.MapList as MapList
+ 38 import qualified HelVM.HelIO.Collections.SList as SList
+ 39
+ 40 import qualified Data.Sequence as Seq
+ 41 import qualified Data.Vector as Vector
+ 42
+ 43 simpleEval :: BIO m => S.SimpleParams -> m ()
+ 44 simpleEval p = eval (S.tokenType p) (S.source p) (S.asciiLabel p) (S.stackType p) (S.ramType p) (S.dumpType p)
+ 45
+ 46 ----
+ 47
+ 48 evalParams :: BIO m => TokenType -> EvalParams -> m ()
+ 49 evalParams tokenType p = eval tokenType (source p) (asciiLabel p) (stackTypeOptions p) (ramTypeOptions p) (dumpTypeOptions p)
+ 50
+ 51 eval :: BIO m => TokenType -> Source -> Bool -> StackType -> RAMType -> DumpType -> m ()
+ 52 eval tokenType source = evalTL $ tokenize tokenType source
+ 53
+ 54 evalTL :: BIO m => TokenList -> Bool -> StackType -> RAMType -> DumpType -> m ()
+ 55 evalTL tl ascii st rt dt = evalTL' =<< liftSafe (parseTL ascii tl) where evalTL' il = evalIL il st rt dt
+ 56
+ 57 evalIL :: BIO m => InstructionList -> StackType -> RAMType -> DumpType -> m ()
+ 58 evalIL il s ListRAMType = evalIL' il s []
+ 59 evalIL il s SeqRAMType = evalIL' il s Seq.empty
+ 60 evalIL il s SListRAMType = evalIL' il s SList.sListEmpty
+ 61 evalIL il s MapListRAMType = evalIL' il s MapList.mapListEmpty
+ 62
+ 63 evalIL' :: (REvaluator Symbol r m) => InstructionList -> StackType -> r -> DumpType -> m ()
+ 64 evalIL' il ListStackType = start il []
+ 65 evalIL' il SeqStackType = start il Seq.empty
+ 66 evalIL' il SListStackType = start il SList.sListEmpty
+ 67
+ 68 start :: (SREvaluator Symbol s r m) => InstructionList -> s -> r -> DumpType -> m ()
+ 69 start il s r dt = logDump dt =<< next (CU (Vector.fromList il) 0 (IS [])) s r
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html
new file mode 100644
index 000000000..313df0c28
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Evaluator (
+ 2 next
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 6
+ 7 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 8
+ 9 import HelVM.HelMA.Automaton.Instruction
+ 10
+ 11 import HelVM.HelMA.Automaton.Units.ALU as Stack
+ 12 import HelVM.HelMA.Automaton.Units.CPU as CPU
+ 13 import HelVM.HelMA.Automaton.Units.LSU as LSU
+ 14 import HelVM.HelMA.Automaton.Units.Unit
+ 15
+ 16 import HelVM.HelIO.Containers.LLIndexSafe
+ 17
+ 18 import Control.Type.Operator
+ 19
+ 20 import Prelude hiding (swap)
+ 21
+ 22 next :: (SREvaluator Symbol s r m) => ControlUnit -> s -> r -> m $ Unit s r
+ 23 next (CU il ic is) s r = doInstruction' =<< indexSafe il ic where doInstruction' i = doInstruction i (CU il (ic+1) is) s r
+ 24
+ 25 stackNext :: (SREvaluator Symbol s r m) => ControlUnit -> r -> s -> m (Unit s r)
+ 26 stackNext cu r s = next cu s r
+ 27
+ 28 cuNext :: (SREvaluator Symbol s r m) => r -> ControlUnit -> s -> m (Unit s r)
+ 29 cuNext r cu s = next cu s r
+ 30
+ 31 ----
+ 32
+ 33 doInstruction :: (SREvaluator Symbol s r m) => Instruction -> ControlUnit -> s -> r -> m (Unit s r)
+ 34 doInstruction (IAL i) cu s r = stackNext cu r =<< alInstruction i s
+ 35 doInstruction (ILS i) cu s r = uncurry (next cu) . sluToTuple =<< slInstruction i (LSU s r)
+ 36 doInstruction (IControl i) cu s r = uncurry (cuNext r). cpuToTuple =<< controlInstruction i (CPU cu s)
+ 37 doInstruction End cu s r = pure $ Unit cu s r
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html
new file mode 100644
index 000000000..ac7fd28f0
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelMA.Automaton.API.IOTypes
+ 7 import HelVM.HelMA.Automaton.Types.TokenType
+ 8 import HelVM.HelMA.Automaton.WrapTokenList
+ 9
+ 10 -- | Lexer
+ 11
+ 12 tokenize :: TokenType -> Source -> TokenList
+ 13 tokenize VisibleTokenType = tokenizeVisible
+ 14 tokenize _ = tokenizeWhite
+ 15
+ 16 tokenizeVisible :: Source -> TokenList
+ 17 tokenizeVisible = unWrapTokenList . readVisibleTokens
+ 18
+ 19 tokenizeWhite :: Source -> TokenList
+ 20 tokenizeWhite = whiteTokenListToTokenList . unWrapTokenList . readWhiteTokens
+ 21
+ 22 readVisibleTokens :: Source -> VisibleTokens
+ 23 readVisibleTokens source = readTextUnsafe source :: VisibleTokens
+ 24
+ 25 readWhiteTokens :: Source -> WhiteTokens
+ 26 readWhiteTokens source = readTextUnsafe source :: WhiteTokens
+ 27
+ 28 type VisibleTokens = WrapTokenList TokenList
+ 29
+ 30 type WhiteTokens = WrapTokenList WhiteTokenList
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html
new file mode 100644
index 000000000..10bbf0b57
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.OperandParsers where
+ 2
+ 3 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 4 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 5
+ 6 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 7
+ 8 import HelVM.HelIO.Collections.SList
+ 9 import HelVM.HelIO.Control.Safe
+ 10 import HelVM.HelIO.Digit.ToDigit
+ 11
+ 12 type OperandParser m a = TokenList -> m (a , TokenList)
+ 13
+ 14 ----
+ 15
+ 16 parseIndex :: MonadSafe m => OperandParser m Index
+ 17 parseIndex = parseInt
+ 18
+ 19 parseSymbol :: MonadSafe m => OperandParser m Symbol
+ 20 parseSymbol = parseInteger
+ 21
+ 22 parseLabel :: MonadSafe m => Bool -> OperandParser m Label
+ 23 parseLabel False = parseDigitString
+ 24 parseLabel True = parseAsciiString
+ 25
+ 26 ----
+ 27
+ 28 parseInt :: MonadSafe m => OperandParser m Int
+ 29 parseInt tl = parseInt' <$> parseInteger tl where
+ 30 parseInt' (integer , tl') = (fromIntegral integer , tl')
+ 31
+ 32 parseInteger :: MonadSafe m => OperandParser m Integer
+ 33 parseInteger [] = liftError "EOL"
+ 34 parseInteger (S : tl) = parseUtil makeIntegral2FromList tl
+ 35 parseInteger (T : tl) = negationIntegral <$> parseUtil makeIntegral2FromList tl
+ 36 parseInteger (N : tl) = pure (0 , tl )
+ 37
+ 38 negationIntegral :: (Integer , TokenList) -> (Integer , TokenList)
+ 39 negationIntegral (i , l) = (-i , l)
+ 40
+ 41 parseNatural :: MonadSafe m => OperandParser m Natural
+ 42 parseNatural = parseUtil makeIntegral2FromList
+ 43
+ 44 parseUtil :: MonadSafe m => (TokenList -> m a) -> OperandParser m a
+ 45 parseUtil maker = go ([] :: TokenList) where
+ 46 go acc [] = liftError $ show acc
+ 47 go acc (N:tl) = moveSafe (maker acc , tl)
+ 48 go acc (t:tl) = go (t : acc) tl
+ 49
+ 50 parseDigitString :: MonadSafe m => OperandParser m SString
+ 51 parseDigitString tl = moveSafe =<< parseString' makeDigitStringFromList tl
+ 52
+ 53 parseAsciiString :: MonadSafe m => OperandParser m SString
+ 54 parseAsciiString tl = moveSafe =<< parseString' makeAsciiString28FromList tl
+ 55
+ 56 moveSafe :: MonadSafe m => (m a , TokenList) -> m (a , TokenList)
+ 57 moveSafe (a , tl) = appendErrorTuple ("TokenList" , show tl) $ ( , tl) <$> a
+ 58
+ 59 parseString' :: MonadSafe m => (TokenList -> a) -> OperandParser m a
+ 60 parseString' maker tl = parseString'' <$> splitByN tl where
+ 61 parseString'' (acc , tl') = (maker acc , tl')
+ 62
+ 63 splitByN :: MonadSafe m => OperandParser m TokenList
+ 64 splitByN [] = liftError "Empty list"
+ 65 splitByN (N : tl) = pure ([] , tl)
+ 66 splitByN (t : tl) = splitByN' <$> splitByN tl where
+ 67 splitByN' (acc , tl') = (t:acc , tl')
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html
new file mode 100644
index 000000000..a79a8c5e6
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Parser (
+ 2 flipParseVisible,
+ 3 flipParseWhite,
+ 4 parseVisible,
+ 5 parseWhite,
+ 6 parse,
+ 7 parseTL
+ 8 ) where
+ 9
+ 10 import HelVM.HelMA.Automata.WhiteSpace.Lexer
+ 11 import HelVM.HelMA.Automata.WhiteSpace.OperandParsers
+ 12 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 13
+ 14
+ 15 import HelVM.HelMA.Automaton.API.IOTypes
+ 16
+ 17 import HelVM.HelMA.Automaton.Instruction
+ 18 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 19 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 20 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 21 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 22
+ 23 import HelVM.HelMA.Automaton.Types.TokenType
+ 24
+ 25 import HelVM.HelIO.Control.Safe
+ 26
+ 27 flipParseVisible :: Bool -> Source -> Safe InstructionList
+ 28 flipParseVisible = flip parseVisible
+ 29
+ 30 flipParseWhite :: Bool -> Source -> Safe InstructionList
+ 31 flipParseWhite = flip parseWhite
+ 32
+ 33 parseVisible :: Source -> Bool -> Safe InstructionList
+ 34 parseVisible = parse VisibleTokenType
+ 35
+ 36 parseWhite :: Source -> Bool -> Safe InstructionList
+ 37 parseWhite = parse WhiteTokenType
+ 38
+ 39 parse :: MonadSafe m => TokenType -> Source -> Bool -> m InstructionList
+ 40 parse tokenType = flip parseTL . tokenize tokenType
+ 41
+ 42 parseTL :: MonadSafe m => Bool -> TokenList -> m InstructionList
+ 43 parseTL ascii = go where
+ 44 go :: MonadSafe m => TokenList -> m InstructionList
+ 45 go [] = pure []
+ 46 -- | IAL instructions
+ 47 go (S:S:tl') = go' =<< parseSymbol tl' where go' (symbol , tl'') = (IAL (Cons symbol) : ) <$> go tl''
+ 48 go (S:T:S:tl') = go' =<< parseIndex tl' where go' (index , tl'') = (IAL (SStatic index Copy) : ) <$> go tl''
+ 49 go (S:T:T:tl') = panic "STT" tl'
+ 50 go (S:T:N:tl') = go' =<< parseIndex tl' where go' (index , tl'') = (IAL (SStatic index Slide) : ) <$> go tl''
+ 51 go (S:N:S:tl') = (IAL Dup : ) <$> go tl'
+ 52 go (S:N:T:tl') = (IAL Swap : ) <$> go tl'
+ 53 go (S:N:N:tl') = (IAL Discard : ) <$> go tl'
+ 54 --Arithmetic
+ 55 go (T:S:S:S:tl') = (IAL (Binary Add) : ) <$> go tl'
+ 56 go (T:S:S:T:tl') = (IAL (Binary Sub) : ) <$> go tl'
+ 57 go (T:S:S:N:tl') = (IAL (Binary Mul) : ) <$> go tl'
+ 58 go (T:S:T:S:tl') = (IAL (Binary Div) : ) <$> go tl'
+ 59 go (T:S:T:T:tl') = (IAL (Binary Mod) : ) <$> go tl'
+ 60 go (T:S:T:N:tl') = panic "TSTN" tl'
+ 61 go (T:S:N:S:tl') = panic "TSNS" tl'
+ 62 go (T:S:N:T:tl') = panic "TSNT" tl'
+ 63 go (T:S:N:N:tl') = panic "TSNN" tl'
+ 64 -- | Heap access
+ 65 go (T:T:S:tl') = (ILS Store : ) <$> go tl'
+ 66 go (T:T:T:tl') = (ILS Load : ) <$> go tl'
+ 67 go (T:T:N:tl') = panic "TTN" tl'
+ 68 -- | IControl
+ 69 go (N:S:S:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (Mark label) : ) <$> go tl''
+ 70 go (N:S:T:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label Call ) : ) <$> go tl''
+ 71 go (N:S:N:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label Jump ) : ) <$> go tl''
+ 72 go (N:T:S:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label (Branch EZ)) : ) <$> go tl''
+ 73 go (N:T:T:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label (Branch LTZ)) : ) <$> go tl''
+ 74 go (N:T:N:tl') = (IControl Return : ) <$> go tl'
+ 75 go (N:N:S:tl') = panic "NNS" tl'
+ 76 go (N:N:T:tl') = panic "NNT" tl'
+ 77 go (N:N:N:tl') = (End : ) <$> go tl'
+ 78 -- | IO instructions
+ 79 go (T:N:S:S:tl') = (IAL (SIO OutputChar) : ) <$> go tl'
+ 80 go (T:N:S:T:tl') = (IAL (SIO OutputDec) : ) <$> go tl'
+ 81 go (T:N:S:N:tl') = panic "TNSN" tl'
+ 82 go (T:N:T:S:tl') = (ILS (MIO InputChar) : ) <$> go tl'
+ 83 go (T:N:T:T:tl') = (ILS (MIO InputDec) : ) <$> go tl'
+ 84 go (T:N:T:N:tl') = panic "TNTN" tl'
+ 85 go (T:N:N:S:tl') = panic "TNNS" tl'
+ 86 go (T:N:N:T:tl') = panic "TNNT" tl'
+ 87 go (T:N:N:N:tl') = panic "TNNN" tl'
+ 88 go tl' = panic (show tl') []
+ 89
+ 90 panic :: MonadSafe m => Text -> TokenList -> m InstructionList
+ 91 panic token tl = liftErrorTupleList [("Unrecognised tokenl" , token) , ("Rest tokens" , show tl)]
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html
new file mode 100644
index 000000000..7097b0beb
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.SimpleParams where
+ 2
+ 3 import HelVM.HelMA.Automaton.API.IOTypes
+ 4 import HelVM.HelMA.Automaton.Types.DumpType
+ 5 import HelVM.HelMA.Automaton.Types.RAMType
+ 6 import HelVM.HelMA.Automaton.Types.StackType
+ 7 import HelVM.HelMA.Automaton.Types.TokenType
+ 8
+ 9 -- | Construction for tests
+ 10 simpleParamsWithDefaultsAndWhiteTokenType :: Bool -> Source -> SimpleParams
+ 11 simpleParamsWithDefaultsAndWhiteTokenType = simpleParamsWithDefaults WhiteTokenType
+ 12
+ 13 simpleParamsWithDefaultsAndVisibleTokenType :: Bool -> Source -> SimpleParams
+ 14 simpleParamsWithDefaultsAndVisibleTokenType = simpleParamsWithDefaults VisibleTokenType
+ 15
+ 16 simpleParamsWithDefaults :: TokenType -> Bool -> Source -> SimpleParams
+ 17 simpleParamsWithDefaults tt = simpleParams tt (defaultStackType , defaultRAMType)
+ 18
+ 19 -- | Construction for benchmark
+ 20 simpleParamsWithWhiteTokenType :: (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 21 simpleParamsWithWhiteTokenType = simpleParams WhiteTokenType
+ 22
+ 23 simpleParamsWithVisibleTokenType :: (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 24 simpleParamsWithVisibleTokenType = simpleParams VisibleTokenType
+ 25
+ 26 simpleParams :: TokenType -> (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 27 simpleParams tt (st , rt) al s = SimpleParams
+ 28 { tokenType = tt
+ 29 , source = s
+ 30 , asciiLabel = al
+ 31 , stackType = st
+ 32 , ramType = rt
+ 33 , dumpType = Pretty
+ 34 }
+ 35
+ 36 -- | Type
+ 37 data SimpleParams = SimpleParams
+ 38 { tokenType :: !TokenType
+ 39 , source :: !Source
+ 40 , asciiLabel :: !Bool
+ 41 , stackType :: !StackType
+ 42 , ramType :: !RAMType
+ 43 , dumpType :: !DumpType
+ 44 }
+ 45
+ 46
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html
new file mode 100644
index 000000000..6cb7c3008
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Token where
+ 2
+ 3 import HelVM.HelIO.Collections.SList
+ 4 import HelVM.HelIO.Control.Safe
+ 5 import HelVM.HelIO.Digit.ToDigit
+ 6
+ 7 import Text.Read
+ 8
+ 9 import qualified Text.Show
+ 10
+ 11 data Token = S | T | N
+ 12 deriving stock (Bounded , Enum , Eq , Read , Show )
+ 13
+ 14 type TokenList = [Token]
+ 15 type TokenSList = SList Token
+ 16
+ 17 instance ToDigit Token where
+ 18 toDigit S = pure 0
+ 19 toDigit T = pure 1
+ 20 toDigit t = liftErrorWithPrefix "Wrong token" $ show t
+ 21
+ 22 ----
+ 23
+ 24 newtype WhiteToken = WhiteToken { unWhiteToken :: Token}
+ 25 deriving stock (Eq )
+ 26
+ 27 instance Show WhiteToken where
+ 28 show (WhiteToken S) = " "
+ 29 show (WhiteToken T) = "\t"
+ 30 show (WhiteToken N) = "\n"
+ 31
+ 32 -- | Scanner
+ 33 instance Read WhiteToken where
+ 34 readsPrec _ " " = [( WhiteToken S , "")]
+ 35 readsPrec _ "\t" = [( WhiteToken T , "")]
+ 36 readsPrec _ "\n" = [( WhiteToken N , "")]
+ 37 readsPrec _ _ = []
+ 38
+ 39 type WhiteTokenList = [WhiteToken]
+ 40
+ 41 whiteTokenListToTokenList :: WhiteTokenList -> TokenList
+ 42 whiteTokenListToTokenList = fmap unWhiteToken
+ 43
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html
new file mode 100644
index 000000000..5aabe2f22
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Automaton (
+ 2 evalParams,
+ 3 eval,
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automata.Zot.Evaluator
+ 7 import HelVM.HelMA.Automata.Zot.Expression
+ 8 import HelVM.HelMA.Automata.Zot.Parser
+ 9
+ 10 import HelVM.HelMA.Automaton.API.EvalParams
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14
+ 15 import HelVM.HelIO.Containers.Util
+ 16 import HelVM.HelIO.Control.Safe
+ 17
+ 18 import HelVM.HelIO.Digit.Digitable
+ 19 import HelVM.HelIO.Digit.ToDigit
+ 20
+ 21 import HelVM.HelIO.ListLikeUtil
+ 22
+ 23 import Control.Monad.Writer.Lazy
+ 24
+ 25 evalParams :: BIO m => EvalParams -> m ()
+ 26 evalParams p = wPutStr =<< eval (asciiLabel p) (source p) =<< wGetContents
+ 27
+ 28 eval :: MonadSafe m => Bool -> Source -> Input -> m Output
+ 29 eval False source input = pure $ showFoldable $ evalSource source input
+ 30 eval True source input = (makeAsciiText28 . convert . evalSource source) . showExpressionList =<< textToDL input
+ 31
+ 32 evalSource :: Source -> Input -> ExpressionDList
+ 33 evalSource source input = evalText $ source <> input
+ 34
+ 35 evalText :: Text -> ExpressionDList
+ 36 evalText = execWriter . evalExpressionList . parse
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html
new file mode 100644
index 000000000..6a1b85405
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Evaluator (
+ 2 evalExpressionList,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.Zot.Expression
+ 6
+ 7 import Control.Monad.Writer.Lazy
+ 8
+ 9 import qualified Data.ListLike as LL
+ 10
+ 11 -- | High-level Expressions
+ 12 evalExpressionList :: ExpressionList -> Out Expression
+ 13 evalExpressionList el = foldExpression el >><< outputExpression >>< printExpression
+ 14
+ 15 foldExpression :: ExpressionList -> Out Expression
+ 16 foldExpression = foldM (><) emptyExpression
+ 17
+ 18 emptyExpression :: Expression
+ 19 emptyExpression = contExpression iExpression
+ 20
+ 21 outputExpression :: Out Expression
+ 22 outputExpression = kExpression ><< kExpression ><< kExpression ><< kExpression ><< kExpression ><< kExpression >< iExpression
+ 23
+ 24 printExpression :: Expression
+ 25 printExpression = Expression innerPrintExpression
+ 26
+ 27 innerPrintExpression :: Expression -> Out Expression
+ 28 innerPrintExpression f = interrogateExpression f >>< Zero >>< One >>= tell . LL.singleton >> pure printExpression
+ 29
+ 30 interrogateExpression :: Expression -> Out Expression
+ 31 interrogateExpression f = f >< iExpression >>< iExpression >>< iExpression >>< kExpression
+ 32
+ 33 -- | Operators
+ 34 infixl 9 ><
+ 35 (><) :: Expression -> Expression -> Out Expression
+ 36 (><) Zero = (zeroExpression ><)
+ 37 (><) One = (oneExpression ><)
+ 38 (><) (Expression f) = f
+ 39
+ 40 infixl 6 >><
+ 41 (>><) :: Out Expression -> Expression -> Out Expression
+ 42 f >>< a = f >>= (>< a)
+ 43
+ 44 infixr 8 ><<
+ 45 (><<) :: Expression -> Out Expression -> Out Expression
+ 46 f ><< a = (f ><) =<< a
+ 47
+ 48 infixl 7 >><<
+ 49 (>><<) :: Out Expression -> Out Expression -> Out Expression
+ 50 f >><< a = f >>= (><< a)
+ 51
+ 52
+ 53 -- | Low-level Expressions
+ 54 zeroExpression :: Expression
+ 55 zeroExpression = contExpression $ Expression $ \ f -> f >< sExpression >>< kExpression
+ 56
+ 57 oneExpression :: Expression
+ 58 oneExpression = makeExpression $ \c -> contExpression $ makeExpression $ \l -> contExpression $ Expression $ \r -> c ><< l >< r
+ 59
+ 60 contExpression :: Expression -> Expression
+ 61 contExpression = Expression . flip (><)
+ 62
+ 63 sExpression :: Expression
+ 64 sExpression = makeExpression $ \x -> makeExpression $ \y -> Expression $ \z -> x >< z >><< y >< z
+ 65
+ 66 kExpression :: Expression
+ 67 kExpression = makeExpression $ makeExpression . const
+ 68
+ 69 iExpression :: Expression
+ 70 iExpression = makeExpression id
+ 71
+ 72 makeExpression :: (Expression -> Expression) -> Expression
+ 73 makeExpression f = Expression $ pure . f
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html
new file mode 100644
index 000000000..1176a44b3
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Expression where
+ 2
+ 3 import HelVM.HelIO.Control.Safe
+ 4
+ 5 import HelVM.HelIO.Containers.Util
+ 6 import HelVM.HelIO.Digit.Digitable
+ 7 import HelVM.HelIO.Digit.ToDigit
+ 8
+ 9 import Control.Monad.Writer.Lazy
+ 10
+ 11 import qualified Data.DList as D
+ 12
+ 13 import Text.Read
+ 14 import qualified Text.Show
+ 15
+ 16 showExpressionList :: ExpressionList -> Text
+ 17 showExpressionList = showFoldable
+ 18
+ 19 readExpressionList :: Text -> ExpressionList
+ 20 readExpressionList = stringToExpressionList . toString
+ 21
+ 22 stringToExpressionList :: String -> ExpressionList
+ 23 stringToExpressionList s = charToExpressionList =<< s
+ 24
+ 25 charToExpressionList :: Char -> ExpressionList
+ 26 charToExpressionList = maybeToList . rightToMaybe . charToExpressionSafe
+ 27
+ 28 charToExpression :: Char -> Expression
+ 29 charToExpression = unsafe . charToExpressionSafe
+ 30
+ 31 charToExpressionSafe :: MonadSafe m => Char -> m Expression
+ 32 charToExpressionSafe '0' = pure Zero
+ 33 charToExpressionSafe '1' = pure One
+ 34 charToExpressionSafe c = liftErrorWithPrefix "charToExpression" $ one c
+ 35
+ 36 -- | Types
+ 37 type ExpressionDList = D.DList Expression
+ 38
+ 39 type ExpressionList = [Expression]
+ 40
+ 41 data Expression = Zero | One | Expression (Expression -> Out Expression)
+ 42
+ 43 type Out = Writer ExpressionDList
+ 44
+ 45 instance Read Expression where
+ 46 readsPrec _ [] = []
+ 47 readsPrec _ (c : s) = [(charToExpression c , s)]
+ 48 readList s = [(stringToExpressionList s , "")]
+ 49
+ 50 instance Show Expression where
+ 51 show Zero = "0"
+ 52 show One = "1"
+ 53 show (Expression _) = "function"
+ 54 showList fs = (concatMap show fs <>)
+ 55
+ 56 instance Digitable Expression where
+ 57 fromDigit 0 = pure Zero
+ 58 fromDigit 1 = pure One
+ 59 fromDigit t = wrongToken t
+ 60
+ 61 instance ToDigit Expression where
+ 62 toDigit Zero = pure 0
+ 63 toDigit One = pure 1
+ 64 toDigit t = wrongToken t
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html
new file mode 100644
index 000000000..d8a3a6160
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Parser (
+ 2 parse,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.Zot.Expression
+ 6
+ 7 import qualified Data.Text as Text
+ 8
+ 9 parse :: Text -> ExpressionList
+ 10 parse = concatMap parseLine . lines
+ 11
+ 12 parseLine :: Text -> ExpressionList
+ 13 parseLine = readExpressionList . filter01 . Text.takeWhile (/= '#')
+ 14
+ 15 filter01 :: Text -> Text
+ 16 filter01 = Text.filter is01
+ 17
+ 18 is01 :: Char -> Bool
+ 19 is01 c = c == '0' || c == '1'
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html
new file mode 100644
index 000000000..8b25d1153
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.API.EvalParams where
+ 2
+ 3 import HelVM.HelMA.Automaton.API.IOTypes
+ 4 import HelVM.HelMA.Automaton.API.TypeOptions
+ 5
+ 6 import HelVM.HelMA.Automaton.Types.CellType
+ 7 import HelVM.HelMA.Automaton.Types.DumpType
+ 8 import HelVM.HelMA.Automaton.Types.IntCellType
+ 9 import HelVM.HelMA.Automaton.Types.RAMType
+ 10 import HelVM.HelMA.Automaton.Types.StackType
+ 11
+ 12 -- | Accessors
+ 13 ramTypeOptions :: EvalParams -> RAMType
+ 14 ramTypeOptions = ram . typeOptions
+ 15
+ 16 stackTypeOptions :: EvalParams -> StackType
+ 17 stackTypeOptions = stack . typeOptions
+ 18
+ 19 cellTypeOptions :: EvalParams -> CellType
+ 20 cellTypeOptions = cell . typeOptions
+ 21
+ 22 intCellTypeOptions :: EvalParams -> IntCellType
+ 23 intCellTypeOptions = intCell . typeOptions
+ 24
+ 25 dumpTypeOptions :: EvalParams -> DumpType
+ 26 dumpTypeOptions = dumpType . typeOptions
+ 27
+ 28 -- | Type
+ 29 data EvalParams = EvalParams
+ 30 { compile :: !Bool
+ 31 , asciiLabel :: !Bool
+ 32 , source :: !Source
+ 33 , typeOptions :: !TypeOptions
+ 34 }
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html
new file mode 100644
index 000000000..363cc695b
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.API.TypeOptions where
+ 2
+ 3 import HelVM.HelMA.Automaton.Types.CellType
+ 4 import HelVM.HelMA.Automaton.Types.DumpType
+ 5 import HelVM.HelMA.Automaton.Types.IntCellType
+ 6 import HelVM.HelMA.Automaton.Types.RAMType
+ 7 import HelVM.HelMA.Automaton.Types.StackType
+ 8
+ 9 -- | Types
+ 10
+ 11 data TypeOptions = TypeOptions
+ 12 { ram :: !RAMType
+ 13 , stack :: !StackType
+ 14 , cell :: !CellType
+ 15 , intCell :: !IntCellType
+ 16 , dumpType :: !DumpType
+ 17 }
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html
new file mode 100644
index 000000000..031ebb36b
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.IO.BusinessIO (
+ 2
+ 3 Element,
+ 4 BIO,
+ 5 BusinessIO,
+ 6
+ 7 wPutAsChar,
+ 8 wPutAsDec,
+ 9 wGetCharAs,
+ 10 wGetDecAs,
+ 11
+ 12 -- wPutIntAsChar,
+ 13 -- wPutIntAsDec,
+ 14 -- wGetCharAsInt,
+ 15 -- wGetDecAsInt,
+ 16
+ 17 wGetChar,
+ 18 wPutChar,
+ 19 wGetLine,
+ 20 wGetContents,
+ 21 wPutStr,
+ 22 wPutStrLn,
+ 23 wFlush,
+ 24 wLogStr,
+ 25 wLogStrLn,
+ 26 wLogShow,
+ 27
+ 28 logStr,
+ 29 flush,
+ 30 ) where
+ 31
+ 32 import HelVM.HelIO.Control.Control
+ 33 import HelVM.HelIO.Control.Safe
+ 34
+ 35 import HelVM.HelIO.ReadText
+ 36
+ 37 import Data.Default as Default
+ 38 import Data.Text.IO (getContents)
+ 39
+ 40 import System.IO hiding (getContents, getLine, hFlush, stderr, stdout)
+ 41
+ 42 type Element e = (ReadShow e , Integral e , Default e)
+ 43 type ReadShow e = (Read e , Show e)
+ 44 type BIO m = (MonadControl m , BusinessIO m)
+ 45
+ 46 class Monad m => BusinessIO m where
+ 47
+ 48 wPutAsChar :: Integral v => v -> m ()
+ 49 wPutAsDec :: Integral v => v -> m ()
+ 50 wGetCharAs :: Integral v => m v
+ 51 wGetDecAs :: Integral v => m v
+ 52
+ 53 wPutIntAsChar :: Int -> m ()
+ 54 wPutIntAsDec :: Int -> m ()
+ 55 wGetCharAsInt :: m Int
+ 56 wGetDecAsInt :: m Int
+ 57
+ 58 wGetChar :: m Char
+ 59 wGetLine :: m Text
+ 60 wGetContents :: m Text
+ 61 wPutChar :: Char -> m ()
+ 62 wPutStr :: Text -> m ()
+ 63 wPutStrLn :: Text -> m ()
+ 64 wLogStr :: Text -> m ()
+ 65 wLogStrLn :: Text -> m ()
+ 66 wLogShow :: Show s => s -> m ()
+ 67 wFlush :: m ()
+ 68
+ 69 wPutAsChar = wPutIntAsChar . fromIntegral
+ 70 wPutAsDec = wPutIntAsDec . fromIntegral
+ 71 wGetCharAs = fromIntegral <$> wGetCharAsInt
+ 72 wGetDecAs = fromIntegral <$> wGetDecAsInt
+ 73
+ 74 wPutIntAsChar = wPutChar . chr
+ 75 wPutIntAsDec = wPutStr . show
+ 76 wGetCharAsInt = ord <$> wGetChar
+ 77 wGetDecAsInt = readTextUnsafe <$> wGetLine
+ 78
+ 79 wPutStrLn s = wPutStr $ s <> "\n"
+ 80 wLogStrLn s = wLogStr $ s <> "\n"
+ 81 wLogShow = wLogStrLn . show
+ 82 wFlush = pass
+ 83
+ 84 logStr :: Text -> IO ()
+ 85 logStr = hPutStrLn stderr . toString
+ 86
+ 87 flush :: IO ()
+ 88 flush = hFlush stdout
+ 89
+ 90 instance BusinessIO IO where
+ 91 wGetChar = getChar
+ 92 wGetLine = getLine
+ 93 wGetContents = getContents
+ 94 wPutChar = putChar
+ 95 wPutStr = putText
+ 96 wPutStrLn = putTextLn
+ 97 wLogStr = logStr
+ 98 wFlush = flush
+ 99
+ 100 type ExceptTLegacy = ExceptT String
+ 101
+ 102 exceptTLegacy :: Monad m => m a -> ExceptTLegacy m a
+ 103 exceptTLegacy a = ExceptT $ pure <$> a
+ 104
+ 105 instance BusinessIO (ExceptT String IO) where --FIXXME
+ 106 wGetChar = exceptTLegacy getChar
+ 107 wGetLine = exceptTLegacy getLine
+ 108 wGetContents = exceptTLegacy getContents
+ 109 wPutChar = exceptTLegacy . putChar
+ 110 wPutStr = exceptTLegacy . putText
+ 111 wPutStrLn = exceptTLegacy . putTextLn
+ 112 wLogStr = exceptTLegacy . logStr
+ 113 wFlush = exceptTLegacy flush
+ 114
+ 115 instance BusinessIO (SafeT IO) where
+ 116 wGetChar = safeT getChar
+ 117 wGetLine = safeT getLine
+ 118 wGetContents = safeT getContents
+ 119 wPutChar = safeT . putChar
+ 120 wPutStr = safeT . putText
+ 121 wPutStrLn = safeT . putTextLn
+ 122 wLogStr = safeT . logStr
+ 123 wFlush = safeT flush
+ 124
+ 125 instance BusinessIO (ControlT IO) where
+ 126 wGetChar = controlT getChar
+ 127 wGetLine = controlT getLine
+ 128 wGetContents = controlT getContents
+ 129 wPutChar = controlT . putChar
+ 130 wPutStr = controlT . putText
+ 131 wPutStrLn = controlT . putTextLn
+ 132 wLogStr = controlT . logStr
+ 133 wFlush = controlT flush
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html
new file mode 100644
index 000000000..6d53f1fda
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 {-# LANGUAGE DeriveFunctor #-}
+ 2 module HelVM.HelMA.Automaton.IO.FreeIO (
+ 3 interpretFreeIOToBusinessIO,
+ 4 logInput,
+ 5 logOutput,
+ 6 FreeIO,
+ 7 ) where
+ 8
+ 9 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 10
+ 11 import HelVM.HelIO.Control.Control
+ 12 import HelVM.HelIO.Control.Safe
+ 13
+ 14 import Control.Monad.Free
+ 15 import Control.Natural
+ 16
+ 17 interpretFreeIOToBusinessIO :: BusinessIO m => FreeIO a -> m a
+ 18 interpretFreeIOToBusinessIO = foldFree interpretFreeIOFToBusinessIO
+ 19
+ 20 logInput :: FreeIO ~> FreeIO
+ 21 logInput = foldFree logInputF
+ 22
+ 23 logOutput :: FreeIO ~> FreeIO
+ 24 logOutput = foldFree logOutputF
+ 25
+ 26 ----
+ 27
+ 28 interpretFreeIOFToBusinessIO :: BusinessIO m => FreeIOF a -> m a
+ 29 interpretFreeIOFToBusinessIO (GetChar cd) = cd <$> wGetChar
+ 30 interpretFreeIOFToBusinessIO (GetLine cd) = cd <$> wGetLine
+ 31 interpretFreeIOFToBusinessIO (GetContents cd) = cd <$> wGetContents
+ 32 interpretFreeIOFToBusinessIO (PutChar c v) = wPutChar c $> v
+ 33 interpretFreeIOFToBusinessIO (PutStr s v) = wPutStr s $> v
+ 34 interpretFreeIOFToBusinessIO (PutStrLn s v) = wPutStrLn s $> v
+ 35 interpretFreeIOFToBusinessIO (LogStr s v) = wLogStr s $> v
+ 36 interpretFreeIOFToBusinessIO (LogStrLn s v) = wLogStrLn s $> v
+ 37 interpretFreeIOFToBusinessIO (Flush v) = wFlush $> v
+ 38
+ 39 ----
+ 40
+ 41 logInputF :: FreeIOF a -> FreeIO a
+ 42 logInputF (GetChar cd) = freeGetChar >>= (\c -> liftF $ LogStr (one c) (cd c))
+ 43 logInputF (GetLine cd) = freeGetLine >>= (\l -> liftF $ LogStr l (cd l))
+ 44 logInputF (GetContents cd) = freeGetContents >>= (\l -> liftF $ LogStr l (cd l))
+ 45 logInputF f = liftF f
+ 46
+ 47 logOutputF :: FreeIOF a -> FreeIO a
+ 48 logOutputF f@(PutChar c v) = liftF (LogStr (one c) v) *> liftF f
+ 49 logOutputF f@(PutStr s v) = liftF (LogStr s v) *> liftF f
+ 50 logOutputF f = liftF f
+ 51
+ 52 -- | Instances
+ 53 instance BusinessIO FreeIO where
+ 54 wGetChar = freeGetChar
+ 55 wGetLine = freeGetLine
+ 56 wGetContents = freeGetContents
+ 57 wPutChar = freePutChar
+ 58 wPutStr = freePutStr
+ 59 wPutStrLn = freePutStrLn
+ 60 wLogStr = freeLogStr
+ 61 wLogStrLn = freeLogStrLn
+ 62 wFlush = freeFlush
+ 63
+ 64 instance BusinessIO (SafeT FreeIO) where
+ 65 wGetChar = safeT freeGetChar
+ 66 wGetLine = safeT freeGetLine
+ 67 wGetContents = safeT freeGetContents
+ 68 wPutChar = safeT . freePutChar
+ 69 wPutStr = safeT . freePutStr
+ 70 wPutStrLn = safeT . freePutStrLn
+ 71 wLogStr = safeT . freeLogStr
+ 72 wLogStrLn = safeT . freeLogStrLn
+ 73 wFlush = safeT freeFlush
+ 74
+ 75 instance BusinessIO (ControlT FreeIO) where
+ 76 wGetChar = controlT freeGetChar
+ 77 wGetLine = controlT freeGetLine
+ 78 wGetContents = controlT freeGetContents
+ 79 wPutChar = controlT . freePutChar
+ 80 wPutStr = controlT . freePutStr
+ 81 wPutStrLn = controlT . freePutStrLn
+ 82 wLogStr = controlT . freeLogStr
+ 83 wLogStrLn = controlT . freeLogStrLn
+ 84 wFlush = controlT freeFlush
+ 85
+ 86 -- | Low level functions
+ 87 freeGetChar :: FreeIO Char
+ 88 freeGetChar = liftF $ GetChar id
+ 89
+ 90 freeGetLine :: FreeIO Text
+ 91 freeGetLine = liftF $ GetLine id
+ 92
+ 93 freeGetContents :: FreeIO Text
+ 94 freeGetContents = liftF $ GetContents id
+ 95
+ 96 freePutChar :: Char -> FreeIO ()
+ 97 freePutChar = liftF . flip PutChar ()
+ 98
+ 99 freePutStr :: Text -> FreeIO ()
+ 100 freePutStr = liftF . flip PutStr ()
+ 101
+ 102 freePutStrLn :: Text -> FreeIO ()
+ 103 freePutStrLn = liftF . flip PutStrLn ()
+ 104
+ 105 freeLogStr :: Text -> FreeIO ()
+ 106 freeLogStr = liftF . flip LogStr ()
+ 107
+ 108 freeLogStrLn :: Text -> FreeIO ()
+ 109 freeLogStrLn = liftF . flip LogStrLn ()
+ 110
+ 111 freeFlush :: FreeIO ()
+ 112 freeFlush = liftF $ Flush ()
+ 113
+ 114 -- | Types
+ 115 type FreeIO = Free FreeIOF
+ 116
+ 117 data FreeIOF a
+ 118 = GetChar (Char -> a)
+ 119 | GetLine (Text -> a)
+ 120 | GetContents (Text -> a)
+ 121 | PutChar Char a
+ 122 | PutStr Text a
+ 123 | PutStrLn Text a
+ 124 | LogStr Text a
+ 125 | LogStrLn Text a
+ 126 | Flush a
+ 127 deriving stock (Functor )
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html
new file mode 100644
index 000000000..4bbc46214
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.IO.MockIO (
+ 2 ioExecMockIOBatch,
+ 3 ioExecMockIOWithInput,
+ 4
+ 5 safeExecMockIOBatch,
+ 6 safeExecMockIOWithInput,
+ 7
+ 8 execMockIOBatch,
+ 9 execMockIOWithInput,
+ 10
+ 11 runMockIO,
+ 12 createMockIO,
+ 13 calculateOutput,
+ 14 calculateLogged,
+ 15
+ 16 MockIO,
+ 17 MockIOData,
+ 18 ) where
+ 19
+ 20 import HelVM.HelMA.Automaton.API.IOTypes
+ 21 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 22
+ 23 import HelVM.HelIO.Control.Control
+ 24 import HelVM.HelIO.Control.Safe
+ 25
+ 26 import HelVM.HelIO.ListLikeUtil
+ 27
+ 28 import Data.Text as Text
+ 29
+ 30 ioExecMockIOBatch :: ControlT MockIO () -> IO MockIOData
+ 31 ioExecMockIOBatch = ioExecMockIOWithInput ""
+ 32
+ 33 ioExecMockIOWithInput :: Input -> ControlT MockIO () -> IO MockIOData
+ 34 ioExecMockIOWithInput i = safeToIO . safeExecMockIOWithInput i
+ 35
+ 36 safeExecMockIOBatch :: ControlT MockIO () -> Safe MockIOData
+ 37 safeExecMockIOBatch = safeExecMockIOWithInput ""
+ 38
+ 39 safeExecMockIOWithInput :: Input -> ControlT MockIO () -> Safe MockIOData
+ 40 safeExecMockIOWithInput i = pure . runMockIO i . runControlT
+ 41
+ 42 execMockIOBatch :: MockIO () -> MockIOData
+ 43 execMockIOBatch = execMockIOWithInput ""
+ 44
+ 45 execMockIOWithInput :: Input -> MockIO () -> MockIOData
+ 46 execMockIOWithInput i a = runMockIO i $ safeWithMessages <$> a
+ 47
+ 48 ----
+ 49
+ 50 runMockIO :: Input -> MockIO UnitSafeWithMessages -> MockIOData
+ 51 runMockIO i mockIO = flip mockDataLogStr mockIOData $ safeWithMessagesToText s
+ 52 where (s , mockIOData) = runState mockIO $ createMockIO i
+ 53
+ 54 createMockIO :: Input -> MockIOData
+ 55 createMockIO i = MockIOData (toString i) "" ""
+ 56
+ 57 calculateOutput :: MockIOData -> Output
+ 58 calculateOutput = calculateText . output
+ 59
+ 60 calculateLogged :: MockIOData -> Output
+ 61 calculateLogged = calculateText . logged
+ 62
+ 63 ----
+ 64
+ 65 instance BusinessIO MockIO where
+ 66 wGetChar = mockGetChar
+ 67 wGetLine = mockGetLine
+ 68 wGetContents = mockGetContent
+ 69 wPutChar = mockPutChar
+ 70 wPutStr = mockPutStr
+ 71 wLogStr = mockLogStr
+ 72
+ 73 instance BusinessIO (SafeT MockIO) where
+ 74 wGetChar = safeT mockGetChar
+ 75 wGetLine = safeT mockGetLine
+ 76 wGetContents = safeT mockGetContent
+ 77 wPutChar = safeT . mockPutChar
+ 78 wPutStr = safeT . mockPutStr
+ 79 wLogStr = safeT . mockLogStr
+ 80
+ 81 instance BusinessIO (ControlT MockIO) where
+ 82 wGetChar = mockGetCharSafe
+ 83 wGetLine = mockGetLineSafe
+ 84 wGetContents = controlT mockGetContent
+ 85 wPutChar = controlT . mockPutChar
+ 86 wPutStr = controlT . mockPutStr
+ 87 wLogStr = controlT . mockLogStr
+ 88
+ 89 ----
+ 90
+ 91 mockGetChar :: MonadMockIO m => m Char
+ 92 mockGetChar = mockGetChar' =<< get where
+ 93 mockGetChar' :: MonadMockIO m => MockIOData -> m Char
+ 94 mockGetChar' mockIO = orErrorTuple ("mockGetChar" , show mockIO) (top (input mockIO)) <$ put mockIO { input = orErrorTuple ("mockGetChar" , show mockIO) $ discard $ input mockIO }
+ 95
+ 96 mockGetLine :: MonadMockIO m => m Text
+ 97 mockGetLine = mockGetLine' =<< get where
+ 98 mockGetLine' :: MonadMockIO m => MockIOData -> m Text
+ 99 mockGetLine' mockIO = toText line <$ put mockIO { input = input' } where (line , input') = splitStringByLn $ input mockIO
+ 100
+ 101 mockGetContent :: MonadMockIO m => m Text
+ 102 mockGetContent = mockGetContent' =<< get where
+ 103 mockGetContent' :: MonadMockIO m => MockIOData -> m Text
+ 104 mockGetContent' mockIO = toText content <$ put mockIO { input = "" } where content = input mockIO
+ 105
+ 106 mockGetCharSafe :: MonadControlMockIO m => m Char
+ 107 mockGetCharSafe = mockGetChar' =<< get where
+ 108 mockGetChar' :: MonadControlMockIO m => MockIOData -> m Char
+ 109 mockGetChar' mockIO = appendErrorTuple ("mockGetCharSafe" , show mockIO) $ mockGetChar'' =<< unconsSafe (input mockIO) where
+ 110 mockGetChar'' (c, input') = put mockIO { input = input' } $> c
+ 111
+ 112 mockGetLineSafe :: MonadControlMockIO m => m Text
+ 113 mockGetLineSafe = mockGetLine' =<< get where
+ 114 mockGetLine' :: MonadControlMockIO m => MockIOData -> m Text
+ 115 mockGetLine' mockIO = toText line <$ put mockIO { input = input' } where (line , input') = splitStringByLn $ input mockIO
+ 116
+ 117
+ 118 mockPutChar :: Char -> MockIO ()
+ 119 mockPutChar = modify . mockDataPutChar
+ 120
+ 121 mockPutStr :: Text -> MockIO ()
+ 122 mockPutStr = modify . mockDataPutStr
+ 123
+ 124 mockLogStr :: Text -> MockIO ()
+ 125 mockLogStr = modify . mockDataLogStr
+ 126
+ 127 ----
+ 128
+ 129 mockDataPutChar :: Char -> MockIOData -> MockIOData
+ 130 mockDataPutChar char mockIO = mockIO { output = char : output mockIO }
+ 131
+ 132 mockDataPutStr :: Text -> MockIOData -> MockIOData
+ 133 mockDataPutStr text mockIO = mockIO { output = calculateString text <> output mockIO }
+ 134
+ 135 mockDataLogStr :: Text -> MockIOData -> MockIOData
+ 136 mockDataLogStr text mockIO = mockIO { logged = calculateString text <> logged mockIO }
+ 137
+ 138 ----
+ 139
+ 140 type MonadControlMockIO m = (MonadMockIO m , MonadControl m)
+ 141
+ 142 --type MonadSafeMockIO m = (MonadMockIO m , MonadSafe m)
+ 143
+ 144 type MonadMockIO m = MonadState MockIOData m
+ 145
+ 146 type MockIO = State MockIOData
+ 147
+ 148 calculateText :: String -> Output
+ 149 calculateText = Text.reverse . toText
+ 150
+ 151 calculateString :: Output -> String
+ 152 calculateString = toString . Text.reverse
+ 153
+ 154 data MockIOData = MockIOData
+ 155 { input :: !String
+ 156 , output :: !String
+ 157 , logged :: !String
+ 158 }
+ 159 deriving stock (Eq , Read , Show )
+ 160
+ 161 ----
+ 162
+ 163 splitStringByLn :: String -> (String , String)
+ 164 splitStringByLn = splitBy '\n'
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html
new file mode 100644
index 000000000..55759ae7a
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.ALInstruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 4
+ 5 -- | Constructors
+ 6
+ 7 blAnd :: Bool -> BinaryInstruction
+ 8 blAnd False = BAnd
+ 9 blAnd True = LAnd
+ 10
+ 11 blOr :: Bool -> BinaryInstruction
+ 12 blOr False = BOr
+ 13 blOr True = LOr
+ 14
+ 15 blXor :: Bool -> BinaryInstruction
+ 16 blXor False = BXor
+ 17 blXor True = LXor
+ 18
+ 19 blEQ :: Bool -> BinaryInstruction
+ 20 blEQ False = BEQ
+ 21 blEQ True = LEQ
+ 22
+ 23 blGT :: Bool -> BinaryInstruction
+ 24 blGT False = BGT
+ 25 blGT True = LGT
+ 26
+ 27 -- | Other functions
+ 28
+ 29 calculateOps :: Integral a => a -> a -> [BinaryInstruction] -> [a]
+ 30 calculateOps operand operand' = map (calculateOp operand operand')
+ 31
+ 32 calculateOp :: Integral a => a -> a -> BinaryInstruction -> a
+ 33 calculateOp operand operand' operation = doBinary operation operand' operand
+ 34
+ 35 doBinary :: Integral a => BinaryInstruction -> a -> a -> a
+ 36 doBinary Add = (+)
+ 37 doBinary Sub = (-)
+ 38 doBinary Mul = (*)
+ 39 doBinary Div = div
+ 40 doBinary Mod = mod
+ 41 doBinary o = error $ show o
+ 42
+ 43 -- | Types
+ 44
+ 45 data ALInstruction =
+ 46 Cons Integer
+ 47 | Unary !UnaryInstruction
+ 48 | Binary !BinaryInstruction
+ 49 | Binaries [BinaryInstruction]
+ 50 | SStatic !StackIndex !ManipulationInstruction
+ 51 | SDynamic !ManipulationInstruction
+ 52 | SIO !IOInstruction
+ 53 | Halibut
+ 54 | Pick
+ 55 | Dup
+ 56 | Rot
+ 57 | Swap
+ 58 | Discard
+ 59 deriving stock (Eq , Read , Show )
+ 60
+ 61 data UnaryInstruction = Neg | BNot | LNot
+ 62 deriving stock (Eq , Read , Show )
+ 63
+ 64 data BinaryInstruction =
+ 65 Add | Sub | Mul | Div | Mod
+ 66 | BAnd | BOr | BXor | BEQ | BGT
+ 67 | LAnd | LOr | LXor | LEQ | LGT
+ 68 deriving stock (Eq , Read , Show )
+ 69
+ 70 data ManipulationInstruction = Copy | Move | Slide
+ 71 deriving stock (Eq , Read , Show )
+ 72
+ 73 type StackIndex = Int
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html
new file mode 100644
index 000000000..458afdd15
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.ControlInstruction where
+ 2
+ 3 import HelVM.HelIO.Collections.SList
+ 4
+ 5 isNotJump :: Integral e => BranchTest -> e -> Bool
+ 6 isNotJump t = not . isJump t
+ 7
+ 8 isJump :: Integral e => BranchTest -> e -> Bool
+ 9 isJump EZ e = e == 0
+ 10 isJump LTZ e = e < 0
+ 11 isJump GTZ e = e > 0
+ 12
+ 13 -- | Types
+ 14 data ControlInstruction =
+ 15 Mark !Label
+ 16 | CStatic !Label !LabelInstruction
+ 17 | CDynamic !LabelInstruction
+ 18 | Return
+ 19 deriving stock (Eq , Read , Show )
+ 20
+ 21 type Label = SString
+ 22
+ 23 data LabelInstruction = Call | Jump | Branch !BranchTest
+ 24 deriving stock (Eq , Read , Show )
+ 25
+ 26 data BranchTest = EZ | LTZ | GTZ
+ 27 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html
new file mode 100644
index 000000000..95df8d9ea
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.IOInstruction where
+ 2
+ 3 data IOInstruction =
+ 4 OutputChar
+ 5 | OutputDec
+ 6 | InputChar
+ 7 | InputDec
+ 8 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html
new file mode 100644
index 000000000..8e565b994
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.LSInstruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 4
+ 5 -- | Types
+ 6
+ 7 data LSInstruction =
+ 8 Load --Restore --Fetch
+ 9 | Store --Save
+ 10 | MIO !IOInstruction
+ 11 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.hs.html
new file mode 100644
index 000000000..9d7132219
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.hs.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 4 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 5 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 6
+ 7 import Data.Vector as Vector
+ 8
+ 9 isMark :: Label -> Instruction -> Bool
+ 10 isMark l (IControl (Mark l')) = l == l'
+ 11 isMark _ _ = False
+ 12
+ 13 -- | Types
+ 14
+ 15 data Instruction =
+ 16 IAL !ALInstruction
+ 17 | ILS !LSInstruction
+ 18 | IControl !ControlInstruction
+ 19 | End
+ 20 deriving stock (Eq , Read , Show )
+ 21
+ 22 type InstructionList = [Instruction]
+ 23 type InstructionVector = Vector Instruction
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html
new file mode 100644
index 000000000..bf8caca64
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.CellType where
+ 2
+ 3 -- | Constructors
+ 4 parseCellType :: String -> CellType
+ 5 parseCellType raw = valid $ readMaybe raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "CellType '" <> toText raw <> "' is not valid CellType. Valid cellTypes are : " <> show cellTypes
+ 8
+ 9 defaultCellType :: CellType
+ 10 defaultCellType = Word8Type
+ 11
+ 12 cellTypes :: [CellType]
+ 13 cellTypes = [Int8Type , Word8Type , Int16Type , Word16Type , Int32Type , Word32Type , Int64Type , Word64Type]
+ 14
+ 15 -- | Types
+ 16 data CellType = Int8Type | Word8Type | Int16Type | Word16Type | Int32Type | Word32Type | Int64Type | Word64Type
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html
new file mode 100644
index 000000000..62ed08dbf
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.DumpType where
+ 2
+ 3 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 4
+ 5 import HelVM.HelIO.Control.Logger
+ 6
+ 7 import HelVM.HelIO.Util
+ 8
+ 9 logDump :: (BIO m , Show d) => DumpType -> d -> m ()
+ 10 logDump dt d = logDump' $ dump dt d where
+ 11 logDump' Nothing = pass
+ 12 logDump' (Just t) = logMessageTuple ("dump" , t)
+ 13
+ 14 dump :: Show a => DumpType -> a -> Maybe Text
+ 15 dump No _ = Nothing
+ 16 dump Ugly a = Just $ show a
+ 17 dump Pretty a = Just $ showP a
+ 18
+ 19 -- | Constructors
+ 20 parseDumpType :: String -> DumpType
+ 21 parseDumpType raw = (valid . readMaybe) raw where
+ 22 valid (Just value) = value
+ 23 valid Nothing = error $ "DumpType '" <> toText raw <> "' is not valid DumpType. Valid dumpTypes are : " <> show dumpTypes
+ 24
+ 25 defaultDumpType :: DumpType
+ 26 defaultDumpType = No
+ 27
+ 28 dumpTypes :: [DumpType]
+ 29 dumpTypes = [No , Ugly , Pretty]
+ 30
+ 31 -- | Types
+ 32 data DumpType = No | Ugly | Pretty
+ 33 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html
new file mode 100644
index 000000000..6820efd95
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.IntCellType where
+ 2
+ 3 -- | Constructors
+ 4 parseIntCellType :: String -> IntCellType
+ 5 parseIntCellType raw = (valid . readMaybe) raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "IntCellType '" <> toText raw <> "' is not valid IntCellType. Valid intCellTypes are : " <> show intCellTypes
+ 8
+ 9 defaultIntCellType :: IntCellType
+ 10 defaultIntCellType = IntegerType
+ 11
+ 12 intCellTypes :: [IntCellType]
+ 13 intCellTypes = [Int8Type , Int16Type , Int32Type , Int64Type , IntegerType]
+ 14
+ 15 -- | Types
+ 16 data IntCellType = Int8Type | Int16Type | Int32Type | Int64Type | IntegerType
+ 17 deriving stock (Bounded , Enum , Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html
new file mode 100644
index 000000000..73ff87384
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.RAMType where
+ 2
+ 3 -- | Constructors
+ 4 parseRAMType :: String -> RAMType
+ 5 parseRAMType raw = (valid . readMaybe) raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "RAMType '" <> toText raw <> "' is not valid RAMType. Valid ramTypes are : " <> show ramTypes
+ 8
+ 9 defaultRAMType :: RAMType
+ 10 defaultRAMType = MapListRAMType
+ 11
+ 12 ramTypes :: [RAMType]
+ 13 ramTypes = [ListRAMType , SeqRAMType , SListRAMType , MapListRAMType]
+ 14
+ 15 -- | Types
+ 16 data RAMType = ListRAMType | SeqRAMType | SListRAMType | MapListRAMType
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html
new file mode 100644
index 000000000..9b8c8627c
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.StackType where
+ 2
+ 3 -- | Constructors
+ 4 parseStackType :: String -> StackType
+ 5 parseStackType raw = valid $ readMaybe raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "StackType '" <> toText raw <> "' is not valid StackType. Valid stackTypes are : " <> show stackTypes
+ 8
+ 9 defaultStackType :: StackType
+ 10 defaultStackType = SeqStackType
+ 11
+ 12 stackTypes :: [StackType]
+ 13 stackTypes = [ListStackType , SeqStackType , SListStackType]
+ 14
+ 15 -- | Types
+ 16 data StackType = ListStackType | SeqStackType | SListStackType
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html
new file mode 100644
index 000000000..a3f64c276
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.TokenType where
+ 2
+ 3 -- | Constructors
+ 4 parseTokenType :: Bool -> TokenType
+ 5 parseTokenType True = VisibleTokenType
+ 6 parseTokenType _ = WhiteTokenType
+ 7
+ 8 defaultTokenType :: TokenType
+ 9 defaultTokenType = VisibleTokenType
+ 10
+ 11 tokenTypes :: [TokenType]
+ 12 tokenTypes = [VisibleTokenType , WhiteTokenType , BothTokenType]
+ 13
+ 14 -- | Types
+ 15 data TokenType = VisibleTokenType | WhiteTokenType | BothTokenType
+ 16 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html
new file mode 100644
index 000000000..ea19db0d8
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.ALU (
+ 2 doOutputChar2,
+ 3 doInputChar2,
+ 4 doInputDec2,
+ 5 divMod,
+ 6 sub,
+ 7 binaryInstruction,
+ 8 binaryInstructions,
+ 9 halibut,
+ 10 alInstruction,
+ 11 move,
+ 12 swap,
+ 13 discard,
+ 14 slide,
+ 15 dup,
+ 16 copy,
+ 17 flipPush1,
+ 18 charPush1,
+ 19 genericPush1,
+ 20 pop1,
+ 21 pop2,
+ 22 push1,
+ 23 push2,
+ 24 splitAt,
+ 25 drop,
+ 26 ALU,
+ 27 Stack,
+ 28 ) where
+ 29
+ 30 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 31 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 32
+ 33 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 34
+ 35 import HelVM.HelIO.Control.Safe
+ 36
+ 37 import HelVM.HelIO.Containers.LLIndexSafe
+ 38
+ 39 import HelVM.HelIO.ListLikeUtil
+ 40
+ 41 import Data.ListLike hiding (show)
+ 42 import Prelude hiding (divMod, drop, fromList, splitAt, swap)
+ 43
+ 44
+ 45 alInstruction :: ALU m ll element => ALInstruction -> ll -> m ll
+ 46 alInstruction (Cons i ) = push i
+ 47 alInstruction (Unary op) = error $ show op
+ 48 alInstruction (Binary op) = binaryInstruction op
+ 49 alInstruction (SDynamic op) = dynamicManipulation op
+ 50 alInstruction (SStatic i op) = staticManipulation op i
+ 51 alInstruction (SIO OutputChar) = doOutputChar2
+ 52 alInstruction (SIO OutputDec) = doOutputDec2
+ 53 alInstruction (SIO InputChar) = doInputChar2
+ 54 alInstruction Halibut = halibut
+ 55 alInstruction Pick = pick
+ 56 alInstruction Dup = dup
+ 57 alInstruction Rot = rot
+ 58 alInstruction Swap = swap
+ 59 alInstruction Discard = discard
+ 60 alInstruction op = error $ show op
+ 61
+ 62 -- | Arithmetic instructions
+ 63 divMod :: ALU m ll element => ll -> m ll
+ 64 divMod = binaryInstructions [Mod , Div]
+ 65
+ 66 sub :: ALU m ll element => ll -> m ll
+ 67 sub = binaryInstruction Sub
+ 68
+ 69 binaryInstruction :: ALU m ll element => BinaryInstruction -> ll -> m ll
+ 70 binaryInstruction i = binaryInstructions [i]
+ 71
+ 72 binaryInstructions :: ALU m ll element => [BinaryInstruction] -> ll -> m ll
+ 73 binaryInstructions il l = binaryInstructions' <$> pop2 l where
+ 74 binaryInstructions' (e , e', l') = pushList (calculateOps e e' il) l'
+ 75
+ 76 -- | IO instructions
+ 77 doOutputChar2 :: ALU m ll element => ll -> m ll
+ 78 doOutputChar2 l = doOutputChar' =<< pop1 l where
+ 79 doOutputChar' (e , l') = wPutAsChar e $> l'
+ 80
+ 81 doOutputDec2 :: ALU m ll element => ll -> m ll
+ 82 doOutputDec2 l = doOutputDec' =<< pop1 l where
+ 83 doOutputDec' (e , l') = wPutAsDec e $> l'
+ 84
+ 85 doInputChar2 :: ALU m ll element => ll -> m ll
+ 86 doInputChar2 l = doInputChar' <$> wGetCharAs where
+ 87 doInputChar' e = push1 e l
+ 88
+ 89 doInputDec2 :: ALU m ll element => ll -> m ll
+ 90 doInputDec2 l = doInputChar' <$> wGetCharAs where
+ 91 doInputChar' e = push1 e l
+ 92
+ 93 -- | Manipulation instructions
+ 94 dynamicManipulation :: ALU m ll element => ManipulationInstruction -> ll -> m ll
+ 95 dynamicManipulation op l = dynamicManipulation' =<< unconsSafe l where
+ 96 dynamicManipulation' (e , l') = staticManipulation op (fromIntegral e) l'
+ 97
+ 98 staticManipulation :: ALU m ll element => ManipulationInstruction -> Index -> ll -> m ll
+ 99 staticManipulation Copy = copy
+ 100 staticManipulation Move = move
+ 101 staticManipulation Slide = slide
+ 102
+ 103 -- | Halibut and Pick instructions
+ 104 halibut :: ALU m ll element => ll -> m ll
+ 105 halibut l = halibut' =<< pop1 l where
+ 106 halibut' (e , l')
+ 107 | 0 < i = move i l'
+ 108 | otherwise = copy (negate i) l'
+ 109 where i = fromIntegral e
+ 110
+ 111 pick :: ALU m ll element => ll -> m ll
+ 112 pick l = pick' =<< pop1 l where
+ 113 pick' (e , l')
+ 114 | 0 <= i = copy i l'
+ 115 | otherwise = move (negate i) l'
+ 116 where i = fromIntegral e
+ 117
+ 118 -- | Slide instructions
+ 119 slide :: ALU m ll element => Index -> ll -> m ll
+ 120 slide i l = slide' <$> pop1 l where
+ 121 slide' (e , l') = push1 e $ drop i l'
+ 122
+ 123 -- | Move instructions
+ 124 rot :: ALU m ll element => ll -> m ll
+ 125 rot = move 2
+ 126
+ 127 swap :: ALU m ll element => ll -> m ll
+ 128 swap = move 1
+ 129
+ 130 move :: ALU m ll element => Index -> ll -> m ll
+ 131 move i l = pure $ l1 <> l2 <> l3 where
+ 132 (l1 , l3) = splitAt 1 l'
+ 133 (l2 , l') = splitAt i l
+ 134
+ 135 -- | Copy instructions
+ 136 dup :: ALU m ll element => ll -> m ll
+ 137 dup = copy 0
+ 138
+ 139 copy :: ALU m ll element => Index -> ll -> m ll
+ 140 copy i l = flipPush1 l <$> l `indexSafe` i
+ 141
+ 142 -- | Pop instructions
+ 143 pop1 :: ALU m ll element => ll -> m (element , ll)
+ 144 pop1 l = appendErrorTuple ("l" , show l) $ unconsSafe l
+ 145
+ 146 pop2 :: ALU m ll element => ll -> m (element , element , ll)
+ 147 pop2 l = appendErrorTuple ("l" , show l) $ uncons2Safe l
+ 148
+ 149 -- | Push instructions
+ 150 push :: ALU m ll element => Integer -> ll -> m ll
+ 151 push i l = pure $ genericPush1 i l
+ 152
+ 153 flipPush1 :: Stack ll element => ll -> element -> ll
+ 154 flipPush1 = flip push1
+ 155
+ 156 charPush1 :: (Num element , Stack ll element) => Char -> ll -> ll
+ 157 charPush1 = genericPush1 . ord
+ 158
+ 159 genericPush1 :: (Integral v , Num element , Stack ll element) => v -> ll -> ll
+ 160 genericPush1 = push1 . fromIntegral
+ 161
+ 162 push1 :: Stack ll element => element -> ll -> ll
+ 163 push1 e = pushList [e]
+ 164
+ 165 push2 :: Stack ll element => element -> element -> ll -> ll
+ 166 push2 e e' = pushList [e , e']
+ 167
+ 168 pushList :: Stack ll element => [element] -> ll -> ll
+ 169 pushList es l = fromList es <> l
+ 170
+ 171 -- | Types
+ 172 type ALU m ll element = (BIO m , Stack ll element , Integral element)
+ 173
+ 174 type Stack ll element = (Show ll , ListLike ll element , IndexSafe ll element)
+ 175
+ 176 type Index = Int
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html
new file mode 100644
index 000000000..e01d03cd4
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.CPU where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.ALU
+ 4
+ 5 import HelVM.HelMA.Automaton.Instruction
+ 6 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 7
+ 8 import HelVM.HelIO.Control.Safe
+ 9
+ 10 import Control.Type.Operator
+ 11
+ 12 import Data.ListLike hiding (show)
+ 13
+ 14 controlInstruction :: (ALU m ll element , Show element) => ControlInstruction -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 15 --controlInstruction :: ALU m ll element => ControlInstruction -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 16 controlInstruction (Mark _ ) = pure
+ 17 controlInstruction Return = popAddress
+ 18 controlInstruction (CDynamic Call ) = dynamicCall
+ 19 controlInstruction (CDynamic Jump ) = dynamicJump
+ 20 controlInstruction (CDynamic (Branch t)) = dynamicBranch t
+ 21 controlInstruction (CStatic l Call ) = staticCall l
+ 22 controlInstruction (CStatic l Jump ) = staticJump l
+ 23 controlInstruction (CStatic l (Branch t)) = staticBranch l t
+ 24
+ 25 popAddress :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 26 popAddress (CPU (CU il _ (IS (a : is))) s) = pure $ CPU (CU il a $ IS is) s
+ 27 popAddress (CPU (CU il _ (IS [] )) _) = liftErrorWithTupleList "Empty Return Stack" [("il" , show il)]
+ 28
+ 29 dynamicCall :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 30 dynamicCall (CPU (CU il ic (IS is)) s) = call <$> pop1 s where
+ 31 call (a , s') = CPU (CU il (fromIntegral a) (IS (ic : is))) s'
+ 32
+ 33 dynamicJump :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 34 dynamicJump (CPU (CU il _ is) s) = jump <$> pop1 s where
+ 35 jump (a , s') = CPU (CU il (fromIntegral a) is) s'
+ 36
+ 37 dynamicBranch :: (ALU m ll element , Show element) => BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 38 --dynamicBranch :: ALU m ll element => BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 39 dynamicBranch t (CPU (CU il ic is) s) = branch =<< pop2 s where
+ 40 -- dynamicBranch' (l , e , s') = liftErrorTupleList [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 41 branch (l , e , s')
+ 42 | isNotJump t e = liftErrorWithTupleList "isNotJump" [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 43 -- | isNotJump t e = pure $ CPU (CU il ic is) s'
+ 44 | otherwise = liftErrorWithTupleList "otherwise" [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 45 -- | otherwise = jump <$> findAddress il (show l) where jump ic' = CPU (CU il ic' is) s'
+ 46
+ 47 staticCall :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 48 staticCall l (CPU (CU il ic (IS is)) s) = call <$> findAddress il l where
+ 49 call a = CPU (CU il a (IS (ic : is))) s
+ 50
+ 51 staticJump :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 52 staticJump l (CPU (CU il _ is) s) = jump <$> findAddress il l where
+ 53 jump a = CPU (CU il a is) s
+ 54
+ 55 staticBranch :: ALU m ll element => Label -> BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 56 staticBranch l t (CPU (CU il ic is) s) = branch =<< pop1 s where
+ 57 branch (e , s')
+ 58 | isNotJump t e = pure $ CPU (CU il ic is) s'
+ 59 | otherwise = jump <$> findAddress il l where
+ 60 jump ic' = CPU (CU il ic' is) s'
+ 61
+ 62 findAddress :: MonadSafe m => InstructionVector -> Label -> m InstructionAddress
+ 63 findAddress il l = liftMaybeOrErrorTuple ("Undefined label", show l) $ findIndex (isMark l) il
+ 64
+ 65 cpuToTuple :: CentralProcessingUnit s -> (ControlUnit , s)
+ 66 cpuToTuple (CPU cu s) = (cu , s)
+ 67
+ 68 -- | Types
+ 69 data CentralProcessingUnit al = CPU
+ 70 { controlUnit :: ControlUnit
+ 71 , alu :: al
+ 72 }
+ 73 deriving stock (Show )
+ 74
+ 75 data ControlUnit = CU
+ 76 { program :: InstructionVector
+ 77 , programCounter :: InstructionCounter
+ 78 , returnStack :: InstructionStack
+ 79 }
+ 80 deriving stock (Show )
+ 81
+ 82 newtype InstructionStack = IS [InstructionAddress]
+ 83 deriving stock (Show )
+ 84
+ 85 type InstructionCounter = InstructionAddress
+ 86
+ 87 type InstructionAddress = Int
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html
new file mode 100644
index 000000000..f06c468f8
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.LSU where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.ALU
+ 4 import qualified HelVM.HelMA.Automaton.Units.RAM as RAM
+ 5
+ 6 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 7
+ 8 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 9 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 10
+ 11 import Control.Type.Operator
+ 12
+ 13 slInstruction :: (LSU m s r element) => LSInstruction -> LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 14 slInstruction Load = load
+ 15 slInstruction Store = store
+ 16 slInstruction (MIO OutputChar) = loadOutputChar
+ 17 slInstruction (MIO OutputDec) = loadOutputDec
+ 18 slInstruction (MIO InputChar) = storeInputChar
+ 19 slInstruction (MIO InputDec) = storeInputDec
+ 20
+ 21 load :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 22 load (LSU s r) = load' <$> pop1 s where
+ 23 load' (address , s') = LSU (push1 (RAM.genericLoad r address) s') r
+ 24
+ 25 store :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 26 store (LSU s r) = store' <$> pop2 s where
+ 27 store' (value , address , s') = LSU s' $ RAM.store address value r
+ 28
+ 29 loadOutputChar :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 30 loadOutputChar (LSU s r) = loadOutputChar' =<< pop1 s where
+ 31 loadOutputChar' (address , s') = LSU s' r <$ wPutAsChar (RAM.genericLoad r address)
+ 32
+ 33 loadOutputDec :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 34 loadOutputDec (LSU s r) = doOutputDec' =<< pop1 s where
+ 35 doOutputDec' (address , s') = LSU s' r <$ wPutAsDec (RAM.genericLoad r address)
+ 36
+ 37 storeInputChar :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 38 storeInputChar (LSU s r) = storeInputChar' =<< pop1 s where
+ 39 storeInputChar' (address , s') = LSU s' . flip (RAM.store address) r <$> wGetCharAs
+ 40
+ 41 storeInputDec :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 42 storeInputDec (LSU s r) = storeInputDec' =<< pop1 s where
+ 43 storeInputDec' (address , s') = LSU s' . flip (RAM.store address) r <$> wGetDecAs
+ 44
+ 45 sluToTuple :: LoadStoreUnit s r -> (s , r)
+ 46 sluToTuple (LSU s r) = (s , r)
+ 47
+ 48 -- | Types
+ 49 type LSU m s r element = (ALU m s element , RAM.RAM r element)
+ 50
+ 51 data LoadStoreUnit s r = LSU
+ 52 { stack :: s
+ 53 , ram :: r
+ 54 }
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html
new file mode 100644
index 000000000..14c59981a
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.RAM (
+ 2 genericLoad,
+ 3 load,
+ 4 storeChar,
+ 5 genericStore,
+ 6 store,
+ 7 fromList,
+ 8 RAM,
+ 9 ) where
+ 10
+ 11 import HelVM.HelIO.Containers.LLIndexSafe
+ 12 import HelVM.HelIO.Containers.LLInsertDef
+ 13
+ 14 import Data.Default
+ 15 import Prelude hiding (divMod, drop, splitAt, swap)
+ 16
+ 17 genericLoad :: (Integral i , RAM ll element) => ll -> i -> element
+ 18 genericLoad l = load l . fromIntegral
+ 19
+ 20 load :: (RAM ll element) => ll -> Address -> element
+ 21 load l i = indexMaybe l i ?: def
+ 22
+ 23 storeChar :: (Num element , Integral address , RAM ll element) => address -> Char -> ll -> ll
+ 24 storeChar a char = genericStore a $ ord char
+ 25
+ 26 genericStore :: (Integral value , Num element , Integral address , RAM ll element) => address -> value -> ll -> ll
+ 27 genericStore a v = store a $ fromIntegral v
+ 28
+ 29 store :: (Integral a , RAM ll element) => a -> element -> ll -> ll
+ 30 store = insertDef . fromIntegral
+ 31
+ 32 -- | Types
+ 33 type RAM ll element = (Show ll , Default element , II ll element)
+ 34
+ 35 type II ll element = (InsertDef ll element , IndexSafe ll element)
+ 36
+ 37 type Address = Int
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html
new file mode 100644
index 000000000..c8be4c41d
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.Unit where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.CPU
+ 4
+ 5 -- | Data types
+ 6 data Unit s r = Unit
+ 7 { unitCU :: ControlUnit
+ 8 , unitStack :: s
+ 9 , unitRAM :: r
+ 10 }
+ 11 deriving stock (Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html
new file mode 100644
index 000000000..41a99454c
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.WrapTokenList where
+ 2
+ 3 import qualified Text.Read
+ 4 import qualified Text.Show
+ 5
+ 6 newtype WrapTokenList a = WrapTokenList { unWrapTokenList :: a }
+ 7 deriving stock (Eq )
+ 8
+ 9 ----
+ 10
+ 11 instance Show a => Show (WrapTokenList [a]) where
+ 12 show (WrapTokenList tokens) = show =<< tokens
+ 13
+ 14 instance Read a => Read (WrapTokenList [a]) where
+ 15 readsPrec _ source = [( WrapTokenList $ maybeToList . readMaybe . one =<< source , "")]
+
+
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/hpc_index.html b/docs/reports/hpc/helma-0.7.2.0/hpc_index.html
new file mode 100644
index 000000000..d59079b07
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/hpc_index.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/hpc_index_alt.html b/docs/reports/hpc/helma-0.7.2.0/hpc_index_alt.html
new file mode 100644
index 000000000..01d703675
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/hpc_index_alt.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/hpc_index_exp.html b/docs/reports/hpc/helma-0.7.2.0/hpc_index_exp.html
new file mode 100644
index 000000000..6acf20d50
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/hpc_index_exp.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/helma-0.7.2.0/hpc_index_fun.html b/docs/reports/hpc/helma-0.7.2.0/hpc_index_fun.html
new file mode 100644
index 000000000..c7b0f8c5e
--- /dev/null
+++ b/docs/reports/hpc/helma-0.7.2.0/hpc_index_fun.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html
new file mode 100644
index 000000000..4360f2d7c
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton (
+ 2 evalSource,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 6 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 7 import HelVM.HelMA.Automata.BrainFuck.Lexer
+ 8 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 9 import HelVM.HelMA.Automata.BrainFuck.TableOfInstructions
+ 10 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 11
+ 12 import HelVM.HelMA.Automaton.API.IOTypes
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14 import HelVM.HelMA.Automaton.Types.DumpType
+ 15
+ 16 import Control.Type.Operator
+ 17
+ 18 evalSource :: (BIO m , Symbol e) => Source -> FullTape e -> DumpType -> m ()
+ 19 evalSource source tape dt = logDump dt =<< doInstruction ([] , tokenize source) tape
+ 20
+ 21 doInstruction :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 22 doInstruction table@(_ , Simple MoveR : _) tape = doInstruction (nextInst table) (moveHeadRight tape)
+ 23 doInstruction table@(_ , Simple MoveL : _) tape = doInstruction (nextInst table) (moveHeadLeft tape)
+ 24 doInstruction table@(_ , Simple Inc : _) tape = doInstruction (nextInst table) (wNextSymbol tape)
+ 25 doInstruction table@(_ , Simple Dec : _) tape = doInstruction (nextInst table) (wPrevSymbol tape)
+ 26 doInstruction table@(_ , Simple Output : _) tape = doOutputChar table tape
+ 27 doInstruction table@(_ , Simple Input : _) tape = doInputChar table tape
+ 28 doInstruction table@(_ , JmpPast : _) tape = doJmpPast table tape
+ 29 doInstruction table@(_ , JmpBack : _) tape = doJmpBack table tape
+ 30 doInstruction table@(_ , [] ) tape = doEnd table tape
+ 31
+ 32 doJmpPast :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 33 doJmpPast table tape@(_ , 0 : _) = doInstruction (jumpPast table) tape
+ 34 doJmpPast table tape = doInstruction (nextInst table) tape
+ 35
+ 36 doJmpBack :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 37 doJmpBack table tape@(_ , 0 : _) = doInstruction (nextInst table) tape
+ 38 doJmpBack table tape = doInstruction (jumpBack table) tape
+ 39
+ 40 -- | IO instructions
+ 41 doOutputChar :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 42 doOutputChar _ (_ , []) = error "Illegal State"
+ 43 doOutputChar table tape@(_ , e : _) = wPutChar (toChar e) *> doInstruction (nextInst table) tape
+ 44
+ 45 doInputChar :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 46 doInputChar table tape = (doInstruction (nextInst table) . flip writeSymbol tape) =<< wGetChar
+ 47
+ 48 -- | Terminate instruction
+ 49 doEnd :: BIO m => Table -> FullTape e -> m $ Unit e
+ 50 doEnd table tape = pure $ Unit table tape
+ 51
+ 52 -- | Types
+ 53 data Unit e = Unit
+ 54 { unitTable :: Table
+ 55 , unitTape :: FullTape e
+ 56 }
+ 57 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html
new file mode 100644
index 000000000..b5ff9ec69
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton (
+ 2 evalSource,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 6 import HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction
+ 7 import HelVM.HelMA.Automata.BrainFuck.Parser
+ 8 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 9 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 10
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 13 import HelVM.HelMA.Automaton.Types.DumpType
+ 14
+ 15 import HelVM.HelIO.Containers.LLIndexSafe
+ 16
+ 17 import Control.Type.Operator
+ 18
+ 19 evalSource :: (BIO m , Symbol e) => Source -> FullTape e -> DumpType -> m ()
+ 20 evalSource source tape dt = logDump dt =<< flip evalVector tape =<< parseAsVector source
+ 21
+ 22 evalVector :: (BIO m , Symbol e) => TreeInstructionVector -> FullTape e -> m $ Unit e
+ 23 evalVector iv = nextStep (IU iv 0)
+ 24
+ 25 nextStep :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 26 nextStep (IU iv ic) = doInstruction (iv `indexMaybe` ic) (IU iv $ ic + 1)
+ 27
+ 28 doInstruction :: (BIO m , Symbol e) => Maybe TreeInstruction -> InstructionUnit -> FullTape e -> m $ Unit e
+ 29 doInstruction (Just (Simple MoveR )) table tape = nextStep table (moveHeadRight tape)
+ 30 doInstruction (Just (Simple MoveL )) table tape = nextStep table (moveHeadLeft tape)
+ 31 doInstruction (Just (Simple Inc )) table tape = nextStep table (wNextSymbol tape)
+ 32 doInstruction (Just (Simple Dec )) table tape = nextStep table (wPrevSymbol tape)
+ 33 doInstruction (Just (Simple Output )) table tape = doOutputChar table tape
+ 34 doInstruction (Just (Simple Input )) table tape = doInputChar table tape
+ 35 doInstruction (Just (While iv )) table tape = doWhile iv table tape
+ 36 doInstruction Nothing table tape = doEnd table tape
+ 37
+ 38 doWhile :: (BIO m , Symbol e) => TreeInstructionVector -> InstructionUnit -> FullTape e -> m $ Unit e
+ 39 doWhile _ table tape@(_ , 0:_) = nextStep table tape
+ 40 doWhile iv table tape = doWhileWithTape =<< evalVector iv tape where
+ 41 doWhileWithTape :: (BIO m , Symbol e) => Unit e -> m $ Unit e
+ 42 doWhileWithTape = doWhile iv table . unitTape
+ 43
+ 44 -- | IO instructions
+ 45 doOutputChar :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 46 doOutputChar _ (_ , []) = error "Illegal State"
+ 47 doOutputChar table tape@(_ , e:_) = wPutChar (toChar e) *> nextStep table tape
+ 48
+ 49 doInputChar :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 50 doInputChar table tape = (nextStep table . flip writeSymbol tape) =<< wGetChar
+ 51
+ 52 -- | Terminate instruction
+ 53 doEnd :: BIO m => InstructionUnit -> FullTape e -> m $ Unit e
+ 54 doEnd iu tape = pure $ Unit iu tape
+ 55
+ 56 -- | Types
+ 57 data Unit e = Unit
+ 58 { unitUI :: InstructionUnit
+ 59 , unitTape :: FullTape e
+ 60 }
+ 61 deriving stock (Eq , Show )
+ 62
+ 63 data InstructionUnit = IU !TreeInstructionVector !InstructionCounter
+ 64 deriving stock (Eq , Show )
+ 65
+ 66 type InstructionCounter = Int
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html
new file mode 100644
index 000000000..05adcb87b
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton where
+ 2
+ 3 import qualified HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton as Flat
+ 4 import qualified HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton as Tree
+ 5
+ 6 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 7 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 8
+ 9 import HelVM.HelMA.Automaton.API.EvalParams
+ 10 import HelVM.HelMA.Automaton.API.IOTypes
+ 11 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 12
+ 13 import HelVM.HelMA.Automaton.Types.CellType
+ 14 import HelVM.HelMA.Automaton.Types.DumpType
+ 15
+ 16 simpleEval :: BIO m => (Bool , Source , CellType) -> m ()
+ 17 simpleEval (c , s , t) = eval c s t Pretty
+ 18
+ 19 ----
+ 20
+ 21 evalParams :: BIO m => EvalParams -> m ()
+ 22 evalParams p = eval (compile p) (source p) (cellTypeOptions p) (dumpTypeOptions p)
+ 23
+ 24 eval :: BIO m => Bool -> Source -> CellType -> DumpType -> m ()
+ 25 eval c s Int8Type = evalSource c s (newTape :: FullTape Int8)
+ 26 eval c s Word8Type = evalSource c s (newTape :: FullTape Word8)
+ 27 eval c s Int16Type = evalSource c s (newTape :: FullTape Int16)
+ 28 eval c s Word16Type = evalSource c s (newTape :: FullTape Word16)
+ 29 eval c s Int32Type = evalSource c s (newTape :: FullTape Int32)
+ 30 eval c s Word32Type = evalSource c s (newTape :: FullTape Word32)
+ 31 eval c s Int64Type = evalSource c s (newTape :: FullTape Int64)
+ 32 eval c s Word64Type = evalSource c s (newTape :: FullTape Word64)
+ 33
+ 34 evalSource :: (BIO m , Symbol e) => Bool -> Source -> FullTape e -> DumpType -> m ()
+ 35 evalSource False = Flat.evalSource
+ 36 evalSource True = Tree.evalSource
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html
new file mode 100644
index 000000000..bdb30e3fe
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 4
+ 5 import Text.Read
+ 6
+ 7 import qualified Text.Show
+ 8
+ 9 data FlatInstruction =
+ 10 Simple SimpleInstruction
+ 11 | JmpPast
+ 12 | JmpBack
+ 13 deriving stock (Eq )
+ 14
+ 15 type FlatTreeInstructionList = [FlatInstruction]
+ 16
+ 17 instance Show FlatInstruction where
+ 18 show (Simple i) = show i
+ 19 show JmpPast = "["
+ 20 show JmpBack = "]"
+ 21
+ 22 instance Read FlatInstruction where
+ 23 readsPrec _ ">" = [( Simple MoveR , "")]
+ 24 readsPrec _ "<" = [( Simple MoveL , "")]
+ 25 readsPrec _ "+" = [( Simple Inc , "")]
+ 26 readsPrec _ "-" = [( Simple Dec , "")]
+ 27 readsPrec _ "." = [( Simple Output , "")]
+ 28 readsPrec _ "," = [( Simple Input , "")]
+ 29 readsPrec _ "[" = [( JmpPast , "")]
+ 30 readsPrec _ "]" = [( JmpBack , "")]
+ 31 readsPrec _ _ = []
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html
new file mode 100644
index 000000000..d40c09792
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction where
+ 2
+ 3 import Text.Read
+ 4 import qualified Text.Show
+ 5
+ 6 data SimpleInstruction =
+ 7 MoveR
+ 8 | MoveL
+ 9 | Inc
+ 10 | Dec
+ 11 | Output
+ 12 | Input
+ 13 deriving stock (Bounded , Enum , Eq )
+ 14
+ 15 instance Show SimpleInstruction where
+ 16 show MoveR = ">"
+ 17 show MoveL = "<"
+ 18 show Inc = "+"
+ 19 show Dec = "-"
+ 20 show Output = "."
+ 21 show Input = ","
+ 22
+ 23 instance Read SimpleInstruction where
+ 24 readsPrec _ ">" = [( MoveR , "")]
+ 25 readsPrec _ "<" = [( MoveL , "")]
+ 26 readsPrec _ "+" = [( Inc , "")]
+ 27 readsPrec _ "-" = [( Dec , "")]
+ 28 readsPrec _ "." = [( Output , "")]
+ 29 readsPrec _ "," = [( Input , "")]
+ 30 readsPrec _ _ = []
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html
new file mode 100644
index 000000000..f7c5c74b9
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 4
+ 5 import Data.DList
+ 6 import qualified Data.ListLike as LL
+ 7 import Data.Vector
+ 8
+ 9 import qualified Text.Show
+ 10
+ 11 data TreeInstruction =
+ 12 Simple SimpleInstruction
+ 13 | While !TreeInstructionVector
+ 14 deriving stock (Eq )
+ 15
+ 16 type TreeInstructionList = [TreeInstruction]
+ 17 type TreeInstructionDList = DList TreeInstruction
+ 18 type TreeInstructionVector = Vector TreeInstruction
+ 19
+ 20 instance Show TreeInstruction where
+ 21 show (Simple i) = show i
+ 22 show (While il) = "[" <> (show =<< LL.toList il) <> "]"
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html
new file mode 100644
index 000000000..7987dc7b9
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelMA.Automaton.API.IOTypes
+ 7 import HelVM.HelMA.Automaton.WrapTokenList
+ 8
+ 9 -- | Lexer
+ 10 tokenize :: Source -> FlatTreeInstructionList
+ 11 tokenize = unWrapTokenList . readTokens
+ 12
+ 13 readTokens :: Source -> Tokens
+ 14 readTokens source = readTextUnsafe source :: Tokens
+ 15
+ 16 type Tokens = WrapTokenList FlatTreeInstructionList
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html
new file mode 100644
index 000000000..88eb4e52f
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Parser where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction as Flat
+ 4 import HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction as Tree
+ 5 import HelVM.HelMA.Automata.BrainFuck.Lexer
+ 6
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8
+ 9 import HelVM.HelIO.Control.Safe
+ 10 import HelVM.HelIO.ListLikeUtil
+ 11
+ 12 import Data.ListLike hiding (show)
+ 13
+ 14 import qualified Data.DList as D
+ 15
+ 16 type OperandParser m a = FlatTreeInstructionList -> m (a , FlatTreeInstructionList)
+ 17
+ 18 parseAsVector :: MonadSafe m => Source -> m TreeInstructionVector
+ 19 parseAsVector = parseFILAsVector . tokenize
+ 20
+ 21 parseFILAsVector :: MonadSafe m => FlatTreeInstructionList -> m TreeInstructionVector
+ 22 parseFILAsVector fil = fromList <$> parseFIL fil
+ 23
+ 24 parseFIL :: MonadSafe m => FlatTreeInstructionList -> m TreeInstructionList
+ 25 parseFIL (Flat.Simple i : fil) = (Tree.Simple i : ) <$> parseFIL fil
+ 26 parseFIL [] = pure []
+ 27 parseFIL (Flat.JmpBack : fil) = liftErrorWithPrefix "JmpBack" $ show fil
+ 28 parseFIL (Flat.JmpPast : fil) = addWhile =<< parseWhile fil where
+ 29 addWhile (i , fil') = (i : ) <$> parseFIL fil'
+ 30
+ 31 parseWhile :: MonadSafe m => OperandParser m TreeInstruction
+ 32 parseWhile fil = buildWhile <$> parseWhileD fil where
+ 33 buildWhile :: (TreeInstructionDList , FlatTreeInstructionList) -> (TreeInstruction , FlatTreeInstructionList)
+ 34 buildWhile (idl , fil') = (buildWhileFromDList idl , fil')
+ 35
+ 36 buildWhileFromDList :: TreeInstructionDList -> TreeInstruction
+ 37 buildWhileFromDList = Tree.While . convert
+ 38
+ 39 parseWhileD :: MonadSafe m => OperandParser m TreeInstructionDList
+ 40 parseWhileD = go D.empty where
+ 41 go :: MonadSafe m => TreeInstructionDList -> FlatTreeInstructionList -> m (TreeInstructionDList , FlatTreeInstructionList)
+ 42 go acc (Flat.Simple i : fil) = go (acc `snoc` Tree.Simple i ) fil
+ 43 go acc [] = liftErrorWithPrefix "End of List" $ show acc
+ 44 go acc (Flat.JmpBack : fil) = pure (acc , fil)
+ 45 go acc (Flat.JmpPast : fil) = snocInstruction =<< parseWhile fil where
+ 46 snocInstruction :: MonadSafe m => (TreeInstruction , FlatTreeInstructionList) -> m (TreeInstructionDList , FlatTreeInstructionList)
+ 47 snocInstruction (i , fil') = go (acc `snoc` i) fil'
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html
new file mode 100644
index 000000000..e276c86f8
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Symbol (
+ 2 Symbol,
+ 3 def,
+ 4 next,
+ 5 prev,
+ 6 fromChar,
+ 7 toChar
+ 8 ) where
+ 9
+ 10 import Data.Default (Default)
+ 11
+ 12 import qualified Data.Default as Default
+ 13 import qualified Relude.Extra as Extra
+ 14
+ 15 def :: Symbol e => e
+ 16 def = Default.def
+ 17
+ 18 next :: Symbol e => e -> e
+ 19 next = Extra.next
+ 20
+ 21 prev :: Symbol e => e -> e
+ 22 prev = Extra.prev
+ 23
+ 24 class (Bounded e , Default e , Enum e , Eq e , Num e , Show e) => Symbol e where
+ 25 fromChar :: Char -> e
+ 26 toChar :: e -> Char
+ 27
+ 28 --
+ 29
+ 30 instance Symbol Int where
+ 31 fromChar = ord
+ 32 toChar = chr
+ 33
+ 34 instance Symbol Word where
+ 35 fromChar = fromIntegral . ord
+ 36 toChar = chr . fromIntegral
+ 37
+ 38 instance Symbol Int8 where
+ 39 fromChar = fromIntegral . ord
+ 40 toChar = chr . normalizeMod . fromIntegral
+ 41
+ 42 instance Symbol Word8 where
+ 43 fromChar = fromIntegral . ord
+ 44 toChar = chr . fromIntegral
+ 45
+ 46 instance Symbol Int16 where
+ 47 fromChar = fromIntegral . ord
+ 48 toChar = chr . normalizeMod . fromIntegral
+ 49
+ 50 instance Symbol Word16 where
+ 51 fromChar = fromIntegral . ord
+ 52 toChar = chr . fromIntegral
+ 53
+ 54 instance Symbol Int32 where
+ 55 fromChar = fromIntegral . ord
+ 56 toChar = chr . normalizeMod . fromIntegral
+ 57
+ 58 instance Symbol Word32 where
+ 59 fromChar = fromIntegral . ord
+ 60 toChar = chr . fromIntegral
+ 61
+ 62 instance Symbol Int64 where
+ 63 fromChar = fromIntegral . ord
+ 64 toChar = chr . normalizeMod . fromIntegral
+ 65
+ 66 instance Symbol Word64 where
+ 67 fromChar = fromIntegral . ord
+ 68 toChar = chr . fromIntegral
+ 69 --
+ 70
+ 71 countSymbols :: (Integral e) => e
+ 72 countSymbols = 256
+ 73
+ 74 modifyMod :: (Integral e) => (e -> e) -> e -> e
+ 75 modifyMod f i = f (i + countSymbols) `mod` countSymbols
+ 76
+ 77 normalizeMod :: (Integral e) => e -> e
+ 78 normalizeMod = modifyMod id
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html
new file mode 100644
index 000000000..78fc0f8ac
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.TableOfInstructions where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 4
+ 5 type HalfTable = FlatTreeInstructionList
+ 6 type Table = (HalfTable , HalfTable)
+ 7 type TableD = Table -> Table
+ 8
+ 9 prevInst :: TableD
+ 10 prevInst (inst : prev , next) = (prev , inst : next)
+ 11 prevInst ([] , _) = error "End of the table"
+ 12
+ 13 nextInst :: TableD
+ 14 nextInst (prev , inst : next) = (inst : prev , next)
+ 15 nextInst (_ , []) = error "End of the table"
+ 16
+ 17 matchPrevJmp :: TableD
+ 18 matchPrevJmp table@(JmpPast : _ , _) = table
+ 19 matchPrevJmp table@(JmpBack : _ , _) = (matchPrevJmp . prevInst . jumpBack) table
+ 20 matchPrevJmp table = jumpBack table
+ 21
+ 22 matchNextJmp :: TableD
+ 23 matchNextJmp table@(_ , JmpBack : _) = nextInst table
+ 24 matchNextJmp table@(_ , JmpPast : _) = (matchNextJmp . jumpPast) table
+ 25 matchNextJmp table = jumpPast table
+ 26
+ 27 jumpPast :: TableD
+ 28 jumpPast = matchNextJmp . nextInst
+ 29
+ 30 jumpBack :: TableD
+ 31 jumpBack = matchPrevJmp . prevInst
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html
new file mode 100644
index 000000000..df2083506
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols (
+ 2 FullTape,
+ 3 newTape,
+ 4 moveHeadRight,
+ 5 moveHeadLeft,
+ 6 wNextSymbol,
+ 7 wPrevSymbol,
+ 8 writeSymbol
+ 9 ) where
+ 10
+ 11 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 12
+ 13 ----
+ 14
+ 15 type D a = a -> a
+ 16 type FullTape e = (HalfTape e , HalfTape e)
+ 17 type FullTapeD e = D (FullTape e)
+ 18
+ 19 type HalfTape e = [e]
+ 20
+ 21 ----
+ 22
+ 23 newTape :: (Symbol e) => FullTape e
+ 24 newTape = ([def] , [def])
+ 25
+ 26 moveHeadRight :: (Symbol e) => FullTapeD e
+ 27 moveHeadRight (cell:left , right) = pad (left , cell:right)
+ 28 moveHeadRight ([] , _) = error "End of the Tape"
+ 29
+ 30 moveHeadLeft :: (Symbol e) => FullTapeD e
+ 31 moveHeadLeft (left , cell:right) = pad (cell:left , right)
+ 32 moveHeadLeft (_ , []) = error "End of the Tape"
+ 33
+ 34 pad :: (Symbol e) => FullTapeD e
+ 35 pad ([] , []) = newTape
+ 36 pad ([] , right) = ([def] , right)
+ 37 pad (left , []) = (left , [def])
+ 38 pad tape = tape
+ 39
+ 40 ----
+ 41
+ 42 wNextSymbol :: (Symbol e) => FullTapeD e
+ 43 wNextSymbol = modifyCell next
+ 44
+ 45 wPrevSymbol :: (Symbol e) => FullTapeD e
+ 46 wPrevSymbol = modifyCell prev
+ 47
+ 48 writeSymbol :: (Symbol e) => Char -> FullTapeD e
+ 49 writeSymbol symbol = modifyCell (const $ fromChar symbol)
+ 50
+ 51 modifyCell :: D e -> FullTapeD e
+ 52 modifyCell f (left , cell:right) = (left , f cell:right)
+ 53 modifyCell _ (_ , []) = error "End of the Tape"
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html
new file mode 100644
index 000000000..378891022
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Cat.Automaton (
+ 2 evalParams,
+ 3 eval
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automaton.API.EvalParams
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 9
+ 10 evalParams :: BIO m => EvalParams -> m ()
+ 11 evalParams = eval . source
+ 12
+ 13 eval :: BusinessIO m => Source -> m ()
+ 14 eval = wPutStr
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html
new file mode 100644
index 000000000..277ad958a
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Addressing (
+ 2 genericFindAddress,
+ 3 findAddress,
+ 4 genericNextLabel,
+ 5 nextLabel
+ 6 ) where
+ 7
+ 8 import HelVM.HelMA.Automata.ETA.Symbol
+ 9 import HelVM.HelMA.Automata.ETA.Token
+ 10
+ 11 import HelVM.HelIO.Containers.LLIndexSafe
+ 12
+ 13 import HelVM.HelIO.Control.Safe
+ 14
+ 15 import Data.ListLike hiding (show)
+ 16
+ 17 import Prelude hiding (length, splitAt)
+ 18
+ 19 import qualified Data.Vector as Vector
+ 20
+ 21 ----
+ 22
+ 23 genericFindAddress :: (MonadSafe m , Integral cell) => Vector.Vector Token -> cell -> m InstructionAddress
+ 24 genericFindAddress il = findAddress il . fromIntegral
+ 25
+ 26 findAddress :: MonadSafe m => Vector.Vector Token -> Int -> m InstructionAddress
+ 27 findAddress _ 1 = pure 0
+ 28 findAddress il address = appendErrorTupleList [("il" , show il) , ("address" , show address)] ((+1) <$> indexSafe (Vector.elemIndices R il) (address-2))
+ 29
+ 30 ----
+ 31
+ 32 genericNextLabel :: Integral cell => Vector.Vector Token -> InstructionAddress -> cell
+ 33 genericNextLabel il = fromIntegral . nextLabel il
+ 34
+ 35 nextLabel :: Vector.Vector Token -> InstructionAddress -> Int
+ 36 nextLabel il ic = length (Vector.elemIndices R il') + 2 where (il' , _) = splitAt ic il
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html
new file mode 100644
index 000000000..281881e0e
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 ) where
+ 6
+ 7 import HelVM.HelMA.Automata.ETA.Evaluator
+ 8 import HelVM.HelMA.Automata.ETA.Lexer
+ 9 import HelVM.HelMA.Automata.ETA.OperandParsers
+ 10 import HelVM.HelMA.Automata.ETA.Symbol
+ 11 import HelVM.HelMA.Automata.ETA.Token
+ 12
+ 13 import HelVM.HelMA.Automaton.API.EvalParams
+ 14 import HelVM.HelMA.Automaton.API.IOTypes
+ 15
+ 16 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 17 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 18
+ 19 import HelVM.HelMA.Automaton.Types.DumpType
+ 20 import HelVM.HelMA.Automaton.Types.StackType
+ 21
+ 22 import HelVM.HelIO.Collections.SList as SList
+ 23
+ 24 import Prelude hiding (divMod)
+ 25
+ 26 import qualified Data.Sequence as Seq
+ 27 import qualified Data.Vector as Vector
+ 28
+ 29 simpleEval :: BIO m => (Bool , Source , StackType) -> m ()
+ 30 simpleEval (c , s , t) = eval c s t Pretty
+ 31
+ 32 ----
+ 33
+ 34 evalParams :: BIO m => EvalParams -> m ()
+ 35 evalParams p = eval (compile p) (source p) (stackTypeOptions p) (dumpTypeOptions p)
+ 36
+ 37 eval :: (Evaluator Symbol m) => Bool -> Source -> StackType -> DumpType -> m ()
+ 38 eval compile source = evalTL compile (tokenize source)
+ 39
+ 40 evalTL :: (Evaluator Symbol m) => Bool -> TokenList -> StackType -> DumpType -> m ()
+ 41 evalTL c tl ListStackType = start c tl []
+ 42 evalTL c tl SeqStackType = start c tl Seq.empty
+ 43 evalTL c tl SListStackType = start c tl SList.sListEmpty
+ 44
+ 45 start :: (SEvaluator Symbol s m) => Bool -> TokenList -> s -> DumpType -> m ()
+ 46 start _ tl s dt = logDump dt =<< next (IU (Vector.fromList tl) 0) s
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html
new file mode 100644
index 000000000..50abd12dd
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Evaluator (
+ 2 next,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.ETA.Addressing
+ 6 import HelVM.HelMA.Automata.ETA.OperandParsers
+ 7 import HelVM.HelMA.Automata.ETA.Token
+ 8
+ 9 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 10
+ 11 import HelVM.HelMA.Automaton.Units.ALU as Stack
+ 12
+ 13 import Control.Type.Operator
+ 14
+ 15 import Prelude hiding (divMod)
+ 16
+ 17 next :: (SEvaluator e s m) => InstructionUnit -> s -> m $ Unit s
+ 18 next iu s = doInstruction' =<< nextIU iu where doInstruction' (t , iu') = doInstruction t iu' s
+ 19
+ 20 doInstruction :: (SEvaluator e s m) => Maybe Token -> InstructionUnit -> s -> m $ Unit s
+ 21 -- | IO instructions
+ 22 doInstruction (Just O) iu s = next iu =<< doOutputChar2 s
+ 23 doInstruction (Just I) iu s = next iu =<< doInputChar2 s
+ 24
+ 25 -- | Stack instructions
+ 26 doInstruction (Just N) iu s = next' =<< parseNumber iu where next' (symbol , iu') = next iu' (push1 symbol s)
+ 27 doInstruction (Just H) iu s = next iu =<< halibut s
+ 28
+ 29 -- | Arithmetic
+ 30 doInstruction (Just S) iu s = next iu =<< sub s
+ 31 doInstruction (Just E) iu s = next iu =<< divMod s
+ 32
+ 33 -- | Control
+ 34 doInstruction (Just R) iu s = next iu s
+ 35 doInstruction (Just A) iu@(IU il ic) s = (next iu . flipPush1 s . genericNextLabel il) ic
+ 36 doInstruction (Just T) iu@(IU il _ ) s = transfer =<< pop2 s where
+ 37 transfer (_ , 0 , s') = next iu s'
+ 38 transfer (0 , _ , _ ) = doEnd iu s
+ 39 transfer (l , _ , s') = next' =<< genericFindAddress il l where next' address = next (IU il address) s'
+ 40 doInstruction Nothing iu s = doEnd iu s
+ 41
+ 42 -- | Terminate instruction
+ 43 doEnd :: (SEvaluator e s m) => InstructionUnit -> s -> m $ Unit s
+ 44 doEnd iu s = pure $ Unit iu s
+ 45
+ 46 -- | Types
+ 47
+ 48 data Unit s = Unit
+ 49 { unitIU :: !InstructionUnit
+ 50 , unitStack :: s
+ 51 }
+ 52 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html
new file mode 100644
index 000000000..cdb64831c
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.ETA.Token
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelIO.Util
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.WrapTokenList
+ 9
+ 10 -- | Lexer
+ 11 tokenize :: Source -> TokenList
+ 12 tokenize = whiteTokenListToTokenList . unWrapTokenList . readTokens
+ 13
+ 14 readTokens :: Source -> WhiteTokens
+ 15 readTokens source = (readTextUnsafe . toUppers) source :: WhiteTokens
+ 16
+ 17 -- | Types
+ 18 type WhiteTokens = WrapTokenList WhiteTokenList
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html
new file mode 100644
index 000000000..b04a053b3
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.OperandParsers where
+ 2
+ 3 import HelVM.HelMA.Automata.ETA.Symbol
+ 4 import HelVM.HelMA.Automata.ETA.Token
+ 5
+ 6 import HelVM.HelIO.Containers.LLIndexSafe
+ 7 import HelVM.HelIO.Control.Safe
+ 8 import HelVM.HelIO.Digit.ToDigit
+ 9
+ 10 import qualified Data.Vector as Vector
+ 11
+ 12 parseNumber :: (MonadSafe m , Integral a) => OperandIUParser m a
+ 13 parseNumber iu = go [] =<< nextIU iu where
+ 14 go :: (MonadSafe m , Integral a) => TokenList -> (Maybe Token, InstructionUnit) -> m (a, InstructionUnit)
+ 15 go acc (Nothing , iu') = ( , iu') <$> makeIntegral7FromList acc
+ 16 go acc (Just E , iu') = ( , iu') <$> makeIntegral7FromList acc
+ 17 go acc (Just R , iu') = go acc =<< nextIU iu'
+ 18 go acc (Just t , iu') = go (t : acc) =<< nextIU iu'
+ 19
+ 20 nextIU :: MonadSafe m => OperandIUParser m (Maybe Token)
+ 21 nextIU iu@(IU il ic)
+ 22 | ic < Vector.length il = wrap <$> indexSafe il ic
+ 23 | otherwise = pure (Nothing , iu)
+ 24 where wrap i = (Just i, IU il (ic+1))
+ 25
+ 26 -- | Types
+ 27 data InstructionUnit = IU !TokenVector !InstructionCounter
+ 28 deriving stock (Eq , Read , Show )
+ 29
+ 30 type OperandIUParser m a = InstructionUnit -> m (a , InstructionUnit)
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html
new file mode 100644
index 000000000..ee376a36d
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Token where
+ 2
+ 3 import HelVM.HelIO.Control.Safe
+ 4 import HelVM.HelIO.Digit.ToDigit
+ 5
+ 6 import Data.Vector as Vector
+ 7
+ 8 import qualified Text.Read
+ 9 import qualified Text.Show
+ 10
+ 11 data Token = E | T | A | O | I | N | S | H | R
+ 12 deriving stock (Bounded , Enum , Eq , Read , Show )
+ 13
+ 14 type TokenList = [Token]
+ 15 type TokenVector = Vector Token
+ 16
+ 17 instance ToDigit Token where
+ 18 toDigit H = pure 0
+ 19 toDigit T = pure 1
+ 20 toDigit A = pure 2
+ 21 toDigit O = pure 3
+ 22 toDigit I = pure 4
+ 23 toDigit N = pure 5
+ 24 toDigit S = pure 6
+ 25 toDigit t = liftErrorWithPrefix "Wrong token" $ show t
+ 26
+ 27 ----
+ 28
+ 29 newtype WhiteToken = WhiteToken { unWhiteToken :: Token}
+ 30 deriving stock (Eq )
+ 31
+ 32 type WhiteTokenList = [WhiteToken]
+ 33
+ 34 instance Show WhiteToken where
+ 35 show (WhiteToken R) = "\n"
+ 36 show (WhiteToken t) = show t
+ 37
+ 38 -- | Scanner
+ 39 instance Read WhiteToken where
+ 40 readsPrec _ "\n" = [( WhiteToken R , "")]
+ 41 readsPrec _ "E" = [( WhiteToken E , "")]
+ 42 readsPrec _ "T" = [( WhiteToken T , "")]
+ 43 readsPrec _ "A" = [( WhiteToken A , "")]
+ 44 readsPrec _ "O" = [( WhiteToken O , "")]
+ 45 readsPrec _ "I" = [( WhiteToken I , "")]
+ 46 readsPrec _ "N" = [( WhiteToken N , "")]
+ 47 readsPrec _ "S" = [( WhiteToken S , "")]
+ 48 readsPrec _ "H" = [( WhiteToken H , "")]
+ 49 readsPrec _ _ = []
+ 50
+ 51 tokenToWhiteTokenPair :: Token -> (WhiteToken , String)
+ 52 tokenToWhiteTokenPair t = (WhiteToken t , "")
+ 53
+ 54 whiteTokenListToTokenList :: WhiteTokenList -> TokenList
+ 55 whiteTokenListToTokenList = fmap unWhiteToken
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html
new file mode 100644
index 000000000..89e5d37a4
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Rev.Automaton (
+ 2 evalParams,
+ 3 eval
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automaton.API.EvalParams
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 9
+ 10 import qualified Data.Text as Text
+ 11
+ 12 evalParams :: BIO m => EvalParams -> m ()
+ 13 evalParams = eval . source
+ 14
+ 15 eval :: BusinessIO m => Source -> m ()
+ 16 eval = evalLines . lines
+ 17
+ 18 evalLines :: BusinessIO m => [Source] -> m ()
+ 19 evalLines ll = doOutput $ unlines $ Text.reverse <$> ll
+ 20
+ 21 doOutput :: BusinessIO m => Source -> m ()
+ 22 doOutput = wPutStr
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html
new file mode 100644
index 000000000..f8508b74b
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 ) where
+ 6
+ 7 import HelVM.HelMA.Automata.SubLeq.Evaluator
+ 8 import HelVM.HelMA.Automata.SubLeq.Lexer
+ 9
+ 10 import HelVM.HelMA.Automaton.API.EvalParams
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 15
+ 16 import HelVM.HelMA.Automaton.Types.DumpType
+ 17 import HelVM.HelMA.Automaton.Types.RAMType
+ 18
+ 19 import qualified HelVM.HelIO.Collections.MapList as MapList
+ 20 import qualified HelVM.HelIO.Collections.SList as SList
+ 21
+ 22 import qualified Data.Sequence as Seq
+ 23
+ 24 simpleEval :: BIO m => RAMType -> Source -> m ()
+ 25 simpleEval rt s = eval s rt Pretty
+ 26
+ 27 ----
+ 28
+ 29 evalParams :: BIO m => EvalParams -> m ()
+ 30 evalParams p = eval (source p) (ramTypeOptions p) (dumpTypeOptions p)
+ 31
+ 32 eval :: BIO m => Source -> RAMType -> DumpType -> m ()
+ 33 eval source = evalIL $ tokenize source
+ 34
+ 35 evalIL :: Evaluator e m => [e] -> RAMType -> DumpType -> m ()
+ 36 evalIL = flip evalIL'
+ 37
+ 38 evalIL' :: Evaluator e m => RAMType -> [e] -> DumpType -> m ()
+ 39 evalIL' ListRAMType = start
+ 40 evalIL' SeqRAMType = start . Seq.fromList
+ 41 evalIL' SListRAMType = start . SList.sListFromList
+ 42 evalIL' MapListRAMType = start . MapList.mapListFromList
+ 43
+ 44 start :: REvaluator e r m => r -> DumpType -> m ()
+ 45 start r dt = logDump dt =<< doInstruction 0 r
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html
new file mode 100644
index 000000000..d442c9f2e
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Evaluator (
+ 2 doInstruction,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 6 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 7
+ 8 import HelVM.HelMA.Automaton.Units.RAM as RAM
+ 9
+ 10 import Control.Type.Operator
+ 11
+ 12 doInstruction :: REvaluator e r m => e -> r -> m $ Unit e r
+ 13 doInstruction ic ram
+ 14 | ic < 0 = doEnd ic ram
+ 15 | src < 0 = doInputChar dst ic ram
+ 16 | dst < 0 = doOutputChar src ic ram
+ 17 | otherwise = doInstruction ic' $ store dst diff ram
+ 18 where
+ 19 src = genericLoad ram ic
+ 20 dst = genericLoad ram $ ic + 1
+ 21 diff = genericLoad ram dst - genericLoad ram src
+ 22 ic'
+ 23 | diff <= 0 = genericLoad ram $ ic + 2
+ 24 | otherwise = ic + 3
+ 25
+ 26 -- | IO instructions
+ 27 doOutputChar :: REvaluator e r m => e -> e -> r -> m $ Unit e r
+ 28 doOutputChar address ic ram = wPutAsChar (genericLoad ram address) *> doInstruction (ic+3) ram
+ 29
+ 30 doInputChar :: REvaluator e r m => e -> e -> r -> m $ Unit e r
+ 31 doInputChar address ic ram = doInputChar' =<< wGetChar where
+ 32 doInputChar' char = doInstruction (ic+3) $ storeChar address char ram
+ 33
+ 34 -- | Terminate instruction
+ 35 doEnd :: REvaluator e r m => e -> r -> m $ Unit e r
+ 36 doEnd ic ram = pure $ Unit ic ram
+ 37
+ 38 -- | Types
+ 39 data Unit ic ram = Unit
+ 40 { unitIU :: ic
+ 41 , unitRAM :: ram
+ 42 }
+ 43 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html
new file mode 100644
index 000000000..beead8144
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.SubLeq.Symbol
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelIO.Util
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8
+ 9 import qualified Text.Read as Read
+ 10 import qualified Text.Show as Show
+ 11
+ 12 tokenize :: Source -> SymbolList
+ 13 tokenize source = (maybeToList . readTextMaybe) =<< splitOneOf " \t\n" source
+ 14
+ 15 readSymbols :: Source -> Symbols
+ 16 readSymbols source = readTextUnsafe source :: Symbols
+ 17
+ 18 ----
+ 19
+ 20 newtype Symbols = Symbols SymbolList
+ 21
+ 22 instance Show Symbols where
+ 23 show (Symbols symbols) = toString $ unwords $ shows symbols
+ 24
+ 25 instance Read Symbols where
+ 26 readsPrec _ source = [( Symbols $ tokenize $ toText source , "")]
+ 27
+ 28 ----
+ 29
+ 30 shows :: SymbolList -> [Text]
+ 31 shows symbols = show <$> symbols
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html
new file mode 100644
index 000000000..758410503
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 evalIL,
+ 6 evalTL,
+ 7 start,
+ 8 ) where
+ 9
+ 10 import HelVM.HelMA.Automata.WhiteSpace.Evaluator
+ 11 import HelVM.HelMA.Automata.WhiteSpace.Lexer
+ 12 import HelVM.HelMA.Automata.WhiteSpace.Parser
+ 13 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 14 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 15
+ 16 import HelVM.HelMA.Automaton.API.EvalParams
+ 17 import HelVM.HelMA.Automaton.API.IOTypes
+ 18
+ 19 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 20 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 21
+ 22 import HelVM.HelMA.Automaton.Instruction
+ 23
+ 24 import HelVM.HelMA.Automaton.Units.CPU as CPU
+ 25
+ 26 import HelVM.HelMA.Automaton.Types.DumpType
+ 27 import HelVM.HelMA.Automaton.Types.RAMType
+ 28 import HelVM.HelMA.Automaton.Types.StackType
+ 29 import HelVM.HelMA.Automaton.Types.TokenType
+ 30
+ 31 import HelVM.HelIO.Control.Safe
+ 32
+ 33 import Prelude hiding (swap)
+ 34
+ 35 import qualified HelVM.HelMA.Automata.WhiteSpace.SimpleParams as S
+ 36
+ 37 import qualified HelVM.HelIO.Collections.MapList as MapList
+ 38 import qualified HelVM.HelIO.Collections.SList as SList
+ 39
+ 40 import qualified Data.Sequence as Seq
+ 41 import qualified Data.Vector as Vector
+ 42
+ 43 simpleEval :: BIO m => S.SimpleParams -> m ()
+ 44 simpleEval p = eval (S.tokenType p) (S.source p) (S.asciiLabel p) (S.stackType p) (S.ramType p) (S.dumpType p)
+ 45
+ 46 ----
+ 47
+ 48 evalParams :: BIO m => TokenType -> EvalParams -> m ()
+ 49 evalParams tokenType p = eval tokenType (source p) (asciiLabel p) (stackTypeOptions p) (ramTypeOptions p) (dumpTypeOptions p)
+ 50
+ 51 eval :: BIO m => TokenType -> Source -> Bool -> StackType -> RAMType -> DumpType -> m ()
+ 52 eval tokenType source = evalTL $ tokenize tokenType source
+ 53
+ 54 evalTL :: BIO m => TokenList -> Bool -> StackType -> RAMType -> DumpType -> m ()
+ 55 evalTL tl ascii st rt dt = evalTL' =<< liftSafe (parseTL ascii tl) where evalTL' il = evalIL il st rt dt
+ 56
+ 57 evalIL :: BIO m => InstructionList -> StackType -> RAMType -> DumpType -> m ()
+ 58 evalIL il s ListRAMType = evalIL' il s []
+ 59 evalIL il s SeqRAMType = evalIL' il s Seq.empty
+ 60 evalIL il s SListRAMType = evalIL' il s SList.sListEmpty
+ 61 evalIL il s MapListRAMType = evalIL' il s MapList.mapListEmpty
+ 62
+ 63 evalIL' :: (REvaluator Symbol r m) => InstructionList -> StackType -> r -> DumpType -> m ()
+ 64 evalIL' il ListStackType = start il []
+ 65 evalIL' il SeqStackType = start il Seq.empty
+ 66 evalIL' il SListStackType = start il SList.sListEmpty
+ 67
+ 68 start :: (SREvaluator Symbol s r m) => InstructionList -> s -> r -> DumpType -> m ()
+ 69 start il s r dt = logDump dt =<< next (CU (Vector.fromList il) 0 (IS [])) s r
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html
new file mode 100644
index 000000000..313df0c28
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Evaluator (
+ 2 next
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 6
+ 7 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 8
+ 9 import HelVM.HelMA.Automaton.Instruction
+ 10
+ 11 import HelVM.HelMA.Automaton.Units.ALU as Stack
+ 12 import HelVM.HelMA.Automaton.Units.CPU as CPU
+ 13 import HelVM.HelMA.Automaton.Units.LSU as LSU
+ 14 import HelVM.HelMA.Automaton.Units.Unit
+ 15
+ 16 import HelVM.HelIO.Containers.LLIndexSafe
+ 17
+ 18 import Control.Type.Operator
+ 19
+ 20 import Prelude hiding (swap)
+ 21
+ 22 next :: (SREvaluator Symbol s r m) => ControlUnit -> s -> r -> m $ Unit s r
+ 23 next (CU il ic is) s r = doInstruction' =<< indexSafe il ic where doInstruction' i = doInstruction i (CU il (ic+1) is) s r
+ 24
+ 25 stackNext :: (SREvaluator Symbol s r m) => ControlUnit -> r -> s -> m (Unit s r)
+ 26 stackNext cu r s = next cu s r
+ 27
+ 28 cuNext :: (SREvaluator Symbol s r m) => r -> ControlUnit -> s -> m (Unit s r)
+ 29 cuNext r cu s = next cu s r
+ 30
+ 31 ----
+ 32
+ 33 doInstruction :: (SREvaluator Symbol s r m) => Instruction -> ControlUnit -> s -> r -> m (Unit s r)
+ 34 doInstruction (IAL i) cu s r = stackNext cu r =<< alInstruction i s
+ 35 doInstruction (ILS i) cu s r = uncurry (next cu) . sluToTuple =<< slInstruction i (LSU s r)
+ 36 doInstruction (IControl i) cu s r = uncurry (cuNext r). cpuToTuple =<< controlInstruction i (CPU cu s)
+ 37 doInstruction End cu s r = pure $ Unit cu s r
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html
new file mode 100644
index 000000000..ac7fd28f0
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelMA.Automaton.API.IOTypes
+ 7 import HelVM.HelMA.Automaton.Types.TokenType
+ 8 import HelVM.HelMA.Automaton.WrapTokenList
+ 9
+ 10 -- | Lexer
+ 11
+ 12 tokenize :: TokenType -> Source -> TokenList
+ 13 tokenize VisibleTokenType = tokenizeVisible
+ 14 tokenize _ = tokenizeWhite
+ 15
+ 16 tokenizeVisible :: Source -> TokenList
+ 17 tokenizeVisible = unWrapTokenList . readVisibleTokens
+ 18
+ 19 tokenizeWhite :: Source -> TokenList
+ 20 tokenizeWhite = whiteTokenListToTokenList . unWrapTokenList . readWhiteTokens
+ 21
+ 22 readVisibleTokens :: Source -> VisibleTokens
+ 23 readVisibleTokens source = readTextUnsafe source :: VisibleTokens
+ 24
+ 25 readWhiteTokens :: Source -> WhiteTokens
+ 26 readWhiteTokens source = readTextUnsafe source :: WhiteTokens
+ 27
+ 28 type VisibleTokens = WrapTokenList TokenList
+ 29
+ 30 type WhiteTokens = WrapTokenList WhiteTokenList
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html
new file mode 100644
index 000000000..10bbf0b57
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.OperandParsers where
+ 2
+ 3 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 4 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 5
+ 6 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 7
+ 8 import HelVM.HelIO.Collections.SList
+ 9 import HelVM.HelIO.Control.Safe
+ 10 import HelVM.HelIO.Digit.ToDigit
+ 11
+ 12 type OperandParser m a = TokenList -> m (a , TokenList)
+ 13
+ 14 ----
+ 15
+ 16 parseIndex :: MonadSafe m => OperandParser m Index
+ 17 parseIndex = parseInt
+ 18
+ 19 parseSymbol :: MonadSafe m => OperandParser m Symbol
+ 20 parseSymbol = parseInteger
+ 21
+ 22 parseLabel :: MonadSafe m => Bool -> OperandParser m Label
+ 23 parseLabel False = parseDigitString
+ 24 parseLabel True = parseAsciiString
+ 25
+ 26 ----
+ 27
+ 28 parseInt :: MonadSafe m => OperandParser m Int
+ 29 parseInt tl = parseInt' <$> parseInteger tl where
+ 30 parseInt' (integer , tl') = (fromIntegral integer , tl')
+ 31
+ 32 parseInteger :: MonadSafe m => OperandParser m Integer
+ 33 parseInteger [] = liftError "EOL"
+ 34 parseInteger (S : tl) = parseUtil makeIntegral2FromList tl
+ 35 parseInteger (T : tl) = negationIntegral <$> parseUtil makeIntegral2FromList tl
+ 36 parseInteger (N : tl) = pure (0 , tl )
+ 37
+ 38 negationIntegral :: (Integer , TokenList) -> (Integer , TokenList)
+ 39 negationIntegral (i , l) = (-i , l)
+ 40
+ 41 parseNatural :: MonadSafe m => OperandParser m Natural
+ 42 parseNatural = parseUtil makeIntegral2FromList
+ 43
+ 44 parseUtil :: MonadSafe m => (TokenList -> m a) -> OperandParser m a
+ 45 parseUtil maker = go ([] :: TokenList) where
+ 46 go acc [] = liftError $ show acc
+ 47 go acc (N:tl) = moveSafe (maker acc , tl)
+ 48 go acc (t:tl) = go (t : acc) tl
+ 49
+ 50 parseDigitString :: MonadSafe m => OperandParser m SString
+ 51 parseDigitString tl = moveSafe =<< parseString' makeDigitStringFromList tl
+ 52
+ 53 parseAsciiString :: MonadSafe m => OperandParser m SString
+ 54 parseAsciiString tl = moveSafe =<< parseString' makeAsciiString28FromList tl
+ 55
+ 56 moveSafe :: MonadSafe m => (m a , TokenList) -> m (a , TokenList)
+ 57 moveSafe (a , tl) = appendErrorTuple ("TokenList" , show tl) $ ( , tl) <$> a
+ 58
+ 59 parseString' :: MonadSafe m => (TokenList -> a) -> OperandParser m a
+ 60 parseString' maker tl = parseString'' <$> splitByN tl where
+ 61 parseString'' (acc , tl') = (maker acc , tl')
+ 62
+ 63 splitByN :: MonadSafe m => OperandParser m TokenList
+ 64 splitByN [] = liftError "Empty list"
+ 65 splitByN (N : tl) = pure ([] , tl)
+ 66 splitByN (t : tl) = splitByN' <$> splitByN tl where
+ 67 splitByN' (acc , tl') = (t:acc , tl')
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html
new file mode 100644
index 000000000..a79a8c5e6
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Parser (
+ 2 flipParseVisible,
+ 3 flipParseWhite,
+ 4 parseVisible,
+ 5 parseWhite,
+ 6 parse,
+ 7 parseTL
+ 8 ) where
+ 9
+ 10 import HelVM.HelMA.Automata.WhiteSpace.Lexer
+ 11 import HelVM.HelMA.Automata.WhiteSpace.OperandParsers
+ 12 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 13
+ 14
+ 15 import HelVM.HelMA.Automaton.API.IOTypes
+ 16
+ 17 import HelVM.HelMA.Automaton.Instruction
+ 18 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 19 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 20 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 21 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 22
+ 23 import HelVM.HelMA.Automaton.Types.TokenType
+ 24
+ 25 import HelVM.HelIO.Control.Safe
+ 26
+ 27 flipParseVisible :: Bool -> Source -> Safe InstructionList
+ 28 flipParseVisible = flip parseVisible
+ 29
+ 30 flipParseWhite :: Bool -> Source -> Safe InstructionList
+ 31 flipParseWhite = flip parseWhite
+ 32
+ 33 parseVisible :: Source -> Bool -> Safe InstructionList
+ 34 parseVisible = parse VisibleTokenType
+ 35
+ 36 parseWhite :: Source -> Bool -> Safe InstructionList
+ 37 parseWhite = parse WhiteTokenType
+ 38
+ 39 parse :: MonadSafe m => TokenType -> Source -> Bool -> m InstructionList
+ 40 parse tokenType = flip parseTL . tokenize tokenType
+ 41
+ 42 parseTL :: MonadSafe m => Bool -> TokenList -> m InstructionList
+ 43 parseTL ascii = go where
+ 44 go :: MonadSafe m => TokenList -> m InstructionList
+ 45 go [] = pure []
+ 46 -- | IAL instructions
+ 47 go (S:S:tl') = go' =<< parseSymbol tl' where go' (symbol , tl'') = (IAL (Cons symbol) : ) <$> go tl''
+ 48 go (S:T:S:tl') = go' =<< parseIndex tl' where go' (index , tl'') = (IAL (SStatic index Copy) : ) <$> go tl''
+ 49 go (S:T:T:tl') = panic "STT" tl'
+ 50 go (S:T:N:tl') = go' =<< parseIndex tl' where go' (index , tl'') = (IAL (SStatic index Slide) : ) <$> go tl''
+ 51 go (S:N:S:tl') = (IAL Dup : ) <$> go tl'
+ 52 go (S:N:T:tl') = (IAL Swap : ) <$> go tl'
+ 53 go (S:N:N:tl') = (IAL Discard : ) <$> go tl'
+ 54 --Arithmetic
+ 55 go (T:S:S:S:tl') = (IAL (Binary Add) : ) <$> go tl'
+ 56 go (T:S:S:T:tl') = (IAL (Binary Sub) : ) <$> go tl'
+ 57 go (T:S:S:N:tl') = (IAL (Binary Mul) : ) <$> go tl'
+ 58 go (T:S:T:S:tl') = (IAL (Binary Div) : ) <$> go tl'
+ 59 go (T:S:T:T:tl') = (IAL (Binary Mod) : ) <$> go tl'
+ 60 go (T:S:T:N:tl') = panic "TSTN" tl'
+ 61 go (T:S:N:S:tl') = panic "TSNS" tl'
+ 62 go (T:S:N:T:tl') = panic "TSNT" tl'
+ 63 go (T:S:N:N:tl') = panic "TSNN" tl'
+ 64 -- | Heap access
+ 65 go (T:T:S:tl') = (ILS Store : ) <$> go tl'
+ 66 go (T:T:T:tl') = (ILS Load : ) <$> go tl'
+ 67 go (T:T:N:tl') = panic "TTN" tl'
+ 68 -- | IControl
+ 69 go (N:S:S:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (Mark label) : ) <$> go tl''
+ 70 go (N:S:T:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label Call ) : ) <$> go tl''
+ 71 go (N:S:N:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label Jump ) : ) <$> go tl''
+ 72 go (N:T:S:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label (Branch EZ)) : ) <$> go tl''
+ 73 go (N:T:T:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label (Branch LTZ)) : ) <$> go tl''
+ 74 go (N:T:N:tl') = (IControl Return : ) <$> go tl'
+ 75 go (N:N:S:tl') = panic "NNS" tl'
+ 76 go (N:N:T:tl') = panic "NNT" tl'
+ 77 go (N:N:N:tl') = (End : ) <$> go tl'
+ 78 -- | IO instructions
+ 79 go (T:N:S:S:tl') = (IAL (SIO OutputChar) : ) <$> go tl'
+ 80 go (T:N:S:T:tl') = (IAL (SIO OutputDec) : ) <$> go tl'
+ 81 go (T:N:S:N:tl') = panic "TNSN" tl'
+ 82 go (T:N:T:S:tl') = (ILS (MIO InputChar) : ) <$> go tl'
+ 83 go (T:N:T:T:tl') = (ILS (MIO InputDec) : ) <$> go tl'
+ 84 go (T:N:T:N:tl') = panic "TNTN" tl'
+ 85 go (T:N:N:S:tl') = panic "TNNS" tl'
+ 86 go (T:N:N:T:tl') = panic "TNNT" tl'
+ 87 go (T:N:N:N:tl') = panic "TNNN" tl'
+ 88 go tl' = panic (show tl') []
+ 89
+ 90 panic :: MonadSafe m => Text -> TokenList -> m InstructionList
+ 91 panic token tl = liftErrorTupleList [("Unrecognised tokenl" , token) , ("Rest tokens" , show tl)]
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html
new file mode 100644
index 000000000..7097b0beb
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.SimpleParams where
+ 2
+ 3 import HelVM.HelMA.Automaton.API.IOTypes
+ 4 import HelVM.HelMA.Automaton.Types.DumpType
+ 5 import HelVM.HelMA.Automaton.Types.RAMType
+ 6 import HelVM.HelMA.Automaton.Types.StackType
+ 7 import HelVM.HelMA.Automaton.Types.TokenType
+ 8
+ 9 -- | Construction for tests
+ 10 simpleParamsWithDefaultsAndWhiteTokenType :: Bool -> Source -> SimpleParams
+ 11 simpleParamsWithDefaultsAndWhiteTokenType = simpleParamsWithDefaults WhiteTokenType
+ 12
+ 13 simpleParamsWithDefaultsAndVisibleTokenType :: Bool -> Source -> SimpleParams
+ 14 simpleParamsWithDefaultsAndVisibleTokenType = simpleParamsWithDefaults VisibleTokenType
+ 15
+ 16 simpleParamsWithDefaults :: TokenType -> Bool -> Source -> SimpleParams
+ 17 simpleParamsWithDefaults tt = simpleParams tt (defaultStackType , defaultRAMType)
+ 18
+ 19 -- | Construction for benchmark
+ 20 simpleParamsWithWhiteTokenType :: (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 21 simpleParamsWithWhiteTokenType = simpleParams WhiteTokenType
+ 22
+ 23 simpleParamsWithVisibleTokenType :: (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 24 simpleParamsWithVisibleTokenType = simpleParams VisibleTokenType
+ 25
+ 26 simpleParams :: TokenType -> (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 27 simpleParams tt (st , rt) al s = SimpleParams
+ 28 { tokenType = tt
+ 29 , source = s
+ 30 , asciiLabel = al
+ 31 , stackType = st
+ 32 , ramType = rt
+ 33 , dumpType = Pretty
+ 34 }
+ 35
+ 36 -- | Type
+ 37 data SimpleParams = SimpleParams
+ 38 { tokenType :: !TokenType
+ 39 , source :: !Source
+ 40 , asciiLabel :: !Bool
+ 41 , stackType :: !StackType
+ 42 , ramType :: !RAMType
+ 43 , dumpType :: !DumpType
+ 44 }
+ 45
+ 46
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html
new file mode 100644
index 000000000..6cb7c3008
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Token where
+ 2
+ 3 import HelVM.HelIO.Collections.SList
+ 4 import HelVM.HelIO.Control.Safe
+ 5 import HelVM.HelIO.Digit.ToDigit
+ 6
+ 7 import Text.Read
+ 8
+ 9 import qualified Text.Show
+ 10
+ 11 data Token = S | T | N
+ 12 deriving stock (Bounded , Enum , Eq , Read , Show )
+ 13
+ 14 type TokenList = [Token]
+ 15 type TokenSList = SList Token
+ 16
+ 17 instance ToDigit Token where
+ 18 toDigit S = pure 0
+ 19 toDigit T = pure 1
+ 20 toDigit t = liftErrorWithPrefix "Wrong token" $ show t
+ 21
+ 22 ----
+ 23
+ 24 newtype WhiteToken = WhiteToken { unWhiteToken :: Token}
+ 25 deriving stock (Eq )
+ 26
+ 27 instance Show WhiteToken where
+ 28 show (WhiteToken S) = " "
+ 29 show (WhiteToken T) = "\t"
+ 30 show (WhiteToken N) = "\n"
+ 31
+ 32 -- | Scanner
+ 33 instance Read WhiteToken where
+ 34 readsPrec _ " " = [( WhiteToken S , "")]
+ 35 readsPrec _ "\t" = [( WhiteToken T , "")]
+ 36 readsPrec _ "\n" = [( WhiteToken N , "")]
+ 37 readsPrec _ _ = []
+ 38
+ 39 type WhiteTokenList = [WhiteToken]
+ 40
+ 41 whiteTokenListToTokenList :: WhiteTokenList -> TokenList
+ 42 whiteTokenListToTokenList = fmap unWhiteToken
+ 43
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html
new file mode 100644
index 000000000..5aabe2f22
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Automaton (
+ 2 evalParams,
+ 3 eval,
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automata.Zot.Evaluator
+ 7 import HelVM.HelMA.Automata.Zot.Expression
+ 8 import HelVM.HelMA.Automata.Zot.Parser
+ 9
+ 10 import HelVM.HelMA.Automaton.API.EvalParams
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14
+ 15 import HelVM.HelIO.Containers.Util
+ 16 import HelVM.HelIO.Control.Safe
+ 17
+ 18 import HelVM.HelIO.Digit.Digitable
+ 19 import HelVM.HelIO.Digit.ToDigit
+ 20
+ 21 import HelVM.HelIO.ListLikeUtil
+ 22
+ 23 import Control.Monad.Writer.Lazy
+ 24
+ 25 evalParams :: BIO m => EvalParams -> m ()
+ 26 evalParams p = wPutStr =<< eval (asciiLabel p) (source p) =<< wGetContents
+ 27
+ 28 eval :: MonadSafe m => Bool -> Source -> Input -> m Output
+ 29 eval False source input = pure $ showFoldable $ evalSource source input
+ 30 eval True source input = (makeAsciiText28 . convert . evalSource source) . showExpressionList =<< textToDL input
+ 31
+ 32 evalSource :: Source -> Input -> ExpressionDList
+ 33 evalSource source input = evalText $ source <> input
+ 34
+ 35 evalText :: Text -> ExpressionDList
+ 36 evalText = execWriter . evalExpressionList . parse
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html
new file mode 100644
index 000000000..6a1b85405
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Evaluator (
+ 2 evalExpressionList,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.Zot.Expression
+ 6
+ 7 import Control.Monad.Writer.Lazy
+ 8
+ 9 import qualified Data.ListLike as LL
+ 10
+ 11 -- | High-level Expressions
+ 12 evalExpressionList :: ExpressionList -> Out Expression
+ 13 evalExpressionList el = foldExpression el >><< outputExpression >>< printExpression
+ 14
+ 15 foldExpression :: ExpressionList -> Out Expression
+ 16 foldExpression = foldM (><) emptyExpression
+ 17
+ 18 emptyExpression :: Expression
+ 19 emptyExpression = contExpression iExpression
+ 20
+ 21 outputExpression :: Out Expression
+ 22 outputExpression = kExpression ><< kExpression ><< kExpression ><< kExpression ><< kExpression ><< kExpression >< iExpression
+ 23
+ 24 printExpression :: Expression
+ 25 printExpression = Expression innerPrintExpression
+ 26
+ 27 innerPrintExpression :: Expression -> Out Expression
+ 28 innerPrintExpression f = interrogateExpression f >>< Zero >>< One >>= tell . LL.singleton >> pure printExpression
+ 29
+ 30 interrogateExpression :: Expression -> Out Expression
+ 31 interrogateExpression f = f >< iExpression >>< iExpression >>< iExpression >>< kExpression
+ 32
+ 33 -- | Operators
+ 34 infixl 9 ><
+ 35 (><) :: Expression -> Expression -> Out Expression
+ 36 (><) Zero = (zeroExpression ><)
+ 37 (><) One = (oneExpression ><)
+ 38 (><) (Expression f) = f
+ 39
+ 40 infixl 6 >><
+ 41 (>><) :: Out Expression -> Expression -> Out Expression
+ 42 f >>< a = f >>= (>< a)
+ 43
+ 44 infixr 8 ><<
+ 45 (><<) :: Expression -> Out Expression -> Out Expression
+ 46 f ><< a = (f ><) =<< a
+ 47
+ 48 infixl 7 >><<
+ 49 (>><<) :: Out Expression -> Out Expression -> Out Expression
+ 50 f >><< a = f >>= (><< a)
+ 51
+ 52
+ 53 -- | Low-level Expressions
+ 54 zeroExpression :: Expression
+ 55 zeroExpression = contExpression $ Expression $ \ f -> f >< sExpression >>< kExpression
+ 56
+ 57 oneExpression :: Expression
+ 58 oneExpression = makeExpression $ \c -> contExpression $ makeExpression $ \l -> contExpression $ Expression $ \r -> c ><< l >< r
+ 59
+ 60 contExpression :: Expression -> Expression
+ 61 contExpression = Expression . flip (><)
+ 62
+ 63 sExpression :: Expression
+ 64 sExpression = makeExpression $ \x -> makeExpression $ \y -> Expression $ \z -> x >< z >><< y >< z
+ 65
+ 66 kExpression :: Expression
+ 67 kExpression = makeExpression $ makeExpression . const
+ 68
+ 69 iExpression :: Expression
+ 70 iExpression = makeExpression id
+ 71
+ 72 makeExpression :: (Expression -> Expression) -> Expression
+ 73 makeExpression f = Expression $ pure . f
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html
new file mode 100644
index 000000000..1176a44b3
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Expression where
+ 2
+ 3 import HelVM.HelIO.Control.Safe
+ 4
+ 5 import HelVM.HelIO.Containers.Util
+ 6 import HelVM.HelIO.Digit.Digitable
+ 7 import HelVM.HelIO.Digit.ToDigit
+ 8
+ 9 import Control.Monad.Writer.Lazy
+ 10
+ 11 import qualified Data.DList as D
+ 12
+ 13 import Text.Read
+ 14 import qualified Text.Show
+ 15
+ 16 showExpressionList :: ExpressionList -> Text
+ 17 showExpressionList = showFoldable
+ 18
+ 19 readExpressionList :: Text -> ExpressionList
+ 20 readExpressionList = stringToExpressionList . toString
+ 21
+ 22 stringToExpressionList :: String -> ExpressionList
+ 23 stringToExpressionList s = charToExpressionList =<< s
+ 24
+ 25 charToExpressionList :: Char -> ExpressionList
+ 26 charToExpressionList = maybeToList . rightToMaybe . charToExpressionSafe
+ 27
+ 28 charToExpression :: Char -> Expression
+ 29 charToExpression = unsafe . charToExpressionSafe
+ 30
+ 31 charToExpressionSafe :: MonadSafe m => Char -> m Expression
+ 32 charToExpressionSafe '0' = pure Zero
+ 33 charToExpressionSafe '1' = pure One
+ 34 charToExpressionSafe c = liftErrorWithPrefix "charToExpression" $ one c
+ 35
+ 36 -- | Types
+ 37 type ExpressionDList = D.DList Expression
+ 38
+ 39 type ExpressionList = [Expression]
+ 40
+ 41 data Expression = Zero | One | Expression (Expression -> Out Expression)
+ 42
+ 43 type Out = Writer ExpressionDList
+ 44
+ 45 instance Read Expression where
+ 46 readsPrec _ [] = []
+ 47 readsPrec _ (c : s) = [(charToExpression c , s)]
+ 48 readList s = [(stringToExpressionList s , "")]
+ 49
+ 50 instance Show Expression where
+ 51 show Zero = "0"
+ 52 show One = "1"
+ 53 show (Expression _) = "function"
+ 54 showList fs = (concatMap show fs <>)
+ 55
+ 56 instance Digitable Expression where
+ 57 fromDigit 0 = pure Zero
+ 58 fromDigit 1 = pure One
+ 59 fromDigit t = wrongToken t
+ 60
+ 61 instance ToDigit Expression where
+ 62 toDigit Zero = pure 0
+ 63 toDigit One = pure 1
+ 64 toDigit t = wrongToken t
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html
new file mode 100644
index 000000000..d8a3a6160
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Parser (
+ 2 parse,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.Zot.Expression
+ 6
+ 7 import qualified Data.Text as Text
+ 8
+ 9 parse :: Text -> ExpressionList
+ 10 parse = concatMap parseLine . lines
+ 11
+ 12 parseLine :: Text -> ExpressionList
+ 13 parseLine = readExpressionList . filter01 . Text.takeWhile (/= '#')
+ 14
+ 15 filter01 :: Text -> Text
+ 16 filter01 = Text.filter is01
+ 17
+ 18 is01 :: Char -> Bool
+ 19 is01 c = c == '0' || c == '1'
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html
new file mode 100644
index 000000000..8b25d1153
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.API.EvalParams where
+ 2
+ 3 import HelVM.HelMA.Automaton.API.IOTypes
+ 4 import HelVM.HelMA.Automaton.API.TypeOptions
+ 5
+ 6 import HelVM.HelMA.Automaton.Types.CellType
+ 7 import HelVM.HelMA.Automaton.Types.DumpType
+ 8 import HelVM.HelMA.Automaton.Types.IntCellType
+ 9 import HelVM.HelMA.Automaton.Types.RAMType
+ 10 import HelVM.HelMA.Automaton.Types.StackType
+ 11
+ 12 -- | Accessors
+ 13 ramTypeOptions :: EvalParams -> RAMType
+ 14 ramTypeOptions = ram . typeOptions
+ 15
+ 16 stackTypeOptions :: EvalParams -> StackType
+ 17 stackTypeOptions = stack . typeOptions
+ 18
+ 19 cellTypeOptions :: EvalParams -> CellType
+ 20 cellTypeOptions = cell . typeOptions
+ 21
+ 22 intCellTypeOptions :: EvalParams -> IntCellType
+ 23 intCellTypeOptions = intCell . typeOptions
+ 24
+ 25 dumpTypeOptions :: EvalParams -> DumpType
+ 26 dumpTypeOptions = dumpType . typeOptions
+ 27
+ 28 -- | Type
+ 29 data EvalParams = EvalParams
+ 30 { compile :: !Bool
+ 31 , asciiLabel :: !Bool
+ 32 , source :: !Source
+ 33 , typeOptions :: !TypeOptions
+ 34 }
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html
new file mode 100644
index 000000000..363cc695b
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.API.TypeOptions where
+ 2
+ 3 import HelVM.HelMA.Automaton.Types.CellType
+ 4 import HelVM.HelMA.Automaton.Types.DumpType
+ 5 import HelVM.HelMA.Automaton.Types.IntCellType
+ 6 import HelVM.HelMA.Automaton.Types.RAMType
+ 7 import HelVM.HelMA.Automaton.Types.StackType
+ 8
+ 9 -- | Types
+ 10
+ 11 data TypeOptions = TypeOptions
+ 12 { ram :: !RAMType
+ 13 , stack :: !StackType
+ 14 , cell :: !CellType
+ 15 , intCell :: !IntCellType
+ 16 , dumpType :: !DumpType
+ 17 }
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html
new file mode 100644
index 000000000..031ebb36b
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.IO.BusinessIO (
+ 2
+ 3 Element,
+ 4 BIO,
+ 5 BusinessIO,
+ 6
+ 7 wPutAsChar,
+ 8 wPutAsDec,
+ 9 wGetCharAs,
+ 10 wGetDecAs,
+ 11
+ 12 -- wPutIntAsChar,
+ 13 -- wPutIntAsDec,
+ 14 -- wGetCharAsInt,
+ 15 -- wGetDecAsInt,
+ 16
+ 17 wGetChar,
+ 18 wPutChar,
+ 19 wGetLine,
+ 20 wGetContents,
+ 21 wPutStr,
+ 22 wPutStrLn,
+ 23 wFlush,
+ 24 wLogStr,
+ 25 wLogStrLn,
+ 26 wLogShow,
+ 27
+ 28 logStr,
+ 29 flush,
+ 30 ) where
+ 31
+ 32 import HelVM.HelIO.Control.Control
+ 33 import HelVM.HelIO.Control.Safe
+ 34
+ 35 import HelVM.HelIO.ReadText
+ 36
+ 37 import Data.Default as Default
+ 38 import Data.Text.IO (getContents)
+ 39
+ 40 import System.IO hiding (getContents, getLine, hFlush, stderr, stdout)
+ 41
+ 42 type Element e = (ReadShow e , Integral e , Default e)
+ 43 type ReadShow e = (Read e , Show e)
+ 44 type BIO m = (MonadControl m , BusinessIO m)
+ 45
+ 46 class Monad m => BusinessIO m where
+ 47
+ 48 wPutAsChar :: Integral v => v -> m ()
+ 49 wPutAsDec :: Integral v => v -> m ()
+ 50 wGetCharAs :: Integral v => m v
+ 51 wGetDecAs :: Integral v => m v
+ 52
+ 53 wPutIntAsChar :: Int -> m ()
+ 54 wPutIntAsDec :: Int -> m ()
+ 55 wGetCharAsInt :: m Int
+ 56 wGetDecAsInt :: m Int
+ 57
+ 58 wGetChar :: m Char
+ 59 wGetLine :: m Text
+ 60 wGetContents :: m Text
+ 61 wPutChar :: Char -> m ()
+ 62 wPutStr :: Text -> m ()
+ 63 wPutStrLn :: Text -> m ()
+ 64 wLogStr :: Text -> m ()
+ 65 wLogStrLn :: Text -> m ()
+ 66 wLogShow :: Show s => s -> m ()
+ 67 wFlush :: m ()
+ 68
+ 69 wPutAsChar = wPutIntAsChar . fromIntegral
+ 70 wPutAsDec = wPutIntAsDec . fromIntegral
+ 71 wGetCharAs = fromIntegral <$> wGetCharAsInt
+ 72 wGetDecAs = fromIntegral <$> wGetDecAsInt
+ 73
+ 74 wPutIntAsChar = wPutChar . chr
+ 75 wPutIntAsDec = wPutStr . show
+ 76 wGetCharAsInt = ord <$> wGetChar
+ 77 wGetDecAsInt = readTextUnsafe <$> wGetLine
+ 78
+ 79 wPutStrLn s = wPutStr $ s <> "\n"
+ 80 wLogStrLn s = wLogStr $ s <> "\n"
+ 81 wLogShow = wLogStrLn . show
+ 82 wFlush = pass
+ 83
+ 84 logStr :: Text -> IO ()
+ 85 logStr = hPutStrLn stderr . toString
+ 86
+ 87 flush :: IO ()
+ 88 flush = hFlush stdout
+ 89
+ 90 instance BusinessIO IO where
+ 91 wGetChar = getChar
+ 92 wGetLine = getLine
+ 93 wGetContents = getContents
+ 94 wPutChar = putChar
+ 95 wPutStr = putText
+ 96 wPutStrLn = putTextLn
+ 97 wLogStr = logStr
+ 98 wFlush = flush
+ 99
+ 100 type ExceptTLegacy = ExceptT String
+ 101
+ 102 exceptTLegacy :: Monad m => m a -> ExceptTLegacy m a
+ 103 exceptTLegacy a = ExceptT $ pure <$> a
+ 104
+ 105 instance BusinessIO (ExceptT String IO) where --FIXXME
+ 106 wGetChar = exceptTLegacy getChar
+ 107 wGetLine = exceptTLegacy getLine
+ 108 wGetContents = exceptTLegacy getContents
+ 109 wPutChar = exceptTLegacy . putChar
+ 110 wPutStr = exceptTLegacy . putText
+ 111 wPutStrLn = exceptTLegacy . putTextLn
+ 112 wLogStr = exceptTLegacy . logStr
+ 113 wFlush = exceptTLegacy flush
+ 114
+ 115 instance BusinessIO (SafeT IO) where
+ 116 wGetChar = safeT getChar
+ 117 wGetLine = safeT getLine
+ 118 wGetContents = safeT getContents
+ 119 wPutChar = safeT . putChar
+ 120 wPutStr = safeT . putText
+ 121 wPutStrLn = safeT . putTextLn
+ 122 wLogStr = safeT . logStr
+ 123 wFlush = safeT flush
+ 124
+ 125 instance BusinessIO (ControlT IO) where
+ 126 wGetChar = controlT getChar
+ 127 wGetLine = controlT getLine
+ 128 wGetContents = controlT getContents
+ 129 wPutChar = controlT . putChar
+ 130 wPutStr = controlT . putText
+ 131 wPutStrLn = controlT . putTextLn
+ 132 wLogStr = controlT . logStr
+ 133 wFlush = controlT flush
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html
new file mode 100644
index 000000000..6d53f1fda
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 {-# LANGUAGE DeriveFunctor #-}
+ 2 module HelVM.HelMA.Automaton.IO.FreeIO (
+ 3 interpretFreeIOToBusinessIO,
+ 4 logInput,
+ 5 logOutput,
+ 6 FreeIO,
+ 7 ) where
+ 8
+ 9 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 10
+ 11 import HelVM.HelIO.Control.Control
+ 12 import HelVM.HelIO.Control.Safe
+ 13
+ 14 import Control.Monad.Free
+ 15 import Control.Natural
+ 16
+ 17 interpretFreeIOToBusinessIO :: BusinessIO m => FreeIO a -> m a
+ 18 interpretFreeIOToBusinessIO = foldFree interpretFreeIOFToBusinessIO
+ 19
+ 20 logInput :: FreeIO ~> FreeIO
+ 21 logInput = foldFree logInputF
+ 22
+ 23 logOutput :: FreeIO ~> FreeIO
+ 24 logOutput = foldFree logOutputF
+ 25
+ 26 ----
+ 27
+ 28 interpretFreeIOFToBusinessIO :: BusinessIO m => FreeIOF a -> m a
+ 29 interpretFreeIOFToBusinessIO (GetChar cd) = cd <$> wGetChar
+ 30 interpretFreeIOFToBusinessIO (GetLine cd) = cd <$> wGetLine
+ 31 interpretFreeIOFToBusinessIO (GetContents cd) = cd <$> wGetContents
+ 32 interpretFreeIOFToBusinessIO (PutChar c v) = wPutChar c $> v
+ 33 interpretFreeIOFToBusinessIO (PutStr s v) = wPutStr s $> v
+ 34 interpretFreeIOFToBusinessIO (PutStrLn s v) = wPutStrLn s $> v
+ 35 interpretFreeIOFToBusinessIO (LogStr s v) = wLogStr s $> v
+ 36 interpretFreeIOFToBusinessIO (LogStrLn s v) = wLogStrLn s $> v
+ 37 interpretFreeIOFToBusinessIO (Flush v) = wFlush $> v
+ 38
+ 39 ----
+ 40
+ 41 logInputF :: FreeIOF a -> FreeIO a
+ 42 logInputF (GetChar cd) = freeGetChar >>= (\c -> liftF $ LogStr (one c) (cd c))
+ 43 logInputF (GetLine cd) = freeGetLine >>= (\l -> liftF $ LogStr l (cd l))
+ 44 logInputF (GetContents cd) = freeGetContents >>= (\l -> liftF $ LogStr l (cd l))
+ 45 logInputF f = liftF f
+ 46
+ 47 logOutputF :: FreeIOF a -> FreeIO a
+ 48 logOutputF f@(PutChar c v) = liftF (LogStr (one c) v) *> liftF f
+ 49 logOutputF f@(PutStr s v) = liftF (LogStr s v) *> liftF f
+ 50 logOutputF f = liftF f
+ 51
+ 52 -- | Instances
+ 53 instance BusinessIO FreeIO where
+ 54 wGetChar = freeGetChar
+ 55 wGetLine = freeGetLine
+ 56 wGetContents = freeGetContents
+ 57 wPutChar = freePutChar
+ 58 wPutStr = freePutStr
+ 59 wPutStrLn = freePutStrLn
+ 60 wLogStr = freeLogStr
+ 61 wLogStrLn = freeLogStrLn
+ 62 wFlush = freeFlush
+ 63
+ 64 instance BusinessIO (SafeT FreeIO) where
+ 65 wGetChar = safeT freeGetChar
+ 66 wGetLine = safeT freeGetLine
+ 67 wGetContents = safeT freeGetContents
+ 68 wPutChar = safeT . freePutChar
+ 69 wPutStr = safeT . freePutStr
+ 70 wPutStrLn = safeT . freePutStrLn
+ 71 wLogStr = safeT . freeLogStr
+ 72 wLogStrLn = safeT . freeLogStrLn
+ 73 wFlush = safeT freeFlush
+ 74
+ 75 instance BusinessIO (ControlT FreeIO) where
+ 76 wGetChar = controlT freeGetChar
+ 77 wGetLine = controlT freeGetLine
+ 78 wGetContents = controlT freeGetContents
+ 79 wPutChar = controlT . freePutChar
+ 80 wPutStr = controlT . freePutStr
+ 81 wPutStrLn = controlT . freePutStrLn
+ 82 wLogStr = controlT . freeLogStr
+ 83 wLogStrLn = controlT . freeLogStrLn
+ 84 wFlush = controlT freeFlush
+ 85
+ 86 -- | Low level functions
+ 87 freeGetChar :: FreeIO Char
+ 88 freeGetChar = liftF $ GetChar id
+ 89
+ 90 freeGetLine :: FreeIO Text
+ 91 freeGetLine = liftF $ GetLine id
+ 92
+ 93 freeGetContents :: FreeIO Text
+ 94 freeGetContents = liftF $ GetContents id
+ 95
+ 96 freePutChar :: Char -> FreeIO ()
+ 97 freePutChar = liftF . flip PutChar ()
+ 98
+ 99 freePutStr :: Text -> FreeIO ()
+ 100 freePutStr = liftF . flip PutStr ()
+ 101
+ 102 freePutStrLn :: Text -> FreeIO ()
+ 103 freePutStrLn = liftF . flip PutStrLn ()
+ 104
+ 105 freeLogStr :: Text -> FreeIO ()
+ 106 freeLogStr = liftF . flip LogStr ()
+ 107
+ 108 freeLogStrLn :: Text -> FreeIO ()
+ 109 freeLogStrLn = liftF . flip LogStrLn ()
+ 110
+ 111 freeFlush :: FreeIO ()
+ 112 freeFlush = liftF $ Flush ()
+ 113
+ 114 -- | Types
+ 115 type FreeIO = Free FreeIOF
+ 116
+ 117 data FreeIOF a
+ 118 = GetChar (Char -> a)
+ 119 | GetLine (Text -> a)
+ 120 | GetContents (Text -> a)
+ 121 | PutChar Char a
+ 122 | PutStr Text a
+ 123 | PutStrLn Text a
+ 124 | LogStr Text a
+ 125 | LogStrLn Text a
+ 126 | Flush a
+ 127 deriving stock (Functor )
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html
new file mode 100644
index 000000000..4bbc46214
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.IO.MockIO (
+ 2 ioExecMockIOBatch,
+ 3 ioExecMockIOWithInput,
+ 4
+ 5 safeExecMockIOBatch,
+ 6 safeExecMockIOWithInput,
+ 7
+ 8 execMockIOBatch,
+ 9 execMockIOWithInput,
+ 10
+ 11 runMockIO,
+ 12 createMockIO,
+ 13 calculateOutput,
+ 14 calculateLogged,
+ 15
+ 16 MockIO,
+ 17 MockIOData,
+ 18 ) where
+ 19
+ 20 import HelVM.HelMA.Automaton.API.IOTypes
+ 21 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 22
+ 23 import HelVM.HelIO.Control.Control
+ 24 import HelVM.HelIO.Control.Safe
+ 25
+ 26 import HelVM.HelIO.ListLikeUtil
+ 27
+ 28 import Data.Text as Text
+ 29
+ 30 ioExecMockIOBatch :: ControlT MockIO () -> IO MockIOData
+ 31 ioExecMockIOBatch = ioExecMockIOWithInput ""
+ 32
+ 33 ioExecMockIOWithInput :: Input -> ControlT MockIO () -> IO MockIOData
+ 34 ioExecMockIOWithInput i = safeToIO . safeExecMockIOWithInput i
+ 35
+ 36 safeExecMockIOBatch :: ControlT MockIO () -> Safe MockIOData
+ 37 safeExecMockIOBatch = safeExecMockIOWithInput ""
+ 38
+ 39 safeExecMockIOWithInput :: Input -> ControlT MockIO () -> Safe MockIOData
+ 40 safeExecMockIOWithInput i = pure . runMockIO i . runControlT
+ 41
+ 42 execMockIOBatch :: MockIO () -> MockIOData
+ 43 execMockIOBatch = execMockIOWithInput ""
+ 44
+ 45 execMockIOWithInput :: Input -> MockIO () -> MockIOData
+ 46 execMockIOWithInput i a = runMockIO i $ safeWithMessages <$> a
+ 47
+ 48 ----
+ 49
+ 50 runMockIO :: Input -> MockIO UnitSafeWithMessages -> MockIOData
+ 51 runMockIO i mockIO = flip mockDataLogStr mockIOData $ safeWithMessagesToText s
+ 52 where (s , mockIOData) = runState mockIO $ createMockIO i
+ 53
+ 54 createMockIO :: Input -> MockIOData
+ 55 createMockIO i = MockIOData (toString i) "" ""
+ 56
+ 57 calculateOutput :: MockIOData -> Output
+ 58 calculateOutput = calculateText . output
+ 59
+ 60 calculateLogged :: MockIOData -> Output
+ 61 calculateLogged = calculateText . logged
+ 62
+ 63 ----
+ 64
+ 65 instance BusinessIO MockIO where
+ 66 wGetChar = mockGetChar
+ 67 wGetLine = mockGetLine
+ 68 wGetContents = mockGetContent
+ 69 wPutChar = mockPutChar
+ 70 wPutStr = mockPutStr
+ 71 wLogStr = mockLogStr
+ 72
+ 73 instance BusinessIO (SafeT MockIO) where
+ 74 wGetChar = safeT mockGetChar
+ 75 wGetLine = safeT mockGetLine
+ 76 wGetContents = safeT mockGetContent
+ 77 wPutChar = safeT . mockPutChar
+ 78 wPutStr = safeT . mockPutStr
+ 79 wLogStr = safeT . mockLogStr
+ 80
+ 81 instance BusinessIO (ControlT MockIO) where
+ 82 wGetChar = mockGetCharSafe
+ 83 wGetLine = mockGetLineSafe
+ 84 wGetContents = controlT mockGetContent
+ 85 wPutChar = controlT . mockPutChar
+ 86 wPutStr = controlT . mockPutStr
+ 87 wLogStr = controlT . mockLogStr
+ 88
+ 89 ----
+ 90
+ 91 mockGetChar :: MonadMockIO m => m Char
+ 92 mockGetChar = mockGetChar' =<< get where
+ 93 mockGetChar' :: MonadMockIO m => MockIOData -> m Char
+ 94 mockGetChar' mockIO = orErrorTuple ("mockGetChar" , show mockIO) (top (input mockIO)) <$ put mockIO { input = orErrorTuple ("mockGetChar" , show mockIO) $ discard $ input mockIO }
+ 95
+ 96 mockGetLine :: MonadMockIO m => m Text
+ 97 mockGetLine = mockGetLine' =<< get where
+ 98 mockGetLine' :: MonadMockIO m => MockIOData -> m Text
+ 99 mockGetLine' mockIO = toText line <$ put mockIO { input = input' } where (line , input') = splitStringByLn $ input mockIO
+ 100
+ 101 mockGetContent :: MonadMockIO m => m Text
+ 102 mockGetContent = mockGetContent' =<< get where
+ 103 mockGetContent' :: MonadMockIO m => MockIOData -> m Text
+ 104 mockGetContent' mockIO = toText content <$ put mockIO { input = "" } where content = input mockIO
+ 105
+ 106 mockGetCharSafe :: MonadControlMockIO m => m Char
+ 107 mockGetCharSafe = mockGetChar' =<< get where
+ 108 mockGetChar' :: MonadControlMockIO m => MockIOData -> m Char
+ 109 mockGetChar' mockIO = appendErrorTuple ("mockGetCharSafe" , show mockIO) $ mockGetChar'' =<< unconsSafe (input mockIO) where
+ 110 mockGetChar'' (c, input') = put mockIO { input = input' } $> c
+ 111
+ 112 mockGetLineSafe :: MonadControlMockIO m => m Text
+ 113 mockGetLineSafe = mockGetLine' =<< get where
+ 114 mockGetLine' :: MonadControlMockIO m => MockIOData -> m Text
+ 115 mockGetLine' mockIO = toText line <$ put mockIO { input = input' } where (line , input') = splitStringByLn $ input mockIO
+ 116
+ 117
+ 118 mockPutChar :: Char -> MockIO ()
+ 119 mockPutChar = modify . mockDataPutChar
+ 120
+ 121 mockPutStr :: Text -> MockIO ()
+ 122 mockPutStr = modify . mockDataPutStr
+ 123
+ 124 mockLogStr :: Text -> MockIO ()
+ 125 mockLogStr = modify . mockDataLogStr
+ 126
+ 127 ----
+ 128
+ 129 mockDataPutChar :: Char -> MockIOData -> MockIOData
+ 130 mockDataPutChar char mockIO = mockIO { output = char : output mockIO }
+ 131
+ 132 mockDataPutStr :: Text -> MockIOData -> MockIOData
+ 133 mockDataPutStr text mockIO = mockIO { output = calculateString text <> output mockIO }
+ 134
+ 135 mockDataLogStr :: Text -> MockIOData -> MockIOData
+ 136 mockDataLogStr text mockIO = mockIO { logged = calculateString text <> logged mockIO }
+ 137
+ 138 ----
+ 139
+ 140 type MonadControlMockIO m = (MonadMockIO m , MonadControl m)
+ 141
+ 142 --type MonadSafeMockIO m = (MonadMockIO m , MonadSafe m)
+ 143
+ 144 type MonadMockIO m = MonadState MockIOData m
+ 145
+ 146 type MockIO = State MockIOData
+ 147
+ 148 calculateText :: String -> Output
+ 149 calculateText = Text.reverse . toText
+ 150
+ 151 calculateString :: Output -> String
+ 152 calculateString = toString . Text.reverse
+ 153
+ 154 data MockIOData = MockIOData
+ 155 { input :: !String
+ 156 , output :: !String
+ 157 , logged :: !String
+ 158 }
+ 159 deriving stock (Eq , Read , Show )
+ 160
+ 161 ----
+ 162
+ 163 splitStringByLn :: String -> (String , String)
+ 164 splitStringByLn = splitBy '\n'
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html
new file mode 100644
index 000000000..55759ae7a
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.ALInstruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 4
+ 5 -- | Constructors
+ 6
+ 7 blAnd :: Bool -> BinaryInstruction
+ 8 blAnd False = BAnd
+ 9 blAnd True = LAnd
+ 10
+ 11 blOr :: Bool -> BinaryInstruction
+ 12 blOr False = BOr
+ 13 blOr True = LOr
+ 14
+ 15 blXor :: Bool -> BinaryInstruction
+ 16 blXor False = BXor
+ 17 blXor True = LXor
+ 18
+ 19 blEQ :: Bool -> BinaryInstruction
+ 20 blEQ False = BEQ
+ 21 blEQ True = LEQ
+ 22
+ 23 blGT :: Bool -> BinaryInstruction
+ 24 blGT False = BGT
+ 25 blGT True = LGT
+ 26
+ 27 -- | Other functions
+ 28
+ 29 calculateOps :: Integral a => a -> a -> [BinaryInstruction] -> [a]
+ 30 calculateOps operand operand' = map (calculateOp operand operand')
+ 31
+ 32 calculateOp :: Integral a => a -> a -> BinaryInstruction -> a
+ 33 calculateOp operand operand' operation = doBinary operation operand' operand
+ 34
+ 35 doBinary :: Integral a => BinaryInstruction -> a -> a -> a
+ 36 doBinary Add = (+)
+ 37 doBinary Sub = (-)
+ 38 doBinary Mul = (*)
+ 39 doBinary Div = div
+ 40 doBinary Mod = mod
+ 41 doBinary o = error $ show o
+ 42
+ 43 -- | Types
+ 44
+ 45 data ALInstruction =
+ 46 Cons Integer
+ 47 | Unary !UnaryInstruction
+ 48 | Binary !BinaryInstruction
+ 49 | Binaries [BinaryInstruction]
+ 50 | SStatic !StackIndex !ManipulationInstruction
+ 51 | SDynamic !ManipulationInstruction
+ 52 | SIO !IOInstruction
+ 53 | Halibut
+ 54 | Pick
+ 55 | Dup
+ 56 | Rot
+ 57 | Swap
+ 58 | Discard
+ 59 deriving stock (Eq , Read , Show )
+ 60
+ 61 data UnaryInstruction = Neg | BNot | LNot
+ 62 deriving stock (Eq , Read , Show )
+ 63
+ 64 data BinaryInstruction =
+ 65 Add | Sub | Mul | Div | Mod
+ 66 | BAnd | BOr | BXor | BEQ | BGT
+ 67 | LAnd | LOr | LXor | LEQ | LGT
+ 68 deriving stock (Eq , Read , Show )
+ 69
+ 70 data ManipulationInstruction = Copy | Move | Slide
+ 71 deriving stock (Eq , Read , Show )
+ 72
+ 73 type StackIndex = Int
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html
new file mode 100644
index 000000000..458afdd15
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.ControlInstruction where
+ 2
+ 3 import HelVM.HelIO.Collections.SList
+ 4
+ 5 isNotJump :: Integral e => BranchTest -> e -> Bool
+ 6 isNotJump t = not . isJump t
+ 7
+ 8 isJump :: Integral e => BranchTest -> e -> Bool
+ 9 isJump EZ e = e == 0
+ 10 isJump LTZ e = e < 0
+ 11 isJump GTZ e = e > 0
+ 12
+ 13 -- | Types
+ 14 data ControlInstruction =
+ 15 Mark !Label
+ 16 | CStatic !Label !LabelInstruction
+ 17 | CDynamic !LabelInstruction
+ 18 | Return
+ 19 deriving stock (Eq , Read , Show )
+ 20
+ 21 type Label = SString
+ 22
+ 23 data LabelInstruction = Call | Jump | Branch !BranchTest
+ 24 deriving stock (Eq , Read , Show )
+ 25
+ 26 data BranchTest = EZ | LTZ | GTZ
+ 27 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html
new file mode 100644
index 000000000..95df8d9ea
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.IOInstruction where
+ 2
+ 3 data IOInstruction =
+ 4 OutputChar
+ 5 | OutputDec
+ 6 | InputChar
+ 7 | InputDec
+ 8 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html
new file mode 100644
index 000000000..8e565b994
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.LSInstruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 4
+ 5 -- | Types
+ 6
+ 7 data LSInstruction =
+ 8 Load --Restore --Fetch
+ 9 | Store --Save
+ 10 | MIO !IOInstruction
+ 11 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.hs.html
new file mode 100644
index 000000000..9d7132219
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.hs.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 4 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 5 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 6
+ 7 import Data.Vector as Vector
+ 8
+ 9 isMark :: Label -> Instruction -> Bool
+ 10 isMark l (IControl (Mark l')) = l == l'
+ 11 isMark _ _ = False
+ 12
+ 13 -- | Types
+ 14
+ 15 data Instruction =
+ 16 IAL !ALInstruction
+ 17 | ILS !LSInstruction
+ 18 | IControl !ControlInstruction
+ 19 | End
+ 20 deriving stock (Eq , Read , Show )
+ 21
+ 22 type InstructionList = [Instruction]
+ 23 type InstructionVector = Vector Instruction
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html
new file mode 100644
index 000000000..bf8caca64
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.CellType where
+ 2
+ 3 -- | Constructors
+ 4 parseCellType :: String -> CellType
+ 5 parseCellType raw = valid $ readMaybe raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "CellType '" <> toText raw <> "' is not valid CellType. Valid cellTypes are : " <> show cellTypes
+ 8
+ 9 defaultCellType :: CellType
+ 10 defaultCellType = Word8Type
+ 11
+ 12 cellTypes :: [CellType]
+ 13 cellTypes = [Int8Type , Word8Type , Int16Type , Word16Type , Int32Type , Word32Type , Int64Type , Word64Type]
+ 14
+ 15 -- | Types
+ 16 data CellType = Int8Type | Word8Type | Int16Type | Word16Type | Int32Type | Word32Type | Int64Type | Word64Type
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html
new file mode 100644
index 000000000..62ed08dbf
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.DumpType where
+ 2
+ 3 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 4
+ 5 import HelVM.HelIO.Control.Logger
+ 6
+ 7 import HelVM.HelIO.Util
+ 8
+ 9 logDump :: (BIO m , Show d) => DumpType -> d -> m ()
+ 10 logDump dt d = logDump' $ dump dt d where
+ 11 logDump' Nothing = pass
+ 12 logDump' (Just t) = logMessageTuple ("dump" , t)
+ 13
+ 14 dump :: Show a => DumpType -> a -> Maybe Text
+ 15 dump No _ = Nothing
+ 16 dump Ugly a = Just $ show a
+ 17 dump Pretty a = Just $ showP a
+ 18
+ 19 -- | Constructors
+ 20 parseDumpType :: String -> DumpType
+ 21 parseDumpType raw = (valid . readMaybe) raw where
+ 22 valid (Just value) = value
+ 23 valid Nothing = error $ "DumpType '" <> toText raw <> "' is not valid DumpType. Valid dumpTypes are : " <> show dumpTypes
+ 24
+ 25 defaultDumpType :: DumpType
+ 26 defaultDumpType = No
+ 27
+ 28 dumpTypes :: [DumpType]
+ 29 dumpTypes = [No , Ugly , Pretty]
+ 30
+ 31 -- | Types
+ 32 data DumpType = No | Ugly | Pretty
+ 33 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html
new file mode 100644
index 000000000..6820efd95
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.IntCellType where
+ 2
+ 3 -- | Constructors
+ 4 parseIntCellType :: String -> IntCellType
+ 5 parseIntCellType raw = (valid . readMaybe) raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "IntCellType '" <> toText raw <> "' is not valid IntCellType. Valid intCellTypes are : " <> show intCellTypes
+ 8
+ 9 defaultIntCellType :: IntCellType
+ 10 defaultIntCellType = IntegerType
+ 11
+ 12 intCellTypes :: [IntCellType]
+ 13 intCellTypes = [Int8Type , Int16Type , Int32Type , Int64Type , IntegerType]
+ 14
+ 15 -- | Types
+ 16 data IntCellType = Int8Type | Int16Type | Int32Type | Int64Type | IntegerType
+ 17 deriving stock (Bounded , Enum , Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html
new file mode 100644
index 000000000..73ff87384
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.RAMType where
+ 2
+ 3 -- | Constructors
+ 4 parseRAMType :: String -> RAMType
+ 5 parseRAMType raw = (valid . readMaybe) raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "RAMType '" <> toText raw <> "' is not valid RAMType. Valid ramTypes are : " <> show ramTypes
+ 8
+ 9 defaultRAMType :: RAMType
+ 10 defaultRAMType = MapListRAMType
+ 11
+ 12 ramTypes :: [RAMType]
+ 13 ramTypes = [ListRAMType , SeqRAMType , SListRAMType , MapListRAMType]
+ 14
+ 15 -- | Types
+ 16 data RAMType = ListRAMType | SeqRAMType | SListRAMType | MapListRAMType
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html
new file mode 100644
index 000000000..9b8c8627c
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.StackType where
+ 2
+ 3 -- | Constructors
+ 4 parseStackType :: String -> StackType
+ 5 parseStackType raw = valid $ readMaybe raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "StackType '" <> toText raw <> "' is not valid StackType. Valid stackTypes are : " <> show stackTypes
+ 8
+ 9 defaultStackType :: StackType
+ 10 defaultStackType = SeqStackType
+ 11
+ 12 stackTypes :: [StackType]
+ 13 stackTypes = [ListStackType , SeqStackType , SListStackType]
+ 14
+ 15 -- | Types
+ 16 data StackType = ListStackType | SeqStackType | SListStackType
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html
new file mode 100644
index 000000000..a3f64c276
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.TokenType where
+ 2
+ 3 -- | Constructors
+ 4 parseTokenType :: Bool -> TokenType
+ 5 parseTokenType True = VisibleTokenType
+ 6 parseTokenType _ = WhiteTokenType
+ 7
+ 8 defaultTokenType :: TokenType
+ 9 defaultTokenType = VisibleTokenType
+ 10
+ 11 tokenTypes :: [TokenType]
+ 12 tokenTypes = [VisibleTokenType , WhiteTokenType , BothTokenType]
+ 13
+ 14 -- | Types
+ 15 data TokenType = VisibleTokenType | WhiteTokenType | BothTokenType
+ 16 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html
new file mode 100644
index 000000000..ea19db0d8
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.ALU (
+ 2 doOutputChar2,
+ 3 doInputChar2,
+ 4 doInputDec2,
+ 5 divMod,
+ 6 sub,
+ 7 binaryInstruction,
+ 8 binaryInstructions,
+ 9 halibut,
+ 10 alInstruction,
+ 11 move,
+ 12 swap,
+ 13 discard,
+ 14 slide,
+ 15 dup,
+ 16 copy,
+ 17 flipPush1,
+ 18 charPush1,
+ 19 genericPush1,
+ 20 pop1,
+ 21 pop2,
+ 22 push1,
+ 23 push2,
+ 24 splitAt,
+ 25 drop,
+ 26 ALU,
+ 27 Stack,
+ 28 ) where
+ 29
+ 30 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 31 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 32
+ 33 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 34
+ 35 import HelVM.HelIO.Control.Safe
+ 36
+ 37 import HelVM.HelIO.Containers.LLIndexSafe
+ 38
+ 39 import HelVM.HelIO.ListLikeUtil
+ 40
+ 41 import Data.ListLike hiding (show)
+ 42 import Prelude hiding (divMod, drop, fromList, splitAt, swap)
+ 43
+ 44
+ 45 alInstruction :: ALU m ll element => ALInstruction -> ll -> m ll
+ 46 alInstruction (Cons i ) = push i
+ 47 alInstruction (Unary op) = error $ show op
+ 48 alInstruction (Binary op) = binaryInstruction op
+ 49 alInstruction (SDynamic op) = dynamicManipulation op
+ 50 alInstruction (SStatic i op) = staticManipulation op i
+ 51 alInstruction (SIO OutputChar) = doOutputChar2
+ 52 alInstruction (SIO OutputDec) = doOutputDec2
+ 53 alInstruction (SIO InputChar) = doInputChar2
+ 54 alInstruction Halibut = halibut
+ 55 alInstruction Pick = pick
+ 56 alInstruction Dup = dup
+ 57 alInstruction Rot = rot
+ 58 alInstruction Swap = swap
+ 59 alInstruction Discard = discard
+ 60 alInstruction op = error $ show op
+ 61
+ 62 -- | Arithmetic instructions
+ 63 divMod :: ALU m ll element => ll -> m ll
+ 64 divMod = binaryInstructions [Mod , Div]
+ 65
+ 66 sub :: ALU m ll element => ll -> m ll
+ 67 sub = binaryInstruction Sub
+ 68
+ 69 binaryInstruction :: ALU m ll element => BinaryInstruction -> ll -> m ll
+ 70 binaryInstruction i = binaryInstructions [i]
+ 71
+ 72 binaryInstructions :: ALU m ll element => [BinaryInstruction] -> ll -> m ll
+ 73 binaryInstructions il l = binaryInstructions' <$> pop2 l where
+ 74 binaryInstructions' (e , e', l') = pushList (calculateOps e e' il) l'
+ 75
+ 76 -- | IO instructions
+ 77 doOutputChar2 :: ALU m ll element => ll -> m ll
+ 78 doOutputChar2 l = doOutputChar' =<< pop1 l where
+ 79 doOutputChar' (e , l') = wPutAsChar e $> l'
+ 80
+ 81 doOutputDec2 :: ALU m ll element => ll -> m ll
+ 82 doOutputDec2 l = doOutputDec' =<< pop1 l where
+ 83 doOutputDec' (e , l') = wPutAsDec e $> l'
+ 84
+ 85 doInputChar2 :: ALU m ll element => ll -> m ll
+ 86 doInputChar2 l = doInputChar' <$> wGetCharAs where
+ 87 doInputChar' e = push1 e l
+ 88
+ 89 doInputDec2 :: ALU m ll element => ll -> m ll
+ 90 doInputDec2 l = doInputChar' <$> wGetCharAs where
+ 91 doInputChar' e = push1 e l
+ 92
+ 93 -- | Manipulation instructions
+ 94 dynamicManipulation :: ALU m ll element => ManipulationInstruction -> ll -> m ll
+ 95 dynamicManipulation op l = dynamicManipulation' =<< unconsSafe l where
+ 96 dynamicManipulation' (e , l') = staticManipulation op (fromIntegral e) l'
+ 97
+ 98 staticManipulation :: ALU m ll element => ManipulationInstruction -> Index -> ll -> m ll
+ 99 staticManipulation Copy = copy
+ 100 staticManipulation Move = move
+ 101 staticManipulation Slide = slide
+ 102
+ 103 -- | Halibut and Pick instructions
+ 104 halibut :: ALU m ll element => ll -> m ll
+ 105 halibut l = halibut' =<< pop1 l where
+ 106 halibut' (e , l')
+ 107 | 0 < i = move i l'
+ 108 | otherwise = copy (negate i) l'
+ 109 where i = fromIntegral e
+ 110
+ 111 pick :: ALU m ll element => ll -> m ll
+ 112 pick l = pick' =<< pop1 l where
+ 113 pick' (e , l')
+ 114 | 0 <= i = copy i l'
+ 115 | otherwise = move (negate i) l'
+ 116 where i = fromIntegral e
+ 117
+ 118 -- | Slide instructions
+ 119 slide :: ALU m ll element => Index -> ll -> m ll
+ 120 slide i l = slide' <$> pop1 l where
+ 121 slide' (e , l') = push1 e $ drop i l'
+ 122
+ 123 -- | Move instructions
+ 124 rot :: ALU m ll element => ll -> m ll
+ 125 rot = move 2
+ 126
+ 127 swap :: ALU m ll element => ll -> m ll
+ 128 swap = move 1
+ 129
+ 130 move :: ALU m ll element => Index -> ll -> m ll
+ 131 move i l = pure $ l1 <> l2 <> l3 where
+ 132 (l1 , l3) = splitAt 1 l'
+ 133 (l2 , l') = splitAt i l
+ 134
+ 135 -- | Copy instructions
+ 136 dup :: ALU m ll element => ll -> m ll
+ 137 dup = copy 0
+ 138
+ 139 copy :: ALU m ll element => Index -> ll -> m ll
+ 140 copy i l = flipPush1 l <$> l `indexSafe` i
+ 141
+ 142 -- | Pop instructions
+ 143 pop1 :: ALU m ll element => ll -> m (element , ll)
+ 144 pop1 l = appendErrorTuple ("l" , show l) $ unconsSafe l
+ 145
+ 146 pop2 :: ALU m ll element => ll -> m (element , element , ll)
+ 147 pop2 l = appendErrorTuple ("l" , show l) $ uncons2Safe l
+ 148
+ 149 -- | Push instructions
+ 150 push :: ALU m ll element => Integer -> ll -> m ll
+ 151 push i l = pure $ genericPush1 i l
+ 152
+ 153 flipPush1 :: Stack ll element => ll -> element -> ll
+ 154 flipPush1 = flip push1
+ 155
+ 156 charPush1 :: (Num element , Stack ll element) => Char -> ll -> ll
+ 157 charPush1 = genericPush1 . ord
+ 158
+ 159 genericPush1 :: (Integral v , Num element , Stack ll element) => v -> ll -> ll
+ 160 genericPush1 = push1 . fromIntegral
+ 161
+ 162 push1 :: Stack ll element => element -> ll -> ll
+ 163 push1 e = pushList [e]
+ 164
+ 165 push2 :: Stack ll element => element -> element -> ll -> ll
+ 166 push2 e e' = pushList [e , e']
+ 167
+ 168 pushList :: Stack ll element => [element] -> ll -> ll
+ 169 pushList es l = fromList es <> l
+ 170
+ 171 -- | Types
+ 172 type ALU m ll element = (BIO m , Stack ll element , Integral element)
+ 173
+ 174 type Stack ll element = (Show ll , ListLike ll element , IndexSafe ll element)
+ 175
+ 176 type Index = Int
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html
new file mode 100644
index 000000000..e01d03cd4
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.CPU where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.ALU
+ 4
+ 5 import HelVM.HelMA.Automaton.Instruction
+ 6 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 7
+ 8 import HelVM.HelIO.Control.Safe
+ 9
+ 10 import Control.Type.Operator
+ 11
+ 12 import Data.ListLike hiding (show)
+ 13
+ 14 controlInstruction :: (ALU m ll element , Show element) => ControlInstruction -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 15 --controlInstruction :: ALU m ll element => ControlInstruction -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 16 controlInstruction (Mark _ ) = pure
+ 17 controlInstruction Return = popAddress
+ 18 controlInstruction (CDynamic Call ) = dynamicCall
+ 19 controlInstruction (CDynamic Jump ) = dynamicJump
+ 20 controlInstruction (CDynamic (Branch t)) = dynamicBranch t
+ 21 controlInstruction (CStatic l Call ) = staticCall l
+ 22 controlInstruction (CStatic l Jump ) = staticJump l
+ 23 controlInstruction (CStatic l (Branch t)) = staticBranch l t
+ 24
+ 25 popAddress :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 26 popAddress (CPU (CU il _ (IS (a : is))) s) = pure $ CPU (CU il a $ IS is) s
+ 27 popAddress (CPU (CU il _ (IS [] )) _) = liftErrorWithTupleList "Empty Return Stack" [("il" , show il)]
+ 28
+ 29 dynamicCall :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 30 dynamicCall (CPU (CU il ic (IS is)) s) = call <$> pop1 s where
+ 31 call (a , s') = CPU (CU il (fromIntegral a) (IS (ic : is))) s'
+ 32
+ 33 dynamicJump :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 34 dynamicJump (CPU (CU il _ is) s) = jump <$> pop1 s where
+ 35 jump (a , s') = CPU (CU il (fromIntegral a) is) s'
+ 36
+ 37 dynamicBranch :: (ALU m ll element , Show element) => BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 38 --dynamicBranch :: ALU m ll element => BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 39 dynamicBranch t (CPU (CU il ic is) s) = branch =<< pop2 s where
+ 40 -- dynamicBranch' (l , e , s') = liftErrorTupleList [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 41 branch (l , e , s')
+ 42 | isNotJump t e = liftErrorWithTupleList "isNotJump" [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 43 -- | isNotJump t e = pure $ CPU (CU il ic is) s'
+ 44 | otherwise = liftErrorWithTupleList "otherwise" [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 45 -- | otherwise = jump <$> findAddress il (show l) where jump ic' = CPU (CU il ic' is) s'
+ 46
+ 47 staticCall :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 48 staticCall l (CPU (CU il ic (IS is)) s) = call <$> findAddress il l where
+ 49 call a = CPU (CU il a (IS (ic : is))) s
+ 50
+ 51 staticJump :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 52 staticJump l (CPU (CU il _ is) s) = jump <$> findAddress il l where
+ 53 jump a = CPU (CU il a is) s
+ 54
+ 55 staticBranch :: ALU m ll element => Label -> BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 56 staticBranch l t (CPU (CU il ic is) s) = branch =<< pop1 s where
+ 57 branch (e , s')
+ 58 | isNotJump t e = pure $ CPU (CU il ic is) s'
+ 59 | otherwise = jump <$> findAddress il l where
+ 60 jump ic' = CPU (CU il ic' is) s'
+ 61
+ 62 findAddress :: MonadSafe m => InstructionVector -> Label -> m InstructionAddress
+ 63 findAddress il l = liftMaybeOrErrorTuple ("Undefined label", show l) $ findIndex (isMark l) il
+ 64
+ 65 cpuToTuple :: CentralProcessingUnit s -> (ControlUnit , s)
+ 66 cpuToTuple (CPU cu s) = (cu , s)
+ 67
+ 68 -- | Types
+ 69 data CentralProcessingUnit al = CPU
+ 70 { controlUnit :: ControlUnit
+ 71 , alu :: al
+ 72 }
+ 73 deriving stock (Show )
+ 74
+ 75 data ControlUnit = CU
+ 76 { program :: InstructionVector
+ 77 , programCounter :: InstructionCounter
+ 78 , returnStack :: InstructionStack
+ 79 }
+ 80 deriving stock (Show )
+ 81
+ 82 newtype InstructionStack = IS [InstructionAddress]
+ 83 deriving stock (Show )
+ 84
+ 85 type InstructionCounter = InstructionAddress
+ 86
+ 87 type InstructionAddress = Int
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html
new file mode 100644
index 000000000..f06c468f8
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.LSU where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.ALU
+ 4 import qualified HelVM.HelMA.Automaton.Units.RAM as RAM
+ 5
+ 6 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 7
+ 8 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 9 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 10
+ 11 import Control.Type.Operator
+ 12
+ 13 slInstruction :: (LSU m s r element) => LSInstruction -> LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 14 slInstruction Load = load
+ 15 slInstruction Store = store
+ 16 slInstruction (MIO OutputChar) = loadOutputChar
+ 17 slInstruction (MIO OutputDec) = loadOutputDec
+ 18 slInstruction (MIO InputChar) = storeInputChar
+ 19 slInstruction (MIO InputDec) = storeInputDec
+ 20
+ 21 load :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 22 load (LSU s r) = load' <$> pop1 s where
+ 23 load' (address , s') = LSU (push1 (RAM.genericLoad r address) s') r
+ 24
+ 25 store :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 26 store (LSU s r) = store' <$> pop2 s where
+ 27 store' (value , address , s') = LSU s' $ RAM.store address value r
+ 28
+ 29 loadOutputChar :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 30 loadOutputChar (LSU s r) = loadOutputChar' =<< pop1 s where
+ 31 loadOutputChar' (address , s') = LSU s' r <$ wPutAsChar (RAM.genericLoad r address)
+ 32
+ 33 loadOutputDec :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 34 loadOutputDec (LSU s r) = doOutputDec' =<< pop1 s where
+ 35 doOutputDec' (address , s') = LSU s' r <$ wPutAsDec (RAM.genericLoad r address)
+ 36
+ 37 storeInputChar :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 38 storeInputChar (LSU s r) = storeInputChar' =<< pop1 s where
+ 39 storeInputChar' (address , s') = LSU s' . flip (RAM.store address) r <$> wGetCharAs
+ 40
+ 41 storeInputDec :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 42 storeInputDec (LSU s r) = storeInputDec' =<< pop1 s where
+ 43 storeInputDec' (address , s') = LSU s' . flip (RAM.store address) r <$> wGetDecAs
+ 44
+ 45 sluToTuple :: LoadStoreUnit s r -> (s , r)
+ 46 sluToTuple (LSU s r) = (s , r)
+ 47
+ 48 -- | Types
+ 49 type LSU m s r element = (ALU m s element , RAM.RAM r element)
+ 50
+ 51 data LoadStoreUnit s r = LSU
+ 52 { stack :: s
+ 53 , ram :: r
+ 54 }
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html
new file mode 100644
index 000000000..14c59981a
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.RAM (
+ 2 genericLoad,
+ 3 load,
+ 4 storeChar,
+ 5 genericStore,
+ 6 store,
+ 7 fromList,
+ 8 RAM,
+ 9 ) where
+ 10
+ 11 import HelVM.HelIO.Containers.LLIndexSafe
+ 12 import HelVM.HelIO.Containers.LLInsertDef
+ 13
+ 14 import Data.Default
+ 15 import Prelude hiding (divMod, drop, splitAt, swap)
+ 16
+ 17 genericLoad :: (Integral i , RAM ll element) => ll -> i -> element
+ 18 genericLoad l = load l . fromIntegral
+ 19
+ 20 load :: (RAM ll element) => ll -> Address -> element
+ 21 load l i = indexMaybe l i ?: def
+ 22
+ 23 storeChar :: (Num element , Integral address , RAM ll element) => address -> Char -> ll -> ll
+ 24 storeChar a char = genericStore a $ ord char
+ 25
+ 26 genericStore :: (Integral value , Num element , Integral address , RAM ll element) => address -> value -> ll -> ll
+ 27 genericStore a v = store a $ fromIntegral v
+ 28
+ 29 store :: (Integral a , RAM ll element) => a -> element -> ll -> ll
+ 30 store = insertDef . fromIntegral
+ 31
+ 32 -- | Types
+ 33 type RAM ll element = (Show ll , Default element , II ll element)
+ 34
+ 35 type II ll element = (InsertDef ll element , IndexSafe ll element)
+ 36
+ 37 type Address = Int
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html
new file mode 100644
index 000000000..c8be4c41d
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.Unit where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.CPU
+ 4
+ 5 -- | Data types
+ 6 data Unit s r = Unit
+ 7 { unitCU :: ControlUnit
+ 8 , unitStack :: s
+ 9 , unitRAM :: r
+ 10 }
+ 11 deriving stock (Show )
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html
new file mode 100644
index 000000000..41a99454c
--- /dev/null
+++ b/docs/reports/hpc/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.WrapTokenList where
+ 2
+ 3 import qualified Text.Read
+ 4 import qualified Text.Show
+ 5
+ 6 newtype WrapTokenList a = WrapTokenList { unWrapTokenList :: a }
+ 7 deriving stock (Eq )
+ 8
+ 9 ----
+ 10
+ 11 instance Show a => Show (WrapTokenList [a]) where
+ 12 show (WrapTokenList tokens) = show =<< tokens
+ 13
+ 14 instance Read a => Read (WrapTokenList [a]) where
+ 15 readsPrec _ source = [( WrapTokenList $ maybeToList . readMaybe . one =<< source , "")]
+
+
+
+
diff --git a/docs/reports/hpc/helma-test/hpc_index.html b/docs/reports/hpc/helma-test/hpc_index.html
new file mode 100644
index 000000000..d59079b07
--- /dev/null
+++ b/docs/reports/hpc/helma-test/hpc_index.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/helma-test/hpc_index_alt.html b/docs/reports/hpc/helma-test/hpc_index_alt.html
new file mode 100644
index 000000000..01d703675
--- /dev/null
+++ b/docs/reports/hpc/helma-test/hpc_index_alt.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/helma-test/hpc_index_exp.html b/docs/reports/hpc/helma-test/hpc_index_exp.html
new file mode 100644
index 000000000..6acf20d50
--- /dev/null
+++ b/docs/reports/hpc/helma-test/hpc_index_exp.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/helma-test/hpc_index_fun.html b/docs/reports/hpc/helma-test/hpc_index_fun.html
new file mode 100644
index 000000000..c7b0f8c5e
--- /dev/null
+++ b/docs/reports/hpc/helma-test/hpc_index_fun.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html
new file mode 100644
index 000000000..4360f2d7c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton (
+ 2 evalSource,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 6 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 7 import HelVM.HelMA.Automata.BrainFuck.Lexer
+ 8 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 9 import HelVM.HelMA.Automata.BrainFuck.TableOfInstructions
+ 10 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 11
+ 12 import HelVM.HelMA.Automaton.API.IOTypes
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14 import HelVM.HelMA.Automaton.Types.DumpType
+ 15
+ 16 import Control.Type.Operator
+ 17
+ 18 evalSource :: (BIO m , Symbol e) => Source -> FullTape e -> DumpType -> m ()
+ 19 evalSource source tape dt = logDump dt =<< doInstruction ([] , tokenize source) tape
+ 20
+ 21 doInstruction :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 22 doInstruction table@(_ , Simple MoveR : _) tape = doInstruction (nextInst table) (moveHeadRight tape)
+ 23 doInstruction table@(_ , Simple MoveL : _) tape = doInstruction (nextInst table) (moveHeadLeft tape)
+ 24 doInstruction table@(_ , Simple Inc : _) tape = doInstruction (nextInst table) (wNextSymbol tape)
+ 25 doInstruction table@(_ , Simple Dec : _) tape = doInstruction (nextInst table) (wPrevSymbol tape)
+ 26 doInstruction table@(_ , Simple Output : _) tape = doOutputChar table tape
+ 27 doInstruction table@(_ , Simple Input : _) tape = doInputChar table tape
+ 28 doInstruction table@(_ , JmpPast : _) tape = doJmpPast table tape
+ 29 doInstruction table@(_ , JmpBack : _) tape = doJmpBack table tape
+ 30 doInstruction table@(_ , [] ) tape = doEnd table tape
+ 31
+ 32 doJmpPast :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 33 doJmpPast table tape@(_ , 0 : _) = doInstruction (jumpPast table) tape
+ 34 doJmpPast table tape = doInstruction (nextInst table) tape
+ 35
+ 36 doJmpBack :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 37 doJmpBack table tape@(_ , 0 : _) = doInstruction (nextInst table) tape
+ 38 doJmpBack table tape = doInstruction (jumpBack table) tape
+ 39
+ 40 -- | IO instructions
+ 41 doOutputChar :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 42 doOutputChar _ (_ , []) = error "Illegal State"
+ 43 doOutputChar table tape@(_ , e : _) = wPutChar (toChar e) *> doInstruction (nextInst table) tape
+ 44
+ 45 doInputChar :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 46 doInputChar table tape = (doInstruction (nextInst table) . flip writeSymbol tape) =<< wGetChar
+ 47
+ 48 -- | Terminate instruction
+ 49 doEnd :: BIO m => Table -> FullTape e -> m $ Unit e
+ 50 doEnd table tape = pure $ Unit table tape
+ 51
+ 52 -- | Types
+ 53 data Unit e = Unit
+ 54 { unitTable :: Table
+ 55 , unitTape :: FullTape e
+ 56 }
+ 57 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html
new file mode 100644
index 000000000..b5ff9ec69
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton (
+ 2 evalSource,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 6 import HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction
+ 7 import HelVM.HelMA.Automata.BrainFuck.Parser
+ 8 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 9 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 10
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 13 import HelVM.HelMA.Automaton.Types.DumpType
+ 14
+ 15 import HelVM.HelIO.Containers.LLIndexSafe
+ 16
+ 17 import Control.Type.Operator
+ 18
+ 19 evalSource :: (BIO m , Symbol e) => Source -> FullTape e -> DumpType -> m ()
+ 20 evalSource source tape dt = logDump dt =<< flip evalVector tape =<< parseAsVector source
+ 21
+ 22 evalVector :: (BIO m , Symbol e) => TreeInstructionVector -> FullTape e -> m $ Unit e
+ 23 evalVector iv = nextStep (IU iv 0)
+ 24
+ 25 nextStep :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 26 nextStep (IU iv ic) = doInstruction (iv `indexMaybe` ic) (IU iv $ ic + 1)
+ 27
+ 28 doInstruction :: (BIO m , Symbol e) => Maybe TreeInstruction -> InstructionUnit -> FullTape e -> m $ Unit e
+ 29 doInstruction (Just (Simple MoveR )) table tape = nextStep table (moveHeadRight tape)
+ 30 doInstruction (Just (Simple MoveL )) table tape = nextStep table (moveHeadLeft tape)
+ 31 doInstruction (Just (Simple Inc )) table tape = nextStep table (wNextSymbol tape)
+ 32 doInstruction (Just (Simple Dec )) table tape = nextStep table (wPrevSymbol tape)
+ 33 doInstruction (Just (Simple Output )) table tape = doOutputChar table tape
+ 34 doInstruction (Just (Simple Input )) table tape = doInputChar table tape
+ 35 doInstruction (Just (While iv )) table tape = doWhile iv table tape
+ 36 doInstruction Nothing table tape = doEnd table tape
+ 37
+ 38 doWhile :: (BIO m , Symbol e) => TreeInstructionVector -> InstructionUnit -> FullTape e -> m $ Unit e
+ 39 doWhile _ table tape@(_ , 0:_) = nextStep table tape
+ 40 doWhile iv table tape = doWhileWithTape =<< evalVector iv tape where
+ 41 doWhileWithTape :: (BIO m , Symbol e) => Unit e -> m $ Unit e
+ 42 doWhileWithTape = doWhile iv table . unitTape
+ 43
+ 44 -- | IO instructions
+ 45 doOutputChar :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 46 doOutputChar _ (_ , []) = error "Illegal State"
+ 47 doOutputChar table tape@(_ , e:_) = wPutChar (toChar e) *> nextStep table tape
+ 48
+ 49 doInputChar :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 50 doInputChar table tape = (nextStep table . flip writeSymbol tape) =<< wGetChar
+ 51
+ 52 -- | Terminate instruction
+ 53 doEnd :: BIO m => InstructionUnit -> FullTape e -> m $ Unit e
+ 54 doEnd iu tape = pure $ Unit iu tape
+ 55
+ 56 -- | Types
+ 57 data Unit e = Unit
+ 58 { unitUI :: InstructionUnit
+ 59 , unitTape :: FullTape e
+ 60 }
+ 61 deriving stock (Eq , Show )
+ 62
+ 63 data InstructionUnit = IU !TreeInstructionVector !InstructionCounter
+ 64 deriving stock (Eq , Show )
+ 65
+ 66 type InstructionCounter = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html
new file mode 100644
index 000000000..05adcb87b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton where
+ 2
+ 3 import qualified HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton as Flat
+ 4 import qualified HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton as Tree
+ 5
+ 6 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 7 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 8
+ 9 import HelVM.HelMA.Automaton.API.EvalParams
+ 10 import HelVM.HelMA.Automaton.API.IOTypes
+ 11 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 12
+ 13 import HelVM.HelMA.Automaton.Types.CellType
+ 14 import HelVM.HelMA.Automaton.Types.DumpType
+ 15
+ 16 simpleEval :: BIO m => (Bool , Source , CellType) -> m ()
+ 17 simpleEval (c , s , t) = eval c s t Pretty
+ 18
+ 19 ----
+ 20
+ 21 evalParams :: BIO m => EvalParams -> m ()
+ 22 evalParams p = eval (compile p) (source p) (cellTypeOptions p) (dumpTypeOptions p)
+ 23
+ 24 eval :: BIO m => Bool -> Source -> CellType -> DumpType -> m ()
+ 25 eval c s Int8Type = evalSource c s (newTape :: FullTape Int8)
+ 26 eval c s Word8Type = evalSource c s (newTape :: FullTape Word8)
+ 27 eval c s Int16Type = evalSource c s (newTape :: FullTape Int16)
+ 28 eval c s Word16Type = evalSource c s (newTape :: FullTape Word16)
+ 29 eval c s Int32Type = evalSource c s (newTape :: FullTape Int32)
+ 30 eval c s Word32Type = evalSource c s (newTape :: FullTape Word32)
+ 31 eval c s Int64Type = evalSource c s (newTape :: FullTape Int64)
+ 32 eval c s Word64Type = evalSource c s (newTape :: FullTape Word64)
+ 33
+ 34 evalSource :: (BIO m , Symbol e) => Bool -> Source -> FullTape e -> DumpType -> m ()
+ 35 evalSource False = Flat.evalSource
+ 36 evalSource True = Tree.evalSource
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html
new file mode 100644
index 000000000..bdb30e3fe
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 4
+ 5 import Text.Read
+ 6
+ 7 import qualified Text.Show
+ 8
+ 9 data FlatInstruction =
+ 10 Simple SimpleInstruction
+ 11 | JmpPast
+ 12 | JmpBack
+ 13 deriving stock (Eq )
+ 14
+ 15 type FlatTreeInstructionList = [FlatInstruction]
+ 16
+ 17 instance Show FlatInstruction where
+ 18 show (Simple i) = show i
+ 19 show JmpPast = "["
+ 20 show JmpBack = "]"
+ 21
+ 22 instance Read FlatInstruction where
+ 23 readsPrec _ ">" = [( Simple MoveR , "")]
+ 24 readsPrec _ "<" = [( Simple MoveL , "")]
+ 25 readsPrec _ "+" = [( Simple Inc , "")]
+ 26 readsPrec _ "-" = [( Simple Dec , "")]
+ 27 readsPrec _ "." = [( Simple Output , "")]
+ 28 readsPrec _ "," = [( Simple Input , "")]
+ 29 readsPrec _ "[" = [( JmpPast , "")]
+ 30 readsPrec _ "]" = [( JmpBack , "")]
+ 31 readsPrec _ _ = []
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html
new file mode 100644
index 000000000..d40c09792
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction where
+ 2
+ 3 import Text.Read
+ 4 import qualified Text.Show
+ 5
+ 6 data SimpleInstruction =
+ 7 MoveR
+ 8 | MoveL
+ 9 | Inc
+ 10 | Dec
+ 11 | Output
+ 12 | Input
+ 13 deriving stock (Bounded , Enum , Eq )
+ 14
+ 15 instance Show SimpleInstruction where
+ 16 show MoveR = ">"
+ 17 show MoveL = "<"
+ 18 show Inc = "+"
+ 19 show Dec = "-"
+ 20 show Output = "."
+ 21 show Input = ","
+ 22
+ 23 instance Read SimpleInstruction where
+ 24 readsPrec _ ">" = [( MoveR , "")]
+ 25 readsPrec _ "<" = [( MoveL , "")]
+ 26 readsPrec _ "+" = [( Inc , "")]
+ 27 readsPrec _ "-" = [( Dec , "")]
+ 28 readsPrec _ "." = [( Output , "")]
+ 29 readsPrec _ "," = [( Input , "")]
+ 30 readsPrec _ _ = []
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html
new file mode 100644
index 000000000..f7c5c74b9
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 4
+ 5 import Data.DList
+ 6 import qualified Data.ListLike as LL
+ 7 import Data.Vector
+ 8
+ 9 import qualified Text.Show
+ 10
+ 11 data TreeInstruction =
+ 12 Simple SimpleInstruction
+ 13 | While !TreeInstructionVector
+ 14 deriving stock (Eq )
+ 15
+ 16 type TreeInstructionList = [TreeInstruction]
+ 17 type TreeInstructionDList = DList TreeInstruction
+ 18 type TreeInstructionVector = Vector TreeInstruction
+ 19
+ 20 instance Show TreeInstruction where
+ 21 show (Simple i) = show i
+ 22 show (While il) = "[" <> (show =<< LL.toList il) <> "]"
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html
new file mode 100644
index 000000000..7987dc7b9
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelMA.Automaton.API.IOTypes
+ 7 import HelVM.HelMA.Automaton.WrapTokenList
+ 8
+ 9 -- | Lexer
+ 10 tokenize :: Source -> FlatTreeInstructionList
+ 11 tokenize = unWrapTokenList . readTokens
+ 12
+ 13 readTokens :: Source -> Tokens
+ 14 readTokens source = readTextUnsafe source :: Tokens
+ 15
+ 16 type Tokens = WrapTokenList FlatTreeInstructionList
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html
new file mode 100644
index 000000000..88eb4e52f
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Parser where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction as Flat
+ 4 import HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction as Tree
+ 5 import HelVM.HelMA.Automata.BrainFuck.Lexer
+ 6
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8
+ 9 import HelVM.HelIO.Control.Safe
+ 10 import HelVM.HelIO.ListLikeUtil
+ 11
+ 12 import Data.ListLike hiding (show)
+ 13
+ 14 import qualified Data.DList as D
+ 15
+ 16 type OperandParser m a = FlatTreeInstructionList -> m (a , FlatTreeInstructionList)
+ 17
+ 18 parseAsVector :: MonadSafe m => Source -> m TreeInstructionVector
+ 19 parseAsVector = parseFILAsVector . tokenize
+ 20
+ 21 parseFILAsVector :: MonadSafe m => FlatTreeInstructionList -> m TreeInstructionVector
+ 22 parseFILAsVector fil = fromList <$> parseFIL fil
+ 23
+ 24 parseFIL :: MonadSafe m => FlatTreeInstructionList -> m TreeInstructionList
+ 25 parseFIL (Flat.Simple i : fil) = (Tree.Simple i : ) <$> parseFIL fil
+ 26 parseFIL [] = pure []
+ 27 parseFIL (Flat.JmpBack : fil) = liftErrorWithPrefix "JmpBack" $ show fil
+ 28 parseFIL (Flat.JmpPast : fil) = addWhile =<< parseWhile fil where
+ 29 addWhile (i , fil') = (i : ) <$> parseFIL fil'
+ 30
+ 31 parseWhile :: MonadSafe m => OperandParser m TreeInstruction
+ 32 parseWhile fil = buildWhile <$> parseWhileD fil where
+ 33 buildWhile :: (TreeInstructionDList , FlatTreeInstructionList) -> (TreeInstruction , FlatTreeInstructionList)
+ 34 buildWhile (idl , fil') = (buildWhileFromDList idl , fil')
+ 35
+ 36 buildWhileFromDList :: TreeInstructionDList -> TreeInstruction
+ 37 buildWhileFromDList = Tree.While . convert
+ 38
+ 39 parseWhileD :: MonadSafe m => OperandParser m TreeInstructionDList
+ 40 parseWhileD = go D.empty where
+ 41 go :: MonadSafe m => TreeInstructionDList -> FlatTreeInstructionList -> m (TreeInstructionDList , FlatTreeInstructionList)
+ 42 go acc (Flat.Simple i : fil) = go (acc `snoc` Tree.Simple i ) fil
+ 43 go acc [] = liftErrorWithPrefix "End of List" $ show acc
+ 44 go acc (Flat.JmpBack : fil) = pure (acc , fil)
+ 45 go acc (Flat.JmpPast : fil) = snocInstruction =<< parseWhile fil where
+ 46 snocInstruction :: MonadSafe m => (TreeInstruction , FlatTreeInstructionList) -> m (TreeInstructionDList , FlatTreeInstructionList)
+ 47 snocInstruction (i , fil') = go (acc `snoc` i) fil'
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html
new file mode 100644
index 000000000..e276c86f8
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Symbol (
+ 2 Symbol,
+ 3 def,
+ 4 next,
+ 5 prev,
+ 6 fromChar,
+ 7 toChar
+ 8 ) where
+ 9
+ 10 import Data.Default (Default)
+ 11
+ 12 import qualified Data.Default as Default
+ 13 import qualified Relude.Extra as Extra
+ 14
+ 15 def :: Symbol e => e
+ 16 def = Default.def
+ 17
+ 18 next :: Symbol e => e -> e
+ 19 next = Extra.next
+ 20
+ 21 prev :: Symbol e => e -> e
+ 22 prev = Extra.prev
+ 23
+ 24 class (Bounded e , Default e , Enum e , Eq e , Num e , Show e) => Symbol e where
+ 25 fromChar :: Char -> e
+ 26 toChar :: e -> Char
+ 27
+ 28 --
+ 29
+ 30 instance Symbol Int where
+ 31 fromChar = ord
+ 32 toChar = chr
+ 33
+ 34 instance Symbol Word where
+ 35 fromChar = fromIntegral . ord
+ 36 toChar = chr . fromIntegral
+ 37
+ 38 instance Symbol Int8 where
+ 39 fromChar = fromIntegral . ord
+ 40 toChar = chr . normalizeMod . fromIntegral
+ 41
+ 42 instance Symbol Word8 where
+ 43 fromChar = fromIntegral . ord
+ 44 toChar = chr . fromIntegral
+ 45
+ 46 instance Symbol Int16 where
+ 47 fromChar = fromIntegral . ord
+ 48 toChar = chr . normalizeMod . fromIntegral
+ 49
+ 50 instance Symbol Word16 where
+ 51 fromChar = fromIntegral . ord
+ 52 toChar = chr . fromIntegral
+ 53
+ 54 instance Symbol Int32 where
+ 55 fromChar = fromIntegral . ord
+ 56 toChar = chr . normalizeMod . fromIntegral
+ 57
+ 58 instance Symbol Word32 where
+ 59 fromChar = fromIntegral . ord
+ 60 toChar = chr . fromIntegral
+ 61
+ 62 instance Symbol Int64 where
+ 63 fromChar = fromIntegral . ord
+ 64 toChar = chr . normalizeMod . fromIntegral
+ 65
+ 66 instance Symbol Word64 where
+ 67 fromChar = fromIntegral . ord
+ 68 toChar = chr . fromIntegral
+ 69 --
+ 70
+ 71 countSymbols :: (Integral e) => e
+ 72 countSymbols = 256
+ 73
+ 74 modifyMod :: (Integral e) => (e -> e) -> e -> e
+ 75 modifyMod f i = f (i + countSymbols) `mod` countSymbols
+ 76
+ 77 normalizeMod :: (Integral e) => e -> e
+ 78 normalizeMod = modifyMod id
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html
new file mode 100644
index 000000000..78fc0f8ac
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.TableOfInstructions where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 4
+ 5 type HalfTable = FlatTreeInstructionList
+ 6 type Table = (HalfTable , HalfTable)
+ 7 type TableD = Table -> Table
+ 8
+ 9 prevInst :: TableD
+ 10 prevInst (inst : prev , next) = (prev , inst : next)
+ 11 prevInst ([] , _) = error "End of the table"
+ 12
+ 13 nextInst :: TableD
+ 14 nextInst (prev , inst : next) = (inst : prev , next)
+ 15 nextInst (_ , []) = error "End of the table"
+ 16
+ 17 matchPrevJmp :: TableD
+ 18 matchPrevJmp table@(JmpPast : _ , _) = table
+ 19 matchPrevJmp table@(JmpBack : _ , _) = (matchPrevJmp . prevInst . jumpBack) table
+ 20 matchPrevJmp table = jumpBack table
+ 21
+ 22 matchNextJmp :: TableD
+ 23 matchNextJmp table@(_ , JmpBack : _) = nextInst table
+ 24 matchNextJmp table@(_ , JmpPast : _) = (matchNextJmp . jumpPast) table
+ 25 matchNextJmp table = jumpPast table
+ 26
+ 27 jumpPast :: TableD
+ 28 jumpPast = matchNextJmp . nextInst
+ 29
+ 30 jumpBack :: TableD
+ 31 jumpBack = matchPrevJmp . prevInst
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html
new file mode 100644
index 000000000..df2083506
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols (
+ 2 FullTape,
+ 3 newTape,
+ 4 moveHeadRight,
+ 5 moveHeadLeft,
+ 6 wNextSymbol,
+ 7 wPrevSymbol,
+ 8 writeSymbol
+ 9 ) where
+ 10
+ 11 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 12
+ 13 ----
+ 14
+ 15 type D a = a -> a
+ 16 type FullTape e = (HalfTape e , HalfTape e)
+ 17 type FullTapeD e = D (FullTape e)
+ 18
+ 19 type HalfTape e = [e]
+ 20
+ 21 ----
+ 22
+ 23 newTape :: (Symbol e) => FullTape e
+ 24 newTape = ([def] , [def])
+ 25
+ 26 moveHeadRight :: (Symbol e) => FullTapeD e
+ 27 moveHeadRight (cell:left , right) = pad (left , cell:right)
+ 28 moveHeadRight ([] , _) = error "End of the Tape"
+ 29
+ 30 moveHeadLeft :: (Symbol e) => FullTapeD e
+ 31 moveHeadLeft (left , cell:right) = pad (cell:left , right)
+ 32 moveHeadLeft (_ , []) = error "End of the Tape"
+ 33
+ 34 pad :: (Symbol e) => FullTapeD e
+ 35 pad ([] , []) = newTape
+ 36 pad ([] , right) = ([def] , right)
+ 37 pad (left , []) = (left , [def])
+ 38 pad tape = tape
+ 39
+ 40 ----
+ 41
+ 42 wNextSymbol :: (Symbol e) => FullTapeD e
+ 43 wNextSymbol = modifyCell next
+ 44
+ 45 wPrevSymbol :: (Symbol e) => FullTapeD e
+ 46 wPrevSymbol = modifyCell prev
+ 47
+ 48 writeSymbol :: (Symbol e) => Char -> FullTapeD e
+ 49 writeSymbol symbol = modifyCell (const $ fromChar symbol)
+ 50
+ 51 modifyCell :: D e -> FullTapeD e
+ 52 modifyCell f (left , cell:right) = (left , f cell:right)
+ 53 modifyCell _ (_ , []) = error "End of the Tape"
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html
new file mode 100644
index 000000000..378891022
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Cat.Automaton (
+ 2 evalParams,
+ 3 eval
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automaton.API.EvalParams
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 9
+ 10 evalParams :: BIO m => EvalParams -> m ()
+ 11 evalParams = eval . source
+ 12
+ 13 eval :: BusinessIO m => Source -> m ()
+ 14 eval = wPutStr
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html
new file mode 100644
index 000000000..277ad958a
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Addressing (
+ 2 genericFindAddress,
+ 3 findAddress,
+ 4 genericNextLabel,
+ 5 nextLabel
+ 6 ) where
+ 7
+ 8 import HelVM.HelMA.Automata.ETA.Symbol
+ 9 import HelVM.HelMA.Automata.ETA.Token
+ 10
+ 11 import HelVM.HelIO.Containers.LLIndexSafe
+ 12
+ 13 import HelVM.HelIO.Control.Safe
+ 14
+ 15 import Data.ListLike hiding (show)
+ 16
+ 17 import Prelude hiding (length, splitAt)
+ 18
+ 19 import qualified Data.Vector as Vector
+ 20
+ 21 ----
+ 22
+ 23 genericFindAddress :: (MonadSafe m , Integral cell) => Vector.Vector Token -> cell -> m InstructionAddress
+ 24 genericFindAddress il = findAddress il . fromIntegral
+ 25
+ 26 findAddress :: MonadSafe m => Vector.Vector Token -> Int -> m InstructionAddress
+ 27 findAddress _ 1 = pure 0
+ 28 findAddress il address = appendErrorTupleList [("il" , show il) , ("address" , show address)] ((+1) <$> indexSafe (Vector.elemIndices R il) (address-2))
+ 29
+ 30 ----
+ 31
+ 32 genericNextLabel :: Integral cell => Vector.Vector Token -> InstructionAddress -> cell
+ 33 genericNextLabel il = fromIntegral . nextLabel il
+ 34
+ 35 nextLabel :: Vector.Vector Token -> InstructionAddress -> Int
+ 36 nextLabel il ic = length (Vector.elemIndices R il') + 2 where (il' , _) = splitAt ic il
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html
new file mode 100644
index 000000000..281881e0e
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 ) where
+ 6
+ 7 import HelVM.HelMA.Automata.ETA.Evaluator
+ 8 import HelVM.HelMA.Automata.ETA.Lexer
+ 9 import HelVM.HelMA.Automata.ETA.OperandParsers
+ 10 import HelVM.HelMA.Automata.ETA.Symbol
+ 11 import HelVM.HelMA.Automata.ETA.Token
+ 12
+ 13 import HelVM.HelMA.Automaton.API.EvalParams
+ 14 import HelVM.HelMA.Automaton.API.IOTypes
+ 15
+ 16 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 17 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 18
+ 19 import HelVM.HelMA.Automaton.Types.DumpType
+ 20 import HelVM.HelMA.Automaton.Types.StackType
+ 21
+ 22 import HelVM.HelIO.Collections.SList as SList
+ 23
+ 24 import Prelude hiding (divMod)
+ 25
+ 26 import qualified Data.Sequence as Seq
+ 27 import qualified Data.Vector as Vector
+ 28
+ 29 simpleEval :: BIO m => (Bool , Source , StackType) -> m ()
+ 30 simpleEval (c , s , t) = eval c s t Pretty
+ 31
+ 32 ----
+ 33
+ 34 evalParams :: BIO m => EvalParams -> m ()
+ 35 evalParams p = eval (compile p) (source p) (stackTypeOptions p) (dumpTypeOptions p)
+ 36
+ 37 eval :: (Evaluator Symbol m) => Bool -> Source -> StackType -> DumpType -> m ()
+ 38 eval compile source = evalTL compile (tokenize source)
+ 39
+ 40 evalTL :: (Evaluator Symbol m) => Bool -> TokenList -> StackType -> DumpType -> m ()
+ 41 evalTL c tl ListStackType = start c tl []
+ 42 evalTL c tl SeqStackType = start c tl Seq.empty
+ 43 evalTL c tl SListStackType = start c tl SList.sListEmpty
+ 44
+ 45 start :: (SEvaluator Symbol s m) => Bool -> TokenList -> s -> DumpType -> m ()
+ 46 start _ tl s dt = logDump dt =<< next (IU (Vector.fromList tl) 0) s
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html
new file mode 100644
index 000000000..50abd12dd
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Evaluator (
+ 2 next,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.ETA.Addressing
+ 6 import HelVM.HelMA.Automata.ETA.OperandParsers
+ 7 import HelVM.HelMA.Automata.ETA.Token
+ 8
+ 9 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 10
+ 11 import HelVM.HelMA.Automaton.Units.ALU as Stack
+ 12
+ 13 import Control.Type.Operator
+ 14
+ 15 import Prelude hiding (divMod)
+ 16
+ 17 next :: (SEvaluator e s m) => InstructionUnit -> s -> m $ Unit s
+ 18 next iu s = doInstruction' =<< nextIU iu where doInstruction' (t , iu') = doInstruction t iu' s
+ 19
+ 20 doInstruction :: (SEvaluator e s m) => Maybe Token -> InstructionUnit -> s -> m $ Unit s
+ 21 -- | IO instructions
+ 22 doInstruction (Just O) iu s = next iu =<< doOutputChar2 s
+ 23 doInstruction (Just I) iu s = next iu =<< doInputChar2 s
+ 24
+ 25 -- | Stack instructions
+ 26 doInstruction (Just N) iu s = next' =<< parseNumber iu where next' (symbol , iu') = next iu' (push1 symbol s)
+ 27 doInstruction (Just H) iu s = next iu =<< halibut s
+ 28
+ 29 -- | Arithmetic
+ 30 doInstruction (Just S) iu s = next iu =<< sub s
+ 31 doInstruction (Just E) iu s = next iu =<< divMod s
+ 32
+ 33 -- | Control
+ 34 doInstruction (Just R) iu s = next iu s
+ 35 doInstruction (Just A) iu@(IU il ic) s = (next iu . flipPush1 s . genericNextLabel il) ic
+ 36 doInstruction (Just T) iu@(IU il _ ) s = transfer =<< pop2 s where
+ 37 transfer (_ , 0 , s') = next iu s'
+ 38 transfer (0 , _ , _ ) = doEnd iu s
+ 39 transfer (l , _ , s') = next' =<< genericFindAddress il l where next' address = next (IU il address) s'
+ 40 doInstruction Nothing iu s = doEnd iu s
+ 41
+ 42 -- | Terminate instruction
+ 43 doEnd :: (SEvaluator e s m) => InstructionUnit -> s -> m $ Unit s
+ 44 doEnd iu s = pure $ Unit iu s
+ 45
+ 46 -- | Types
+ 47
+ 48 data Unit s = Unit
+ 49 { unitIU :: !InstructionUnit
+ 50 , unitStack :: s
+ 51 }
+ 52 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html
new file mode 100644
index 000000000..cdb64831c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.ETA.Token
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelIO.Util
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.WrapTokenList
+ 9
+ 10 -- | Lexer
+ 11 tokenize :: Source -> TokenList
+ 12 tokenize = whiteTokenListToTokenList . unWrapTokenList . readTokens
+ 13
+ 14 readTokens :: Source -> WhiteTokens
+ 15 readTokens source = (readTextUnsafe . toUppers) source :: WhiteTokens
+ 16
+ 17 -- | Types
+ 18 type WhiteTokens = WrapTokenList WhiteTokenList
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html
new file mode 100644
index 000000000..b04a053b3
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.OperandParsers where
+ 2
+ 3 import HelVM.HelMA.Automata.ETA.Symbol
+ 4 import HelVM.HelMA.Automata.ETA.Token
+ 5
+ 6 import HelVM.HelIO.Containers.LLIndexSafe
+ 7 import HelVM.HelIO.Control.Safe
+ 8 import HelVM.HelIO.Digit.ToDigit
+ 9
+ 10 import qualified Data.Vector as Vector
+ 11
+ 12 parseNumber :: (MonadSafe m , Integral a) => OperandIUParser m a
+ 13 parseNumber iu = go [] =<< nextIU iu where
+ 14 go :: (MonadSafe m , Integral a) => TokenList -> (Maybe Token, InstructionUnit) -> m (a, InstructionUnit)
+ 15 go acc (Nothing , iu') = ( , iu') <$> makeIntegral7FromList acc
+ 16 go acc (Just E , iu') = ( , iu') <$> makeIntegral7FromList acc
+ 17 go acc (Just R , iu') = go acc =<< nextIU iu'
+ 18 go acc (Just t , iu') = go (t : acc) =<< nextIU iu'
+ 19
+ 20 nextIU :: MonadSafe m => OperandIUParser m (Maybe Token)
+ 21 nextIU iu@(IU il ic)
+ 22 | ic < Vector.length il = wrap <$> indexSafe il ic
+ 23 | otherwise = pure (Nothing , iu)
+ 24 where wrap i = (Just i, IU il (ic+1))
+ 25
+ 26 -- | Types
+ 27 data InstructionUnit = IU !TokenVector !InstructionCounter
+ 28 deriving stock (Eq , Read , Show )
+ 29
+ 30 type OperandIUParser m a = InstructionUnit -> m (a , InstructionUnit)
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html
new file mode 100644
index 000000000..ee376a36d
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Token where
+ 2
+ 3 import HelVM.HelIO.Control.Safe
+ 4 import HelVM.HelIO.Digit.ToDigit
+ 5
+ 6 import Data.Vector as Vector
+ 7
+ 8 import qualified Text.Read
+ 9 import qualified Text.Show
+ 10
+ 11 data Token = E | T | A | O | I | N | S | H | R
+ 12 deriving stock (Bounded , Enum , Eq , Read , Show )
+ 13
+ 14 type TokenList = [Token]
+ 15 type TokenVector = Vector Token
+ 16
+ 17 instance ToDigit Token where
+ 18 toDigit H = pure 0
+ 19 toDigit T = pure 1
+ 20 toDigit A = pure 2
+ 21 toDigit O = pure 3
+ 22 toDigit I = pure 4
+ 23 toDigit N = pure 5
+ 24 toDigit S = pure 6
+ 25 toDigit t = liftErrorWithPrefix "Wrong token" $ show t
+ 26
+ 27 ----
+ 28
+ 29 newtype WhiteToken = WhiteToken { unWhiteToken :: Token}
+ 30 deriving stock (Eq )
+ 31
+ 32 type WhiteTokenList = [WhiteToken]
+ 33
+ 34 instance Show WhiteToken where
+ 35 show (WhiteToken R) = "\n"
+ 36 show (WhiteToken t) = show t
+ 37
+ 38 -- | Scanner
+ 39 instance Read WhiteToken where
+ 40 readsPrec _ "\n" = [( WhiteToken R , "")]
+ 41 readsPrec _ "E" = [( WhiteToken E , "")]
+ 42 readsPrec _ "T" = [( WhiteToken T , "")]
+ 43 readsPrec _ "A" = [( WhiteToken A , "")]
+ 44 readsPrec _ "O" = [( WhiteToken O , "")]
+ 45 readsPrec _ "I" = [( WhiteToken I , "")]
+ 46 readsPrec _ "N" = [( WhiteToken N , "")]
+ 47 readsPrec _ "S" = [( WhiteToken S , "")]
+ 48 readsPrec _ "H" = [( WhiteToken H , "")]
+ 49 readsPrec _ _ = []
+ 50
+ 51 tokenToWhiteTokenPair :: Token -> (WhiteToken , String)
+ 52 tokenToWhiteTokenPair t = (WhiteToken t , "")
+ 53
+ 54 whiteTokenListToTokenList :: WhiteTokenList -> TokenList
+ 55 whiteTokenListToTokenList = fmap unWhiteToken
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html
new file mode 100644
index 000000000..89e5d37a4
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Rev.Automaton (
+ 2 evalParams,
+ 3 eval
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automaton.API.EvalParams
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 9
+ 10 import qualified Data.Text as Text
+ 11
+ 12 evalParams :: BIO m => EvalParams -> m ()
+ 13 evalParams = eval . source
+ 14
+ 15 eval :: BusinessIO m => Source -> m ()
+ 16 eval = evalLines . lines
+ 17
+ 18 evalLines :: BusinessIO m => [Source] -> m ()
+ 19 evalLines ll = doOutput $ unlines $ Text.reverse <$> ll
+ 20
+ 21 doOutput :: BusinessIO m => Source -> m ()
+ 22 doOutput = wPutStr
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html
new file mode 100644
index 000000000..f8508b74b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 ) where
+ 6
+ 7 import HelVM.HelMA.Automata.SubLeq.Evaluator
+ 8 import HelVM.HelMA.Automata.SubLeq.Lexer
+ 9
+ 10 import HelVM.HelMA.Automaton.API.EvalParams
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 15
+ 16 import HelVM.HelMA.Automaton.Types.DumpType
+ 17 import HelVM.HelMA.Automaton.Types.RAMType
+ 18
+ 19 import qualified HelVM.HelIO.Collections.MapList as MapList
+ 20 import qualified HelVM.HelIO.Collections.SList as SList
+ 21
+ 22 import qualified Data.Sequence as Seq
+ 23
+ 24 simpleEval :: BIO m => RAMType -> Source -> m ()
+ 25 simpleEval rt s = eval s rt Pretty
+ 26
+ 27 ----
+ 28
+ 29 evalParams :: BIO m => EvalParams -> m ()
+ 30 evalParams p = eval (source p) (ramTypeOptions p) (dumpTypeOptions p)
+ 31
+ 32 eval :: BIO m => Source -> RAMType -> DumpType -> m ()
+ 33 eval source = evalIL $ tokenize source
+ 34
+ 35 evalIL :: Evaluator e m => [e] -> RAMType -> DumpType -> m ()
+ 36 evalIL = flip evalIL'
+ 37
+ 38 evalIL' :: Evaluator e m => RAMType -> [e] -> DumpType -> m ()
+ 39 evalIL' ListRAMType = start
+ 40 evalIL' SeqRAMType = start . Seq.fromList
+ 41 evalIL' SListRAMType = start . SList.sListFromList
+ 42 evalIL' MapListRAMType = start . MapList.mapListFromList
+ 43
+ 44 start :: REvaluator e r m => r -> DumpType -> m ()
+ 45 start r dt = logDump dt =<< doInstruction 0 r
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html
new file mode 100644
index 000000000..d442c9f2e
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Evaluator (
+ 2 doInstruction,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 6 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 7
+ 8 import HelVM.HelMA.Automaton.Units.RAM as RAM
+ 9
+ 10 import Control.Type.Operator
+ 11
+ 12 doInstruction :: REvaluator e r m => e -> r -> m $ Unit e r
+ 13 doInstruction ic ram
+ 14 | ic < 0 = doEnd ic ram
+ 15 | src < 0 = doInputChar dst ic ram
+ 16 | dst < 0 = doOutputChar src ic ram
+ 17 | otherwise = doInstruction ic' $ store dst diff ram
+ 18 where
+ 19 src = genericLoad ram ic
+ 20 dst = genericLoad ram $ ic + 1
+ 21 diff = genericLoad ram dst - genericLoad ram src
+ 22 ic'
+ 23 | diff <= 0 = genericLoad ram $ ic + 2
+ 24 | otherwise = ic + 3
+ 25
+ 26 -- | IO instructions
+ 27 doOutputChar :: REvaluator e r m => e -> e -> r -> m $ Unit e r
+ 28 doOutputChar address ic ram = wPutAsChar (genericLoad ram address) *> doInstruction (ic+3) ram
+ 29
+ 30 doInputChar :: REvaluator e r m => e -> e -> r -> m $ Unit e r
+ 31 doInputChar address ic ram = doInputChar' =<< wGetChar where
+ 32 doInputChar' char = doInstruction (ic+3) $ storeChar address char ram
+ 33
+ 34 -- | Terminate instruction
+ 35 doEnd :: REvaluator e r m => e -> r -> m $ Unit e r
+ 36 doEnd ic ram = pure $ Unit ic ram
+ 37
+ 38 -- | Types
+ 39 data Unit ic ram = Unit
+ 40 { unitIU :: ic
+ 41 , unitRAM :: ram
+ 42 }
+ 43 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html
new file mode 100644
index 000000000..beead8144
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.SubLeq.Symbol
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelIO.Util
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8
+ 9 import qualified Text.Read as Read
+ 10 import qualified Text.Show as Show
+ 11
+ 12 tokenize :: Source -> SymbolList
+ 13 tokenize source = (maybeToList . readTextMaybe) =<< splitOneOf " \t\n" source
+ 14
+ 15 readSymbols :: Source -> Symbols
+ 16 readSymbols source = readTextUnsafe source :: Symbols
+ 17
+ 18 ----
+ 19
+ 20 newtype Symbols = Symbols SymbolList
+ 21
+ 22 instance Show Symbols where
+ 23 show (Symbols symbols) = toString $ unwords $ shows symbols
+ 24
+ 25 instance Read Symbols where
+ 26 readsPrec _ source = [( Symbols $ tokenize $ toText source , "")]
+ 27
+ 28 ----
+ 29
+ 30 shows :: SymbolList -> [Text]
+ 31 shows symbols = show <$> symbols
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html
new file mode 100644
index 000000000..758410503
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 evalIL,
+ 6 evalTL,
+ 7 start,
+ 8 ) where
+ 9
+ 10 import HelVM.HelMA.Automata.WhiteSpace.Evaluator
+ 11 import HelVM.HelMA.Automata.WhiteSpace.Lexer
+ 12 import HelVM.HelMA.Automata.WhiteSpace.Parser
+ 13 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 14 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 15
+ 16 import HelVM.HelMA.Automaton.API.EvalParams
+ 17 import HelVM.HelMA.Automaton.API.IOTypes
+ 18
+ 19 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 20 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 21
+ 22 import HelVM.HelMA.Automaton.Instruction
+ 23
+ 24 import HelVM.HelMA.Automaton.Units.CPU as CPU
+ 25
+ 26 import HelVM.HelMA.Automaton.Types.DumpType
+ 27 import HelVM.HelMA.Automaton.Types.RAMType
+ 28 import HelVM.HelMA.Automaton.Types.StackType
+ 29 import HelVM.HelMA.Automaton.Types.TokenType
+ 30
+ 31 import HelVM.HelIO.Control.Safe
+ 32
+ 33 import Prelude hiding (swap)
+ 34
+ 35 import qualified HelVM.HelMA.Automata.WhiteSpace.SimpleParams as S
+ 36
+ 37 import qualified HelVM.HelIO.Collections.MapList as MapList
+ 38 import qualified HelVM.HelIO.Collections.SList as SList
+ 39
+ 40 import qualified Data.Sequence as Seq
+ 41 import qualified Data.Vector as Vector
+ 42
+ 43 simpleEval :: BIO m => S.SimpleParams -> m ()
+ 44 simpleEval p = eval (S.tokenType p) (S.source p) (S.asciiLabel p) (S.stackType p) (S.ramType p) (S.dumpType p)
+ 45
+ 46 ----
+ 47
+ 48 evalParams :: BIO m => TokenType -> EvalParams -> m ()
+ 49 evalParams tokenType p = eval tokenType (source p) (asciiLabel p) (stackTypeOptions p) (ramTypeOptions p) (dumpTypeOptions p)
+ 50
+ 51 eval :: BIO m => TokenType -> Source -> Bool -> StackType -> RAMType -> DumpType -> m ()
+ 52 eval tokenType source = evalTL $ tokenize tokenType source
+ 53
+ 54 evalTL :: BIO m => TokenList -> Bool -> StackType -> RAMType -> DumpType -> m ()
+ 55 evalTL tl ascii st rt dt = evalTL' =<< liftSafe (parseTL ascii tl) where evalTL' il = evalIL il st rt dt
+ 56
+ 57 evalIL :: BIO m => InstructionList -> StackType -> RAMType -> DumpType -> m ()
+ 58 evalIL il s ListRAMType = evalIL' il s []
+ 59 evalIL il s SeqRAMType = evalIL' il s Seq.empty
+ 60 evalIL il s SListRAMType = evalIL' il s SList.sListEmpty
+ 61 evalIL il s MapListRAMType = evalIL' il s MapList.mapListEmpty
+ 62
+ 63 evalIL' :: (REvaluator Symbol r m) => InstructionList -> StackType -> r -> DumpType -> m ()
+ 64 evalIL' il ListStackType = start il []
+ 65 evalIL' il SeqStackType = start il Seq.empty
+ 66 evalIL' il SListStackType = start il SList.sListEmpty
+ 67
+ 68 start :: (SREvaluator Symbol s r m) => InstructionList -> s -> r -> DumpType -> m ()
+ 69 start il s r dt = logDump dt =<< next (CU (Vector.fromList il) 0 (IS [])) s r
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html
new file mode 100644
index 000000000..313df0c28
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Evaluator (
+ 2 next
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 6
+ 7 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 8
+ 9 import HelVM.HelMA.Automaton.Instruction
+ 10
+ 11 import HelVM.HelMA.Automaton.Units.ALU as Stack
+ 12 import HelVM.HelMA.Automaton.Units.CPU as CPU
+ 13 import HelVM.HelMA.Automaton.Units.LSU as LSU
+ 14 import HelVM.HelMA.Automaton.Units.Unit
+ 15
+ 16 import HelVM.HelIO.Containers.LLIndexSafe
+ 17
+ 18 import Control.Type.Operator
+ 19
+ 20 import Prelude hiding (swap)
+ 21
+ 22 next :: (SREvaluator Symbol s r m) => ControlUnit -> s -> r -> m $ Unit s r
+ 23 next (CU il ic is) s r = doInstruction' =<< indexSafe il ic where doInstruction' i = doInstruction i (CU il (ic+1) is) s r
+ 24
+ 25 stackNext :: (SREvaluator Symbol s r m) => ControlUnit -> r -> s -> m (Unit s r)
+ 26 stackNext cu r s = next cu s r
+ 27
+ 28 cuNext :: (SREvaluator Symbol s r m) => r -> ControlUnit -> s -> m (Unit s r)
+ 29 cuNext r cu s = next cu s r
+ 30
+ 31 ----
+ 32
+ 33 doInstruction :: (SREvaluator Symbol s r m) => Instruction -> ControlUnit -> s -> r -> m (Unit s r)
+ 34 doInstruction (IAL i) cu s r = stackNext cu r =<< alInstruction i s
+ 35 doInstruction (ILS i) cu s r = uncurry (next cu) . sluToTuple =<< slInstruction i (LSU s r)
+ 36 doInstruction (IControl i) cu s r = uncurry (cuNext r). cpuToTuple =<< controlInstruction i (CPU cu s)
+ 37 doInstruction End cu s r = pure $ Unit cu s r
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html
new file mode 100644
index 000000000..ac7fd28f0
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelMA.Automaton.API.IOTypes
+ 7 import HelVM.HelMA.Automaton.Types.TokenType
+ 8 import HelVM.HelMA.Automaton.WrapTokenList
+ 9
+ 10 -- | Lexer
+ 11
+ 12 tokenize :: TokenType -> Source -> TokenList
+ 13 tokenize VisibleTokenType = tokenizeVisible
+ 14 tokenize _ = tokenizeWhite
+ 15
+ 16 tokenizeVisible :: Source -> TokenList
+ 17 tokenizeVisible = unWrapTokenList . readVisibleTokens
+ 18
+ 19 tokenizeWhite :: Source -> TokenList
+ 20 tokenizeWhite = whiteTokenListToTokenList . unWrapTokenList . readWhiteTokens
+ 21
+ 22 readVisibleTokens :: Source -> VisibleTokens
+ 23 readVisibleTokens source = readTextUnsafe source :: VisibleTokens
+ 24
+ 25 readWhiteTokens :: Source -> WhiteTokens
+ 26 readWhiteTokens source = readTextUnsafe source :: WhiteTokens
+ 27
+ 28 type VisibleTokens = WrapTokenList TokenList
+ 29
+ 30 type WhiteTokens = WrapTokenList WhiteTokenList
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html
new file mode 100644
index 000000000..10bbf0b57
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.OperandParsers where
+ 2
+ 3 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 4 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 5
+ 6 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 7
+ 8 import HelVM.HelIO.Collections.SList
+ 9 import HelVM.HelIO.Control.Safe
+ 10 import HelVM.HelIO.Digit.ToDigit
+ 11
+ 12 type OperandParser m a = TokenList -> m (a , TokenList)
+ 13
+ 14 ----
+ 15
+ 16 parseIndex :: MonadSafe m => OperandParser m Index
+ 17 parseIndex = parseInt
+ 18
+ 19 parseSymbol :: MonadSafe m => OperandParser m Symbol
+ 20 parseSymbol = parseInteger
+ 21
+ 22 parseLabel :: MonadSafe m => Bool -> OperandParser m Label
+ 23 parseLabel False = parseDigitString
+ 24 parseLabel True = parseAsciiString
+ 25
+ 26 ----
+ 27
+ 28 parseInt :: MonadSafe m => OperandParser m Int
+ 29 parseInt tl = parseInt' <$> parseInteger tl where
+ 30 parseInt' (integer , tl') = (fromIntegral integer , tl')
+ 31
+ 32 parseInteger :: MonadSafe m => OperandParser m Integer
+ 33 parseInteger [] = liftError "EOL"
+ 34 parseInteger (S : tl) = parseUtil makeIntegral2FromList tl
+ 35 parseInteger (T : tl) = negationIntegral <$> parseUtil makeIntegral2FromList tl
+ 36 parseInteger (N : tl) = pure (0 , tl )
+ 37
+ 38 negationIntegral :: (Integer , TokenList) -> (Integer , TokenList)
+ 39 negationIntegral (i , l) = (-i , l)
+ 40
+ 41 parseNatural :: MonadSafe m => OperandParser m Natural
+ 42 parseNatural = parseUtil makeIntegral2FromList
+ 43
+ 44 parseUtil :: MonadSafe m => (TokenList -> m a) -> OperandParser m a
+ 45 parseUtil maker = go ([] :: TokenList) where
+ 46 go acc [] = liftError $ show acc
+ 47 go acc (N:tl) = moveSafe (maker acc , tl)
+ 48 go acc (t:tl) = go (t : acc) tl
+ 49
+ 50 parseDigitString :: MonadSafe m => OperandParser m SString
+ 51 parseDigitString tl = moveSafe =<< parseString' makeDigitStringFromList tl
+ 52
+ 53 parseAsciiString :: MonadSafe m => OperandParser m SString
+ 54 parseAsciiString tl = moveSafe =<< parseString' makeAsciiString28FromList tl
+ 55
+ 56 moveSafe :: MonadSafe m => (m a , TokenList) -> m (a , TokenList)
+ 57 moveSafe (a , tl) = appendErrorTuple ("TokenList" , show tl) $ ( , tl) <$> a
+ 58
+ 59 parseString' :: MonadSafe m => (TokenList -> a) -> OperandParser m a
+ 60 parseString' maker tl = parseString'' <$> splitByN tl where
+ 61 parseString'' (acc , tl') = (maker acc , tl')
+ 62
+ 63 splitByN :: MonadSafe m => OperandParser m TokenList
+ 64 splitByN [] = liftError "Empty list"
+ 65 splitByN (N : tl) = pure ([] , tl)
+ 66 splitByN (t : tl) = splitByN' <$> splitByN tl where
+ 67 splitByN' (acc , tl') = (t:acc , tl')
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html
new file mode 100644
index 000000000..8f77e63a7
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Parser (
+ 2 flipParseVisible,
+ 3 flipParseWhite,
+ 4 parseVisible,
+ 5 parseWhite,
+ 6 parse,
+ 7 parseTL
+ 8 ) where
+ 9
+ 10 import HelVM.HelMA.Automata.WhiteSpace.Lexer
+ 11 import HelVM.HelMA.Automata.WhiteSpace.OperandParsers
+ 12 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 13
+ 14
+ 15 import HelVM.HelMA.Automaton.API.IOTypes
+ 16
+ 17 import HelVM.HelMA.Automaton.Instruction
+ 18 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 19 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 20 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 21 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 22
+ 23 import HelVM.HelMA.Automaton.Types.TokenType
+ 24
+ 25 import HelVM.HelIO.Control.Safe
+ 26
+ 27 -- FIXME
+ 28 flipParseVisible :: Bool -> Source -> Safe InstructionList
+ 29 flipParseVisible = flip parseVisible
+ 30
+ 31 flipParseWhite :: Bool -> Source -> Safe InstructionList
+ 32 flipParseWhite = flip parseWhite
+ 33
+ 34 parseVisible :: Source -> Bool -> Safe InstructionList
+ 35 parseVisible = parse VisibleTokenType
+ 36
+ 37 parseWhite :: Source -> Bool -> Safe InstructionList
+ 38 parseWhite = parse WhiteTokenType
+ 39
+ 40 parse :: MonadSafe m => TokenType -> Source -> Bool -> m InstructionList
+ 41 parse tokenType = flip parseTL . tokenize tokenType
+ 42
+ 43 parseTL :: MonadSafe m => Bool -> TokenList -> m InstructionList
+ 44 parseTL ascii = go where
+ 45 go :: MonadSafe m => TokenList -> m InstructionList
+ 46 go [] = pure []
+ 47 -- | IAL instructions
+ 48 go (S:S:tl') = go' =<< parseSymbol tl' where go' (symbol , tl'') = (IAL (Cons symbol) : ) <$> go tl''
+ 49 go (S:T:S:tl') = go' =<< parseIndex tl' where go' (index , tl'') = (IAL (SStatic index Copy) : ) <$> go tl''
+ 50 go (S:T:T:tl') = panic "STT" tl'
+ 51 go (S:T:N:tl') = go' =<< parseIndex tl' where go' (index , tl'') = (IAL (SStatic index Slide) : ) <$> go tl''
+ 52 go (S:N:S:tl') = (IAL Dup : ) <$> go tl'
+ 53 go (S:N:T:tl') = (IAL Swap : ) <$> go tl'
+ 54 go (S:N:N:tl') = (IAL Discard : ) <$> go tl'
+ 55 --Arithmetic
+ 56 go (T:S:S:S:tl') = (IAL (Binary Add) : ) <$> go tl'
+ 57 go (T:S:S:T:tl') = (IAL (Binary Sub) : ) <$> go tl'
+ 58 go (T:S:S:N:tl') = (IAL (Binary Mul) : ) <$> go tl'
+ 59 go (T:S:T:S:tl') = (IAL (Binary Div) : ) <$> go tl'
+ 60 go (T:S:T:T:tl') = (IAL (Binary Mod) : ) <$> go tl'
+ 61 go (T:S:T:N:tl') = panic "TSTN" tl'
+ 62 go (T:S:N:S:tl') = panic "TSNS" tl'
+ 63 go (T:S:N:T:tl') = panic "TSNT" tl'
+ 64 go (T:S:N:N:tl') = panic "TSNN" tl'
+ 65 -- | Heap access
+ 66 go (T:T:S:tl') = (ILS Store : ) <$> go tl'
+ 67 go (T:T:T:tl') = (ILS Load : ) <$> go tl'
+ 68 go (T:T:N:tl') = panic "TTN" tl'
+ 69 -- | IControl
+ 70 go (N:S:S:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (Mark label) : ) <$> go tl''
+ 71 go (N:S:T:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label Call ) : ) <$> go tl''
+ 72 go (N:S:N:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label Jump ) : ) <$> go tl''
+ 73 go (N:T:S:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label (Branch EZ)) : ) <$> go tl''
+ 74 go (N:T:T:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label (Branch LTZ)) : ) <$> go tl''
+ 75 go (N:T:N:tl') = (IControl Return : ) <$> go tl'
+ 76 go (N:N:S:tl') = panic "NNS" tl'
+ 77 go (N:N:T:tl') = panic "NNT" tl'
+ 78 go (N:N:N:tl') = (End : ) <$> go tl'
+ 79 -- | IO instructions
+ 80 go (T:N:S:S:tl') = (IAL (SIO OutputChar) : ) <$> go tl'
+ 81 go (T:N:S:T:tl') = (IAL (SIO OutputDec) : ) <$> go tl'
+ 82 go (T:N:S:N:tl') = panic "TNSN" tl'
+ 83 go (T:N:T:S:tl') = (ILS (MIO InputChar) : ) <$> go tl'
+ 84 go (T:N:T:T:tl') = (ILS (MIO InputDec) : ) <$> go tl'
+ 85 go (T:N:T:N:tl') = panic "TNTN" tl'
+ 86 go (T:N:N:S:tl') = panic "TNNS" tl'
+ 87 go (T:N:N:T:tl') = panic "TNNT" tl'
+ 88 go (T:N:N:N:tl') = panic "TNNN" tl'
+ 89 go tl' = panic (show tl') []
+ 90
+ 91 panic :: MonadSafe m => Text -> TokenList -> m InstructionList
+ 92 panic token tl = liftErrorTupleList [("Unrecognised tokenl" , token) , ("Rest tokens" , show tl)]
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html
new file mode 100644
index 000000000..7097b0beb
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.SimpleParams where
+ 2
+ 3 import HelVM.HelMA.Automaton.API.IOTypes
+ 4 import HelVM.HelMA.Automaton.Types.DumpType
+ 5 import HelVM.HelMA.Automaton.Types.RAMType
+ 6 import HelVM.HelMA.Automaton.Types.StackType
+ 7 import HelVM.HelMA.Automaton.Types.TokenType
+ 8
+ 9 -- | Construction for tests
+ 10 simpleParamsWithDefaultsAndWhiteTokenType :: Bool -> Source -> SimpleParams
+ 11 simpleParamsWithDefaultsAndWhiteTokenType = simpleParamsWithDefaults WhiteTokenType
+ 12
+ 13 simpleParamsWithDefaultsAndVisibleTokenType :: Bool -> Source -> SimpleParams
+ 14 simpleParamsWithDefaultsAndVisibleTokenType = simpleParamsWithDefaults VisibleTokenType
+ 15
+ 16 simpleParamsWithDefaults :: TokenType -> Bool -> Source -> SimpleParams
+ 17 simpleParamsWithDefaults tt = simpleParams tt (defaultStackType , defaultRAMType)
+ 18
+ 19 -- | Construction for benchmark
+ 20 simpleParamsWithWhiteTokenType :: (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 21 simpleParamsWithWhiteTokenType = simpleParams WhiteTokenType
+ 22
+ 23 simpleParamsWithVisibleTokenType :: (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 24 simpleParamsWithVisibleTokenType = simpleParams VisibleTokenType
+ 25
+ 26 simpleParams :: TokenType -> (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 27 simpleParams tt (st , rt) al s = SimpleParams
+ 28 { tokenType = tt
+ 29 , source = s
+ 30 , asciiLabel = al
+ 31 , stackType = st
+ 32 , ramType = rt
+ 33 , dumpType = Pretty
+ 34 }
+ 35
+ 36 -- | Type
+ 37 data SimpleParams = SimpleParams
+ 38 { tokenType :: !TokenType
+ 39 , source :: !Source
+ 40 , asciiLabel :: !Bool
+ 41 , stackType :: !StackType
+ 42 , ramType :: !RAMType
+ 43 , dumpType :: !DumpType
+ 44 }
+ 45
+ 46
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html
new file mode 100644
index 000000000..6cb7c3008
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Token where
+ 2
+ 3 import HelVM.HelIO.Collections.SList
+ 4 import HelVM.HelIO.Control.Safe
+ 5 import HelVM.HelIO.Digit.ToDigit
+ 6
+ 7 import Text.Read
+ 8
+ 9 import qualified Text.Show
+ 10
+ 11 data Token = S | T | N
+ 12 deriving stock (Bounded , Enum , Eq , Read , Show )
+ 13
+ 14 type TokenList = [Token]
+ 15 type TokenSList = SList Token
+ 16
+ 17 instance ToDigit Token where
+ 18 toDigit S = pure 0
+ 19 toDigit T = pure 1
+ 20 toDigit t = liftErrorWithPrefix "Wrong token" $ show t
+ 21
+ 22 ----
+ 23
+ 24 newtype WhiteToken = WhiteToken { unWhiteToken :: Token}
+ 25 deriving stock (Eq )
+ 26
+ 27 instance Show WhiteToken where
+ 28 show (WhiteToken S) = " "
+ 29 show (WhiteToken T) = "\t"
+ 30 show (WhiteToken N) = "\n"
+ 31
+ 32 -- | Scanner
+ 33 instance Read WhiteToken where
+ 34 readsPrec _ " " = [( WhiteToken S , "")]
+ 35 readsPrec _ "\t" = [( WhiteToken T , "")]
+ 36 readsPrec _ "\n" = [( WhiteToken N , "")]
+ 37 readsPrec _ _ = []
+ 38
+ 39 type WhiteTokenList = [WhiteToken]
+ 40
+ 41 whiteTokenListToTokenList :: WhiteTokenList -> TokenList
+ 42 whiteTokenListToTokenList = fmap unWhiteToken
+ 43
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html
new file mode 100644
index 000000000..5aabe2f22
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Automaton (
+ 2 evalParams,
+ 3 eval,
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automata.Zot.Evaluator
+ 7 import HelVM.HelMA.Automata.Zot.Expression
+ 8 import HelVM.HelMA.Automata.Zot.Parser
+ 9
+ 10 import HelVM.HelMA.Automaton.API.EvalParams
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14
+ 15 import HelVM.HelIO.Containers.Util
+ 16 import HelVM.HelIO.Control.Safe
+ 17
+ 18 import HelVM.HelIO.Digit.Digitable
+ 19 import HelVM.HelIO.Digit.ToDigit
+ 20
+ 21 import HelVM.HelIO.ListLikeUtil
+ 22
+ 23 import Control.Monad.Writer.Lazy
+ 24
+ 25 evalParams :: BIO m => EvalParams -> m ()
+ 26 evalParams p = wPutStr =<< eval (asciiLabel p) (source p) =<< wGetContents
+ 27
+ 28 eval :: MonadSafe m => Bool -> Source -> Input -> m Output
+ 29 eval False source input = pure $ showFoldable $ evalSource source input
+ 30 eval True source input = (makeAsciiText28 . convert . evalSource source) . showExpressionList =<< textToDL input
+ 31
+ 32 evalSource :: Source -> Input -> ExpressionDList
+ 33 evalSource source input = evalText $ source <> input
+ 34
+ 35 evalText :: Text -> ExpressionDList
+ 36 evalText = execWriter . evalExpressionList . parse
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html
new file mode 100644
index 000000000..6a1b85405
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Evaluator (
+ 2 evalExpressionList,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.Zot.Expression
+ 6
+ 7 import Control.Monad.Writer.Lazy
+ 8
+ 9 import qualified Data.ListLike as LL
+ 10
+ 11 -- | High-level Expressions
+ 12 evalExpressionList :: ExpressionList -> Out Expression
+ 13 evalExpressionList el = foldExpression el >><< outputExpression >>< printExpression
+ 14
+ 15 foldExpression :: ExpressionList -> Out Expression
+ 16 foldExpression = foldM (><) emptyExpression
+ 17
+ 18 emptyExpression :: Expression
+ 19 emptyExpression = contExpression iExpression
+ 20
+ 21 outputExpression :: Out Expression
+ 22 outputExpression = kExpression ><< kExpression ><< kExpression ><< kExpression ><< kExpression ><< kExpression >< iExpression
+ 23
+ 24 printExpression :: Expression
+ 25 printExpression = Expression innerPrintExpression
+ 26
+ 27 innerPrintExpression :: Expression -> Out Expression
+ 28 innerPrintExpression f = interrogateExpression f >>< Zero >>< One >>= tell . LL.singleton >> pure printExpression
+ 29
+ 30 interrogateExpression :: Expression -> Out Expression
+ 31 interrogateExpression f = f >< iExpression >>< iExpression >>< iExpression >>< kExpression
+ 32
+ 33 -- | Operators
+ 34 infixl 9 ><
+ 35 (><) :: Expression -> Expression -> Out Expression
+ 36 (><) Zero = (zeroExpression ><)
+ 37 (><) One = (oneExpression ><)
+ 38 (><) (Expression f) = f
+ 39
+ 40 infixl 6 >><
+ 41 (>><) :: Out Expression -> Expression -> Out Expression
+ 42 f >>< a = f >>= (>< a)
+ 43
+ 44 infixr 8 ><<
+ 45 (><<) :: Expression -> Out Expression -> Out Expression
+ 46 f ><< a = (f ><) =<< a
+ 47
+ 48 infixl 7 >><<
+ 49 (>><<) :: Out Expression -> Out Expression -> Out Expression
+ 50 f >><< a = f >>= (><< a)
+ 51
+ 52
+ 53 -- | Low-level Expressions
+ 54 zeroExpression :: Expression
+ 55 zeroExpression = contExpression $ Expression $ \ f -> f >< sExpression >>< kExpression
+ 56
+ 57 oneExpression :: Expression
+ 58 oneExpression = makeExpression $ \c -> contExpression $ makeExpression $ \l -> contExpression $ Expression $ \r -> c ><< l >< r
+ 59
+ 60 contExpression :: Expression -> Expression
+ 61 contExpression = Expression . flip (><)
+ 62
+ 63 sExpression :: Expression
+ 64 sExpression = makeExpression $ \x -> makeExpression $ \y -> Expression $ \z -> x >< z >><< y >< z
+ 65
+ 66 kExpression :: Expression
+ 67 kExpression = makeExpression $ makeExpression . const
+ 68
+ 69 iExpression :: Expression
+ 70 iExpression = makeExpression id
+ 71
+ 72 makeExpression :: (Expression -> Expression) -> Expression
+ 73 makeExpression f = Expression $ pure . f
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html
new file mode 100644
index 000000000..1176a44b3
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Expression where
+ 2
+ 3 import HelVM.HelIO.Control.Safe
+ 4
+ 5 import HelVM.HelIO.Containers.Util
+ 6 import HelVM.HelIO.Digit.Digitable
+ 7 import HelVM.HelIO.Digit.ToDigit
+ 8
+ 9 import Control.Monad.Writer.Lazy
+ 10
+ 11 import qualified Data.DList as D
+ 12
+ 13 import Text.Read
+ 14 import qualified Text.Show
+ 15
+ 16 showExpressionList :: ExpressionList -> Text
+ 17 showExpressionList = showFoldable
+ 18
+ 19 readExpressionList :: Text -> ExpressionList
+ 20 readExpressionList = stringToExpressionList . toString
+ 21
+ 22 stringToExpressionList :: String -> ExpressionList
+ 23 stringToExpressionList s = charToExpressionList =<< s
+ 24
+ 25 charToExpressionList :: Char -> ExpressionList
+ 26 charToExpressionList = maybeToList . rightToMaybe . charToExpressionSafe
+ 27
+ 28 charToExpression :: Char -> Expression
+ 29 charToExpression = unsafe . charToExpressionSafe
+ 30
+ 31 charToExpressionSafe :: MonadSafe m => Char -> m Expression
+ 32 charToExpressionSafe '0' = pure Zero
+ 33 charToExpressionSafe '1' = pure One
+ 34 charToExpressionSafe c = liftErrorWithPrefix "charToExpression" $ one c
+ 35
+ 36 -- | Types
+ 37 type ExpressionDList = D.DList Expression
+ 38
+ 39 type ExpressionList = [Expression]
+ 40
+ 41 data Expression = Zero | One | Expression (Expression -> Out Expression)
+ 42
+ 43 type Out = Writer ExpressionDList
+ 44
+ 45 instance Read Expression where
+ 46 readsPrec _ [] = []
+ 47 readsPrec _ (c : s) = [(charToExpression c , s)]
+ 48 readList s = [(stringToExpressionList s , "")]
+ 49
+ 50 instance Show Expression where
+ 51 show Zero = "0"
+ 52 show One = "1"
+ 53 show (Expression _) = "function"
+ 54 showList fs = (concatMap show fs <>)
+ 55
+ 56 instance Digitable Expression where
+ 57 fromDigit 0 = pure Zero
+ 58 fromDigit 1 = pure One
+ 59 fromDigit t = wrongToken t
+ 60
+ 61 instance ToDigit Expression where
+ 62 toDigit Zero = pure 0
+ 63 toDigit One = pure 1
+ 64 toDigit t = wrongToken t
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html
new file mode 100644
index 000000000..d8a3a6160
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Parser (
+ 2 parse,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.Zot.Expression
+ 6
+ 7 import qualified Data.Text as Text
+ 8
+ 9 parse :: Text -> ExpressionList
+ 10 parse = concatMap parseLine . lines
+ 11
+ 12 parseLine :: Text -> ExpressionList
+ 13 parseLine = readExpressionList . filter01 . Text.takeWhile (/= '#')
+ 14
+ 15 filter01 :: Text -> Text
+ 16 filter01 = Text.filter is01
+ 17
+ 18 is01 :: Char -> Bool
+ 19 is01 c = c == '0' || c == '1'
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html
new file mode 100644
index 000000000..8b25d1153
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.API.EvalParams where
+ 2
+ 3 import HelVM.HelMA.Automaton.API.IOTypes
+ 4 import HelVM.HelMA.Automaton.API.TypeOptions
+ 5
+ 6 import HelVM.HelMA.Automaton.Types.CellType
+ 7 import HelVM.HelMA.Automaton.Types.DumpType
+ 8 import HelVM.HelMA.Automaton.Types.IntCellType
+ 9 import HelVM.HelMA.Automaton.Types.RAMType
+ 10 import HelVM.HelMA.Automaton.Types.StackType
+ 11
+ 12 -- | Accessors
+ 13 ramTypeOptions :: EvalParams -> RAMType
+ 14 ramTypeOptions = ram . typeOptions
+ 15
+ 16 stackTypeOptions :: EvalParams -> StackType
+ 17 stackTypeOptions = stack . typeOptions
+ 18
+ 19 cellTypeOptions :: EvalParams -> CellType
+ 20 cellTypeOptions = cell . typeOptions
+ 21
+ 22 intCellTypeOptions :: EvalParams -> IntCellType
+ 23 intCellTypeOptions = intCell . typeOptions
+ 24
+ 25 dumpTypeOptions :: EvalParams -> DumpType
+ 26 dumpTypeOptions = dumpType . typeOptions
+ 27
+ 28 -- | Type
+ 29 data EvalParams = EvalParams
+ 30 { compile :: !Bool
+ 31 , asciiLabel :: !Bool
+ 32 , source :: !Source
+ 33 , typeOptions :: !TypeOptions
+ 34 }
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html
new file mode 100644
index 000000000..363cc695b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.API.TypeOptions where
+ 2
+ 3 import HelVM.HelMA.Automaton.Types.CellType
+ 4 import HelVM.HelMA.Automaton.Types.DumpType
+ 5 import HelVM.HelMA.Automaton.Types.IntCellType
+ 6 import HelVM.HelMA.Automaton.Types.RAMType
+ 7 import HelVM.HelMA.Automaton.Types.StackType
+ 8
+ 9 -- | Types
+ 10
+ 11 data TypeOptions = TypeOptions
+ 12 { ram :: !RAMType
+ 13 , stack :: !StackType
+ 14 , cell :: !CellType
+ 15 , intCell :: !IntCellType
+ 16 , dumpType :: !DumpType
+ 17 }
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html
new file mode 100644
index 000000000..031ebb36b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.IO.BusinessIO (
+ 2
+ 3 Element,
+ 4 BIO,
+ 5 BusinessIO,
+ 6
+ 7 wPutAsChar,
+ 8 wPutAsDec,
+ 9 wGetCharAs,
+ 10 wGetDecAs,
+ 11
+ 12 -- wPutIntAsChar,
+ 13 -- wPutIntAsDec,
+ 14 -- wGetCharAsInt,
+ 15 -- wGetDecAsInt,
+ 16
+ 17 wGetChar,
+ 18 wPutChar,
+ 19 wGetLine,
+ 20 wGetContents,
+ 21 wPutStr,
+ 22 wPutStrLn,
+ 23 wFlush,
+ 24 wLogStr,
+ 25 wLogStrLn,
+ 26 wLogShow,
+ 27
+ 28 logStr,
+ 29 flush,
+ 30 ) where
+ 31
+ 32 import HelVM.HelIO.Control.Control
+ 33 import HelVM.HelIO.Control.Safe
+ 34
+ 35 import HelVM.HelIO.ReadText
+ 36
+ 37 import Data.Default as Default
+ 38 import Data.Text.IO (getContents)
+ 39
+ 40 import System.IO hiding (getContents, getLine, hFlush, stderr, stdout)
+ 41
+ 42 type Element e = (ReadShow e , Integral e , Default e)
+ 43 type ReadShow e = (Read e , Show e)
+ 44 type BIO m = (MonadControl m , BusinessIO m)
+ 45
+ 46 class Monad m => BusinessIO m where
+ 47
+ 48 wPutAsChar :: Integral v => v -> m ()
+ 49 wPutAsDec :: Integral v => v -> m ()
+ 50 wGetCharAs :: Integral v => m v
+ 51 wGetDecAs :: Integral v => m v
+ 52
+ 53 wPutIntAsChar :: Int -> m ()
+ 54 wPutIntAsDec :: Int -> m ()
+ 55 wGetCharAsInt :: m Int
+ 56 wGetDecAsInt :: m Int
+ 57
+ 58 wGetChar :: m Char
+ 59 wGetLine :: m Text
+ 60 wGetContents :: m Text
+ 61 wPutChar :: Char -> m ()
+ 62 wPutStr :: Text -> m ()
+ 63 wPutStrLn :: Text -> m ()
+ 64 wLogStr :: Text -> m ()
+ 65 wLogStrLn :: Text -> m ()
+ 66 wLogShow :: Show s => s -> m ()
+ 67 wFlush :: m ()
+ 68
+ 69 wPutAsChar = wPutIntAsChar . fromIntegral
+ 70 wPutAsDec = wPutIntAsDec . fromIntegral
+ 71 wGetCharAs = fromIntegral <$> wGetCharAsInt
+ 72 wGetDecAs = fromIntegral <$> wGetDecAsInt
+ 73
+ 74 wPutIntAsChar = wPutChar . chr
+ 75 wPutIntAsDec = wPutStr . show
+ 76 wGetCharAsInt = ord <$> wGetChar
+ 77 wGetDecAsInt = readTextUnsafe <$> wGetLine
+ 78
+ 79 wPutStrLn s = wPutStr $ s <> "\n"
+ 80 wLogStrLn s = wLogStr $ s <> "\n"
+ 81 wLogShow = wLogStrLn . show
+ 82 wFlush = pass
+ 83
+ 84 logStr :: Text -> IO ()
+ 85 logStr = hPutStrLn stderr . toString
+ 86
+ 87 flush :: IO ()
+ 88 flush = hFlush stdout
+ 89
+ 90 instance BusinessIO IO where
+ 91 wGetChar = getChar
+ 92 wGetLine = getLine
+ 93 wGetContents = getContents
+ 94 wPutChar = putChar
+ 95 wPutStr = putText
+ 96 wPutStrLn = putTextLn
+ 97 wLogStr = logStr
+ 98 wFlush = flush
+ 99
+ 100 type ExceptTLegacy = ExceptT String
+ 101
+ 102 exceptTLegacy :: Monad m => m a -> ExceptTLegacy m a
+ 103 exceptTLegacy a = ExceptT $ pure <$> a
+ 104
+ 105 instance BusinessIO (ExceptT String IO) where --FIXXME
+ 106 wGetChar = exceptTLegacy getChar
+ 107 wGetLine = exceptTLegacy getLine
+ 108 wGetContents = exceptTLegacy getContents
+ 109 wPutChar = exceptTLegacy . putChar
+ 110 wPutStr = exceptTLegacy . putText
+ 111 wPutStrLn = exceptTLegacy . putTextLn
+ 112 wLogStr = exceptTLegacy . logStr
+ 113 wFlush = exceptTLegacy flush
+ 114
+ 115 instance BusinessIO (SafeT IO) where
+ 116 wGetChar = safeT getChar
+ 117 wGetLine = safeT getLine
+ 118 wGetContents = safeT getContents
+ 119 wPutChar = safeT . putChar
+ 120 wPutStr = safeT . putText
+ 121 wPutStrLn = safeT . putTextLn
+ 122 wLogStr = safeT . logStr
+ 123 wFlush = safeT flush
+ 124
+ 125 instance BusinessIO (ControlT IO) where
+ 126 wGetChar = controlT getChar
+ 127 wGetLine = controlT getLine
+ 128 wGetContents = controlT getContents
+ 129 wPutChar = controlT . putChar
+ 130 wPutStr = controlT . putText
+ 131 wPutStrLn = controlT . putTextLn
+ 132 wLogStr = controlT . logStr
+ 133 wFlush = controlT flush
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html
new file mode 100644
index 000000000..6d53f1fda
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 {-# LANGUAGE DeriveFunctor #-}
+ 2 module HelVM.HelMA.Automaton.IO.FreeIO (
+ 3 interpretFreeIOToBusinessIO,
+ 4 logInput,
+ 5 logOutput,
+ 6 FreeIO,
+ 7 ) where
+ 8
+ 9 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 10
+ 11 import HelVM.HelIO.Control.Control
+ 12 import HelVM.HelIO.Control.Safe
+ 13
+ 14 import Control.Monad.Free
+ 15 import Control.Natural
+ 16
+ 17 interpretFreeIOToBusinessIO :: BusinessIO m => FreeIO a -> m a
+ 18 interpretFreeIOToBusinessIO = foldFree interpretFreeIOFToBusinessIO
+ 19
+ 20 logInput :: FreeIO ~> FreeIO
+ 21 logInput = foldFree logInputF
+ 22
+ 23 logOutput :: FreeIO ~> FreeIO
+ 24 logOutput = foldFree logOutputF
+ 25
+ 26 ----
+ 27
+ 28 interpretFreeIOFToBusinessIO :: BusinessIO m => FreeIOF a -> m a
+ 29 interpretFreeIOFToBusinessIO (GetChar cd) = cd <$> wGetChar
+ 30 interpretFreeIOFToBusinessIO (GetLine cd) = cd <$> wGetLine
+ 31 interpretFreeIOFToBusinessIO (GetContents cd) = cd <$> wGetContents
+ 32 interpretFreeIOFToBusinessIO (PutChar c v) = wPutChar c $> v
+ 33 interpretFreeIOFToBusinessIO (PutStr s v) = wPutStr s $> v
+ 34 interpretFreeIOFToBusinessIO (PutStrLn s v) = wPutStrLn s $> v
+ 35 interpretFreeIOFToBusinessIO (LogStr s v) = wLogStr s $> v
+ 36 interpretFreeIOFToBusinessIO (LogStrLn s v) = wLogStrLn s $> v
+ 37 interpretFreeIOFToBusinessIO (Flush v) = wFlush $> v
+ 38
+ 39 ----
+ 40
+ 41 logInputF :: FreeIOF a -> FreeIO a
+ 42 logInputF (GetChar cd) = freeGetChar >>= (\c -> liftF $ LogStr (one c) (cd c))
+ 43 logInputF (GetLine cd) = freeGetLine >>= (\l -> liftF $ LogStr l (cd l))
+ 44 logInputF (GetContents cd) = freeGetContents >>= (\l -> liftF $ LogStr l (cd l))
+ 45 logInputF f = liftF f
+ 46
+ 47 logOutputF :: FreeIOF a -> FreeIO a
+ 48 logOutputF f@(PutChar c v) = liftF (LogStr (one c) v) *> liftF f
+ 49 logOutputF f@(PutStr s v) = liftF (LogStr s v) *> liftF f
+ 50 logOutputF f = liftF f
+ 51
+ 52 -- | Instances
+ 53 instance BusinessIO FreeIO where
+ 54 wGetChar = freeGetChar
+ 55 wGetLine = freeGetLine
+ 56 wGetContents = freeGetContents
+ 57 wPutChar = freePutChar
+ 58 wPutStr = freePutStr
+ 59 wPutStrLn = freePutStrLn
+ 60 wLogStr = freeLogStr
+ 61 wLogStrLn = freeLogStrLn
+ 62 wFlush = freeFlush
+ 63
+ 64 instance BusinessIO (SafeT FreeIO) where
+ 65 wGetChar = safeT freeGetChar
+ 66 wGetLine = safeT freeGetLine
+ 67 wGetContents = safeT freeGetContents
+ 68 wPutChar = safeT . freePutChar
+ 69 wPutStr = safeT . freePutStr
+ 70 wPutStrLn = safeT . freePutStrLn
+ 71 wLogStr = safeT . freeLogStr
+ 72 wLogStrLn = safeT . freeLogStrLn
+ 73 wFlush = safeT freeFlush
+ 74
+ 75 instance BusinessIO (ControlT FreeIO) where
+ 76 wGetChar = controlT freeGetChar
+ 77 wGetLine = controlT freeGetLine
+ 78 wGetContents = controlT freeGetContents
+ 79 wPutChar = controlT . freePutChar
+ 80 wPutStr = controlT . freePutStr
+ 81 wPutStrLn = controlT . freePutStrLn
+ 82 wLogStr = controlT . freeLogStr
+ 83 wLogStrLn = controlT . freeLogStrLn
+ 84 wFlush = controlT freeFlush
+ 85
+ 86 -- | Low level functions
+ 87 freeGetChar :: FreeIO Char
+ 88 freeGetChar = liftF $ GetChar id
+ 89
+ 90 freeGetLine :: FreeIO Text
+ 91 freeGetLine = liftF $ GetLine id
+ 92
+ 93 freeGetContents :: FreeIO Text
+ 94 freeGetContents = liftF $ GetContents id
+ 95
+ 96 freePutChar :: Char -> FreeIO ()
+ 97 freePutChar = liftF . flip PutChar ()
+ 98
+ 99 freePutStr :: Text -> FreeIO ()
+ 100 freePutStr = liftF . flip PutStr ()
+ 101
+ 102 freePutStrLn :: Text -> FreeIO ()
+ 103 freePutStrLn = liftF . flip PutStrLn ()
+ 104
+ 105 freeLogStr :: Text -> FreeIO ()
+ 106 freeLogStr = liftF . flip LogStr ()
+ 107
+ 108 freeLogStrLn :: Text -> FreeIO ()
+ 109 freeLogStrLn = liftF . flip LogStrLn ()
+ 110
+ 111 freeFlush :: FreeIO ()
+ 112 freeFlush = liftF $ Flush ()
+ 113
+ 114 -- | Types
+ 115 type FreeIO = Free FreeIOF
+ 116
+ 117 data FreeIOF a
+ 118 = GetChar (Char -> a)
+ 119 | GetLine (Text -> a)
+ 120 | GetContents (Text -> a)
+ 121 | PutChar Char a
+ 122 | PutStr Text a
+ 123 | PutStrLn Text a
+ 124 | LogStr Text a
+ 125 | LogStrLn Text a
+ 126 | Flush a
+ 127 deriving stock (Functor )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html
new file mode 100644
index 000000000..4bbc46214
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.IO.MockIO (
+ 2 ioExecMockIOBatch,
+ 3 ioExecMockIOWithInput,
+ 4
+ 5 safeExecMockIOBatch,
+ 6 safeExecMockIOWithInput,
+ 7
+ 8 execMockIOBatch,
+ 9 execMockIOWithInput,
+ 10
+ 11 runMockIO,
+ 12 createMockIO,
+ 13 calculateOutput,
+ 14 calculateLogged,
+ 15
+ 16 MockIO,
+ 17 MockIOData,
+ 18 ) where
+ 19
+ 20 import HelVM.HelMA.Automaton.API.IOTypes
+ 21 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 22
+ 23 import HelVM.HelIO.Control.Control
+ 24 import HelVM.HelIO.Control.Safe
+ 25
+ 26 import HelVM.HelIO.ListLikeUtil
+ 27
+ 28 import Data.Text as Text
+ 29
+ 30 ioExecMockIOBatch :: ControlT MockIO () -> IO MockIOData
+ 31 ioExecMockIOBatch = ioExecMockIOWithInput ""
+ 32
+ 33 ioExecMockIOWithInput :: Input -> ControlT MockIO () -> IO MockIOData
+ 34 ioExecMockIOWithInput i = safeToIO . safeExecMockIOWithInput i
+ 35
+ 36 safeExecMockIOBatch :: ControlT MockIO () -> Safe MockIOData
+ 37 safeExecMockIOBatch = safeExecMockIOWithInput ""
+ 38
+ 39 safeExecMockIOWithInput :: Input -> ControlT MockIO () -> Safe MockIOData
+ 40 safeExecMockIOWithInput i = pure . runMockIO i . runControlT
+ 41
+ 42 execMockIOBatch :: MockIO () -> MockIOData
+ 43 execMockIOBatch = execMockIOWithInput ""
+ 44
+ 45 execMockIOWithInput :: Input -> MockIO () -> MockIOData
+ 46 execMockIOWithInput i a = runMockIO i $ safeWithMessages <$> a
+ 47
+ 48 ----
+ 49
+ 50 runMockIO :: Input -> MockIO UnitSafeWithMessages -> MockIOData
+ 51 runMockIO i mockIO = flip mockDataLogStr mockIOData $ safeWithMessagesToText s
+ 52 where (s , mockIOData) = runState mockIO $ createMockIO i
+ 53
+ 54 createMockIO :: Input -> MockIOData
+ 55 createMockIO i = MockIOData (toString i) "" ""
+ 56
+ 57 calculateOutput :: MockIOData -> Output
+ 58 calculateOutput = calculateText . output
+ 59
+ 60 calculateLogged :: MockIOData -> Output
+ 61 calculateLogged = calculateText . logged
+ 62
+ 63 ----
+ 64
+ 65 instance BusinessIO MockIO where
+ 66 wGetChar = mockGetChar
+ 67 wGetLine = mockGetLine
+ 68 wGetContents = mockGetContent
+ 69 wPutChar = mockPutChar
+ 70 wPutStr = mockPutStr
+ 71 wLogStr = mockLogStr
+ 72
+ 73 instance BusinessIO (SafeT MockIO) where
+ 74 wGetChar = safeT mockGetChar
+ 75 wGetLine = safeT mockGetLine
+ 76 wGetContents = safeT mockGetContent
+ 77 wPutChar = safeT . mockPutChar
+ 78 wPutStr = safeT . mockPutStr
+ 79 wLogStr = safeT . mockLogStr
+ 80
+ 81 instance BusinessIO (ControlT MockIO) where
+ 82 wGetChar = mockGetCharSafe
+ 83 wGetLine = mockGetLineSafe
+ 84 wGetContents = controlT mockGetContent
+ 85 wPutChar = controlT . mockPutChar
+ 86 wPutStr = controlT . mockPutStr
+ 87 wLogStr = controlT . mockLogStr
+ 88
+ 89 ----
+ 90
+ 91 mockGetChar :: MonadMockIO m => m Char
+ 92 mockGetChar = mockGetChar' =<< get where
+ 93 mockGetChar' :: MonadMockIO m => MockIOData -> m Char
+ 94 mockGetChar' mockIO = orErrorTuple ("mockGetChar" , show mockIO) (top (input mockIO)) <$ put mockIO { input = orErrorTuple ("mockGetChar" , show mockIO) $ discard $ input mockIO }
+ 95
+ 96 mockGetLine :: MonadMockIO m => m Text
+ 97 mockGetLine = mockGetLine' =<< get where
+ 98 mockGetLine' :: MonadMockIO m => MockIOData -> m Text
+ 99 mockGetLine' mockIO = toText line <$ put mockIO { input = input' } where (line , input') = splitStringByLn $ input mockIO
+ 100
+ 101 mockGetContent :: MonadMockIO m => m Text
+ 102 mockGetContent = mockGetContent' =<< get where
+ 103 mockGetContent' :: MonadMockIO m => MockIOData -> m Text
+ 104 mockGetContent' mockIO = toText content <$ put mockIO { input = "" } where content = input mockIO
+ 105
+ 106 mockGetCharSafe :: MonadControlMockIO m => m Char
+ 107 mockGetCharSafe = mockGetChar' =<< get where
+ 108 mockGetChar' :: MonadControlMockIO m => MockIOData -> m Char
+ 109 mockGetChar' mockIO = appendErrorTuple ("mockGetCharSafe" , show mockIO) $ mockGetChar'' =<< unconsSafe (input mockIO) where
+ 110 mockGetChar'' (c, input') = put mockIO { input = input' } $> c
+ 111
+ 112 mockGetLineSafe :: MonadControlMockIO m => m Text
+ 113 mockGetLineSafe = mockGetLine' =<< get where
+ 114 mockGetLine' :: MonadControlMockIO m => MockIOData -> m Text
+ 115 mockGetLine' mockIO = toText line <$ put mockIO { input = input' } where (line , input') = splitStringByLn $ input mockIO
+ 116
+ 117
+ 118 mockPutChar :: Char -> MockIO ()
+ 119 mockPutChar = modify . mockDataPutChar
+ 120
+ 121 mockPutStr :: Text -> MockIO ()
+ 122 mockPutStr = modify . mockDataPutStr
+ 123
+ 124 mockLogStr :: Text -> MockIO ()
+ 125 mockLogStr = modify . mockDataLogStr
+ 126
+ 127 ----
+ 128
+ 129 mockDataPutChar :: Char -> MockIOData -> MockIOData
+ 130 mockDataPutChar char mockIO = mockIO { output = char : output mockIO }
+ 131
+ 132 mockDataPutStr :: Text -> MockIOData -> MockIOData
+ 133 mockDataPutStr text mockIO = mockIO { output = calculateString text <> output mockIO }
+ 134
+ 135 mockDataLogStr :: Text -> MockIOData -> MockIOData
+ 136 mockDataLogStr text mockIO = mockIO { logged = calculateString text <> logged mockIO }
+ 137
+ 138 ----
+ 139
+ 140 type MonadControlMockIO m = (MonadMockIO m , MonadControl m)
+ 141
+ 142 --type MonadSafeMockIO m = (MonadMockIO m , MonadSafe m)
+ 143
+ 144 type MonadMockIO m = MonadState MockIOData m
+ 145
+ 146 type MockIO = State MockIOData
+ 147
+ 148 calculateText :: String -> Output
+ 149 calculateText = Text.reverse . toText
+ 150
+ 151 calculateString :: Output -> String
+ 152 calculateString = toString . Text.reverse
+ 153
+ 154 data MockIOData = MockIOData
+ 155 { input :: !String
+ 156 , output :: !String
+ 157 , logged :: !String
+ 158 }
+ 159 deriving stock (Eq , Read , Show )
+ 160
+ 161 ----
+ 162
+ 163 splitStringByLn :: String -> (String , String)
+ 164 splitStringByLn = splitBy '\n'
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html
new file mode 100644
index 000000000..55759ae7a
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.ALInstruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 4
+ 5 -- | Constructors
+ 6
+ 7 blAnd :: Bool -> BinaryInstruction
+ 8 blAnd False = BAnd
+ 9 blAnd True = LAnd
+ 10
+ 11 blOr :: Bool -> BinaryInstruction
+ 12 blOr False = BOr
+ 13 blOr True = LOr
+ 14
+ 15 blXor :: Bool -> BinaryInstruction
+ 16 blXor False = BXor
+ 17 blXor True = LXor
+ 18
+ 19 blEQ :: Bool -> BinaryInstruction
+ 20 blEQ False = BEQ
+ 21 blEQ True = LEQ
+ 22
+ 23 blGT :: Bool -> BinaryInstruction
+ 24 blGT False = BGT
+ 25 blGT True = LGT
+ 26
+ 27 -- | Other functions
+ 28
+ 29 calculateOps :: Integral a => a -> a -> [BinaryInstruction] -> [a]
+ 30 calculateOps operand operand' = map (calculateOp operand operand')
+ 31
+ 32 calculateOp :: Integral a => a -> a -> BinaryInstruction -> a
+ 33 calculateOp operand operand' operation = doBinary operation operand' operand
+ 34
+ 35 doBinary :: Integral a => BinaryInstruction -> a -> a -> a
+ 36 doBinary Add = (+)
+ 37 doBinary Sub = (-)
+ 38 doBinary Mul = (*)
+ 39 doBinary Div = div
+ 40 doBinary Mod = mod
+ 41 doBinary o = error $ show o
+ 42
+ 43 -- | Types
+ 44
+ 45 data ALInstruction =
+ 46 Cons Integer
+ 47 | Unary !UnaryInstruction
+ 48 | Binary !BinaryInstruction
+ 49 | Binaries [BinaryInstruction]
+ 50 | SStatic !StackIndex !ManipulationInstruction
+ 51 | SDynamic !ManipulationInstruction
+ 52 | SIO !IOInstruction
+ 53 | Halibut
+ 54 | Pick
+ 55 | Dup
+ 56 | Rot
+ 57 | Swap
+ 58 | Discard
+ 59 deriving stock (Eq , Read , Show )
+ 60
+ 61 data UnaryInstruction = Neg | BNot | LNot
+ 62 deriving stock (Eq , Read , Show )
+ 63
+ 64 data BinaryInstruction =
+ 65 Add | Sub | Mul | Div | Mod
+ 66 | BAnd | BOr | BXor | BEQ | BGT
+ 67 | LAnd | LOr | LXor | LEQ | LGT
+ 68 deriving stock (Eq , Read , Show )
+ 69
+ 70 data ManipulationInstruction = Copy | Move | Slide
+ 71 deriving stock (Eq , Read , Show )
+ 72
+ 73 type StackIndex = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html
new file mode 100644
index 000000000..458afdd15
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.ControlInstruction where
+ 2
+ 3 import HelVM.HelIO.Collections.SList
+ 4
+ 5 isNotJump :: Integral e => BranchTest -> e -> Bool
+ 6 isNotJump t = not . isJump t
+ 7
+ 8 isJump :: Integral e => BranchTest -> e -> Bool
+ 9 isJump EZ e = e == 0
+ 10 isJump LTZ e = e < 0
+ 11 isJump GTZ e = e > 0
+ 12
+ 13 -- | Types
+ 14 data ControlInstruction =
+ 15 Mark !Label
+ 16 | CStatic !Label !LabelInstruction
+ 17 | CDynamic !LabelInstruction
+ 18 | Return
+ 19 deriving stock (Eq , Read , Show )
+ 20
+ 21 type Label = SString
+ 22
+ 23 data LabelInstruction = Call | Jump | Branch !BranchTest
+ 24 deriving stock (Eq , Read , Show )
+ 25
+ 26 data BranchTest = EZ | LTZ | GTZ
+ 27 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html
new file mode 100644
index 000000000..95df8d9ea
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.IOInstruction where
+ 2
+ 3 data IOInstruction =
+ 4 OutputChar
+ 5 | OutputDec
+ 6 | InputChar
+ 7 | InputDec
+ 8 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html
new file mode 100644
index 000000000..8e565b994
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.LSInstruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 4
+ 5 -- | Types
+ 6
+ 7 data LSInstruction =
+ 8 Load --Restore --Fetch
+ 9 | Store --Save
+ 10 | MIO !IOInstruction
+ 11 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.hs.html
new file mode 100644
index 000000000..9d7132219
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.hs.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 4 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 5 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 6
+ 7 import Data.Vector as Vector
+ 8
+ 9 isMark :: Label -> Instruction -> Bool
+ 10 isMark l (IControl (Mark l')) = l == l'
+ 11 isMark _ _ = False
+ 12
+ 13 -- | Types
+ 14
+ 15 data Instruction =
+ 16 IAL !ALInstruction
+ 17 | ILS !LSInstruction
+ 18 | IControl !ControlInstruction
+ 19 | End
+ 20 deriving stock (Eq , Read , Show )
+ 21
+ 22 type InstructionList = [Instruction]
+ 23 type InstructionVector = Vector Instruction
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html
new file mode 100644
index 000000000..bf8caca64
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.CellType where
+ 2
+ 3 -- | Constructors
+ 4 parseCellType :: String -> CellType
+ 5 parseCellType raw = valid $ readMaybe raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "CellType '" <> toText raw <> "' is not valid CellType. Valid cellTypes are : " <> show cellTypes
+ 8
+ 9 defaultCellType :: CellType
+ 10 defaultCellType = Word8Type
+ 11
+ 12 cellTypes :: [CellType]
+ 13 cellTypes = [Int8Type , Word8Type , Int16Type , Word16Type , Int32Type , Word32Type , Int64Type , Word64Type]
+ 14
+ 15 -- | Types
+ 16 data CellType = Int8Type | Word8Type | Int16Type | Word16Type | Int32Type | Word32Type | Int64Type | Word64Type
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html
new file mode 100644
index 000000000..62ed08dbf
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.DumpType where
+ 2
+ 3 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 4
+ 5 import HelVM.HelIO.Control.Logger
+ 6
+ 7 import HelVM.HelIO.Util
+ 8
+ 9 logDump :: (BIO m , Show d) => DumpType -> d -> m ()
+ 10 logDump dt d = logDump' $ dump dt d where
+ 11 logDump' Nothing = pass
+ 12 logDump' (Just t) = logMessageTuple ("dump" , t)
+ 13
+ 14 dump :: Show a => DumpType -> a -> Maybe Text
+ 15 dump No _ = Nothing
+ 16 dump Ugly a = Just $ show a
+ 17 dump Pretty a = Just $ showP a
+ 18
+ 19 -- | Constructors
+ 20 parseDumpType :: String -> DumpType
+ 21 parseDumpType raw = (valid . readMaybe) raw where
+ 22 valid (Just value) = value
+ 23 valid Nothing = error $ "DumpType '" <> toText raw <> "' is not valid DumpType. Valid dumpTypes are : " <> show dumpTypes
+ 24
+ 25 defaultDumpType :: DumpType
+ 26 defaultDumpType = No
+ 27
+ 28 dumpTypes :: [DumpType]
+ 29 dumpTypes = [No , Ugly , Pretty]
+ 30
+ 31 -- | Types
+ 32 data DumpType = No | Ugly | Pretty
+ 33 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html
new file mode 100644
index 000000000..6820efd95
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.IntCellType where
+ 2
+ 3 -- | Constructors
+ 4 parseIntCellType :: String -> IntCellType
+ 5 parseIntCellType raw = (valid . readMaybe) raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "IntCellType '" <> toText raw <> "' is not valid IntCellType. Valid intCellTypes are : " <> show intCellTypes
+ 8
+ 9 defaultIntCellType :: IntCellType
+ 10 defaultIntCellType = IntegerType
+ 11
+ 12 intCellTypes :: [IntCellType]
+ 13 intCellTypes = [Int8Type , Int16Type , Int32Type , Int64Type , IntegerType]
+ 14
+ 15 -- | Types
+ 16 data IntCellType = Int8Type | Int16Type | Int32Type | Int64Type | IntegerType
+ 17 deriving stock (Bounded , Enum , Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html
new file mode 100644
index 000000000..73ff87384
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.RAMType where
+ 2
+ 3 -- | Constructors
+ 4 parseRAMType :: String -> RAMType
+ 5 parseRAMType raw = (valid . readMaybe) raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "RAMType '" <> toText raw <> "' is not valid RAMType. Valid ramTypes are : " <> show ramTypes
+ 8
+ 9 defaultRAMType :: RAMType
+ 10 defaultRAMType = MapListRAMType
+ 11
+ 12 ramTypes :: [RAMType]
+ 13 ramTypes = [ListRAMType , SeqRAMType , SListRAMType , MapListRAMType]
+ 14
+ 15 -- | Types
+ 16 data RAMType = ListRAMType | SeqRAMType | SListRAMType | MapListRAMType
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html
new file mode 100644
index 000000000..9b8c8627c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.StackType where
+ 2
+ 3 -- | Constructors
+ 4 parseStackType :: String -> StackType
+ 5 parseStackType raw = valid $ readMaybe raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "StackType '" <> toText raw <> "' is not valid StackType. Valid stackTypes are : " <> show stackTypes
+ 8
+ 9 defaultStackType :: StackType
+ 10 defaultStackType = SeqStackType
+ 11
+ 12 stackTypes :: [StackType]
+ 13 stackTypes = [ListStackType , SeqStackType , SListStackType]
+ 14
+ 15 -- | Types
+ 16 data StackType = ListStackType | SeqStackType | SListStackType
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html
new file mode 100644
index 000000000..66779bcac
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.TokenType where
+ 2
+ 3 import HelVM.HelIO.SwitchEnum
+ 4
+ 5 -- | Constructors
+ 6 parseTokenType:: String -> TokenType
+ 7 parseTokenType raw = valid $ readMaybe raw where
+ 8 valid (Just value) = value
+ 9 valid Nothing = error $ "'" <> toText raw <> "' is not valid TokenType. Valid tokenTypes are : " <> show tokenTypes
+ 10
+ 11 defaultTokenType :: TokenType
+ 12 defaultTokenType = defaultEnum
+ 13
+ 14 tokenTypes :: [TokenType]
+ 15 tokenTypes = bothEnums
+ 16
+ 17 -- | Types
+ 18 data TokenType = VisibleTokenType | WhiteTokenType
+ 19 deriving stock (Bounded , Enum , Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html
new file mode 100644
index 000000000..ea19db0d8
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.ALU (
+ 2 doOutputChar2,
+ 3 doInputChar2,
+ 4 doInputDec2,
+ 5 divMod,
+ 6 sub,
+ 7 binaryInstruction,
+ 8 binaryInstructions,
+ 9 halibut,
+ 10 alInstruction,
+ 11 move,
+ 12 swap,
+ 13 discard,
+ 14 slide,
+ 15 dup,
+ 16 copy,
+ 17 flipPush1,
+ 18 charPush1,
+ 19 genericPush1,
+ 20 pop1,
+ 21 pop2,
+ 22 push1,
+ 23 push2,
+ 24 splitAt,
+ 25 drop,
+ 26 ALU,
+ 27 Stack,
+ 28 ) where
+ 29
+ 30 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 31 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 32
+ 33 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 34
+ 35 import HelVM.HelIO.Control.Safe
+ 36
+ 37 import HelVM.HelIO.Containers.LLIndexSafe
+ 38
+ 39 import HelVM.HelIO.ListLikeUtil
+ 40
+ 41 import Data.ListLike hiding (show)
+ 42 import Prelude hiding (divMod, drop, fromList, splitAt, swap)
+ 43
+ 44
+ 45 alInstruction :: ALU m ll element => ALInstruction -> ll -> m ll
+ 46 alInstruction (Cons i ) = push i
+ 47 alInstruction (Unary op) = error $ show op
+ 48 alInstruction (Binary op) = binaryInstruction op
+ 49 alInstruction (SDynamic op) = dynamicManipulation op
+ 50 alInstruction (SStatic i op) = staticManipulation op i
+ 51 alInstruction (SIO OutputChar) = doOutputChar2
+ 52 alInstruction (SIO OutputDec) = doOutputDec2
+ 53 alInstruction (SIO InputChar) = doInputChar2
+ 54 alInstruction Halibut = halibut
+ 55 alInstruction Pick = pick
+ 56 alInstruction Dup = dup
+ 57 alInstruction Rot = rot
+ 58 alInstruction Swap = swap
+ 59 alInstruction Discard = discard
+ 60 alInstruction op = error $ show op
+ 61
+ 62 -- | Arithmetic instructions
+ 63 divMod :: ALU m ll element => ll -> m ll
+ 64 divMod = binaryInstructions [Mod , Div]
+ 65
+ 66 sub :: ALU m ll element => ll -> m ll
+ 67 sub = binaryInstruction Sub
+ 68
+ 69 binaryInstruction :: ALU m ll element => BinaryInstruction -> ll -> m ll
+ 70 binaryInstruction i = binaryInstructions [i]
+ 71
+ 72 binaryInstructions :: ALU m ll element => [BinaryInstruction] -> ll -> m ll
+ 73 binaryInstructions il l = binaryInstructions' <$> pop2 l where
+ 74 binaryInstructions' (e , e', l') = pushList (calculateOps e e' il) l'
+ 75
+ 76 -- | IO instructions
+ 77 doOutputChar2 :: ALU m ll element => ll -> m ll
+ 78 doOutputChar2 l = doOutputChar' =<< pop1 l where
+ 79 doOutputChar' (e , l') = wPutAsChar e $> l'
+ 80
+ 81 doOutputDec2 :: ALU m ll element => ll -> m ll
+ 82 doOutputDec2 l = doOutputDec' =<< pop1 l where
+ 83 doOutputDec' (e , l') = wPutAsDec e $> l'
+ 84
+ 85 doInputChar2 :: ALU m ll element => ll -> m ll
+ 86 doInputChar2 l = doInputChar' <$> wGetCharAs where
+ 87 doInputChar' e = push1 e l
+ 88
+ 89 doInputDec2 :: ALU m ll element => ll -> m ll
+ 90 doInputDec2 l = doInputChar' <$> wGetCharAs where
+ 91 doInputChar' e = push1 e l
+ 92
+ 93 -- | Manipulation instructions
+ 94 dynamicManipulation :: ALU m ll element => ManipulationInstruction -> ll -> m ll
+ 95 dynamicManipulation op l = dynamicManipulation' =<< unconsSafe l where
+ 96 dynamicManipulation' (e , l') = staticManipulation op (fromIntegral e) l'
+ 97
+ 98 staticManipulation :: ALU m ll element => ManipulationInstruction -> Index -> ll -> m ll
+ 99 staticManipulation Copy = copy
+ 100 staticManipulation Move = move
+ 101 staticManipulation Slide = slide
+ 102
+ 103 -- | Halibut and Pick instructions
+ 104 halibut :: ALU m ll element => ll -> m ll
+ 105 halibut l = halibut' =<< pop1 l where
+ 106 halibut' (e , l')
+ 107 | 0 < i = move i l'
+ 108 | otherwise = copy (negate i) l'
+ 109 where i = fromIntegral e
+ 110
+ 111 pick :: ALU m ll element => ll -> m ll
+ 112 pick l = pick' =<< pop1 l where
+ 113 pick' (e , l')
+ 114 | 0 <= i = copy i l'
+ 115 | otherwise = move (negate i) l'
+ 116 where i = fromIntegral e
+ 117
+ 118 -- | Slide instructions
+ 119 slide :: ALU m ll element => Index -> ll -> m ll
+ 120 slide i l = slide' <$> pop1 l where
+ 121 slide' (e , l') = push1 e $ drop i l'
+ 122
+ 123 -- | Move instructions
+ 124 rot :: ALU m ll element => ll -> m ll
+ 125 rot = move 2
+ 126
+ 127 swap :: ALU m ll element => ll -> m ll
+ 128 swap = move 1
+ 129
+ 130 move :: ALU m ll element => Index -> ll -> m ll
+ 131 move i l = pure $ l1 <> l2 <> l3 where
+ 132 (l1 , l3) = splitAt 1 l'
+ 133 (l2 , l') = splitAt i l
+ 134
+ 135 -- | Copy instructions
+ 136 dup :: ALU m ll element => ll -> m ll
+ 137 dup = copy 0
+ 138
+ 139 copy :: ALU m ll element => Index -> ll -> m ll
+ 140 copy i l = flipPush1 l <$> l `indexSafe` i
+ 141
+ 142 -- | Pop instructions
+ 143 pop1 :: ALU m ll element => ll -> m (element , ll)
+ 144 pop1 l = appendErrorTuple ("l" , show l) $ unconsSafe l
+ 145
+ 146 pop2 :: ALU m ll element => ll -> m (element , element , ll)
+ 147 pop2 l = appendErrorTuple ("l" , show l) $ uncons2Safe l
+ 148
+ 149 -- | Push instructions
+ 150 push :: ALU m ll element => Integer -> ll -> m ll
+ 151 push i l = pure $ genericPush1 i l
+ 152
+ 153 flipPush1 :: Stack ll element => ll -> element -> ll
+ 154 flipPush1 = flip push1
+ 155
+ 156 charPush1 :: (Num element , Stack ll element) => Char -> ll -> ll
+ 157 charPush1 = genericPush1 . ord
+ 158
+ 159 genericPush1 :: (Integral v , Num element , Stack ll element) => v -> ll -> ll
+ 160 genericPush1 = push1 . fromIntegral
+ 161
+ 162 push1 :: Stack ll element => element -> ll -> ll
+ 163 push1 e = pushList [e]
+ 164
+ 165 push2 :: Stack ll element => element -> element -> ll -> ll
+ 166 push2 e e' = pushList [e , e']
+ 167
+ 168 pushList :: Stack ll element => [element] -> ll -> ll
+ 169 pushList es l = fromList es <> l
+ 170
+ 171 -- | Types
+ 172 type ALU m ll element = (BIO m , Stack ll element , Integral element)
+ 173
+ 174 type Stack ll element = (Show ll , ListLike ll element , IndexSafe ll element)
+ 175
+ 176 type Index = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html
new file mode 100644
index 000000000..e01d03cd4
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.CPU where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.ALU
+ 4
+ 5 import HelVM.HelMA.Automaton.Instruction
+ 6 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 7
+ 8 import HelVM.HelIO.Control.Safe
+ 9
+ 10 import Control.Type.Operator
+ 11
+ 12 import Data.ListLike hiding (show)
+ 13
+ 14 controlInstruction :: (ALU m ll element , Show element) => ControlInstruction -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 15 --controlInstruction :: ALU m ll element => ControlInstruction -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 16 controlInstruction (Mark _ ) = pure
+ 17 controlInstruction Return = popAddress
+ 18 controlInstruction (CDynamic Call ) = dynamicCall
+ 19 controlInstruction (CDynamic Jump ) = dynamicJump
+ 20 controlInstruction (CDynamic (Branch t)) = dynamicBranch t
+ 21 controlInstruction (CStatic l Call ) = staticCall l
+ 22 controlInstruction (CStatic l Jump ) = staticJump l
+ 23 controlInstruction (CStatic l (Branch t)) = staticBranch l t
+ 24
+ 25 popAddress :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 26 popAddress (CPU (CU il _ (IS (a : is))) s) = pure $ CPU (CU il a $ IS is) s
+ 27 popAddress (CPU (CU il _ (IS [] )) _) = liftErrorWithTupleList "Empty Return Stack" [("il" , show il)]
+ 28
+ 29 dynamicCall :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 30 dynamicCall (CPU (CU il ic (IS is)) s) = call <$> pop1 s where
+ 31 call (a , s') = CPU (CU il (fromIntegral a) (IS (ic : is))) s'
+ 32
+ 33 dynamicJump :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 34 dynamicJump (CPU (CU il _ is) s) = jump <$> pop1 s where
+ 35 jump (a , s') = CPU (CU il (fromIntegral a) is) s'
+ 36
+ 37 dynamicBranch :: (ALU m ll element , Show element) => BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 38 --dynamicBranch :: ALU m ll element => BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 39 dynamicBranch t (CPU (CU il ic is) s) = branch =<< pop2 s where
+ 40 -- dynamicBranch' (l , e , s') = liftErrorTupleList [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 41 branch (l , e , s')
+ 42 | isNotJump t e = liftErrorWithTupleList "isNotJump" [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 43 -- | isNotJump t e = pure $ CPU (CU il ic is) s'
+ 44 | otherwise = liftErrorWithTupleList "otherwise" [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 45 -- | otherwise = jump <$> findAddress il (show l) where jump ic' = CPU (CU il ic' is) s'
+ 46
+ 47 staticCall :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 48 staticCall l (CPU (CU il ic (IS is)) s) = call <$> findAddress il l where
+ 49 call a = CPU (CU il a (IS (ic : is))) s
+ 50
+ 51 staticJump :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 52 staticJump l (CPU (CU il _ is) s) = jump <$> findAddress il l where
+ 53 jump a = CPU (CU il a is) s
+ 54
+ 55 staticBranch :: ALU m ll element => Label -> BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 56 staticBranch l t (CPU (CU il ic is) s) = branch =<< pop1 s where
+ 57 branch (e , s')
+ 58 | isNotJump t e = pure $ CPU (CU il ic is) s'
+ 59 | otherwise = jump <$> findAddress il l where
+ 60 jump ic' = CPU (CU il ic' is) s'
+ 61
+ 62 findAddress :: MonadSafe m => InstructionVector -> Label -> m InstructionAddress
+ 63 findAddress il l = liftMaybeOrErrorTuple ("Undefined label", show l) $ findIndex (isMark l) il
+ 64
+ 65 cpuToTuple :: CentralProcessingUnit s -> (ControlUnit , s)
+ 66 cpuToTuple (CPU cu s) = (cu , s)
+ 67
+ 68 -- | Types
+ 69 data CentralProcessingUnit al = CPU
+ 70 { controlUnit :: ControlUnit
+ 71 , alu :: al
+ 72 }
+ 73 deriving stock (Show )
+ 74
+ 75 data ControlUnit = CU
+ 76 { program :: InstructionVector
+ 77 , programCounter :: InstructionCounter
+ 78 , returnStack :: InstructionStack
+ 79 }
+ 80 deriving stock (Show )
+ 81
+ 82 newtype InstructionStack = IS [InstructionAddress]
+ 83 deriving stock (Show )
+ 84
+ 85 type InstructionCounter = InstructionAddress
+ 86
+ 87 type InstructionAddress = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html
new file mode 100644
index 000000000..f06c468f8
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.LSU where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.ALU
+ 4 import qualified HelVM.HelMA.Automaton.Units.RAM as RAM
+ 5
+ 6 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 7
+ 8 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 9 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 10
+ 11 import Control.Type.Operator
+ 12
+ 13 slInstruction :: (LSU m s r element) => LSInstruction -> LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 14 slInstruction Load = load
+ 15 slInstruction Store = store
+ 16 slInstruction (MIO OutputChar) = loadOutputChar
+ 17 slInstruction (MIO OutputDec) = loadOutputDec
+ 18 slInstruction (MIO InputChar) = storeInputChar
+ 19 slInstruction (MIO InputDec) = storeInputDec
+ 20
+ 21 load :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 22 load (LSU s r) = load' <$> pop1 s where
+ 23 load' (address , s') = LSU (push1 (RAM.genericLoad r address) s') r
+ 24
+ 25 store :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 26 store (LSU s r) = store' <$> pop2 s where
+ 27 store' (value , address , s') = LSU s' $ RAM.store address value r
+ 28
+ 29 loadOutputChar :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 30 loadOutputChar (LSU s r) = loadOutputChar' =<< pop1 s where
+ 31 loadOutputChar' (address , s') = LSU s' r <$ wPutAsChar (RAM.genericLoad r address)
+ 32
+ 33 loadOutputDec :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 34 loadOutputDec (LSU s r) = doOutputDec' =<< pop1 s where
+ 35 doOutputDec' (address , s') = LSU s' r <$ wPutAsDec (RAM.genericLoad r address)
+ 36
+ 37 storeInputChar :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 38 storeInputChar (LSU s r) = storeInputChar' =<< pop1 s where
+ 39 storeInputChar' (address , s') = LSU s' . flip (RAM.store address) r <$> wGetCharAs
+ 40
+ 41 storeInputDec :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 42 storeInputDec (LSU s r) = storeInputDec' =<< pop1 s where
+ 43 storeInputDec' (address , s') = LSU s' . flip (RAM.store address) r <$> wGetDecAs
+ 44
+ 45 sluToTuple :: LoadStoreUnit s r -> (s , r)
+ 46 sluToTuple (LSU s r) = (s , r)
+ 47
+ 48 -- | Types
+ 49 type LSU m s r element = (ALU m s element , RAM.RAM r element)
+ 50
+ 51 data LoadStoreUnit s r = LSU
+ 52 { stack :: s
+ 53 , ram :: r
+ 54 }
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html
new file mode 100644
index 000000000..14c59981a
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.RAM (
+ 2 genericLoad,
+ 3 load,
+ 4 storeChar,
+ 5 genericStore,
+ 6 store,
+ 7 fromList,
+ 8 RAM,
+ 9 ) where
+ 10
+ 11 import HelVM.HelIO.Containers.LLIndexSafe
+ 12 import HelVM.HelIO.Containers.LLInsertDef
+ 13
+ 14 import Data.Default
+ 15 import Prelude hiding (divMod, drop, splitAt, swap)
+ 16
+ 17 genericLoad :: (Integral i , RAM ll element) => ll -> i -> element
+ 18 genericLoad l = load l . fromIntegral
+ 19
+ 20 load :: (RAM ll element) => ll -> Address -> element
+ 21 load l i = indexMaybe l i ?: def
+ 22
+ 23 storeChar :: (Num element , Integral address , RAM ll element) => address -> Char -> ll -> ll
+ 24 storeChar a char = genericStore a $ ord char
+ 25
+ 26 genericStore :: (Integral value , Num element , Integral address , RAM ll element) => address -> value -> ll -> ll
+ 27 genericStore a v = store a $ fromIntegral v
+ 28
+ 29 store :: (Integral a , RAM ll element) => a -> element -> ll -> ll
+ 30 store = insertDef . fromIntegral
+ 31
+ 32 -- | Types
+ 33 type RAM ll element = (Show ll , Default element , II ll element)
+ 34
+ 35 type II ll element = (InsertDef ll element , IndexSafe ll element)
+ 36
+ 37 type Address = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html
new file mode 100644
index 000000000..c8be4c41d
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.Unit where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.CPU
+ 4
+ 5 -- | Data types
+ 6 data Unit s r = Unit
+ 7 { unitCU :: ControlUnit
+ 8 , unitStack :: s
+ 9 , unitRAM :: r
+ 10 }
+ 11 deriving stock (Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html
new file mode 100644
index 000000000..41a99454c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.WrapTokenList where
+ 2
+ 3 import qualified Text.Read
+ 4 import qualified Text.Show
+ 5
+ 6 newtype WrapTokenList a = WrapTokenList { unWrapTokenList :: a }
+ 7 deriving stock (Eq )
+ 8
+ 9 ----
+ 10
+ 11 instance Show a => Show (WrapTokenList [a]) where
+ 12 show (WrapTokenList tokens) = show =<< tokens
+ 13
+ 14 instance Read a => Read (WrapTokenList [a]) where
+ 15 readsPrec _ source = [( WrapTokenList $ maybeToList . readMaybe . one =<< source , "")]
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/hpc_index.html b/docs/reports/hpc/html/helma-0.7.2.0/hpc_index.html
new file mode 100644
index 000000000..9b800c004
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/hpc_index.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/hpc_index_alt.html b/docs/reports/hpc/html/helma-0.7.2.0/hpc_index_alt.html
new file mode 100644
index 000000000..cc01c347b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/hpc_index_alt.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/hpc_index_exp.html b/docs/reports/hpc/html/helma-0.7.2.0/hpc_index_exp.html
new file mode 100644
index 000000000..96591408f
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/hpc_index_exp.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.0/hpc_index_fun.html b/docs/reports/hpc/html/helma-0.7.2.0/hpc_index_fun.html
new file mode 100644
index 000000000..82d0bbc66
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.0/hpc_index_fun.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html
new file mode 100644
index 000000000..4360f2d7c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton (
+ 2 evalSource,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 6 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 7 import HelVM.HelMA.Automata.BrainFuck.Lexer
+ 8 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 9 import HelVM.HelMA.Automata.BrainFuck.TableOfInstructions
+ 10 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 11
+ 12 import HelVM.HelMA.Automaton.API.IOTypes
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14 import HelVM.HelMA.Automaton.Types.DumpType
+ 15
+ 16 import Control.Type.Operator
+ 17
+ 18 evalSource :: (BIO m , Symbol e) => Source -> FullTape e -> DumpType -> m ()
+ 19 evalSource source tape dt = logDump dt =<< doInstruction ([] , tokenize source) tape
+ 20
+ 21 doInstruction :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 22 doInstruction table@(_ , Simple MoveR : _) tape = doInstruction (nextInst table) (moveHeadRight tape)
+ 23 doInstruction table@(_ , Simple MoveL : _) tape = doInstruction (nextInst table) (moveHeadLeft tape)
+ 24 doInstruction table@(_ , Simple Inc : _) tape = doInstruction (nextInst table) (wNextSymbol tape)
+ 25 doInstruction table@(_ , Simple Dec : _) tape = doInstruction (nextInst table) (wPrevSymbol tape)
+ 26 doInstruction table@(_ , Simple Output : _) tape = doOutputChar table tape
+ 27 doInstruction table@(_ , Simple Input : _) tape = doInputChar table tape
+ 28 doInstruction table@(_ , JmpPast : _) tape = doJmpPast table tape
+ 29 doInstruction table@(_ , JmpBack : _) tape = doJmpBack table tape
+ 30 doInstruction table@(_ , [] ) tape = doEnd table tape
+ 31
+ 32 doJmpPast :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 33 doJmpPast table tape@(_ , 0 : _) = doInstruction (jumpPast table) tape
+ 34 doJmpPast table tape = doInstruction (nextInst table) tape
+ 35
+ 36 doJmpBack :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 37 doJmpBack table tape@(_ , 0 : _) = doInstruction (nextInst table) tape
+ 38 doJmpBack table tape = doInstruction (jumpBack table) tape
+ 39
+ 40 -- | IO instructions
+ 41 doOutputChar :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 42 doOutputChar _ (_ , []) = error "Illegal State"
+ 43 doOutputChar table tape@(_ , e : _) = wPutChar (toChar e) *> doInstruction (nextInst table) tape
+ 44
+ 45 doInputChar :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 46 doInputChar table tape = (doInstruction (nextInst table) . flip writeSymbol tape) =<< wGetChar
+ 47
+ 48 -- | Terminate instruction
+ 49 doEnd :: BIO m => Table -> FullTape e -> m $ Unit e
+ 50 doEnd table tape = pure $ Unit table tape
+ 51
+ 52 -- | Types
+ 53 data Unit e = Unit
+ 54 { unitTable :: Table
+ 55 , unitTape :: FullTape e
+ 56 }
+ 57 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html
new file mode 100644
index 000000000..b5ff9ec69
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton (
+ 2 evalSource,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 6 import HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction
+ 7 import HelVM.HelMA.Automata.BrainFuck.Parser
+ 8 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 9 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 10
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 13 import HelVM.HelMA.Automaton.Types.DumpType
+ 14
+ 15 import HelVM.HelIO.Containers.LLIndexSafe
+ 16
+ 17 import Control.Type.Operator
+ 18
+ 19 evalSource :: (BIO m , Symbol e) => Source -> FullTape e -> DumpType -> m ()
+ 20 evalSource source tape dt = logDump dt =<< flip evalVector tape =<< parseAsVector source
+ 21
+ 22 evalVector :: (BIO m , Symbol e) => TreeInstructionVector -> FullTape e -> m $ Unit e
+ 23 evalVector iv = nextStep (IU iv 0)
+ 24
+ 25 nextStep :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 26 nextStep (IU iv ic) = doInstruction (iv `indexMaybe` ic) (IU iv $ ic + 1)
+ 27
+ 28 doInstruction :: (BIO m , Symbol e) => Maybe TreeInstruction -> InstructionUnit -> FullTape e -> m $ Unit e
+ 29 doInstruction (Just (Simple MoveR )) table tape = nextStep table (moveHeadRight tape)
+ 30 doInstruction (Just (Simple MoveL )) table tape = nextStep table (moveHeadLeft tape)
+ 31 doInstruction (Just (Simple Inc )) table tape = nextStep table (wNextSymbol tape)
+ 32 doInstruction (Just (Simple Dec )) table tape = nextStep table (wPrevSymbol tape)
+ 33 doInstruction (Just (Simple Output )) table tape = doOutputChar table tape
+ 34 doInstruction (Just (Simple Input )) table tape = doInputChar table tape
+ 35 doInstruction (Just (While iv )) table tape = doWhile iv table tape
+ 36 doInstruction Nothing table tape = doEnd table tape
+ 37
+ 38 doWhile :: (BIO m , Symbol e) => TreeInstructionVector -> InstructionUnit -> FullTape e -> m $ Unit e
+ 39 doWhile _ table tape@(_ , 0:_) = nextStep table tape
+ 40 doWhile iv table tape = doWhileWithTape =<< evalVector iv tape where
+ 41 doWhileWithTape :: (BIO m , Symbol e) => Unit e -> m $ Unit e
+ 42 doWhileWithTape = doWhile iv table . unitTape
+ 43
+ 44 -- | IO instructions
+ 45 doOutputChar :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 46 doOutputChar _ (_ , []) = error "Illegal State"
+ 47 doOutputChar table tape@(_ , e:_) = wPutChar (toChar e) *> nextStep table tape
+ 48
+ 49 doInputChar :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 50 doInputChar table tape = (nextStep table . flip writeSymbol tape) =<< wGetChar
+ 51
+ 52 -- | Terminate instruction
+ 53 doEnd :: BIO m => InstructionUnit -> FullTape e -> m $ Unit e
+ 54 doEnd iu tape = pure $ Unit iu tape
+ 55
+ 56 -- | Types
+ 57 data Unit e = Unit
+ 58 { unitUI :: InstructionUnit
+ 59 , unitTape :: FullTape e
+ 60 }
+ 61 deriving stock (Eq , Show )
+ 62
+ 63 data InstructionUnit = IU !TreeInstructionVector !InstructionCounter
+ 64 deriving stock (Eq , Show )
+ 65
+ 66 type InstructionCounter = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html
new file mode 100644
index 000000000..05adcb87b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton where
+ 2
+ 3 import qualified HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton as Flat
+ 4 import qualified HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton as Tree
+ 5
+ 6 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 7 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 8
+ 9 import HelVM.HelMA.Automaton.API.EvalParams
+ 10 import HelVM.HelMA.Automaton.API.IOTypes
+ 11 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 12
+ 13 import HelVM.HelMA.Automaton.Types.CellType
+ 14 import HelVM.HelMA.Automaton.Types.DumpType
+ 15
+ 16 simpleEval :: BIO m => (Bool , Source , CellType) -> m ()
+ 17 simpleEval (c , s , t) = eval c s t Pretty
+ 18
+ 19 ----
+ 20
+ 21 evalParams :: BIO m => EvalParams -> m ()
+ 22 evalParams p = eval (compile p) (source p) (cellTypeOptions p) (dumpTypeOptions p)
+ 23
+ 24 eval :: BIO m => Bool -> Source -> CellType -> DumpType -> m ()
+ 25 eval c s Int8Type = evalSource c s (newTape :: FullTape Int8)
+ 26 eval c s Word8Type = evalSource c s (newTape :: FullTape Word8)
+ 27 eval c s Int16Type = evalSource c s (newTape :: FullTape Int16)
+ 28 eval c s Word16Type = evalSource c s (newTape :: FullTape Word16)
+ 29 eval c s Int32Type = evalSource c s (newTape :: FullTape Int32)
+ 30 eval c s Word32Type = evalSource c s (newTape :: FullTape Word32)
+ 31 eval c s Int64Type = evalSource c s (newTape :: FullTape Int64)
+ 32 eval c s Word64Type = evalSource c s (newTape :: FullTape Word64)
+ 33
+ 34 evalSource :: (BIO m , Symbol e) => Bool -> Source -> FullTape e -> DumpType -> m ()
+ 35 evalSource False = Flat.evalSource
+ 36 evalSource True = Tree.evalSource
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html
new file mode 100644
index 000000000..bdb30e3fe
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 4
+ 5 import Text.Read
+ 6
+ 7 import qualified Text.Show
+ 8
+ 9 data FlatInstruction =
+ 10 Simple SimpleInstruction
+ 11 | JmpPast
+ 12 | JmpBack
+ 13 deriving stock (Eq )
+ 14
+ 15 type FlatTreeInstructionList = [FlatInstruction]
+ 16
+ 17 instance Show FlatInstruction where
+ 18 show (Simple i) = show i
+ 19 show JmpPast = "["
+ 20 show JmpBack = "]"
+ 21
+ 22 instance Read FlatInstruction where
+ 23 readsPrec _ ">" = [( Simple MoveR , "")]
+ 24 readsPrec _ "<" = [( Simple MoveL , "")]
+ 25 readsPrec _ "+" = [( Simple Inc , "")]
+ 26 readsPrec _ "-" = [( Simple Dec , "")]
+ 27 readsPrec _ "." = [( Simple Output , "")]
+ 28 readsPrec _ "," = [( Simple Input , "")]
+ 29 readsPrec _ "[" = [( JmpPast , "")]
+ 30 readsPrec _ "]" = [( JmpBack , "")]
+ 31 readsPrec _ _ = []
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html
new file mode 100644
index 000000000..d40c09792
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction where
+ 2
+ 3 import Text.Read
+ 4 import qualified Text.Show
+ 5
+ 6 data SimpleInstruction =
+ 7 MoveR
+ 8 | MoveL
+ 9 | Inc
+ 10 | Dec
+ 11 | Output
+ 12 | Input
+ 13 deriving stock (Bounded , Enum , Eq )
+ 14
+ 15 instance Show SimpleInstruction where
+ 16 show MoveR = ">"
+ 17 show MoveL = "<"
+ 18 show Inc = "+"
+ 19 show Dec = "-"
+ 20 show Output = "."
+ 21 show Input = ","
+ 22
+ 23 instance Read SimpleInstruction where
+ 24 readsPrec _ ">" = [( MoveR , "")]
+ 25 readsPrec _ "<" = [( MoveL , "")]
+ 26 readsPrec _ "+" = [( Inc , "")]
+ 27 readsPrec _ "-" = [( Dec , "")]
+ 28 readsPrec _ "." = [( Output , "")]
+ 29 readsPrec _ "," = [( Input , "")]
+ 30 readsPrec _ _ = []
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html
new file mode 100644
index 000000000..f7c5c74b9
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 4
+ 5 import Data.DList
+ 6 import qualified Data.ListLike as LL
+ 7 import Data.Vector
+ 8
+ 9 import qualified Text.Show
+ 10
+ 11 data TreeInstruction =
+ 12 Simple SimpleInstruction
+ 13 | While !TreeInstructionVector
+ 14 deriving stock (Eq )
+ 15
+ 16 type TreeInstructionList = [TreeInstruction]
+ 17 type TreeInstructionDList = DList TreeInstruction
+ 18 type TreeInstructionVector = Vector TreeInstruction
+ 19
+ 20 instance Show TreeInstruction where
+ 21 show (Simple i) = show i
+ 22 show (While il) = "[" <> (show =<< LL.toList il) <> "]"
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html
new file mode 100644
index 000000000..7987dc7b9
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelMA.Automaton.API.IOTypes
+ 7 import HelVM.HelMA.Automaton.WrapTokenList
+ 8
+ 9 -- | Lexer
+ 10 tokenize :: Source -> FlatTreeInstructionList
+ 11 tokenize = unWrapTokenList . readTokens
+ 12
+ 13 readTokens :: Source -> Tokens
+ 14 readTokens source = readTextUnsafe source :: Tokens
+ 15
+ 16 type Tokens = WrapTokenList FlatTreeInstructionList
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html
new file mode 100644
index 000000000..88eb4e52f
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Parser where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction as Flat
+ 4 import HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction as Tree
+ 5 import HelVM.HelMA.Automata.BrainFuck.Lexer
+ 6
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8
+ 9 import HelVM.HelIO.Control.Safe
+ 10 import HelVM.HelIO.ListLikeUtil
+ 11
+ 12 import Data.ListLike hiding (show)
+ 13
+ 14 import qualified Data.DList as D
+ 15
+ 16 type OperandParser m a = FlatTreeInstructionList -> m (a , FlatTreeInstructionList)
+ 17
+ 18 parseAsVector :: MonadSafe m => Source -> m TreeInstructionVector
+ 19 parseAsVector = parseFILAsVector . tokenize
+ 20
+ 21 parseFILAsVector :: MonadSafe m => FlatTreeInstructionList -> m TreeInstructionVector
+ 22 parseFILAsVector fil = fromList <$> parseFIL fil
+ 23
+ 24 parseFIL :: MonadSafe m => FlatTreeInstructionList -> m TreeInstructionList
+ 25 parseFIL (Flat.Simple i : fil) = (Tree.Simple i : ) <$> parseFIL fil
+ 26 parseFIL [] = pure []
+ 27 parseFIL (Flat.JmpBack : fil) = liftErrorWithPrefix "JmpBack" $ show fil
+ 28 parseFIL (Flat.JmpPast : fil) = addWhile =<< parseWhile fil where
+ 29 addWhile (i , fil') = (i : ) <$> parseFIL fil'
+ 30
+ 31 parseWhile :: MonadSafe m => OperandParser m TreeInstruction
+ 32 parseWhile fil = buildWhile <$> parseWhileD fil where
+ 33 buildWhile :: (TreeInstructionDList , FlatTreeInstructionList) -> (TreeInstruction , FlatTreeInstructionList)
+ 34 buildWhile (idl , fil') = (buildWhileFromDList idl , fil')
+ 35
+ 36 buildWhileFromDList :: TreeInstructionDList -> TreeInstruction
+ 37 buildWhileFromDList = Tree.While . convert
+ 38
+ 39 parseWhileD :: MonadSafe m => OperandParser m TreeInstructionDList
+ 40 parseWhileD = go D.empty where
+ 41 go :: MonadSafe m => TreeInstructionDList -> FlatTreeInstructionList -> m (TreeInstructionDList , FlatTreeInstructionList)
+ 42 go acc (Flat.Simple i : fil) = go (acc `snoc` Tree.Simple i ) fil
+ 43 go acc [] = liftErrorWithPrefix "End of List" $ show acc
+ 44 go acc (Flat.JmpBack : fil) = pure (acc , fil)
+ 45 go acc (Flat.JmpPast : fil) = snocInstruction =<< parseWhile fil where
+ 46 snocInstruction :: MonadSafe m => (TreeInstruction , FlatTreeInstructionList) -> m (TreeInstructionDList , FlatTreeInstructionList)
+ 47 snocInstruction (i , fil') = go (acc `snoc` i) fil'
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html
new file mode 100644
index 000000000..e276c86f8
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Symbol (
+ 2 Symbol,
+ 3 def,
+ 4 next,
+ 5 prev,
+ 6 fromChar,
+ 7 toChar
+ 8 ) where
+ 9
+ 10 import Data.Default (Default)
+ 11
+ 12 import qualified Data.Default as Default
+ 13 import qualified Relude.Extra as Extra
+ 14
+ 15 def :: Symbol e => e
+ 16 def = Default.def
+ 17
+ 18 next :: Symbol e => e -> e
+ 19 next = Extra.next
+ 20
+ 21 prev :: Symbol e => e -> e
+ 22 prev = Extra.prev
+ 23
+ 24 class (Bounded e , Default e , Enum e , Eq e , Num e , Show e) => Symbol e where
+ 25 fromChar :: Char -> e
+ 26 toChar :: e -> Char
+ 27
+ 28 --
+ 29
+ 30 instance Symbol Int where
+ 31 fromChar = ord
+ 32 toChar = chr
+ 33
+ 34 instance Symbol Word where
+ 35 fromChar = fromIntegral . ord
+ 36 toChar = chr . fromIntegral
+ 37
+ 38 instance Symbol Int8 where
+ 39 fromChar = fromIntegral . ord
+ 40 toChar = chr . normalizeMod . fromIntegral
+ 41
+ 42 instance Symbol Word8 where
+ 43 fromChar = fromIntegral . ord
+ 44 toChar = chr . fromIntegral
+ 45
+ 46 instance Symbol Int16 where
+ 47 fromChar = fromIntegral . ord
+ 48 toChar = chr . normalizeMod . fromIntegral
+ 49
+ 50 instance Symbol Word16 where
+ 51 fromChar = fromIntegral . ord
+ 52 toChar = chr . fromIntegral
+ 53
+ 54 instance Symbol Int32 where
+ 55 fromChar = fromIntegral . ord
+ 56 toChar = chr . normalizeMod . fromIntegral
+ 57
+ 58 instance Symbol Word32 where
+ 59 fromChar = fromIntegral . ord
+ 60 toChar = chr . fromIntegral
+ 61
+ 62 instance Symbol Int64 where
+ 63 fromChar = fromIntegral . ord
+ 64 toChar = chr . normalizeMod . fromIntegral
+ 65
+ 66 instance Symbol Word64 where
+ 67 fromChar = fromIntegral . ord
+ 68 toChar = chr . fromIntegral
+ 69 --
+ 70
+ 71 countSymbols :: (Integral e) => e
+ 72 countSymbols = 256
+ 73
+ 74 modifyMod :: (Integral e) => (e -> e) -> e -> e
+ 75 modifyMod f i = f (i + countSymbols) `mod` countSymbols
+ 76
+ 77 normalizeMod :: (Integral e) => e -> e
+ 78 normalizeMod = modifyMod id
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html
new file mode 100644
index 000000000..78fc0f8ac
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.TableOfInstructions where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 4
+ 5 type HalfTable = FlatTreeInstructionList
+ 6 type Table = (HalfTable , HalfTable)
+ 7 type TableD = Table -> Table
+ 8
+ 9 prevInst :: TableD
+ 10 prevInst (inst : prev , next) = (prev , inst : next)
+ 11 prevInst ([] , _) = error "End of the table"
+ 12
+ 13 nextInst :: TableD
+ 14 nextInst (prev , inst : next) = (inst : prev , next)
+ 15 nextInst (_ , []) = error "End of the table"
+ 16
+ 17 matchPrevJmp :: TableD
+ 18 matchPrevJmp table@(JmpPast : _ , _) = table
+ 19 matchPrevJmp table@(JmpBack : _ , _) = (matchPrevJmp . prevInst . jumpBack) table
+ 20 matchPrevJmp table = jumpBack table
+ 21
+ 22 matchNextJmp :: TableD
+ 23 matchNextJmp table@(_ , JmpBack : _) = nextInst table
+ 24 matchNextJmp table@(_ , JmpPast : _) = (matchNextJmp . jumpPast) table
+ 25 matchNextJmp table = jumpPast table
+ 26
+ 27 jumpPast :: TableD
+ 28 jumpPast = matchNextJmp . nextInst
+ 29
+ 30 jumpBack :: TableD
+ 31 jumpBack = matchPrevJmp . prevInst
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html
new file mode 100644
index 000000000..df2083506
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols (
+ 2 FullTape,
+ 3 newTape,
+ 4 moveHeadRight,
+ 5 moveHeadLeft,
+ 6 wNextSymbol,
+ 7 wPrevSymbol,
+ 8 writeSymbol
+ 9 ) where
+ 10
+ 11 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 12
+ 13 ----
+ 14
+ 15 type D a = a -> a
+ 16 type FullTape e = (HalfTape e , HalfTape e)
+ 17 type FullTapeD e = D (FullTape e)
+ 18
+ 19 type HalfTape e = [e]
+ 20
+ 21 ----
+ 22
+ 23 newTape :: (Symbol e) => FullTape e
+ 24 newTape = ([def] , [def])
+ 25
+ 26 moveHeadRight :: (Symbol e) => FullTapeD e
+ 27 moveHeadRight (cell:left , right) = pad (left , cell:right)
+ 28 moveHeadRight ([] , _) = error "End of the Tape"
+ 29
+ 30 moveHeadLeft :: (Symbol e) => FullTapeD e
+ 31 moveHeadLeft (left , cell:right) = pad (cell:left , right)
+ 32 moveHeadLeft (_ , []) = error "End of the Tape"
+ 33
+ 34 pad :: (Symbol e) => FullTapeD e
+ 35 pad ([] , []) = newTape
+ 36 pad ([] , right) = ([def] , right)
+ 37 pad (left , []) = (left , [def])
+ 38 pad tape = tape
+ 39
+ 40 ----
+ 41
+ 42 wNextSymbol :: (Symbol e) => FullTapeD e
+ 43 wNextSymbol = modifyCell next
+ 44
+ 45 wPrevSymbol :: (Symbol e) => FullTapeD e
+ 46 wPrevSymbol = modifyCell prev
+ 47
+ 48 writeSymbol :: (Symbol e) => Char -> FullTapeD e
+ 49 writeSymbol symbol = modifyCell (const $ fromChar symbol)
+ 50
+ 51 modifyCell :: D e -> FullTapeD e
+ 52 modifyCell f (left , cell:right) = (left , f cell:right)
+ 53 modifyCell _ (_ , []) = error "End of the Tape"
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html
new file mode 100644
index 000000000..378891022
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Cat.Automaton (
+ 2 evalParams,
+ 3 eval
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automaton.API.EvalParams
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 9
+ 10 evalParams :: BIO m => EvalParams -> m ()
+ 11 evalParams = eval . source
+ 12
+ 13 eval :: BusinessIO m => Source -> m ()
+ 14 eval = wPutStr
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html
new file mode 100644
index 000000000..17e805bdf
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Addressing (
+ 2 genericFindAddress,
+ 3 findAddress,
+ 4 genericNextLabel,
+ 5 nextLabel
+ 6 ) where
+ 7
+ 8 import HelVM.HelMA.Automata.ETA.Symbol
+ 9 import HelVM.HelMA.Automata.ETA.Token
+ 10
+ 11 import HelVM.HelIO.Containers.LLIndexSafe
+ 12
+ 13 import HelVM.HelIO.Control.Safe
+ 14
+ 15 import Data.ListLike hiding (show)
+ 16
+ 17 import Prelude hiding (length, splitAt)
+ 18
+ 19 import qualified Data.Vector as Vector
+ 20
+ 21 ----
+ 22
+ 23 genericFindAddress :: (MonadSafe m , Integral cell) => Vector.Vector Token -> cell -> m InstructionAddress
+ 24 genericFindAddress il = findAddress il . fromIntegral
+ 25
+ 26 findAddress :: MonadSafe m => Vector.Vector Token -> Int -> m InstructionAddress
+ 27 findAddress _ 1 = pure 0
+ 28 findAddress il address = appendErrorTupleList [("il" , show il) , ("address" , show address)] ((+1) <$> indexSafe (Vector.elemIndices R il) (address-2))
+ 29
+ 30 ----
+ 31
+ 32 genericNextLabel :: Integral cell => Vector.Vector Token -> InstructionAddress -> cell
+ 33 genericNextLabel il = fromIntegral . nextLabel il
+ 34
+ 35 nextLabel :: Vector.Vector Token -> InstructionAddress -> Int
+ 36 nextLabel il ic = length (Vector.elemIndices R il') + 2 where (il' , _) = splitAt ic il
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html
new file mode 100644
index 000000000..62f4c6348
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 ) where
+ 6
+ 7 import HelVM.HelMA.Automata.ETA.Evaluator
+ 8 import HelVM.HelMA.Automata.ETA.Lexer
+ 9 import HelVM.HelMA.Automata.ETA.OperandParsers
+ 10 import HelVM.HelMA.Automata.ETA.Symbol
+ 11 import HelVM.HelMA.Automata.ETA.Token
+ 12
+ 13 import HelVM.HelMA.Automaton.API.EvalParams
+ 14 import HelVM.HelMA.Automaton.API.IOTypes
+ 15
+ 16 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 17 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 18
+ 19 import HelVM.HelMA.Automaton.Types.DumpType
+ 20 import HelVM.HelMA.Automaton.Types.StackType
+ 21
+ 22 import HelVM.HelIO.Collections.SList as SList
+ 23
+ 24 import Prelude hiding (divMod)
+ 25
+ 26 import qualified Data.Sequence as Seq
+ 27 import qualified Data.Vector as Vector
+ 28
+ 29 simpleEval :: BIO m => (Bool , Source , StackType) -> m ()
+ 30 simpleEval (c , s , t) = eval c s t Pretty
+ 31
+ 32 ----
+ 33
+ 34 evalParams :: BIO m => EvalParams -> m ()
+ 35 evalParams p = eval (compile p) (source p) (stackTypeOptions p) (dumpTypeOptions p)
+ 36
+ 37 eval :: (Evaluator Symbol m) => Bool -> Source -> StackType -> DumpType -> m ()
+ 38 eval compile source = evalTL compile (tokenize source)
+ 39
+ 40 evalTL :: (Evaluator Symbol m) => Bool -> TokenList -> StackType -> DumpType -> m ()
+ 41 evalTL c tl ListStackType = start c tl []
+ 42 evalTL c tl SeqStackType = start c tl Seq.empty
+ 43 evalTL c tl SListStackType = start c tl SList.sListEmpty
+ 44
+ 45 start :: (SEvaluator Symbol s m) => Bool -> TokenList -> s -> DumpType -> m ()
+ 46 start _ tl s dt = logDump dt =<< next (IU (Vector.fromList tl) 0) s
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html
new file mode 100644
index 000000000..50abd12dd
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Evaluator (
+ 2 next,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.ETA.Addressing
+ 6 import HelVM.HelMA.Automata.ETA.OperandParsers
+ 7 import HelVM.HelMA.Automata.ETA.Token
+ 8
+ 9 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 10
+ 11 import HelVM.HelMA.Automaton.Units.ALU as Stack
+ 12
+ 13 import Control.Type.Operator
+ 14
+ 15 import Prelude hiding (divMod)
+ 16
+ 17 next :: (SEvaluator e s m) => InstructionUnit -> s -> m $ Unit s
+ 18 next iu s = doInstruction' =<< nextIU iu where doInstruction' (t , iu') = doInstruction t iu' s
+ 19
+ 20 doInstruction :: (SEvaluator e s m) => Maybe Token -> InstructionUnit -> s -> m $ Unit s
+ 21 -- | IO instructions
+ 22 doInstruction (Just O) iu s = next iu =<< doOutputChar2 s
+ 23 doInstruction (Just I) iu s = next iu =<< doInputChar2 s
+ 24
+ 25 -- | Stack instructions
+ 26 doInstruction (Just N) iu s = next' =<< parseNumber iu where next' (symbol , iu') = next iu' (push1 symbol s)
+ 27 doInstruction (Just H) iu s = next iu =<< halibut s
+ 28
+ 29 -- | Arithmetic
+ 30 doInstruction (Just S) iu s = next iu =<< sub s
+ 31 doInstruction (Just E) iu s = next iu =<< divMod s
+ 32
+ 33 -- | Control
+ 34 doInstruction (Just R) iu s = next iu s
+ 35 doInstruction (Just A) iu@(IU il ic) s = (next iu . flipPush1 s . genericNextLabel il) ic
+ 36 doInstruction (Just T) iu@(IU il _ ) s = transfer =<< pop2 s where
+ 37 transfer (_ , 0 , s') = next iu s'
+ 38 transfer (0 , _ , _ ) = doEnd iu s
+ 39 transfer (l , _ , s') = next' =<< genericFindAddress il l where next' address = next (IU il address) s'
+ 40 doInstruction Nothing iu s = doEnd iu s
+ 41
+ 42 -- | Terminate instruction
+ 43 doEnd :: (SEvaluator e s m) => InstructionUnit -> s -> m $ Unit s
+ 44 doEnd iu s = pure $ Unit iu s
+ 45
+ 46 -- | Types
+ 47
+ 48 data Unit s = Unit
+ 49 { unitIU :: !InstructionUnit
+ 50 , unitStack :: s
+ 51 }
+ 52 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html
new file mode 100644
index 000000000..cdb64831c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.ETA.Token
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelIO.Util
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.WrapTokenList
+ 9
+ 10 -- | Lexer
+ 11 tokenize :: Source -> TokenList
+ 12 tokenize = whiteTokenListToTokenList . unWrapTokenList . readTokens
+ 13
+ 14 readTokens :: Source -> WhiteTokens
+ 15 readTokens source = (readTextUnsafe . toUppers) source :: WhiteTokens
+ 16
+ 17 -- | Types
+ 18 type WhiteTokens = WrapTokenList WhiteTokenList
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html
new file mode 100644
index 000000000..7131374a0
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.OperandParsers where
+ 2
+ 3 import HelVM.HelMA.Automata.ETA.Symbol
+ 4 import HelVM.HelMA.Automata.ETA.Token
+ 5
+ 6 import HelVM.HelIO.Containers.LLIndexSafe
+ 7 import HelVM.HelIO.Control.Safe
+ 8 import HelVM.HelIO.Digit.ToDigit
+ 9
+ 10 import qualified Data.Vector as Vector
+ 11
+ 12 parseNumber :: (MonadSafe m , Integral a) => OperandIUParser m a
+ 13 parseNumber iu = go [] =<< nextIU iu where
+ 14 go :: (MonadSafe m , Integral a) => TokenList -> (Maybe Token, InstructionUnit) -> m (a, InstructionUnit)
+ 15 go acc (Nothing , iu') = ( , iu') <$> makeIntegral7FromList acc
+ 16 go acc (Just E , iu') = ( , iu') <$> makeIntegral7FromList acc
+ 17 go acc (Just R , iu') = go acc =<< nextIU iu'
+ 18 go acc (Just t , iu') = go (t : acc) =<< nextIU iu'
+ 19
+ 20 nextIU :: MonadSafe m => OperandIUParser m (Maybe Token)
+ 21 nextIU iu@(IU il ic)
+ 22 | ic < Vector.length il = wrap <$> indexSafe il ic
+ 23 | otherwise = pure (Nothing , iu)
+ 24 where wrap i = (Just i, IU il (ic+1))
+ 25
+ 26 -- | Types
+ 27 data InstructionUnit = IU !TokenVector !InstructionCounter
+ 28 deriving stock (Eq , Read , Show )
+ 29
+ 30 type OperandIUParser m a = InstructionUnit -> m (a , InstructionUnit)
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html
new file mode 100644
index 000000000..b73b3b4c0
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Token where
+ 2
+ 3 import HelVM.HelIO.Control.Safe
+ 4 import HelVM.HelIO.Digit.ToDigit
+ 5
+ 6 import Data.Vector as Vector
+ 7
+ 8 import qualified Text.Read
+ 9 import qualified Text.Show
+ 10
+ 11 data Token = E | T | A | O | I | N | S | H | R
+ 12 deriving stock (Bounded , Enum , Eq , Read , Show )
+ 13
+ 14 type TokenList = [Token]
+ 15 type TokenVector = Vector Token
+ 16
+ 17 instance ToDigit Token where
+ 18 toDigit H = pure 0
+ 19 toDigit T = pure 1
+ 20 toDigit A = pure 2
+ 21 toDigit O = pure 3
+ 22 toDigit I = pure 4
+ 23 toDigit N = pure 5
+ 24 toDigit S = pure 6
+ 25 toDigit t = liftErrorWithPrefix "Wrong token" $ show t
+ 26
+ 27 ----
+ 28
+ 29 newtype WhiteToken = WhiteToken { unWhiteToken :: Token}
+ 30 deriving stock (Eq )
+ 31
+ 32 type WhiteTokenList = [WhiteToken]
+ 33
+ 34 instance Show WhiteToken where
+ 35 show (WhiteToken R) = "\n"
+ 36 show (WhiteToken t) = show t
+ 37
+ 38 -- | Scanner
+ 39 instance Read WhiteToken where
+ 40 readsPrec _ "\n" = [( WhiteToken R , "")]
+ 41 readsPrec _ "E" = [( WhiteToken E , "")]
+ 42 readsPrec _ "T" = [( WhiteToken T , "")]
+ 43 readsPrec _ "A" = [( WhiteToken A , "")]
+ 44 readsPrec _ "O" = [( WhiteToken O , "")]
+ 45 readsPrec _ "I" = [( WhiteToken I , "")]
+ 46 readsPrec _ "N" = [( WhiteToken N , "")]
+ 47 readsPrec _ "S" = [( WhiteToken S , "")]
+ 48 readsPrec _ "H" = [( WhiteToken H , "")]
+ 49 readsPrec _ _ = []
+ 50
+ 51 tokenToWhiteTokenPair :: Token -> (WhiteToken , String)
+ 52 tokenToWhiteTokenPair t = (WhiteToken t , "")
+ 53
+ 54 whiteTokenListToTokenList :: WhiteTokenList -> TokenList
+ 55 whiteTokenListToTokenList = fmap unWhiteToken
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html
new file mode 100644
index 000000000..89e5d37a4
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Rev.Automaton (
+ 2 evalParams,
+ 3 eval
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automaton.API.EvalParams
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 9
+ 10 import qualified Data.Text as Text
+ 11
+ 12 evalParams :: BIO m => EvalParams -> m ()
+ 13 evalParams = eval . source
+ 14
+ 15 eval :: BusinessIO m => Source -> m ()
+ 16 eval = evalLines . lines
+ 17
+ 18 evalLines :: BusinessIO m => [Source] -> m ()
+ 19 evalLines ll = doOutput $ unlines $ Text.reverse <$> ll
+ 20
+ 21 doOutput :: BusinessIO m => Source -> m ()
+ 22 doOutput = wPutStr
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html
new file mode 100644
index 000000000..12d2eadea
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 ) where
+ 6
+ 7 import HelVM.HelMA.Automata.SubLeq.Evaluator
+ 8 import HelVM.HelMA.Automata.SubLeq.Lexer
+ 9
+ 10 import HelVM.HelMA.Automaton.API.EvalParams
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 15
+ 16 import HelVM.HelMA.Automaton.Types.DumpType
+ 17 import HelVM.HelMA.Automaton.Types.RAMType
+ 18
+ 19 import qualified HelVM.HelIO.Collections.MapList as MapList
+ 20 import qualified HelVM.HelIO.Collections.SList as SList
+ 21
+ 22 import qualified Data.Sequence as Seq
+ 23
+ 24 simpleEval :: BIO m => RAMType -> Source -> m ()
+ 25 simpleEval rt s = eval s rt Pretty
+ 26
+ 27 ----
+ 28
+ 29 evalParams :: BIO m => EvalParams -> m ()
+ 30 evalParams p = eval (source p) (ramTypeOptions p) (dumpTypeOptions p)
+ 31
+ 32 eval :: BIO m => Source -> RAMType -> DumpType -> m ()
+ 33 eval source = evalIL $ tokenize source
+ 34
+ 35 evalIL :: Evaluator e m => [e] -> RAMType -> DumpType -> m ()
+ 36 evalIL = flip evalIL'
+ 37
+ 38 evalIL' :: Evaluator e m => RAMType -> [e] -> DumpType -> m ()
+ 39 evalIL' ListRAMType = start
+ 40 evalIL' SeqRAMType = start . Seq.fromList
+ 41 evalIL' SListRAMType = start . SList.sListFromList
+ 42 evalIL' MapListRAMType = start . MapList.mapListFromList
+ 43
+ 44 start :: REvaluator e r m => r -> DumpType -> m ()
+ 45 start r dt = logDump dt =<< doInstruction 0 r
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html
new file mode 100644
index 000000000..d442c9f2e
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Evaluator (
+ 2 doInstruction,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 6 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 7
+ 8 import HelVM.HelMA.Automaton.Units.RAM as RAM
+ 9
+ 10 import Control.Type.Operator
+ 11
+ 12 doInstruction :: REvaluator e r m => e -> r -> m $ Unit e r
+ 13 doInstruction ic ram
+ 14 | ic < 0 = doEnd ic ram
+ 15 | src < 0 = doInputChar dst ic ram
+ 16 | dst < 0 = doOutputChar src ic ram
+ 17 | otherwise = doInstruction ic' $ store dst diff ram
+ 18 where
+ 19 src = genericLoad ram ic
+ 20 dst = genericLoad ram $ ic + 1
+ 21 diff = genericLoad ram dst - genericLoad ram src
+ 22 ic'
+ 23 | diff <= 0 = genericLoad ram $ ic + 2
+ 24 | otherwise = ic + 3
+ 25
+ 26 -- | IO instructions
+ 27 doOutputChar :: REvaluator e r m => e -> e -> r -> m $ Unit e r
+ 28 doOutputChar address ic ram = wPutAsChar (genericLoad ram address) *> doInstruction (ic+3) ram
+ 29
+ 30 doInputChar :: REvaluator e r m => e -> e -> r -> m $ Unit e r
+ 31 doInputChar address ic ram = doInputChar' =<< wGetChar where
+ 32 doInputChar' char = doInstruction (ic+3) $ storeChar address char ram
+ 33
+ 34 -- | Terminate instruction
+ 35 doEnd :: REvaluator e r m => e -> r -> m $ Unit e r
+ 36 doEnd ic ram = pure $ Unit ic ram
+ 37
+ 38 -- | Types
+ 39 data Unit ic ram = Unit
+ 40 { unitIU :: ic
+ 41 , unitRAM :: ram
+ 42 }
+ 43 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html
new file mode 100644
index 000000000..beead8144
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.SubLeq.Symbol
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelIO.Util
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8
+ 9 import qualified Text.Read as Read
+ 10 import qualified Text.Show as Show
+ 11
+ 12 tokenize :: Source -> SymbolList
+ 13 tokenize source = (maybeToList . readTextMaybe) =<< splitOneOf " \t\n" source
+ 14
+ 15 readSymbols :: Source -> Symbols
+ 16 readSymbols source = readTextUnsafe source :: Symbols
+ 17
+ 18 ----
+ 19
+ 20 newtype Symbols = Symbols SymbolList
+ 21
+ 22 instance Show Symbols where
+ 23 show (Symbols symbols) = toString $ unwords $ shows symbols
+ 24
+ 25 instance Read Symbols where
+ 26 readsPrec _ source = [( Symbols $ tokenize $ toText source , "")]
+ 27
+ 28 ----
+ 29
+ 30 shows :: SymbolList -> [Text]
+ 31 shows symbols = show <$> symbols
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html
new file mode 100644
index 000000000..6baaa7248
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 evalIL,
+ 6 evalTL,
+ 7 start,
+ 8 ) where
+ 9
+ 10 import HelVM.HelMA.Automata.WhiteSpace.Evaluator
+ 11 import HelVM.HelMA.Automata.WhiteSpace.Lexer
+ 12 import HelVM.HelMA.Automata.WhiteSpace.Parser
+ 13 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 14 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 15
+ 16 import HelVM.HelMA.Automaton.API.EvalParams
+ 17 import HelVM.HelMA.Automaton.API.IOTypes
+ 18
+ 19 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 20 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 21
+ 22 import HelVM.HelMA.Automaton.Instruction
+ 23
+ 24 import HelVM.HelMA.Automaton.Units.CPU as CPU
+ 25
+ 26 import HelVM.HelMA.Automaton.Types.DumpType
+ 27 import HelVM.HelMA.Automaton.Types.RAMType
+ 28 import HelVM.HelMA.Automaton.Types.StackType
+ 29 import HelVM.HelMA.Automaton.Types.TokenType
+ 30
+ 31 import HelVM.HelIO.Control.Safe
+ 32
+ 33 import Prelude hiding (swap)
+ 34
+ 35 import qualified HelVM.HelMA.Automata.WhiteSpace.SimpleParams as S
+ 36
+ 37 import qualified HelVM.HelIO.Collections.MapList as MapList
+ 38 import qualified HelVM.HelIO.Collections.SList as SList
+ 39
+ 40 import qualified Data.Sequence as Seq
+ 41 import qualified Data.Vector as Vector
+ 42
+ 43 simpleEval :: BIO m => S.SimpleParams -> m ()
+ 44 simpleEval p = eval (S.tokenType p) (S.source p) (S.asciiLabel p) (S.stackType p) (S.ramType p) (S.dumpType p)
+ 45
+ 46 ----
+ 47
+ 48 evalParams :: BIO m => TokenType -> EvalParams -> m ()
+ 49 evalParams tokenType p = eval tokenType (source p) (asciiLabel p) (stackTypeOptions p) (ramTypeOptions p) (dumpTypeOptions p)
+ 50
+ 51 eval :: BIO m => TokenType -> Source -> Bool -> StackType -> RAMType -> DumpType -> m ()
+ 52 eval tokenType source = evalTL $ tokenize tokenType source
+ 53
+ 54 evalTL :: BIO m => TokenList -> Bool -> StackType -> RAMType -> DumpType -> m ()
+ 55 evalTL tl ascii st rt dt = evalTL' =<< liftSafe (parseTL ascii tl) where evalTL' il = evalIL il st rt dt
+ 56
+ 57 evalIL :: BIO m => InstructionList -> StackType -> RAMType -> DumpType -> m ()
+ 58 evalIL il s ListRAMType = evalIL' il s []
+ 59 evalIL il s SeqRAMType = evalIL' il s Seq.empty
+ 60 evalIL il s SListRAMType = evalIL' il s SList.sListEmpty
+ 61 evalIL il s MapListRAMType = evalIL' il s MapList.mapListEmpty
+ 62
+ 63 evalIL' :: (REvaluator Symbol r m) => InstructionList -> StackType -> r -> DumpType -> m ()
+ 64 evalIL' il ListStackType = start il []
+ 65 evalIL' il SeqStackType = start il Seq.empty
+ 66 evalIL' il SListStackType = start il SList.sListEmpty
+ 67
+ 68 start :: (SREvaluator Symbol s r m) => InstructionList -> s -> r -> DumpType -> m ()
+ 69 start il s r dt = logDump dt =<< next (CU (Vector.fromList il) 0 (IS [])) s r
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html
new file mode 100644
index 000000000..313df0c28
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Evaluator (
+ 2 next
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 6
+ 7 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 8
+ 9 import HelVM.HelMA.Automaton.Instruction
+ 10
+ 11 import HelVM.HelMA.Automaton.Units.ALU as Stack
+ 12 import HelVM.HelMA.Automaton.Units.CPU as CPU
+ 13 import HelVM.HelMA.Automaton.Units.LSU as LSU
+ 14 import HelVM.HelMA.Automaton.Units.Unit
+ 15
+ 16 import HelVM.HelIO.Containers.LLIndexSafe
+ 17
+ 18 import Control.Type.Operator
+ 19
+ 20 import Prelude hiding (swap)
+ 21
+ 22 next :: (SREvaluator Symbol s r m) => ControlUnit -> s -> r -> m $ Unit s r
+ 23 next (CU il ic is) s r = doInstruction' =<< indexSafe il ic where doInstruction' i = doInstruction i (CU il (ic+1) is) s r
+ 24
+ 25 stackNext :: (SREvaluator Symbol s r m) => ControlUnit -> r -> s -> m (Unit s r)
+ 26 stackNext cu r s = next cu s r
+ 27
+ 28 cuNext :: (SREvaluator Symbol s r m) => r -> ControlUnit -> s -> m (Unit s r)
+ 29 cuNext r cu s = next cu s r
+ 30
+ 31 ----
+ 32
+ 33 doInstruction :: (SREvaluator Symbol s r m) => Instruction -> ControlUnit -> s -> r -> m (Unit s r)
+ 34 doInstruction (IAL i) cu s r = stackNext cu r =<< alInstruction i s
+ 35 doInstruction (ILS i) cu s r = uncurry (next cu) . sluToTuple =<< slInstruction i (LSU s r)
+ 36 doInstruction (IControl i) cu s r = uncurry (cuNext r). cpuToTuple =<< controlInstruction i (CPU cu s)
+ 37 doInstruction End cu s r = pure $ Unit cu s r
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html
new file mode 100644
index 000000000..ac7fd28f0
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelMA.Automaton.API.IOTypes
+ 7 import HelVM.HelMA.Automaton.Types.TokenType
+ 8 import HelVM.HelMA.Automaton.WrapTokenList
+ 9
+ 10 -- | Lexer
+ 11
+ 12 tokenize :: TokenType -> Source -> TokenList
+ 13 tokenize VisibleTokenType = tokenizeVisible
+ 14 tokenize _ = tokenizeWhite
+ 15
+ 16 tokenizeVisible :: Source -> TokenList
+ 17 tokenizeVisible = unWrapTokenList . readVisibleTokens
+ 18
+ 19 tokenizeWhite :: Source -> TokenList
+ 20 tokenizeWhite = whiteTokenListToTokenList . unWrapTokenList . readWhiteTokens
+ 21
+ 22 readVisibleTokens :: Source -> VisibleTokens
+ 23 readVisibleTokens source = readTextUnsafe source :: VisibleTokens
+ 24
+ 25 readWhiteTokens :: Source -> WhiteTokens
+ 26 readWhiteTokens source = readTextUnsafe source :: WhiteTokens
+ 27
+ 28 type VisibleTokens = WrapTokenList TokenList
+ 29
+ 30 type WhiteTokens = WrapTokenList WhiteTokenList
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html
new file mode 100644
index 000000000..10bbf0b57
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.OperandParsers where
+ 2
+ 3 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 4 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 5
+ 6 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 7
+ 8 import HelVM.HelIO.Collections.SList
+ 9 import HelVM.HelIO.Control.Safe
+ 10 import HelVM.HelIO.Digit.ToDigit
+ 11
+ 12 type OperandParser m a = TokenList -> m (a , TokenList)
+ 13
+ 14 ----
+ 15
+ 16 parseIndex :: MonadSafe m => OperandParser m Index
+ 17 parseIndex = parseInt
+ 18
+ 19 parseSymbol :: MonadSafe m => OperandParser m Symbol
+ 20 parseSymbol = parseInteger
+ 21
+ 22 parseLabel :: MonadSafe m => Bool -> OperandParser m Label
+ 23 parseLabel False = parseDigitString
+ 24 parseLabel True = parseAsciiString
+ 25
+ 26 ----
+ 27
+ 28 parseInt :: MonadSafe m => OperandParser m Int
+ 29 parseInt tl = parseInt' <$> parseInteger tl where
+ 30 parseInt' (integer , tl') = (fromIntegral integer , tl')
+ 31
+ 32 parseInteger :: MonadSafe m => OperandParser m Integer
+ 33 parseInteger [] = liftError "EOL"
+ 34 parseInteger (S : tl) = parseUtil makeIntegral2FromList tl
+ 35 parseInteger (T : tl) = negationIntegral <$> parseUtil makeIntegral2FromList tl
+ 36 parseInteger (N : tl) = pure (0 , tl )
+ 37
+ 38 negationIntegral :: (Integer , TokenList) -> (Integer , TokenList)
+ 39 negationIntegral (i , l) = (-i , l)
+ 40
+ 41 parseNatural :: MonadSafe m => OperandParser m Natural
+ 42 parseNatural = parseUtil makeIntegral2FromList
+ 43
+ 44 parseUtil :: MonadSafe m => (TokenList -> m a) -> OperandParser m a
+ 45 parseUtil maker = go ([] :: TokenList) where
+ 46 go acc [] = liftError $ show acc
+ 47 go acc (N:tl) = moveSafe (maker acc , tl)
+ 48 go acc (t:tl) = go (t : acc) tl
+ 49
+ 50 parseDigitString :: MonadSafe m => OperandParser m SString
+ 51 parseDigitString tl = moveSafe =<< parseString' makeDigitStringFromList tl
+ 52
+ 53 parseAsciiString :: MonadSafe m => OperandParser m SString
+ 54 parseAsciiString tl = moveSafe =<< parseString' makeAsciiString28FromList tl
+ 55
+ 56 moveSafe :: MonadSafe m => (m a , TokenList) -> m (a , TokenList)
+ 57 moveSafe (a , tl) = appendErrorTuple ("TokenList" , show tl) $ ( , tl) <$> a
+ 58
+ 59 parseString' :: MonadSafe m => (TokenList -> a) -> OperandParser m a
+ 60 parseString' maker tl = parseString'' <$> splitByN tl where
+ 61 parseString'' (acc , tl') = (maker acc , tl')
+ 62
+ 63 splitByN :: MonadSafe m => OperandParser m TokenList
+ 64 splitByN [] = liftError "Empty list"
+ 65 splitByN (N : tl) = pure ([] , tl)
+ 66 splitByN (t : tl) = splitByN' <$> splitByN tl where
+ 67 splitByN' (acc , tl') = (t:acc , tl')
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html
new file mode 100644
index 000000000..8f77e63a7
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Parser (
+ 2 flipParseVisible,
+ 3 flipParseWhite,
+ 4 parseVisible,
+ 5 parseWhite,
+ 6 parse,
+ 7 parseTL
+ 8 ) where
+ 9
+ 10 import HelVM.HelMA.Automata.WhiteSpace.Lexer
+ 11 import HelVM.HelMA.Automata.WhiteSpace.OperandParsers
+ 12 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 13
+ 14
+ 15 import HelVM.HelMA.Automaton.API.IOTypes
+ 16
+ 17 import HelVM.HelMA.Automaton.Instruction
+ 18 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 19 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 20 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 21 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 22
+ 23 import HelVM.HelMA.Automaton.Types.TokenType
+ 24
+ 25 import HelVM.HelIO.Control.Safe
+ 26
+ 27 -- FIXME
+ 28 flipParseVisible :: Bool -> Source -> Safe InstructionList
+ 29 flipParseVisible = flip parseVisible
+ 30
+ 31 flipParseWhite :: Bool -> Source -> Safe InstructionList
+ 32 flipParseWhite = flip parseWhite
+ 33
+ 34 parseVisible :: Source -> Bool -> Safe InstructionList
+ 35 parseVisible = parse VisibleTokenType
+ 36
+ 37 parseWhite :: Source -> Bool -> Safe InstructionList
+ 38 parseWhite = parse WhiteTokenType
+ 39
+ 40 parse :: MonadSafe m => TokenType -> Source -> Bool -> m InstructionList
+ 41 parse tokenType = flip parseTL . tokenize tokenType
+ 42
+ 43 parseTL :: MonadSafe m => Bool -> TokenList -> m InstructionList
+ 44 parseTL ascii = go where
+ 45 go :: MonadSafe m => TokenList -> m InstructionList
+ 46 go [] = pure []
+ 47 -- | IAL instructions
+ 48 go (S:S:tl') = go' =<< parseSymbol tl' where go' (symbol , tl'') = (IAL (Cons symbol) : ) <$> go tl''
+ 49 go (S:T:S:tl') = go' =<< parseIndex tl' where go' (index , tl'') = (IAL (SStatic index Copy) : ) <$> go tl''
+ 50 go (S:T:T:tl') = panic "STT" tl'
+ 51 go (S:T:N:tl') = go' =<< parseIndex tl' where go' (index , tl'') = (IAL (SStatic index Slide) : ) <$> go tl''
+ 52 go (S:N:S:tl') = (IAL Dup : ) <$> go tl'
+ 53 go (S:N:T:tl') = (IAL Swap : ) <$> go tl'
+ 54 go (S:N:N:tl') = (IAL Discard : ) <$> go tl'
+ 55 --Arithmetic
+ 56 go (T:S:S:S:tl') = (IAL (Binary Add) : ) <$> go tl'
+ 57 go (T:S:S:T:tl') = (IAL (Binary Sub) : ) <$> go tl'
+ 58 go (T:S:S:N:tl') = (IAL (Binary Mul) : ) <$> go tl'
+ 59 go (T:S:T:S:tl') = (IAL (Binary Div) : ) <$> go tl'
+ 60 go (T:S:T:T:tl') = (IAL (Binary Mod) : ) <$> go tl'
+ 61 go (T:S:T:N:tl') = panic "TSTN" tl'
+ 62 go (T:S:N:S:tl') = panic "TSNS" tl'
+ 63 go (T:S:N:T:tl') = panic "TSNT" tl'
+ 64 go (T:S:N:N:tl') = panic "TSNN" tl'
+ 65 -- | Heap access
+ 66 go (T:T:S:tl') = (ILS Store : ) <$> go tl'
+ 67 go (T:T:T:tl') = (ILS Load : ) <$> go tl'
+ 68 go (T:T:N:tl') = panic "TTN" tl'
+ 69 -- | IControl
+ 70 go (N:S:S:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (Mark label) : ) <$> go tl''
+ 71 go (N:S:T:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label Call ) : ) <$> go tl''
+ 72 go (N:S:N:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label Jump ) : ) <$> go tl''
+ 73 go (N:T:S:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label (Branch EZ)) : ) <$> go tl''
+ 74 go (N:T:T:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label (Branch LTZ)) : ) <$> go tl''
+ 75 go (N:T:N:tl') = (IControl Return : ) <$> go tl'
+ 76 go (N:N:S:tl') = panic "NNS" tl'
+ 77 go (N:N:T:tl') = panic "NNT" tl'
+ 78 go (N:N:N:tl') = (End : ) <$> go tl'
+ 79 -- | IO instructions
+ 80 go (T:N:S:S:tl') = (IAL (SIO OutputChar) : ) <$> go tl'
+ 81 go (T:N:S:T:tl') = (IAL (SIO OutputDec) : ) <$> go tl'
+ 82 go (T:N:S:N:tl') = panic "TNSN" tl'
+ 83 go (T:N:T:S:tl') = (ILS (MIO InputChar) : ) <$> go tl'
+ 84 go (T:N:T:T:tl') = (ILS (MIO InputDec) : ) <$> go tl'
+ 85 go (T:N:T:N:tl') = panic "TNTN" tl'
+ 86 go (T:N:N:S:tl') = panic "TNNS" tl'
+ 87 go (T:N:N:T:tl') = panic "TNNT" tl'
+ 88 go (T:N:N:N:tl') = panic "TNNN" tl'
+ 89 go tl' = panic (show tl') []
+ 90
+ 91 panic :: MonadSafe m => Text -> TokenList -> m InstructionList
+ 92 panic token tl = liftErrorTupleList [("Unrecognised tokenl" , token) , ("Rest tokens" , show tl)]
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html
new file mode 100644
index 000000000..7097b0beb
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.SimpleParams where
+ 2
+ 3 import HelVM.HelMA.Automaton.API.IOTypes
+ 4 import HelVM.HelMA.Automaton.Types.DumpType
+ 5 import HelVM.HelMA.Automaton.Types.RAMType
+ 6 import HelVM.HelMA.Automaton.Types.StackType
+ 7 import HelVM.HelMA.Automaton.Types.TokenType
+ 8
+ 9 -- | Construction for tests
+ 10 simpleParamsWithDefaultsAndWhiteTokenType :: Bool -> Source -> SimpleParams
+ 11 simpleParamsWithDefaultsAndWhiteTokenType = simpleParamsWithDefaults WhiteTokenType
+ 12
+ 13 simpleParamsWithDefaultsAndVisibleTokenType :: Bool -> Source -> SimpleParams
+ 14 simpleParamsWithDefaultsAndVisibleTokenType = simpleParamsWithDefaults VisibleTokenType
+ 15
+ 16 simpleParamsWithDefaults :: TokenType -> Bool -> Source -> SimpleParams
+ 17 simpleParamsWithDefaults tt = simpleParams tt (defaultStackType , defaultRAMType)
+ 18
+ 19 -- | Construction for benchmark
+ 20 simpleParamsWithWhiteTokenType :: (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 21 simpleParamsWithWhiteTokenType = simpleParams WhiteTokenType
+ 22
+ 23 simpleParamsWithVisibleTokenType :: (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 24 simpleParamsWithVisibleTokenType = simpleParams VisibleTokenType
+ 25
+ 26 simpleParams :: TokenType -> (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 27 simpleParams tt (st , rt) al s = SimpleParams
+ 28 { tokenType = tt
+ 29 , source = s
+ 30 , asciiLabel = al
+ 31 , stackType = st
+ 32 , ramType = rt
+ 33 , dumpType = Pretty
+ 34 }
+ 35
+ 36 -- | Type
+ 37 data SimpleParams = SimpleParams
+ 38 { tokenType :: !TokenType
+ 39 , source :: !Source
+ 40 , asciiLabel :: !Bool
+ 41 , stackType :: !StackType
+ 42 , ramType :: !RAMType
+ 43 , dumpType :: !DumpType
+ 44 }
+ 45
+ 46
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html
new file mode 100644
index 000000000..6cb7c3008
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Token where
+ 2
+ 3 import HelVM.HelIO.Collections.SList
+ 4 import HelVM.HelIO.Control.Safe
+ 5 import HelVM.HelIO.Digit.ToDigit
+ 6
+ 7 import Text.Read
+ 8
+ 9 import qualified Text.Show
+ 10
+ 11 data Token = S | T | N
+ 12 deriving stock (Bounded , Enum , Eq , Read , Show )
+ 13
+ 14 type TokenList = [Token]
+ 15 type TokenSList = SList Token
+ 16
+ 17 instance ToDigit Token where
+ 18 toDigit S = pure 0
+ 19 toDigit T = pure 1
+ 20 toDigit t = liftErrorWithPrefix "Wrong token" $ show t
+ 21
+ 22 ----
+ 23
+ 24 newtype WhiteToken = WhiteToken { unWhiteToken :: Token}
+ 25 deriving stock (Eq )
+ 26
+ 27 instance Show WhiteToken where
+ 28 show (WhiteToken S) = " "
+ 29 show (WhiteToken T) = "\t"
+ 30 show (WhiteToken N) = "\n"
+ 31
+ 32 -- | Scanner
+ 33 instance Read WhiteToken where
+ 34 readsPrec _ " " = [( WhiteToken S , "")]
+ 35 readsPrec _ "\t" = [( WhiteToken T , "")]
+ 36 readsPrec _ "\n" = [( WhiteToken N , "")]
+ 37 readsPrec _ _ = []
+ 38
+ 39 type WhiteTokenList = [WhiteToken]
+ 40
+ 41 whiteTokenListToTokenList :: WhiteTokenList -> TokenList
+ 42 whiteTokenListToTokenList = fmap unWhiteToken
+ 43
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html
new file mode 100644
index 000000000..5aabe2f22
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Automaton (
+ 2 evalParams,
+ 3 eval,
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automata.Zot.Evaluator
+ 7 import HelVM.HelMA.Automata.Zot.Expression
+ 8 import HelVM.HelMA.Automata.Zot.Parser
+ 9
+ 10 import HelVM.HelMA.Automaton.API.EvalParams
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14
+ 15 import HelVM.HelIO.Containers.Util
+ 16 import HelVM.HelIO.Control.Safe
+ 17
+ 18 import HelVM.HelIO.Digit.Digitable
+ 19 import HelVM.HelIO.Digit.ToDigit
+ 20
+ 21 import HelVM.HelIO.ListLikeUtil
+ 22
+ 23 import Control.Monad.Writer.Lazy
+ 24
+ 25 evalParams :: BIO m => EvalParams -> m ()
+ 26 evalParams p = wPutStr =<< eval (asciiLabel p) (source p) =<< wGetContents
+ 27
+ 28 eval :: MonadSafe m => Bool -> Source -> Input -> m Output
+ 29 eval False source input = pure $ showFoldable $ evalSource source input
+ 30 eval True source input = (makeAsciiText28 . convert . evalSource source) . showExpressionList =<< textToDL input
+ 31
+ 32 evalSource :: Source -> Input -> ExpressionDList
+ 33 evalSource source input = evalText $ source <> input
+ 34
+ 35 evalText :: Text -> ExpressionDList
+ 36 evalText = execWriter . evalExpressionList . parse
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html
new file mode 100644
index 000000000..6a1b85405
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Evaluator (
+ 2 evalExpressionList,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.Zot.Expression
+ 6
+ 7 import Control.Monad.Writer.Lazy
+ 8
+ 9 import qualified Data.ListLike as LL
+ 10
+ 11 -- | High-level Expressions
+ 12 evalExpressionList :: ExpressionList -> Out Expression
+ 13 evalExpressionList el = foldExpression el >><< outputExpression >>< printExpression
+ 14
+ 15 foldExpression :: ExpressionList -> Out Expression
+ 16 foldExpression = foldM (><) emptyExpression
+ 17
+ 18 emptyExpression :: Expression
+ 19 emptyExpression = contExpression iExpression
+ 20
+ 21 outputExpression :: Out Expression
+ 22 outputExpression = kExpression ><< kExpression ><< kExpression ><< kExpression ><< kExpression ><< kExpression >< iExpression
+ 23
+ 24 printExpression :: Expression
+ 25 printExpression = Expression innerPrintExpression
+ 26
+ 27 innerPrintExpression :: Expression -> Out Expression
+ 28 innerPrintExpression f = interrogateExpression f >>< Zero >>< One >>= tell . LL.singleton >> pure printExpression
+ 29
+ 30 interrogateExpression :: Expression -> Out Expression
+ 31 interrogateExpression f = f >< iExpression >>< iExpression >>< iExpression >>< kExpression
+ 32
+ 33 -- | Operators
+ 34 infixl 9 ><
+ 35 (><) :: Expression -> Expression -> Out Expression
+ 36 (><) Zero = (zeroExpression ><)
+ 37 (><) One = (oneExpression ><)
+ 38 (><) (Expression f) = f
+ 39
+ 40 infixl 6 >><
+ 41 (>><) :: Out Expression -> Expression -> Out Expression
+ 42 f >>< a = f >>= (>< a)
+ 43
+ 44 infixr 8 ><<
+ 45 (><<) :: Expression -> Out Expression -> Out Expression
+ 46 f ><< a = (f ><) =<< a
+ 47
+ 48 infixl 7 >><<
+ 49 (>><<) :: Out Expression -> Out Expression -> Out Expression
+ 50 f >><< a = f >>= (><< a)
+ 51
+ 52
+ 53 -- | Low-level Expressions
+ 54 zeroExpression :: Expression
+ 55 zeroExpression = contExpression $ Expression $ \ f -> f >< sExpression >>< kExpression
+ 56
+ 57 oneExpression :: Expression
+ 58 oneExpression = makeExpression $ \c -> contExpression $ makeExpression $ \l -> contExpression $ Expression $ \r -> c ><< l >< r
+ 59
+ 60 contExpression :: Expression -> Expression
+ 61 contExpression = Expression . flip (><)
+ 62
+ 63 sExpression :: Expression
+ 64 sExpression = makeExpression $ \x -> makeExpression $ \y -> Expression $ \z -> x >< z >><< y >< z
+ 65
+ 66 kExpression :: Expression
+ 67 kExpression = makeExpression $ makeExpression . const
+ 68
+ 69 iExpression :: Expression
+ 70 iExpression = makeExpression id
+ 71
+ 72 makeExpression :: (Expression -> Expression) -> Expression
+ 73 makeExpression f = Expression $ pure . f
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html
new file mode 100644
index 000000000..0e41ae008
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Expression where
+ 2
+ 3 import HelVM.HelIO.Control.Safe
+ 4
+ 5 import HelVM.HelIO.Containers.Util
+ 6 import HelVM.HelIO.Digit.Digitable
+ 7 import HelVM.HelIO.Digit.ToDigit
+ 8
+ 9 import Control.Monad.Writer.Lazy
+ 10
+ 11 import qualified Data.DList as D
+ 12
+ 13 import Text.Read
+ 14 import qualified Text.Show
+ 15
+ 16 showExpressionList :: ExpressionList -> Text
+ 17 showExpressionList = showFoldable
+ 18
+ 19 readExpressionList :: Text -> ExpressionList
+ 20 readExpressionList = stringToExpressionList . toString
+ 21
+ 22 stringToExpressionList :: String -> ExpressionList
+ 23 stringToExpressionList s = charToExpressionList =<< s
+ 24
+ 25 charToExpressionList :: Char -> ExpressionList
+ 26 charToExpressionList = maybeToList . rightToMaybe . charToExpressionSafe
+ 27
+ 28 charToExpression :: Char -> Expression
+ 29 charToExpression = unsafe . charToExpressionSafe
+ 30
+ 31 charToExpressionSafe :: MonadSafe m => Char -> m Expression
+ 32 charToExpressionSafe '0' = pure Zero
+ 33 charToExpressionSafe '1' = pure One
+ 34 charToExpressionSafe c = liftErrorWithPrefix "charToExpression" $ one c
+ 35
+ 36 -- | Types
+ 37 type ExpressionDList = D.DList Expression
+ 38
+ 39 type ExpressionList = [Expression]
+ 40
+ 41 data Expression = Zero | One | Expression (Expression -> Out Expression)
+ 42
+ 43 type Out = Writer ExpressionDList
+ 44
+ 45 instance Read Expression where
+ 46 readsPrec _ [] = []
+ 47 readsPrec _ (c : s) = [(charToExpression c , s)]
+ 48 readList s = [(stringToExpressionList s , "")]
+ 49
+ 50 instance Show Expression where
+ 51 show Zero = "0"
+ 52 show One = "1"
+ 53 show (Expression _) = "function"
+ 54 showList fs = (concatMap show fs <>)
+ 55
+ 56 instance Digitable Expression where
+ 57 fromDigit 0 = pure Zero
+ 58 fromDigit 1 = pure One
+ 59 fromDigit t = wrongToken t
+ 60
+ 61 instance ToDigit Expression where
+ 62 toDigit Zero = pure 0
+ 63 toDigit One = pure 1
+ 64 toDigit t = wrongToken t
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html
new file mode 100644
index 000000000..d8a3a6160
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Parser (
+ 2 parse,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.Zot.Expression
+ 6
+ 7 import qualified Data.Text as Text
+ 8
+ 9 parse :: Text -> ExpressionList
+ 10 parse = concatMap parseLine . lines
+ 11
+ 12 parseLine :: Text -> ExpressionList
+ 13 parseLine = readExpressionList . filter01 . Text.takeWhile (/= '#')
+ 14
+ 15 filter01 :: Text -> Text
+ 16 filter01 = Text.filter is01
+ 17
+ 18 is01 :: Char -> Bool
+ 19 is01 c = c == '0' || c == '1'
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html
new file mode 100644
index 000000000..8b25d1153
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.API.EvalParams where
+ 2
+ 3 import HelVM.HelMA.Automaton.API.IOTypes
+ 4 import HelVM.HelMA.Automaton.API.TypeOptions
+ 5
+ 6 import HelVM.HelMA.Automaton.Types.CellType
+ 7 import HelVM.HelMA.Automaton.Types.DumpType
+ 8 import HelVM.HelMA.Automaton.Types.IntCellType
+ 9 import HelVM.HelMA.Automaton.Types.RAMType
+ 10 import HelVM.HelMA.Automaton.Types.StackType
+ 11
+ 12 -- | Accessors
+ 13 ramTypeOptions :: EvalParams -> RAMType
+ 14 ramTypeOptions = ram . typeOptions
+ 15
+ 16 stackTypeOptions :: EvalParams -> StackType
+ 17 stackTypeOptions = stack . typeOptions
+ 18
+ 19 cellTypeOptions :: EvalParams -> CellType
+ 20 cellTypeOptions = cell . typeOptions
+ 21
+ 22 intCellTypeOptions :: EvalParams -> IntCellType
+ 23 intCellTypeOptions = intCell . typeOptions
+ 24
+ 25 dumpTypeOptions :: EvalParams -> DumpType
+ 26 dumpTypeOptions = dumpType . typeOptions
+ 27
+ 28 -- | Type
+ 29 data EvalParams = EvalParams
+ 30 { compile :: !Bool
+ 31 , asciiLabel :: !Bool
+ 32 , source :: !Source
+ 33 , typeOptions :: !TypeOptions
+ 34 }
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html
new file mode 100644
index 000000000..363cc695b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.API.TypeOptions where
+ 2
+ 3 import HelVM.HelMA.Automaton.Types.CellType
+ 4 import HelVM.HelMA.Automaton.Types.DumpType
+ 5 import HelVM.HelMA.Automaton.Types.IntCellType
+ 6 import HelVM.HelMA.Automaton.Types.RAMType
+ 7 import HelVM.HelMA.Automaton.Types.StackType
+ 8
+ 9 -- | Types
+ 10
+ 11 data TypeOptions = TypeOptions
+ 12 { ram :: !RAMType
+ 13 , stack :: !StackType
+ 14 , cell :: !CellType
+ 15 , intCell :: !IntCellType
+ 16 , dumpType :: !DumpType
+ 17 }
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html
new file mode 100644
index 000000000..4d449c18b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.IO.BusinessIO (
+ 2
+ 3 Element,
+ 4 BIO,
+ 5 BusinessIO,
+ 6
+ 7 wPutAsChar,
+ 8 wPutAsDec,
+ 9 wGetCharAs,
+ 10 wGetDecAs,
+ 11
+ 12 -- wPutIntAsChar,
+ 13 -- wPutIntAsDec,
+ 14 -- wGetCharAsInt,
+ 15 -- wGetDecAsInt,
+ 16
+ 17 wGetChar,
+ 18 wPutChar,
+ 19 wGetLine,
+ 20 wGetContents,
+ 21 wPutStr,
+ 22 wPutStrLn,
+ 23 wFlush,
+ 24 wLogStr,
+ 25 wLogStrLn,
+ 26 wLogShow,
+ 27
+ 28 logStr,
+ 29 flush,
+ 30 ) where
+ 31
+ 32 import HelVM.HelIO.Control.Control
+ 33 import HelVM.HelIO.Control.Safe
+ 34
+ 35 import HelVM.HelIO.ReadText
+ 36
+ 37 import Data.Default as Default
+ 38 import Data.Text.IO (getContents)
+ 39
+ 40 import System.IO hiding (getContents, getLine, hFlush, stderr, stdout)
+ 41
+ 42 type Element e = (ReadShow e , Integral e , Default e)
+ 43 type ReadShow e = (Read e , Show e)
+ 44 type BIO m = (MonadControl m , BusinessIO m)
+ 45
+ 46 class Monad m => BusinessIO m where
+ 47
+ 48 wPutAsChar :: Integral v => v -> m ()
+ 49 wPutAsDec :: Integral v => v -> m ()
+ 50 wGetCharAs :: Integral v => m v
+ 51 wGetDecAs :: Integral v => m v
+ 52
+ 53 wPutIntAsChar :: Int -> m ()
+ 54 wPutIntAsDec :: Int -> m ()
+ 55 wGetCharAsInt :: m Int
+ 56 wGetDecAsInt :: m Int
+ 57
+ 58 wGetChar :: m Char
+ 59 wGetLine :: m Text
+ 60 wGetContents :: m Text
+ 61 wPutChar :: Char -> m ()
+ 62 wPutStr :: Text -> m ()
+ 63 wPutStrLn :: Text -> m ()
+ 64 wLogStr :: Text -> m ()
+ 65 wLogStrLn :: Text -> m ()
+ 66 wLogShow :: Show s => s -> m ()
+ 67 wFlush :: m ()
+ 68
+ 69 wPutAsChar = wPutIntAsChar . fromIntegral
+ 70 wPutAsDec = wPutIntAsDec . fromIntegral
+ 71 wGetCharAs = fromIntegral <$> wGetCharAsInt
+ 72 wGetDecAs = fromIntegral <$> wGetDecAsInt
+ 73
+ 74 wPutIntAsChar = wPutChar . chr
+ 75 wPutIntAsDec = wPutStr . show
+ 76 wGetCharAsInt = ord <$> wGetChar
+ 77 wGetDecAsInt = readTextUnsafe <$> wGetLine
+ 78
+ 79 wPutStrLn s = wPutStr $ s <> "\n"
+ 80 wLogStrLn s = wLogStr $ s <> "\n"
+ 81 wLogShow = wLogStrLn . show
+ 82 wFlush = pass
+ 83
+ 84 logStr :: Text -> IO ()
+ 85 logStr = hPutStrLn stderr . toString
+ 86
+ 87 flush :: IO ()
+ 88 flush = hFlush stdout
+ 89
+ 90 instance BusinessIO IO where
+ 91 wGetChar = getChar
+ 92 wGetLine = getLine
+ 93 wGetContents = getContents
+ 94 wPutChar = putChar
+ 95 wPutStr = putText
+ 96 wPutStrLn = putTextLn
+ 97 wLogStr = logStr
+ 98 wFlush = flush
+ 99
+ 100 type ExceptTLegacy = ExceptT String
+ 101
+ 102 exceptTLegacy :: Monad m => m a -> ExceptTLegacy m a
+ 103 exceptTLegacy a = ExceptT $ pure <$> a
+ 104
+ 105 instance BusinessIO (ExceptT String IO) where --FIXXME
+ 106 wGetChar = exceptTLegacy getChar
+ 107 wGetLine = exceptTLegacy getLine
+ 108 wGetContents = exceptTLegacy getContents
+ 109 wPutChar = exceptTLegacy . putChar
+ 110 wPutStr = exceptTLegacy . putText
+ 111 wPutStrLn = exceptTLegacy . putTextLn
+ 112 wLogStr = exceptTLegacy . logStr
+ 113 wFlush = exceptTLegacy flush
+ 114
+ 115 instance BusinessIO (SafeT IO) where
+ 116 wGetChar = safeT getChar
+ 117 wGetLine = safeT getLine
+ 118 wGetContents = safeT getContents
+ 119 wPutChar = safeT . putChar
+ 120 wPutStr = safeT . putText
+ 121 wPutStrLn = safeT . putTextLn
+ 122 wLogStr = safeT . logStr
+ 123 wFlush = safeT flush
+ 124
+ 125 instance BusinessIO (ControlT IO) where
+ 126 wGetChar = controlT getChar
+ 127 wGetLine = controlT getLine
+ 128 wGetContents = controlT getContents
+ 129 wPutChar = controlT . putChar
+ 130 wPutStr = controlT . putText
+ 131 wPutStrLn = controlT . putTextLn
+ 132 wLogStr = controlT . logStr
+ 133 wFlush = controlT flush
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html
new file mode 100644
index 000000000..6d53f1fda
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 {-# LANGUAGE DeriveFunctor #-}
+ 2 module HelVM.HelMA.Automaton.IO.FreeIO (
+ 3 interpretFreeIOToBusinessIO,
+ 4 logInput,
+ 5 logOutput,
+ 6 FreeIO,
+ 7 ) where
+ 8
+ 9 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 10
+ 11 import HelVM.HelIO.Control.Control
+ 12 import HelVM.HelIO.Control.Safe
+ 13
+ 14 import Control.Monad.Free
+ 15 import Control.Natural
+ 16
+ 17 interpretFreeIOToBusinessIO :: BusinessIO m => FreeIO a -> m a
+ 18 interpretFreeIOToBusinessIO = foldFree interpretFreeIOFToBusinessIO
+ 19
+ 20 logInput :: FreeIO ~> FreeIO
+ 21 logInput = foldFree logInputF
+ 22
+ 23 logOutput :: FreeIO ~> FreeIO
+ 24 logOutput = foldFree logOutputF
+ 25
+ 26 ----
+ 27
+ 28 interpretFreeIOFToBusinessIO :: BusinessIO m => FreeIOF a -> m a
+ 29 interpretFreeIOFToBusinessIO (GetChar cd) = cd <$> wGetChar
+ 30 interpretFreeIOFToBusinessIO (GetLine cd) = cd <$> wGetLine
+ 31 interpretFreeIOFToBusinessIO (GetContents cd) = cd <$> wGetContents
+ 32 interpretFreeIOFToBusinessIO (PutChar c v) = wPutChar c $> v
+ 33 interpretFreeIOFToBusinessIO (PutStr s v) = wPutStr s $> v
+ 34 interpretFreeIOFToBusinessIO (PutStrLn s v) = wPutStrLn s $> v
+ 35 interpretFreeIOFToBusinessIO (LogStr s v) = wLogStr s $> v
+ 36 interpretFreeIOFToBusinessIO (LogStrLn s v) = wLogStrLn s $> v
+ 37 interpretFreeIOFToBusinessIO (Flush v) = wFlush $> v
+ 38
+ 39 ----
+ 40
+ 41 logInputF :: FreeIOF a -> FreeIO a
+ 42 logInputF (GetChar cd) = freeGetChar >>= (\c -> liftF $ LogStr (one c) (cd c))
+ 43 logInputF (GetLine cd) = freeGetLine >>= (\l -> liftF $ LogStr l (cd l))
+ 44 logInputF (GetContents cd) = freeGetContents >>= (\l -> liftF $ LogStr l (cd l))
+ 45 logInputF f = liftF f
+ 46
+ 47 logOutputF :: FreeIOF a -> FreeIO a
+ 48 logOutputF f@(PutChar c v) = liftF (LogStr (one c) v) *> liftF f
+ 49 logOutputF f@(PutStr s v) = liftF (LogStr s v) *> liftF f
+ 50 logOutputF f = liftF f
+ 51
+ 52 -- | Instances
+ 53 instance BusinessIO FreeIO where
+ 54 wGetChar = freeGetChar
+ 55 wGetLine = freeGetLine
+ 56 wGetContents = freeGetContents
+ 57 wPutChar = freePutChar
+ 58 wPutStr = freePutStr
+ 59 wPutStrLn = freePutStrLn
+ 60 wLogStr = freeLogStr
+ 61 wLogStrLn = freeLogStrLn
+ 62 wFlush = freeFlush
+ 63
+ 64 instance BusinessIO (SafeT FreeIO) where
+ 65 wGetChar = safeT freeGetChar
+ 66 wGetLine = safeT freeGetLine
+ 67 wGetContents = safeT freeGetContents
+ 68 wPutChar = safeT . freePutChar
+ 69 wPutStr = safeT . freePutStr
+ 70 wPutStrLn = safeT . freePutStrLn
+ 71 wLogStr = safeT . freeLogStr
+ 72 wLogStrLn = safeT . freeLogStrLn
+ 73 wFlush = safeT freeFlush
+ 74
+ 75 instance BusinessIO (ControlT FreeIO) where
+ 76 wGetChar = controlT freeGetChar
+ 77 wGetLine = controlT freeGetLine
+ 78 wGetContents = controlT freeGetContents
+ 79 wPutChar = controlT . freePutChar
+ 80 wPutStr = controlT . freePutStr
+ 81 wPutStrLn = controlT . freePutStrLn
+ 82 wLogStr = controlT . freeLogStr
+ 83 wLogStrLn = controlT . freeLogStrLn
+ 84 wFlush = controlT freeFlush
+ 85
+ 86 -- | Low level functions
+ 87 freeGetChar :: FreeIO Char
+ 88 freeGetChar = liftF $ GetChar id
+ 89
+ 90 freeGetLine :: FreeIO Text
+ 91 freeGetLine = liftF $ GetLine id
+ 92
+ 93 freeGetContents :: FreeIO Text
+ 94 freeGetContents = liftF $ GetContents id
+ 95
+ 96 freePutChar :: Char -> FreeIO ()
+ 97 freePutChar = liftF . flip PutChar ()
+ 98
+ 99 freePutStr :: Text -> FreeIO ()
+ 100 freePutStr = liftF . flip PutStr ()
+ 101
+ 102 freePutStrLn :: Text -> FreeIO ()
+ 103 freePutStrLn = liftF . flip PutStrLn ()
+ 104
+ 105 freeLogStr :: Text -> FreeIO ()
+ 106 freeLogStr = liftF . flip LogStr ()
+ 107
+ 108 freeLogStrLn :: Text -> FreeIO ()
+ 109 freeLogStrLn = liftF . flip LogStrLn ()
+ 110
+ 111 freeFlush :: FreeIO ()
+ 112 freeFlush = liftF $ Flush ()
+ 113
+ 114 -- | Types
+ 115 type FreeIO = Free FreeIOF
+ 116
+ 117 data FreeIOF a
+ 118 = GetChar (Char -> a)
+ 119 | GetLine (Text -> a)
+ 120 | GetContents (Text -> a)
+ 121 | PutChar Char a
+ 122 | PutStr Text a
+ 123 | PutStrLn Text a
+ 124 | LogStr Text a
+ 125 | LogStrLn Text a
+ 126 | Flush a
+ 127 deriving stock (Functor )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html
new file mode 100644
index 000000000..4bbc46214
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.IO.MockIO (
+ 2 ioExecMockIOBatch,
+ 3 ioExecMockIOWithInput,
+ 4
+ 5 safeExecMockIOBatch,
+ 6 safeExecMockIOWithInput,
+ 7
+ 8 execMockIOBatch,
+ 9 execMockIOWithInput,
+ 10
+ 11 runMockIO,
+ 12 createMockIO,
+ 13 calculateOutput,
+ 14 calculateLogged,
+ 15
+ 16 MockIO,
+ 17 MockIOData,
+ 18 ) where
+ 19
+ 20 import HelVM.HelMA.Automaton.API.IOTypes
+ 21 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 22
+ 23 import HelVM.HelIO.Control.Control
+ 24 import HelVM.HelIO.Control.Safe
+ 25
+ 26 import HelVM.HelIO.ListLikeUtil
+ 27
+ 28 import Data.Text as Text
+ 29
+ 30 ioExecMockIOBatch :: ControlT MockIO () -> IO MockIOData
+ 31 ioExecMockIOBatch = ioExecMockIOWithInput ""
+ 32
+ 33 ioExecMockIOWithInput :: Input -> ControlT MockIO () -> IO MockIOData
+ 34 ioExecMockIOWithInput i = safeToIO . safeExecMockIOWithInput i
+ 35
+ 36 safeExecMockIOBatch :: ControlT MockIO () -> Safe MockIOData
+ 37 safeExecMockIOBatch = safeExecMockIOWithInput ""
+ 38
+ 39 safeExecMockIOWithInput :: Input -> ControlT MockIO () -> Safe MockIOData
+ 40 safeExecMockIOWithInput i = pure . runMockIO i . runControlT
+ 41
+ 42 execMockIOBatch :: MockIO () -> MockIOData
+ 43 execMockIOBatch = execMockIOWithInput ""
+ 44
+ 45 execMockIOWithInput :: Input -> MockIO () -> MockIOData
+ 46 execMockIOWithInput i a = runMockIO i $ safeWithMessages <$> a
+ 47
+ 48 ----
+ 49
+ 50 runMockIO :: Input -> MockIO UnitSafeWithMessages -> MockIOData
+ 51 runMockIO i mockIO = flip mockDataLogStr mockIOData $ safeWithMessagesToText s
+ 52 where (s , mockIOData) = runState mockIO $ createMockIO i
+ 53
+ 54 createMockIO :: Input -> MockIOData
+ 55 createMockIO i = MockIOData (toString i) "" ""
+ 56
+ 57 calculateOutput :: MockIOData -> Output
+ 58 calculateOutput = calculateText . output
+ 59
+ 60 calculateLogged :: MockIOData -> Output
+ 61 calculateLogged = calculateText . logged
+ 62
+ 63 ----
+ 64
+ 65 instance BusinessIO MockIO where
+ 66 wGetChar = mockGetChar
+ 67 wGetLine = mockGetLine
+ 68 wGetContents = mockGetContent
+ 69 wPutChar = mockPutChar
+ 70 wPutStr = mockPutStr
+ 71 wLogStr = mockLogStr
+ 72
+ 73 instance BusinessIO (SafeT MockIO) where
+ 74 wGetChar = safeT mockGetChar
+ 75 wGetLine = safeT mockGetLine
+ 76 wGetContents = safeT mockGetContent
+ 77 wPutChar = safeT . mockPutChar
+ 78 wPutStr = safeT . mockPutStr
+ 79 wLogStr = safeT . mockLogStr
+ 80
+ 81 instance BusinessIO (ControlT MockIO) where
+ 82 wGetChar = mockGetCharSafe
+ 83 wGetLine = mockGetLineSafe
+ 84 wGetContents = controlT mockGetContent
+ 85 wPutChar = controlT . mockPutChar
+ 86 wPutStr = controlT . mockPutStr
+ 87 wLogStr = controlT . mockLogStr
+ 88
+ 89 ----
+ 90
+ 91 mockGetChar :: MonadMockIO m => m Char
+ 92 mockGetChar = mockGetChar' =<< get where
+ 93 mockGetChar' :: MonadMockIO m => MockIOData -> m Char
+ 94 mockGetChar' mockIO = orErrorTuple ("mockGetChar" , show mockIO) (top (input mockIO)) <$ put mockIO { input = orErrorTuple ("mockGetChar" , show mockIO) $ discard $ input mockIO }
+ 95
+ 96 mockGetLine :: MonadMockIO m => m Text
+ 97 mockGetLine = mockGetLine' =<< get where
+ 98 mockGetLine' :: MonadMockIO m => MockIOData -> m Text
+ 99 mockGetLine' mockIO = toText line <$ put mockIO { input = input' } where (line , input') = splitStringByLn $ input mockIO
+ 100
+ 101 mockGetContent :: MonadMockIO m => m Text
+ 102 mockGetContent = mockGetContent' =<< get where
+ 103 mockGetContent' :: MonadMockIO m => MockIOData -> m Text
+ 104 mockGetContent' mockIO = toText content <$ put mockIO { input = "" } where content = input mockIO
+ 105
+ 106 mockGetCharSafe :: MonadControlMockIO m => m Char
+ 107 mockGetCharSafe = mockGetChar' =<< get where
+ 108 mockGetChar' :: MonadControlMockIO m => MockIOData -> m Char
+ 109 mockGetChar' mockIO = appendErrorTuple ("mockGetCharSafe" , show mockIO) $ mockGetChar'' =<< unconsSafe (input mockIO) where
+ 110 mockGetChar'' (c, input') = put mockIO { input = input' } $> c
+ 111
+ 112 mockGetLineSafe :: MonadControlMockIO m => m Text
+ 113 mockGetLineSafe = mockGetLine' =<< get where
+ 114 mockGetLine' :: MonadControlMockIO m => MockIOData -> m Text
+ 115 mockGetLine' mockIO = toText line <$ put mockIO { input = input' } where (line , input') = splitStringByLn $ input mockIO
+ 116
+ 117
+ 118 mockPutChar :: Char -> MockIO ()
+ 119 mockPutChar = modify . mockDataPutChar
+ 120
+ 121 mockPutStr :: Text -> MockIO ()
+ 122 mockPutStr = modify . mockDataPutStr
+ 123
+ 124 mockLogStr :: Text -> MockIO ()
+ 125 mockLogStr = modify . mockDataLogStr
+ 126
+ 127 ----
+ 128
+ 129 mockDataPutChar :: Char -> MockIOData -> MockIOData
+ 130 mockDataPutChar char mockIO = mockIO { output = char : output mockIO }
+ 131
+ 132 mockDataPutStr :: Text -> MockIOData -> MockIOData
+ 133 mockDataPutStr text mockIO = mockIO { output = calculateString text <> output mockIO }
+ 134
+ 135 mockDataLogStr :: Text -> MockIOData -> MockIOData
+ 136 mockDataLogStr text mockIO = mockIO { logged = calculateString text <> logged mockIO }
+ 137
+ 138 ----
+ 139
+ 140 type MonadControlMockIO m = (MonadMockIO m , MonadControl m)
+ 141
+ 142 --type MonadSafeMockIO m = (MonadMockIO m , MonadSafe m)
+ 143
+ 144 type MonadMockIO m = MonadState MockIOData m
+ 145
+ 146 type MockIO = State MockIOData
+ 147
+ 148 calculateText :: String -> Output
+ 149 calculateText = Text.reverse . toText
+ 150
+ 151 calculateString :: Output -> String
+ 152 calculateString = toString . Text.reverse
+ 153
+ 154 data MockIOData = MockIOData
+ 155 { input :: !String
+ 156 , output :: !String
+ 157 , logged :: !String
+ 158 }
+ 159 deriving stock (Eq , Read , Show )
+ 160
+ 161 ----
+ 162
+ 163 splitStringByLn :: String -> (String , String)
+ 164 splitStringByLn = splitBy '\n'
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html
new file mode 100644
index 000000000..55759ae7a
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.ALInstruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 4
+ 5 -- | Constructors
+ 6
+ 7 blAnd :: Bool -> BinaryInstruction
+ 8 blAnd False = BAnd
+ 9 blAnd True = LAnd
+ 10
+ 11 blOr :: Bool -> BinaryInstruction
+ 12 blOr False = BOr
+ 13 blOr True = LOr
+ 14
+ 15 blXor :: Bool -> BinaryInstruction
+ 16 blXor False = BXor
+ 17 blXor True = LXor
+ 18
+ 19 blEQ :: Bool -> BinaryInstruction
+ 20 blEQ False = BEQ
+ 21 blEQ True = LEQ
+ 22
+ 23 blGT :: Bool -> BinaryInstruction
+ 24 blGT False = BGT
+ 25 blGT True = LGT
+ 26
+ 27 -- | Other functions
+ 28
+ 29 calculateOps :: Integral a => a -> a -> [BinaryInstruction] -> [a]
+ 30 calculateOps operand operand' = map (calculateOp operand operand')
+ 31
+ 32 calculateOp :: Integral a => a -> a -> BinaryInstruction -> a
+ 33 calculateOp operand operand' operation = doBinary operation operand' operand
+ 34
+ 35 doBinary :: Integral a => BinaryInstruction -> a -> a -> a
+ 36 doBinary Add = (+)
+ 37 doBinary Sub = (-)
+ 38 doBinary Mul = (*)
+ 39 doBinary Div = div
+ 40 doBinary Mod = mod
+ 41 doBinary o = error $ show o
+ 42
+ 43 -- | Types
+ 44
+ 45 data ALInstruction =
+ 46 Cons Integer
+ 47 | Unary !UnaryInstruction
+ 48 | Binary !BinaryInstruction
+ 49 | Binaries [BinaryInstruction]
+ 50 | SStatic !StackIndex !ManipulationInstruction
+ 51 | SDynamic !ManipulationInstruction
+ 52 | SIO !IOInstruction
+ 53 | Halibut
+ 54 | Pick
+ 55 | Dup
+ 56 | Rot
+ 57 | Swap
+ 58 | Discard
+ 59 deriving stock (Eq , Read , Show )
+ 60
+ 61 data UnaryInstruction = Neg | BNot | LNot
+ 62 deriving stock (Eq , Read , Show )
+ 63
+ 64 data BinaryInstruction =
+ 65 Add | Sub | Mul | Div | Mod
+ 66 | BAnd | BOr | BXor | BEQ | BGT
+ 67 | LAnd | LOr | LXor | LEQ | LGT
+ 68 deriving stock (Eq , Read , Show )
+ 69
+ 70 data ManipulationInstruction = Copy | Move | Slide
+ 71 deriving stock (Eq , Read , Show )
+ 72
+ 73 type StackIndex = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html
new file mode 100644
index 000000000..458afdd15
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.ControlInstruction where
+ 2
+ 3 import HelVM.HelIO.Collections.SList
+ 4
+ 5 isNotJump :: Integral e => BranchTest -> e -> Bool
+ 6 isNotJump t = not . isJump t
+ 7
+ 8 isJump :: Integral e => BranchTest -> e -> Bool
+ 9 isJump EZ e = e == 0
+ 10 isJump LTZ e = e < 0
+ 11 isJump GTZ e = e > 0
+ 12
+ 13 -- | Types
+ 14 data ControlInstruction =
+ 15 Mark !Label
+ 16 | CStatic !Label !LabelInstruction
+ 17 | CDynamic !LabelInstruction
+ 18 | Return
+ 19 deriving stock (Eq , Read , Show )
+ 20
+ 21 type Label = SString
+ 22
+ 23 data LabelInstruction = Call | Jump | Branch !BranchTest
+ 24 deriving stock (Eq , Read , Show )
+ 25
+ 26 data BranchTest = EZ | LTZ | GTZ
+ 27 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html
new file mode 100644
index 000000000..95df8d9ea
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.IOInstruction where
+ 2
+ 3 data IOInstruction =
+ 4 OutputChar
+ 5 | OutputDec
+ 6 | InputChar
+ 7 | InputDec
+ 8 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html
new file mode 100644
index 000000000..8e565b994
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.LSInstruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 4
+ 5 -- | Types
+ 6
+ 7 data LSInstruction =
+ 8 Load --Restore --Fetch
+ 9 | Store --Save
+ 10 | MIO !IOInstruction
+ 11 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.hs.html
new file mode 100644
index 000000000..9d7132219
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.hs.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 4 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 5 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 6
+ 7 import Data.Vector as Vector
+ 8
+ 9 isMark :: Label -> Instruction -> Bool
+ 10 isMark l (IControl (Mark l')) = l == l'
+ 11 isMark _ _ = False
+ 12
+ 13 -- | Types
+ 14
+ 15 data Instruction =
+ 16 IAL !ALInstruction
+ 17 | ILS !LSInstruction
+ 18 | IControl !ControlInstruction
+ 19 | End
+ 20 deriving stock (Eq , Read , Show )
+ 21
+ 22 type InstructionList = [Instruction]
+ 23 type InstructionVector = Vector Instruction
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html
new file mode 100644
index 000000000..bf8caca64
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.CellType where
+ 2
+ 3 -- | Constructors
+ 4 parseCellType :: String -> CellType
+ 5 parseCellType raw = valid $ readMaybe raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "CellType '" <> toText raw <> "' is not valid CellType. Valid cellTypes are : " <> show cellTypes
+ 8
+ 9 defaultCellType :: CellType
+ 10 defaultCellType = Word8Type
+ 11
+ 12 cellTypes :: [CellType]
+ 13 cellTypes = [Int8Type , Word8Type , Int16Type , Word16Type , Int32Type , Word32Type , Int64Type , Word64Type]
+ 14
+ 15 -- | Types
+ 16 data CellType = Int8Type | Word8Type | Int16Type | Word16Type | Int32Type | Word32Type | Int64Type | Word64Type
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html
new file mode 100644
index 000000000..62ed08dbf
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.DumpType where
+ 2
+ 3 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 4
+ 5 import HelVM.HelIO.Control.Logger
+ 6
+ 7 import HelVM.HelIO.Util
+ 8
+ 9 logDump :: (BIO m , Show d) => DumpType -> d -> m ()
+ 10 logDump dt d = logDump' $ dump dt d where
+ 11 logDump' Nothing = pass
+ 12 logDump' (Just t) = logMessageTuple ("dump" , t)
+ 13
+ 14 dump :: Show a => DumpType -> a -> Maybe Text
+ 15 dump No _ = Nothing
+ 16 dump Ugly a = Just $ show a
+ 17 dump Pretty a = Just $ showP a
+ 18
+ 19 -- | Constructors
+ 20 parseDumpType :: String -> DumpType
+ 21 parseDumpType raw = (valid . readMaybe) raw where
+ 22 valid (Just value) = value
+ 23 valid Nothing = error $ "DumpType '" <> toText raw <> "' is not valid DumpType. Valid dumpTypes are : " <> show dumpTypes
+ 24
+ 25 defaultDumpType :: DumpType
+ 26 defaultDumpType = No
+ 27
+ 28 dumpTypes :: [DumpType]
+ 29 dumpTypes = [No , Ugly , Pretty]
+ 30
+ 31 -- | Types
+ 32 data DumpType = No | Ugly | Pretty
+ 33 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html
new file mode 100644
index 000000000..6820efd95
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.IntCellType where
+ 2
+ 3 -- | Constructors
+ 4 parseIntCellType :: String -> IntCellType
+ 5 parseIntCellType raw = (valid . readMaybe) raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "IntCellType '" <> toText raw <> "' is not valid IntCellType. Valid intCellTypes are : " <> show intCellTypes
+ 8
+ 9 defaultIntCellType :: IntCellType
+ 10 defaultIntCellType = IntegerType
+ 11
+ 12 intCellTypes :: [IntCellType]
+ 13 intCellTypes = [Int8Type , Int16Type , Int32Type , Int64Type , IntegerType]
+ 14
+ 15 -- | Types
+ 16 data IntCellType = Int8Type | Int16Type | Int32Type | Int64Type | IntegerType
+ 17 deriving stock (Bounded , Enum , Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html
new file mode 100644
index 000000000..73ff87384
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.RAMType where
+ 2
+ 3 -- | Constructors
+ 4 parseRAMType :: String -> RAMType
+ 5 parseRAMType raw = (valid . readMaybe) raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "RAMType '" <> toText raw <> "' is not valid RAMType. Valid ramTypes are : " <> show ramTypes
+ 8
+ 9 defaultRAMType :: RAMType
+ 10 defaultRAMType = MapListRAMType
+ 11
+ 12 ramTypes :: [RAMType]
+ 13 ramTypes = [ListRAMType , SeqRAMType , SListRAMType , MapListRAMType]
+ 14
+ 15 -- | Types
+ 16 data RAMType = ListRAMType | SeqRAMType | SListRAMType | MapListRAMType
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html
new file mode 100644
index 000000000..9b8c8627c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.StackType where
+ 2
+ 3 -- | Constructors
+ 4 parseStackType :: String -> StackType
+ 5 parseStackType raw = valid $ readMaybe raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "StackType '" <> toText raw <> "' is not valid StackType. Valid stackTypes are : " <> show stackTypes
+ 8
+ 9 defaultStackType :: StackType
+ 10 defaultStackType = SeqStackType
+ 11
+ 12 stackTypes :: [StackType]
+ 13 stackTypes = [ListStackType , SeqStackType , SListStackType]
+ 14
+ 15 -- | Types
+ 16 data StackType = ListStackType | SeqStackType | SListStackType
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html
new file mode 100644
index 000000000..66779bcac
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.TokenType where
+ 2
+ 3 import HelVM.HelIO.SwitchEnum
+ 4
+ 5 -- | Constructors
+ 6 parseTokenType:: String -> TokenType
+ 7 parseTokenType raw = valid $ readMaybe raw where
+ 8 valid (Just value) = value
+ 9 valid Nothing = error $ "'" <> toText raw <> "' is not valid TokenType. Valid tokenTypes are : " <> show tokenTypes
+ 10
+ 11 defaultTokenType :: TokenType
+ 12 defaultTokenType = defaultEnum
+ 13
+ 14 tokenTypes :: [TokenType]
+ 15 tokenTypes = bothEnums
+ 16
+ 17 -- | Types
+ 18 data TokenType = VisibleTokenType | WhiteTokenType
+ 19 deriving stock (Bounded , Enum , Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html
new file mode 100644
index 000000000..ea19db0d8
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.ALU (
+ 2 doOutputChar2,
+ 3 doInputChar2,
+ 4 doInputDec2,
+ 5 divMod,
+ 6 sub,
+ 7 binaryInstruction,
+ 8 binaryInstructions,
+ 9 halibut,
+ 10 alInstruction,
+ 11 move,
+ 12 swap,
+ 13 discard,
+ 14 slide,
+ 15 dup,
+ 16 copy,
+ 17 flipPush1,
+ 18 charPush1,
+ 19 genericPush1,
+ 20 pop1,
+ 21 pop2,
+ 22 push1,
+ 23 push2,
+ 24 splitAt,
+ 25 drop,
+ 26 ALU,
+ 27 Stack,
+ 28 ) where
+ 29
+ 30 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 31 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 32
+ 33 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 34
+ 35 import HelVM.HelIO.Control.Safe
+ 36
+ 37 import HelVM.HelIO.Containers.LLIndexSafe
+ 38
+ 39 import HelVM.HelIO.ListLikeUtil
+ 40
+ 41 import Data.ListLike hiding (show)
+ 42 import Prelude hiding (divMod, drop, fromList, splitAt, swap)
+ 43
+ 44
+ 45 alInstruction :: ALU m ll element => ALInstruction -> ll -> m ll
+ 46 alInstruction (Cons i ) = push i
+ 47 alInstruction (Unary op) = error $ show op
+ 48 alInstruction (Binary op) = binaryInstruction op
+ 49 alInstruction (SDynamic op) = dynamicManipulation op
+ 50 alInstruction (SStatic i op) = staticManipulation op i
+ 51 alInstruction (SIO OutputChar) = doOutputChar2
+ 52 alInstruction (SIO OutputDec) = doOutputDec2
+ 53 alInstruction (SIO InputChar) = doInputChar2
+ 54 alInstruction Halibut = halibut
+ 55 alInstruction Pick = pick
+ 56 alInstruction Dup = dup
+ 57 alInstruction Rot = rot
+ 58 alInstruction Swap = swap
+ 59 alInstruction Discard = discard
+ 60 alInstruction op = error $ show op
+ 61
+ 62 -- | Arithmetic instructions
+ 63 divMod :: ALU m ll element => ll -> m ll
+ 64 divMod = binaryInstructions [Mod , Div]
+ 65
+ 66 sub :: ALU m ll element => ll -> m ll
+ 67 sub = binaryInstruction Sub
+ 68
+ 69 binaryInstruction :: ALU m ll element => BinaryInstruction -> ll -> m ll
+ 70 binaryInstruction i = binaryInstructions [i]
+ 71
+ 72 binaryInstructions :: ALU m ll element => [BinaryInstruction] -> ll -> m ll
+ 73 binaryInstructions il l = binaryInstructions' <$> pop2 l where
+ 74 binaryInstructions' (e , e', l') = pushList (calculateOps e e' il) l'
+ 75
+ 76 -- | IO instructions
+ 77 doOutputChar2 :: ALU m ll element => ll -> m ll
+ 78 doOutputChar2 l = doOutputChar' =<< pop1 l where
+ 79 doOutputChar' (e , l') = wPutAsChar e $> l'
+ 80
+ 81 doOutputDec2 :: ALU m ll element => ll -> m ll
+ 82 doOutputDec2 l = doOutputDec' =<< pop1 l where
+ 83 doOutputDec' (e , l') = wPutAsDec e $> l'
+ 84
+ 85 doInputChar2 :: ALU m ll element => ll -> m ll
+ 86 doInputChar2 l = doInputChar' <$> wGetCharAs where
+ 87 doInputChar' e = push1 e l
+ 88
+ 89 doInputDec2 :: ALU m ll element => ll -> m ll
+ 90 doInputDec2 l = doInputChar' <$> wGetCharAs where
+ 91 doInputChar' e = push1 e l
+ 92
+ 93 -- | Manipulation instructions
+ 94 dynamicManipulation :: ALU m ll element => ManipulationInstruction -> ll -> m ll
+ 95 dynamicManipulation op l = dynamicManipulation' =<< unconsSafe l where
+ 96 dynamicManipulation' (e , l') = staticManipulation op (fromIntegral e) l'
+ 97
+ 98 staticManipulation :: ALU m ll element => ManipulationInstruction -> Index -> ll -> m ll
+ 99 staticManipulation Copy = copy
+ 100 staticManipulation Move = move
+ 101 staticManipulation Slide = slide
+ 102
+ 103 -- | Halibut and Pick instructions
+ 104 halibut :: ALU m ll element => ll -> m ll
+ 105 halibut l = halibut' =<< pop1 l where
+ 106 halibut' (e , l')
+ 107 | 0 < i = move i l'
+ 108 | otherwise = copy (negate i) l'
+ 109 where i = fromIntegral e
+ 110
+ 111 pick :: ALU m ll element => ll -> m ll
+ 112 pick l = pick' =<< pop1 l where
+ 113 pick' (e , l')
+ 114 | 0 <= i = copy i l'
+ 115 | otherwise = move (negate i) l'
+ 116 where i = fromIntegral e
+ 117
+ 118 -- | Slide instructions
+ 119 slide :: ALU m ll element => Index -> ll -> m ll
+ 120 slide i l = slide' <$> pop1 l where
+ 121 slide' (e , l') = push1 e $ drop i l'
+ 122
+ 123 -- | Move instructions
+ 124 rot :: ALU m ll element => ll -> m ll
+ 125 rot = move 2
+ 126
+ 127 swap :: ALU m ll element => ll -> m ll
+ 128 swap = move 1
+ 129
+ 130 move :: ALU m ll element => Index -> ll -> m ll
+ 131 move i l = pure $ l1 <> l2 <> l3 where
+ 132 (l1 , l3) = splitAt 1 l'
+ 133 (l2 , l') = splitAt i l
+ 134
+ 135 -- | Copy instructions
+ 136 dup :: ALU m ll element => ll -> m ll
+ 137 dup = copy 0
+ 138
+ 139 copy :: ALU m ll element => Index -> ll -> m ll
+ 140 copy i l = flipPush1 l <$> l `indexSafe` i
+ 141
+ 142 -- | Pop instructions
+ 143 pop1 :: ALU m ll element => ll -> m (element , ll)
+ 144 pop1 l = appendErrorTuple ("l" , show l) $ unconsSafe l
+ 145
+ 146 pop2 :: ALU m ll element => ll -> m (element , element , ll)
+ 147 pop2 l = appendErrorTuple ("l" , show l) $ uncons2Safe l
+ 148
+ 149 -- | Push instructions
+ 150 push :: ALU m ll element => Integer -> ll -> m ll
+ 151 push i l = pure $ genericPush1 i l
+ 152
+ 153 flipPush1 :: Stack ll element => ll -> element -> ll
+ 154 flipPush1 = flip push1
+ 155
+ 156 charPush1 :: (Num element , Stack ll element) => Char -> ll -> ll
+ 157 charPush1 = genericPush1 . ord
+ 158
+ 159 genericPush1 :: (Integral v , Num element , Stack ll element) => v -> ll -> ll
+ 160 genericPush1 = push1 . fromIntegral
+ 161
+ 162 push1 :: Stack ll element => element -> ll -> ll
+ 163 push1 e = pushList [e]
+ 164
+ 165 push2 :: Stack ll element => element -> element -> ll -> ll
+ 166 push2 e e' = pushList [e , e']
+ 167
+ 168 pushList :: Stack ll element => [element] -> ll -> ll
+ 169 pushList es l = fromList es <> l
+ 170
+ 171 -- | Types
+ 172 type ALU m ll element = (BIO m , Stack ll element , Integral element)
+ 173
+ 174 type Stack ll element = (Show ll , ListLike ll element , IndexSafe ll element)
+ 175
+ 176 type Index = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html
new file mode 100644
index 000000000..e01d03cd4
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.CPU where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.ALU
+ 4
+ 5 import HelVM.HelMA.Automaton.Instruction
+ 6 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 7
+ 8 import HelVM.HelIO.Control.Safe
+ 9
+ 10 import Control.Type.Operator
+ 11
+ 12 import Data.ListLike hiding (show)
+ 13
+ 14 controlInstruction :: (ALU m ll element , Show element) => ControlInstruction -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 15 --controlInstruction :: ALU m ll element => ControlInstruction -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 16 controlInstruction (Mark _ ) = pure
+ 17 controlInstruction Return = popAddress
+ 18 controlInstruction (CDynamic Call ) = dynamicCall
+ 19 controlInstruction (CDynamic Jump ) = dynamicJump
+ 20 controlInstruction (CDynamic (Branch t)) = dynamicBranch t
+ 21 controlInstruction (CStatic l Call ) = staticCall l
+ 22 controlInstruction (CStatic l Jump ) = staticJump l
+ 23 controlInstruction (CStatic l (Branch t)) = staticBranch l t
+ 24
+ 25 popAddress :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 26 popAddress (CPU (CU il _ (IS (a : is))) s) = pure $ CPU (CU il a $ IS is) s
+ 27 popAddress (CPU (CU il _ (IS [] )) _) = liftErrorWithTupleList "Empty Return Stack" [("il" , show il)]
+ 28
+ 29 dynamicCall :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 30 dynamicCall (CPU (CU il ic (IS is)) s) = call <$> pop1 s where
+ 31 call (a , s') = CPU (CU il (fromIntegral a) (IS (ic : is))) s'
+ 32
+ 33 dynamicJump :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 34 dynamicJump (CPU (CU il _ is) s) = jump <$> pop1 s where
+ 35 jump (a , s') = CPU (CU il (fromIntegral a) is) s'
+ 36
+ 37 dynamicBranch :: (ALU m ll element , Show element) => BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 38 --dynamicBranch :: ALU m ll element => BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 39 dynamicBranch t (CPU (CU il ic is) s) = branch =<< pop2 s where
+ 40 -- dynamicBranch' (l , e , s') = liftErrorTupleList [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 41 branch (l , e , s')
+ 42 | isNotJump t e = liftErrorWithTupleList "isNotJump" [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 43 -- | isNotJump t e = pure $ CPU (CU il ic is) s'
+ 44 | otherwise = liftErrorWithTupleList "otherwise" [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 45 -- | otherwise = jump <$> findAddress il (show l) where jump ic' = CPU (CU il ic' is) s'
+ 46
+ 47 staticCall :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 48 staticCall l (CPU (CU il ic (IS is)) s) = call <$> findAddress il l where
+ 49 call a = CPU (CU il a (IS (ic : is))) s
+ 50
+ 51 staticJump :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 52 staticJump l (CPU (CU il _ is) s) = jump <$> findAddress il l where
+ 53 jump a = CPU (CU il a is) s
+ 54
+ 55 staticBranch :: ALU m ll element => Label -> BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 56 staticBranch l t (CPU (CU il ic is) s) = branch =<< pop1 s where
+ 57 branch (e , s')
+ 58 | isNotJump t e = pure $ CPU (CU il ic is) s'
+ 59 | otherwise = jump <$> findAddress il l where
+ 60 jump ic' = CPU (CU il ic' is) s'
+ 61
+ 62 findAddress :: MonadSafe m => InstructionVector -> Label -> m InstructionAddress
+ 63 findAddress il l = liftMaybeOrErrorTuple ("Undefined label", show l) $ findIndex (isMark l) il
+ 64
+ 65 cpuToTuple :: CentralProcessingUnit s -> (ControlUnit , s)
+ 66 cpuToTuple (CPU cu s) = (cu , s)
+ 67
+ 68 -- | Types
+ 69 data CentralProcessingUnit al = CPU
+ 70 { controlUnit :: ControlUnit
+ 71 , alu :: al
+ 72 }
+ 73 deriving stock (Show )
+ 74
+ 75 data ControlUnit = CU
+ 76 { program :: InstructionVector
+ 77 , programCounter :: InstructionCounter
+ 78 , returnStack :: InstructionStack
+ 79 }
+ 80 deriving stock (Show )
+ 81
+ 82 newtype InstructionStack = IS [InstructionAddress]
+ 83 deriving stock (Show )
+ 84
+ 85 type InstructionCounter = InstructionAddress
+ 86
+ 87 type InstructionAddress = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html
new file mode 100644
index 000000000..f06c468f8
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.LSU where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.ALU
+ 4 import qualified HelVM.HelMA.Automaton.Units.RAM as RAM
+ 5
+ 6 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 7
+ 8 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 9 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 10
+ 11 import Control.Type.Operator
+ 12
+ 13 slInstruction :: (LSU m s r element) => LSInstruction -> LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 14 slInstruction Load = load
+ 15 slInstruction Store = store
+ 16 slInstruction (MIO OutputChar) = loadOutputChar
+ 17 slInstruction (MIO OutputDec) = loadOutputDec
+ 18 slInstruction (MIO InputChar) = storeInputChar
+ 19 slInstruction (MIO InputDec) = storeInputDec
+ 20
+ 21 load :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 22 load (LSU s r) = load' <$> pop1 s where
+ 23 load' (address , s') = LSU (push1 (RAM.genericLoad r address) s') r
+ 24
+ 25 store :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 26 store (LSU s r) = store' <$> pop2 s where
+ 27 store' (value , address , s') = LSU s' $ RAM.store address value r
+ 28
+ 29 loadOutputChar :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 30 loadOutputChar (LSU s r) = loadOutputChar' =<< pop1 s where
+ 31 loadOutputChar' (address , s') = LSU s' r <$ wPutAsChar (RAM.genericLoad r address)
+ 32
+ 33 loadOutputDec :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 34 loadOutputDec (LSU s r) = doOutputDec' =<< pop1 s where
+ 35 doOutputDec' (address , s') = LSU s' r <$ wPutAsDec (RAM.genericLoad r address)
+ 36
+ 37 storeInputChar :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 38 storeInputChar (LSU s r) = storeInputChar' =<< pop1 s where
+ 39 storeInputChar' (address , s') = LSU s' . flip (RAM.store address) r <$> wGetCharAs
+ 40
+ 41 storeInputDec :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 42 storeInputDec (LSU s r) = storeInputDec' =<< pop1 s where
+ 43 storeInputDec' (address , s') = LSU s' . flip (RAM.store address) r <$> wGetDecAs
+ 44
+ 45 sluToTuple :: LoadStoreUnit s r -> (s , r)
+ 46 sluToTuple (LSU s r) = (s , r)
+ 47
+ 48 -- | Types
+ 49 type LSU m s r element = (ALU m s element , RAM.RAM r element)
+ 50
+ 51 data LoadStoreUnit s r = LSU
+ 52 { stack :: s
+ 53 , ram :: r
+ 54 }
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html
new file mode 100644
index 000000000..c66cf9943
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.RAM (
+ 2 genericLoad,
+ 3 load,
+ 4 storeChar,
+ 5 genericStore,
+ 6 store,
+ 7 fromList,
+ 8 RAM,
+ 9 ) where
+ 10
+ 11 import HelVM.HelIO.Containers.LLIndexSafe
+ 12 import HelVM.HelIO.Containers.LLInsertDef
+ 13
+ 14 import Data.Default
+ 15 import Prelude hiding (divMod, drop, splitAt, swap)
+ 16
+ 17 genericLoad :: (Integral i , RAM ll element) => ll -> i -> element
+ 18 genericLoad l = load l . fromIntegral
+ 19
+ 20 load :: (RAM ll element) => ll -> Address -> element
+ 21 load l i = indexMaybe l i ?: def
+ 22
+ 23 storeChar :: (Num element , Integral address , RAM ll element) => address -> Char -> ll -> ll
+ 24 storeChar a char = genericStore a $ ord char
+ 25
+ 26 genericStore :: (Integral value , Num element , Integral address , RAM ll element) => address -> value -> ll -> ll
+ 27 genericStore a v = store a $ fromIntegral v
+ 28
+ 29 store :: (Integral a , RAM ll element) => a -> element -> ll -> ll
+ 30 store = insertDef . fromIntegral
+ 31
+ 32 -- | Types
+ 33 type RAM ll element = (Show ll , Default element , II ll element)
+ 34
+ 35 type II ll element = (InsertDef ll element , IndexSafe ll element)
+ 36
+ 37 type Address = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html
new file mode 100644
index 000000000..c8be4c41d
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.Unit where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.CPU
+ 4
+ 5 -- | Data types
+ 6 data Unit s r = Unit
+ 7 { unitCU :: ControlUnit
+ 8 , unitStack :: s
+ 9 , unitRAM :: r
+ 10 }
+ 11 deriving stock (Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html
new file mode 100644
index 000000000..41a99454c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.WrapTokenList where
+ 2
+ 3 import qualified Text.Read
+ 4 import qualified Text.Show
+ 5
+ 6 newtype WrapTokenList a = WrapTokenList { unWrapTokenList :: a }
+ 7 deriving stock (Eq )
+ 8
+ 9 ----
+ 10
+ 11 instance Show a => Show (WrapTokenList [a]) where
+ 12 show (WrapTokenList tokens) = show =<< tokens
+ 13
+ 14 instance Read a => Read (WrapTokenList [a]) where
+ 15 readsPrec _ source = [( WrapTokenList $ maybeToList . readMaybe . one =<< source , "")]
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/hpc_index.html b/docs/reports/hpc/html/helma-0.7.2.1/hpc_index.html
new file mode 100644
index 000000000..e65d82404
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/hpc_index.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/hpc_index_alt.html b/docs/reports/hpc/html/helma-0.7.2.1/hpc_index_alt.html
new file mode 100644
index 000000000..ea06c54cd
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/hpc_index_alt.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/hpc_index_exp.html b/docs/reports/hpc/html/helma-0.7.2.1/hpc_index_exp.html
new file mode 100644
index 000000000..70e33aaaa
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/hpc_index_exp.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/html/helma-0.7.2.1/hpc_index_fun.html b/docs/reports/hpc/html/helma-0.7.2.1/hpc_index_fun.html
new file mode 100644
index 000000000..75e5cf18c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-0.7.2.1/hpc_index_fun.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html
new file mode 100644
index 000000000..4360f2d7c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton (
+ 2 evalSource,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 6 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 7 import HelVM.HelMA.Automata.BrainFuck.Lexer
+ 8 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 9 import HelVM.HelMA.Automata.BrainFuck.TableOfInstructions
+ 10 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 11
+ 12 import HelVM.HelMA.Automaton.API.IOTypes
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14 import HelVM.HelMA.Automaton.Types.DumpType
+ 15
+ 16 import Control.Type.Operator
+ 17
+ 18 evalSource :: (BIO m , Symbol e) => Source -> FullTape e -> DumpType -> m ()
+ 19 evalSource source tape dt = logDump dt =<< doInstruction ([] , tokenize source) tape
+ 20
+ 21 doInstruction :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 22 doInstruction table@(_ , Simple MoveR : _) tape = doInstruction (nextInst table) (moveHeadRight tape)
+ 23 doInstruction table@(_ , Simple MoveL : _) tape = doInstruction (nextInst table) (moveHeadLeft tape)
+ 24 doInstruction table@(_ , Simple Inc : _) tape = doInstruction (nextInst table) (wNextSymbol tape)
+ 25 doInstruction table@(_ , Simple Dec : _) tape = doInstruction (nextInst table) (wPrevSymbol tape)
+ 26 doInstruction table@(_ , Simple Output : _) tape = doOutputChar table tape
+ 27 doInstruction table@(_ , Simple Input : _) tape = doInputChar table tape
+ 28 doInstruction table@(_ , JmpPast : _) tape = doJmpPast table tape
+ 29 doInstruction table@(_ , JmpBack : _) tape = doJmpBack table tape
+ 30 doInstruction table@(_ , [] ) tape = doEnd table tape
+ 31
+ 32 doJmpPast :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 33 doJmpPast table tape@(_ , 0 : _) = doInstruction (jumpPast table) tape
+ 34 doJmpPast table tape = doInstruction (nextInst table) tape
+ 35
+ 36 doJmpBack :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 37 doJmpBack table tape@(_ , 0 : _) = doInstruction (nextInst table) tape
+ 38 doJmpBack table tape = doInstruction (jumpBack table) tape
+ 39
+ 40 -- | IO instructions
+ 41 doOutputChar :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 42 doOutputChar _ (_ , []) = error "Illegal State"
+ 43 doOutputChar table tape@(_ , e : _) = wPutChar (toChar e) *> doInstruction (nextInst table) tape
+ 44
+ 45 doInputChar :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 46 doInputChar table tape = (doInstruction (nextInst table) . flip writeSymbol tape) =<< wGetChar
+ 47
+ 48 -- | Terminate instruction
+ 49 doEnd :: BIO m => Table -> FullTape e -> m $ Unit e
+ 50 doEnd table tape = pure $ Unit table tape
+ 51
+ 52 -- | Types
+ 53 data Unit e = Unit
+ 54 { unitTable :: Table
+ 55 , unitTape :: FullTape e
+ 56 }
+ 57 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html
new file mode 100644
index 000000000..b5ff9ec69
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton (
+ 2 evalSource,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 6 import HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction
+ 7 import HelVM.HelMA.Automata.BrainFuck.Parser
+ 8 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 9 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 10
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 13 import HelVM.HelMA.Automaton.Types.DumpType
+ 14
+ 15 import HelVM.HelIO.Containers.LLIndexSafe
+ 16
+ 17 import Control.Type.Operator
+ 18
+ 19 evalSource :: (BIO m , Symbol e) => Source -> FullTape e -> DumpType -> m ()
+ 20 evalSource source tape dt = logDump dt =<< flip evalVector tape =<< parseAsVector source
+ 21
+ 22 evalVector :: (BIO m , Symbol e) => TreeInstructionVector -> FullTape e -> m $ Unit e
+ 23 evalVector iv = nextStep (IU iv 0)
+ 24
+ 25 nextStep :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 26 nextStep (IU iv ic) = doInstruction (iv `indexMaybe` ic) (IU iv $ ic + 1)
+ 27
+ 28 doInstruction :: (BIO m , Symbol e) => Maybe TreeInstruction -> InstructionUnit -> FullTape e -> m $ Unit e
+ 29 doInstruction (Just (Simple MoveR )) table tape = nextStep table (moveHeadRight tape)
+ 30 doInstruction (Just (Simple MoveL )) table tape = nextStep table (moveHeadLeft tape)
+ 31 doInstruction (Just (Simple Inc )) table tape = nextStep table (wNextSymbol tape)
+ 32 doInstruction (Just (Simple Dec )) table tape = nextStep table (wPrevSymbol tape)
+ 33 doInstruction (Just (Simple Output )) table tape = doOutputChar table tape
+ 34 doInstruction (Just (Simple Input )) table tape = doInputChar table tape
+ 35 doInstruction (Just (While iv )) table tape = doWhile iv table tape
+ 36 doInstruction Nothing table tape = doEnd table tape
+ 37
+ 38 doWhile :: (BIO m , Symbol e) => TreeInstructionVector -> InstructionUnit -> FullTape e -> m $ Unit e
+ 39 doWhile _ table tape@(_ , 0:_) = nextStep table tape
+ 40 doWhile iv table tape = doWhileWithTape =<< evalVector iv tape where
+ 41 doWhileWithTape :: (BIO m , Symbol e) => Unit e -> m $ Unit e
+ 42 doWhileWithTape = doWhile iv table . unitTape
+ 43
+ 44 -- | IO instructions
+ 45 doOutputChar :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 46 doOutputChar _ (_ , []) = error "Illegal State"
+ 47 doOutputChar table tape@(_ , e:_) = wPutChar (toChar e) *> nextStep table tape
+ 48
+ 49 doInputChar :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 50 doInputChar table tape = (nextStep table . flip writeSymbol tape) =<< wGetChar
+ 51
+ 52 -- | Terminate instruction
+ 53 doEnd :: BIO m => InstructionUnit -> FullTape e -> m $ Unit e
+ 54 doEnd iu tape = pure $ Unit iu tape
+ 55
+ 56 -- | Types
+ 57 data Unit e = Unit
+ 58 { unitUI :: InstructionUnit
+ 59 , unitTape :: FullTape e
+ 60 }
+ 61 deriving stock (Eq , Show )
+ 62
+ 63 data InstructionUnit = IU !TreeInstructionVector !InstructionCounter
+ 64 deriving stock (Eq , Show )
+ 65
+ 66 type InstructionCounter = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html
new file mode 100644
index 000000000..05adcb87b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton where
+ 2
+ 3 import qualified HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton as Flat
+ 4 import qualified HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton as Tree
+ 5
+ 6 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 7 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 8
+ 9 import HelVM.HelMA.Automaton.API.EvalParams
+ 10 import HelVM.HelMA.Automaton.API.IOTypes
+ 11 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 12
+ 13 import HelVM.HelMA.Automaton.Types.CellType
+ 14 import HelVM.HelMA.Automaton.Types.DumpType
+ 15
+ 16 simpleEval :: BIO m => (Bool , Source , CellType) -> m ()
+ 17 simpleEval (c , s , t) = eval c s t Pretty
+ 18
+ 19 ----
+ 20
+ 21 evalParams :: BIO m => EvalParams -> m ()
+ 22 evalParams p = eval (compile p) (source p) (cellTypeOptions p) (dumpTypeOptions p)
+ 23
+ 24 eval :: BIO m => Bool -> Source -> CellType -> DumpType -> m ()
+ 25 eval c s Int8Type = evalSource c s (newTape :: FullTape Int8)
+ 26 eval c s Word8Type = evalSource c s (newTape :: FullTape Word8)
+ 27 eval c s Int16Type = evalSource c s (newTape :: FullTape Int16)
+ 28 eval c s Word16Type = evalSource c s (newTape :: FullTape Word16)
+ 29 eval c s Int32Type = evalSource c s (newTape :: FullTape Int32)
+ 30 eval c s Word32Type = evalSource c s (newTape :: FullTape Word32)
+ 31 eval c s Int64Type = evalSource c s (newTape :: FullTape Int64)
+ 32 eval c s Word64Type = evalSource c s (newTape :: FullTape Word64)
+ 33
+ 34 evalSource :: (BIO m , Symbol e) => Bool -> Source -> FullTape e -> DumpType -> m ()
+ 35 evalSource False = Flat.evalSource
+ 36 evalSource True = Tree.evalSource
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html
new file mode 100644
index 000000000..bdb30e3fe
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 4
+ 5 import Text.Read
+ 6
+ 7 import qualified Text.Show
+ 8
+ 9 data FlatInstruction =
+ 10 Simple SimpleInstruction
+ 11 | JmpPast
+ 12 | JmpBack
+ 13 deriving stock (Eq )
+ 14
+ 15 type FlatTreeInstructionList = [FlatInstruction]
+ 16
+ 17 instance Show FlatInstruction where
+ 18 show (Simple i) = show i
+ 19 show JmpPast = "["
+ 20 show JmpBack = "]"
+ 21
+ 22 instance Read FlatInstruction where
+ 23 readsPrec _ ">" = [( Simple MoveR , "")]
+ 24 readsPrec _ "<" = [( Simple MoveL , "")]
+ 25 readsPrec _ "+" = [( Simple Inc , "")]
+ 26 readsPrec _ "-" = [( Simple Dec , "")]
+ 27 readsPrec _ "." = [( Simple Output , "")]
+ 28 readsPrec _ "," = [( Simple Input , "")]
+ 29 readsPrec _ "[" = [( JmpPast , "")]
+ 30 readsPrec _ "]" = [( JmpBack , "")]
+ 31 readsPrec _ _ = []
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html
new file mode 100644
index 000000000..d40c09792
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction where
+ 2
+ 3 import Text.Read
+ 4 import qualified Text.Show
+ 5
+ 6 data SimpleInstruction =
+ 7 MoveR
+ 8 | MoveL
+ 9 | Inc
+ 10 | Dec
+ 11 | Output
+ 12 | Input
+ 13 deriving stock (Bounded , Enum , Eq )
+ 14
+ 15 instance Show SimpleInstruction where
+ 16 show MoveR = ">"
+ 17 show MoveL = "<"
+ 18 show Inc = "+"
+ 19 show Dec = "-"
+ 20 show Output = "."
+ 21 show Input = ","
+ 22
+ 23 instance Read SimpleInstruction where
+ 24 readsPrec _ ">" = [( MoveR , "")]
+ 25 readsPrec _ "<" = [( MoveL , "")]
+ 26 readsPrec _ "+" = [( Inc , "")]
+ 27 readsPrec _ "-" = [( Dec , "")]
+ 28 readsPrec _ "." = [( Output , "")]
+ 29 readsPrec _ "," = [( Input , "")]
+ 30 readsPrec _ _ = []
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html
new file mode 100644
index 000000000..f7c5c74b9
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 4
+ 5 import Data.DList
+ 6 import qualified Data.ListLike as LL
+ 7 import Data.Vector
+ 8
+ 9 import qualified Text.Show
+ 10
+ 11 data TreeInstruction =
+ 12 Simple SimpleInstruction
+ 13 | While !TreeInstructionVector
+ 14 deriving stock (Eq )
+ 15
+ 16 type TreeInstructionList = [TreeInstruction]
+ 17 type TreeInstructionDList = DList TreeInstruction
+ 18 type TreeInstructionVector = Vector TreeInstruction
+ 19
+ 20 instance Show TreeInstruction where
+ 21 show (Simple i) = show i
+ 22 show (While il) = "[" <> (show =<< LL.toList il) <> "]"
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html
new file mode 100644
index 000000000..7987dc7b9
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelMA.Automaton.API.IOTypes
+ 7 import HelVM.HelMA.Automaton.WrapTokenList
+ 8
+ 9 -- | Lexer
+ 10 tokenize :: Source -> FlatTreeInstructionList
+ 11 tokenize = unWrapTokenList . readTokens
+ 12
+ 13 readTokens :: Source -> Tokens
+ 14 readTokens source = readTextUnsafe source :: Tokens
+ 15
+ 16 type Tokens = WrapTokenList FlatTreeInstructionList
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html
new file mode 100644
index 000000000..88eb4e52f
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Parser where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction as Flat
+ 4 import HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction as Tree
+ 5 import HelVM.HelMA.Automata.BrainFuck.Lexer
+ 6
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8
+ 9 import HelVM.HelIO.Control.Safe
+ 10 import HelVM.HelIO.ListLikeUtil
+ 11
+ 12 import Data.ListLike hiding (show)
+ 13
+ 14 import qualified Data.DList as D
+ 15
+ 16 type OperandParser m a = FlatTreeInstructionList -> m (a , FlatTreeInstructionList)
+ 17
+ 18 parseAsVector :: MonadSafe m => Source -> m TreeInstructionVector
+ 19 parseAsVector = parseFILAsVector . tokenize
+ 20
+ 21 parseFILAsVector :: MonadSafe m => FlatTreeInstructionList -> m TreeInstructionVector
+ 22 parseFILAsVector fil = fromList <$> parseFIL fil
+ 23
+ 24 parseFIL :: MonadSafe m => FlatTreeInstructionList -> m TreeInstructionList
+ 25 parseFIL (Flat.Simple i : fil) = (Tree.Simple i : ) <$> parseFIL fil
+ 26 parseFIL [] = pure []
+ 27 parseFIL (Flat.JmpBack : fil) = liftErrorWithPrefix "JmpBack" $ show fil
+ 28 parseFIL (Flat.JmpPast : fil) = addWhile =<< parseWhile fil where
+ 29 addWhile (i , fil') = (i : ) <$> parseFIL fil'
+ 30
+ 31 parseWhile :: MonadSafe m => OperandParser m TreeInstruction
+ 32 parseWhile fil = buildWhile <$> parseWhileD fil where
+ 33 buildWhile :: (TreeInstructionDList , FlatTreeInstructionList) -> (TreeInstruction , FlatTreeInstructionList)
+ 34 buildWhile (idl , fil') = (buildWhileFromDList idl , fil')
+ 35
+ 36 buildWhileFromDList :: TreeInstructionDList -> TreeInstruction
+ 37 buildWhileFromDList = Tree.While . convert
+ 38
+ 39 parseWhileD :: MonadSafe m => OperandParser m TreeInstructionDList
+ 40 parseWhileD = go D.empty where
+ 41 go :: MonadSafe m => TreeInstructionDList -> FlatTreeInstructionList -> m (TreeInstructionDList , FlatTreeInstructionList)
+ 42 go acc (Flat.Simple i : fil) = go (acc `snoc` Tree.Simple i ) fil
+ 43 go acc [] = liftErrorWithPrefix "End of List" $ show acc
+ 44 go acc (Flat.JmpBack : fil) = pure (acc , fil)
+ 45 go acc (Flat.JmpPast : fil) = snocInstruction =<< parseWhile fil where
+ 46 snocInstruction :: MonadSafe m => (TreeInstruction , FlatTreeInstructionList) -> m (TreeInstructionDList , FlatTreeInstructionList)
+ 47 snocInstruction (i , fil') = go (acc `snoc` i) fil'
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html
new file mode 100644
index 000000000..e276c86f8
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Symbol (
+ 2 Symbol,
+ 3 def,
+ 4 next,
+ 5 prev,
+ 6 fromChar,
+ 7 toChar
+ 8 ) where
+ 9
+ 10 import Data.Default (Default)
+ 11
+ 12 import qualified Data.Default as Default
+ 13 import qualified Relude.Extra as Extra
+ 14
+ 15 def :: Symbol e => e
+ 16 def = Default.def
+ 17
+ 18 next :: Symbol e => e -> e
+ 19 next = Extra.next
+ 20
+ 21 prev :: Symbol e => e -> e
+ 22 prev = Extra.prev
+ 23
+ 24 class (Bounded e , Default e , Enum e , Eq e , Num e , Show e) => Symbol e where
+ 25 fromChar :: Char -> e
+ 26 toChar :: e -> Char
+ 27
+ 28 --
+ 29
+ 30 instance Symbol Int where
+ 31 fromChar = ord
+ 32 toChar = chr
+ 33
+ 34 instance Symbol Word where
+ 35 fromChar = fromIntegral . ord
+ 36 toChar = chr . fromIntegral
+ 37
+ 38 instance Symbol Int8 where
+ 39 fromChar = fromIntegral . ord
+ 40 toChar = chr . normalizeMod . fromIntegral
+ 41
+ 42 instance Symbol Word8 where
+ 43 fromChar = fromIntegral . ord
+ 44 toChar = chr . fromIntegral
+ 45
+ 46 instance Symbol Int16 where
+ 47 fromChar = fromIntegral . ord
+ 48 toChar = chr . normalizeMod . fromIntegral
+ 49
+ 50 instance Symbol Word16 where
+ 51 fromChar = fromIntegral . ord
+ 52 toChar = chr . fromIntegral
+ 53
+ 54 instance Symbol Int32 where
+ 55 fromChar = fromIntegral . ord
+ 56 toChar = chr . normalizeMod . fromIntegral
+ 57
+ 58 instance Symbol Word32 where
+ 59 fromChar = fromIntegral . ord
+ 60 toChar = chr . fromIntegral
+ 61
+ 62 instance Symbol Int64 where
+ 63 fromChar = fromIntegral . ord
+ 64 toChar = chr . normalizeMod . fromIntegral
+ 65
+ 66 instance Symbol Word64 where
+ 67 fromChar = fromIntegral . ord
+ 68 toChar = chr . fromIntegral
+ 69 --
+ 70
+ 71 countSymbols :: (Integral e) => e
+ 72 countSymbols = 256
+ 73
+ 74 modifyMod :: (Integral e) => (e -> e) -> e -> e
+ 75 modifyMod f i = f (i + countSymbols) `mod` countSymbols
+ 76
+ 77 normalizeMod :: (Integral e) => e -> e
+ 78 normalizeMod = modifyMod id
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html
new file mode 100644
index 000000000..78fc0f8ac
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.TableOfInstructions where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 4
+ 5 type HalfTable = FlatTreeInstructionList
+ 6 type Table = (HalfTable , HalfTable)
+ 7 type TableD = Table -> Table
+ 8
+ 9 prevInst :: TableD
+ 10 prevInst (inst : prev , next) = (prev , inst : next)
+ 11 prevInst ([] , _) = error "End of the table"
+ 12
+ 13 nextInst :: TableD
+ 14 nextInst (prev , inst : next) = (inst : prev , next)
+ 15 nextInst (_ , []) = error "End of the table"
+ 16
+ 17 matchPrevJmp :: TableD
+ 18 matchPrevJmp table@(JmpPast : _ , _) = table
+ 19 matchPrevJmp table@(JmpBack : _ , _) = (matchPrevJmp . prevInst . jumpBack) table
+ 20 matchPrevJmp table = jumpBack table
+ 21
+ 22 matchNextJmp :: TableD
+ 23 matchNextJmp table@(_ , JmpBack : _) = nextInst table
+ 24 matchNextJmp table@(_ , JmpPast : _) = (matchNextJmp . jumpPast) table
+ 25 matchNextJmp table = jumpPast table
+ 26
+ 27 jumpPast :: TableD
+ 28 jumpPast = matchNextJmp . nextInst
+ 29
+ 30 jumpBack :: TableD
+ 31 jumpBack = matchPrevJmp . prevInst
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html
new file mode 100644
index 000000000..df2083506
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols (
+ 2 FullTape,
+ 3 newTape,
+ 4 moveHeadRight,
+ 5 moveHeadLeft,
+ 6 wNextSymbol,
+ 7 wPrevSymbol,
+ 8 writeSymbol
+ 9 ) where
+ 10
+ 11 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 12
+ 13 ----
+ 14
+ 15 type D a = a -> a
+ 16 type FullTape e = (HalfTape e , HalfTape e)
+ 17 type FullTapeD e = D (FullTape e)
+ 18
+ 19 type HalfTape e = [e]
+ 20
+ 21 ----
+ 22
+ 23 newTape :: (Symbol e) => FullTape e
+ 24 newTape = ([def] , [def])
+ 25
+ 26 moveHeadRight :: (Symbol e) => FullTapeD e
+ 27 moveHeadRight (cell:left , right) = pad (left , cell:right)
+ 28 moveHeadRight ([] , _) = error "End of the Tape"
+ 29
+ 30 moveHeadLeft :: (Symbol e) => FullTapeD e
+ 31 moveHeadLeft (left , cell:right) = pad (cell:left , right)
+ 32 moveHeadLeft (_ , []) = error "End of the Tape"
+ 33
+ 34 pad :: (Symbol e) => FullTapeD e
+ 35 pad ([] , []) = newTape
+ 36 pad ([] , right) = ([def] , right)
+ 37 pad (left , []) = (left , [def])
+ 38 pad tape = tape
+ 39
+ 40 ----
+ 41
+ 42 wNextSymbol :: (Symbol e) => FullTapeD e
+ 43 wNextSymbol = modifyCell next
+ 44
+ 45 wPrevSymbol :: (Symbol e) => FullTapeD e
+ 46 wPrevSymbol = modifyCell prev
+ 47
+ 48 writeSymbol :: (Symbol e) => Char -> FullTapeD e
+ 49 writeSymbol symbol = modifyCell (const $ fromChar symbol)
+ 50
+ 51 modifyCell :: D e -> FullTapeD e
+ 52 modifyCell f (left , cell:right) = (left , f cell:right)
+ 53 modifyCell _ (_ , []) = error "End of the Tape"
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html
new file mode 100644
index 000000000..378891022
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Cat.Automaton (
+ 2 evalParams,
+ 3 eval
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automaton.API.EvalParams
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 9
+ 10 evalParams :: BIO m => EvalParams -> m ()
+ 11 evalParams = eval . source
+ 12
+ 13 eval :: BusinessIO m => Source -> m ()
+ 14 eval = wPutStr
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html
new file mode 100644
index 000000000..277ad958a
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Addressing (
+ 2 genericFindAddress,
+ 3 findAddress,
+ 4 genericNextLabel,
+ 5 nextLabel
+ 6 ) where
+ 7
+ 8 import HelVM.HelMA.Automata.ETA.Symbol
+ 9 import HelVM.HelMA.Automata.ETA.Token
+ 10
+ 11 import HelVM.HelIO.Containers.LLIndexSafe
+ 12
+ 13 import HelVM.HelIO.Control.Safe
+ 14
+ 15 import Data.ListLike hiding (show)
+ 16
+ 17 import Prelude hiding (length, splitAt)
+ 18
+ 19 import qualified Data.Vector as Vector
+ 20
+ 21 ----
+ 22
+ 23 genericFindAddress :: (MonadSafe m , Integral cell) => Vector.Vector Token -> cell -> m InstructionAddress
+ 24 genericFindAddress il = findAddress il . fromIntegral
+ 25
+ 26 findAddress :: MonadSafe m => Vector.Vector Token -> Int -> m InstructionAddress
+ 27 findAddress _ 1 = pure 0
+ 28 findAddress il address = appendErrorTupleList [("il" , show il) , ("address" , show address)] ((+1) <$> indexSafe (Vector.elemIndices R il) (address-2))
+ 29
+ 30 ----
+ 31
+ 32 genericNextLabel :: Integral cell => Vector.Vector Token -> InstructionAddress -> cell
+ 33 genericNextLabel il = fromIntegral . nextLabel il
+ 34
+ 35 nextLabel :: Vector.Vector Token -> InstructionAddress -> Int
+ 36 nextLabel il ic = length (Vector.elemIndices R il') + 2 where (il' , _) = splitAt ic il
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html
new file mode 100644
index 000000000..281881e0e
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 ) where
+ 6
+ 7 import HelVM.HelMA.Automata.ETA.Evaluator
+ 8 import HelVM.HelMA.Automata.ETA.Lexer
+ 9 import HelVM.HelMA.Automata.ETA.OperandParsers
+ 10 import HelVM.HelMA.Automata.ETA.Symbol
+ 11 import HelVM.HelMA.Automata.ETA.Token
+ 12
+ 13 import HelVM.HelMA.Automaton.API.EvalParams
+ 14 import HelVM.HelMA.Automaton.API.IOTypes
+ 15
+ 16 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 17 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 18
+ 19 import HelVM.HelMA.Automaton.Types.DumpType
+ 20 import HelVM.HelMA.Automaton.Types.StackType
+ 21
+ 22 import HelVM.HelIO.Collections.SList as SList
+ 23
+ 24 import Prelude hiding (divMod)
+ 25
+ 26 import qualified Data.Sequence as Seq
+ 27 import qualified Data.Vector as Vector
+ 28
+ 29 simpleEval :: BIO m => (Bool , Source , StackType) -> m ()
+ 30 simpleEval (c , s , t) = eval c s t Pretty
+ 31
+ 32 ----
+ 33
+ 34 evalParams :: BIO m => EvalParams -> m ()
+ 35 evalParams p = eval (compile p) (source p) (stackTypeOptions p) (dumpTypeOptions p)
+ 36
+ 37 eval :: (Evaluator Symbol m) => Bool -> Source -> StackType -> DumpType -> m ()
+ 38 eval compile source = evalTL compile (tokenize source)
+ 39
+ 40 evalTL :: (Evaluator Symbol m) => Bool -> TokenList -> StackType -> DumpType -> m ()
+ 41 evalTL c tl ListStackType = start c tl []
+ 42 evalTL c tl SeqStackType = start c tl Seq.empty
+ 43 evalTL c tl SListStackType = start c tl SList.sListEmpty
+ 44
+ 45 start :: (SEvaluator Symbol s m) => Bool -> TokenList -> s -> DumpType -> m ()
+ 46 start _ tl s dt = logDump dt =<< next (IU (Vector.fromList tl) 0) s
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html
new file mode 100644
index 000000000..50abd12dd
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Evaluator (
+ 2 next,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.ETA.Addressing
+ 6 import HelVM.HelMA.Automata.ETA.OperandParsers
+ 7 import HelVM.HelMA.Automata.ETA.Token
+ 8
+ 9 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 10
+ 11 import HelVM.HelMA.Automaton.Units.ALU as Stack
+ 12
+ 13 import Control.Type.Operator
+ 14
+ 15 import Prelude hiding (divMod)
+ 16
+ 17 next :: (SEvaluator e s m) => InstructionUnit -> s -> m $ Unit s
+ 18 next iu s = doInstruction' =<< nextIU iu where doInstruction' (t , iu') = doInstruction t iu' s
+ 19
+ 20 doInstruction :: (SEvaluator e s m) => Maybe Token -> InstructionUnit -> s -> m $ Unit s
+ 21 -- | IO instructions
+ 22 doInstruction (Just O) iu s = next iu =<< doOutputChar2 s
+ 23 doInstruction (Just I) iu s = next iu =<< doInputChar2 s
+ 24
+ 25 -- | Stack instructions
+ 26 doInstruction (Just N) iu s = next' =<< parseNumber iu where next' (symbol , iu') = next iu' (push1 symbol s)
+ 27 doInstruction (Just H) iu s = next iu =<< halibut s
+ 28
+ 29 -- | Arithmetic
+ 30 doInstruction (Just S) iu s = next iu =<< sub s
+ 31 doInstruction (Just E) iu s = next iu =<< divMod s
+ 32
+ 33 -- | Control
+ 34 doInstruction (Just R) iu s = next iu s
+ 35 doInstruction (Just A) iu@(IU il ic) s = (next iu . flipPush1 s . genericNextLabel il) ic
+ 36 doInstruction (Just T) iu@(IU il _ ) s = transfer =<< pop2 s where
+ 37 transfer (_ , 0 , s') = next iu s'
+ 38 transfer (0 , _ , _ ) = doEnd iu s
+ 39 transfer (l , _ , s') = next' =<< genericFindAddress il l where next' address = next (IU il address) s'
+ 40 doInstruction Nothing iu s = doEnd iu s
+ 41
+ 42 -- | Terminate instruction
+ 43 doEnd :: (SEvaluator e s m) => InstructionUnit -> s -> m $ Unit s
+ 44 doEnd iu s = pure $ Unit iu s
+ 45
+ 46 -- | Types
+ 47
+ 48 data Unit s = Unit
+ 49 { unitIU :: !InstructionUnit
+ 50 , unitStack :: s
+ 51 }
+ 52 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html
new file mode 100644
index 000000000..cdb64831c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.ETA.Token
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelIO.Util
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.WrapTokenList
+ 9
+ 10 -- | Lexer
+ 11 tokenize :: Source -> TokenList
+ 12 tokenize = whiteTokenListToTokenList . unWrapTokenList . readTokens
+ 13
+ 14 readTokens :: Source -> WhiteTokens
+ 15 readTokens source = (readTextUnsafe . toUppers) source :: WhiteTokens
+ 16
+ 17 -- | Types
+ 18 type WhiteTokens = WrapTokenList WhiteTokenList
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html
new file mode 100644
index 000000000..b04a053b3
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.OperandParsers where
+ 2
+ 3 import HelVM.HelMA.Automata.ETA.Symbol
+ 4 import HelVM.HelMA.Automata.ETA.Token
+ 5
+ 6 import HelVM.HelIO.Containers.LLIndexSafe
+ 7 import HelVM.HelIO.Control.Safe
+ 8 import HelVM.HelIO.Digit.ToDigit
+ 9
+ 10 import qualified Data.Vector as Vector
+ 11
+ 12 parseNumber :: (MonadSafe m , Integral a) => OperandIUParser m a
+ 13 parseNumber iu = go [] =<< nextIU iu where
+ 14 go :: (MonadSafe m , Integral a) => TokenList -> (Maybe Token, InstructionUnit) -> m (a, InstructionUnit)
+ 15 go acc (Nothing , iu') = ( , iu') <$> makeIntegral7FromList acc
+ 16 go acc (Just E , iu') = ( , iu') <$> makeIntegral7FromList acc
+ 17 go acc (Just R , iu') = go acc =<< nextIU iu'
+ 18 go acc (Just t , iu') = go (t : acc) =<< nextIU iu'
+ 19
+ 20 nextIU :: MonadSafe m => OperandIUParser m (Maybe Token)
+ 21 nextIU iu@(IU il ic)
+ 22 | ic < Vector.length il = wrap <$> indexSafe il ic
+ 23 | otherwise = pure (Nothing , iu)
+ 24 where wrap i = (Just i, IU il (ic+1))
+ 25
+ 26 -- | Types
+ 27 data InstructionUnit = IU !TokenVector !InstructionCounter
+ 28 deriving stock (Eq , Read , Show )
+ 29
+ 30 type OperandIUParser m a = InstructionUnit -> m (a , InstructionUnit)
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html
new file mode 100644
index 000000000..ee376a36d
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Token where
+ 2
+ 3 import HelVM.HelIO.Control.Safe
+ 4 import HelVM.HelIO.Digit.ToDigit
+ 5
+ 6 import Data.Vector as Vector
+ 7
+ 8 import qualified Text.Read
+ 9 import qualified Text.Show
+ 10
+ 11 data Token = E | T | A | O | I | N | S | H | R
+ 12 deriving stock (Bounded , Enum , Eq , Read , Show )
+ 13
+ 14 type TokenList = [Token]
+ 15 type TokenVector = Vector Token
+ 16
+ 17 instance ToDigit Token where
+ 18 toDigit H = pure 0
+ 19 toDigit T = pure 1
+ 20 toDigit A = pure 2
+ 21 toDigit O = pure 3
+ 22 toDigit I = pure 4
+ 23 toDigit N = pure 5
+ 24 toDigit S = pure 6
+ 25 toDigit t = liftErrorWithPrefix "Wrong token" $ show t
+ 26
+ 27 ----
+ 28
+ 29 newtype WhiteToken = WhiteToken { unWhiteToken :: Token}
+ 30 deriving stock (Eq )
+ 31
+ 32 type WhiteTokenList = [WhiteToken]
+ 33
+ 34 instance Show WhiteToken where
+ 35 show (WhiteToken R) = "\n"
+ 36 show (WhiteToken t) = show t
+ 37
+ 38 -- | Scanner
+ 39 instance Read WhiteToken where
+ 40 readsPrec _ "\n" = [( WhiteToken R , "")]
+ 41 readsPrec _ "E" = [( WhiteToken E , "")]
+ 42 readsPrec _ "T" = [( WhiteToken T , "")]
+ 43 readsPrec _ "A" = [( WhiteToken A , "")]
+ 44 readsPrec _ "O" = [( WhiteToken O , "")]
+ 45 readsPrec _ "I" = [( WhiteToken I , "")]
+ 46 readsPrec _ "N" = [( WhiteToken N , "")]
+ 47 readsPrec _ "S" = [( WhiteToken S , "")]
+ 48 readsPrec _ "H" = [( WhiteToken H , "")]
+ 49 readsPrec _ _ = []
+ 50
+ 51 tokenToWhiteTokenPair :: Token -> (WhiteToken , String)
+ 52 tokenToWhiteTokenPair t = (WhiteToken t , "")
+ 53
+ 54 whiteTokenListToTokenList :: WhiteTokenList -> TokenList
+ 55 whiteTokenListToTokenList = fmap unWhiteToken
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html
new file mode 100644
index 000000000..89e5d37a4
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Rev.Automaton (
+ 2 evalParams,
+ 3 eval
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automaton.API.EvalParams
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 9
+ 10 import qualified Data.Text as Text
+ 11
+ 12 evalParams :: BIO m => EvalParams -> m ()
+ 13 evalParams = eval . source
+ 14
+ 15 eval :: BusinessIO m => Source -> m ()
+ 16 eval = evalLines . lines
+ 17
+ 18 evalLines :: BusinessIO m => [Source] -> m ()
+ 19 evalLines ll = doOutput $ unlines $ Text.reverse <$> ll
+ 20
+ 21 doOutput :: BusinessIO m => Source -> m ()
+ 22 doOutput = wPutStr
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html
new file mode 100644
index 000000000..f8508b74b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 ) where
+ 6
+ 7 import HelVM.HelMA.Automata.SubLeq.Evaluator
+ 8 import HelVM.HelMA.Automata.SubLeq.Lexer
+ 9
+ 10 import HelVM.HelMA.Automaton.API.EvalParams
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 15
+ 16 import HelVM.HelMA.Automaton.Types.DumpType
+ 17 import HelVM.HelMA.Automaton.Types.RAMType
+ 18
+ 19 import qualified HelVM.HelIO.Collections.MapList as MapList
+ 20 import qualified HelVM.HelIO.Collections.SList as SList
+ 21
+ 22 import qualified Data.Sequence as Seq
+ 23
+ 24 simpleEval :: BIO m => RAMType -> Source -> m ()
+ 25 simpleEval rt s = eval s rt Pretty
+ 26
+ 27 ----
+ 28
+ 29 evalParams :: BIO m => EvalParams -> m ()
+ 30 evalParams p = eval (source p) (ramTypeOptions p) (dumpTypeOptions p)
+ 31
+ 32 eval :: BIO m => Source -> RAMType -> DumpType -> m ()
+ 33 eval source = evalIL $ tokenize source
+ 34
+ 35 evalIL :: Evaluator e m => [e] -> RAMType -> DumpType -> m ()
+ 36 evalIL = flip evalIL'
+ 37
+ 38 evalIL' :: Evaluator e m => RAMType -> [e] -> DumpType -> m ()
+ 39 evalIL' ListRAMType = start
+ 40 evalIL' SeqRAMType = start . Seq.fromList
+ 41 evalIL' SListRAMType = start . SList.sListFromList
+ 42 evalIL' MapListRAMType = start . MapList.mapListFromList
+ 43
+ 44 start :: REvaluator e r m => r -> DumpType -> m ()
+ 45 start r dt = logDump dt =<< doInstruction 0 r
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html
new file mode 100644
index 000000000..d442c9f2e
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Evaluator (
+ 2 doInstruction,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 6 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 7
+ 8 import HelVM.HelMA.Automaton.Units.RAM as RAM
+ 9
+ 10 import Control.Type.Operator
+ 11
+ 12 doInstruction :: REvaluator e r m => e -> r -> m $ Unit e r
+ 13 doInstruction ic ram
+ 14 | ic < 0 = doEnd ic ram
+ 15 | src < 0 = doInputChar dst ic ram
+ 16 | dst < 0 = doOutputChar src ic ram
+ 17 | otherwise = doInstruction ic' $ store dst diff ram
+ 18 where
+ 19 src = genericLoad ram ic
+ 20 dst = genericLoad ram $ ic + 1
+ 21 diff = genericLoad ram dst - genericLoad ram src
+ 22 ic'
+ 23 | diff <= 0 = genericLoad ram $ ic + 2
+ 24 | otherwise = ic + 3
+ 25
+ 26 -- | IO instructions
+ 27 doOutputChar :: REvaluator e r m => e -> e -> r -> m $ Unit e r
+ 28 doOutputChar address ic ram = wPutAsChar (genericLoad ram address) *> doInstruction (ic+3) ram
+ 29
+ 30 doInputChar :: REvaluator e r m => e -> e -> r -> m $ Unit e r
+ 31 doInputChar address ic ram = doInputChar' =<< wGetChar where
+ 32 doInputChar' char = doInstruction (ic+3) $ storeChar address char ram
+ 33
+ 34 -- | Terminate instruction
+ 35 doEnd :: REvaluator e r m => e -> r -> m $ Unit e r
+ 36 doEnd ic ram = pure $ Unit ic ram
+ 37
+ 38 -- | Types
+ 39 data Unit ic ram = Unit
+ 40 { unitIU :: ic
+ 41 , unitRAM :: ram
+ 42 }
+ 43 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html
new file mode 100644
index 000000000..beead8144
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.SubLeq.Symbol
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelIO.Util
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8
+ 9 import qualified Text.Read as Read
+ 10 import qualified Text.Show as Show
+ 11
+ 12 tokenize :: Source -> SymbolList
+ 13 tokenize source = (maybeToList . readTextMaybe) =<< splitOneOf " \t\n" source
+ 14
+ 15 readSymbols :: Source -> Symbols
+ 16 readSymbols source = readTextUnsafe source :: Symbols
+ 17
+ 18 ----
+ 19
+ 20 newtype Symbols = Symbols SymbolList
+ 21
+ 22 instance Show Symbols where
+ 23 show (Symbols symbols) = toString $ unwords $ shows symbols
+ 24
+ 25 instance Read Symbols where
+ 26 readsPrec _ source = [( Symbols $ tokenize $ toText source , "")]
+ 27
+ 28 ----
+ 29
+ 30 shows :: SymbolList -> [Text]
+ 31 shows symbols = show <$> symbols
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html
new file mode 100644
index 000000000..758410503
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 evalIL,
+ 6 evalTL,
+ 7 start,
+ 8 ) where
+ 9
+ 10 import HelVM.HelMA.Automata.WhiteSpace.Evaluator
+ 11 import HelVM.HelMA.Automata.WhiteSpace.Lexer
+ 12 import HelVM.HelMA.Automata.WhiteSpace.Parser
+ 13 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 14 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 15
+ 16 import HelVM.HelMA.Automaton.API.EvalParams
+ 17 import HelVM.HelMA.Automaton.API.IOTypes
+ 18
+ 19 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 20 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 21
+ 22 import HelVM.HelMA.Automaton.Instruction
+ 23
+ 24 import HelVM.HelMA.Automaton.Units.CPU as CPU
+ 25
+ 26 import HelVM.HelMA.Automaton.Types.DumpType
+ 27 import HelVM.HelMA.Automaton.Types.RAMType
+ 28 import HelVM.HelMA.Automaton.Types.StackType
+ 29 import HelVM.HelMA.Automaton.Types.TokenType
+ 30
+ 31 import HelVM.HelIO.Control.Safe
+ 32
+ 33 import Prelude hiding (swap)
+ 34
+ 35 import qualified HelVM.HelMA.Automata.WhiteSpace.SimpleParams as S
+ 36
+ 37 import qualified HelVM.HelIO.Collections.MapList as MapList
+ 38 import qualified HelVM.HelIO.Collections.SList as SList
+ 39
+ 40 import qualified Data.Sequence as Seq
+ 41 import qualified Data.Vector as Vector
+ 42
+ 43 simpleEval :: BIO m => S.SimpleParams -> m ()
+ 44 simpleEval p = eval (S.tokenType p) (S.source p) (S.asciiLabel p) (S.stackType p) (S.ramType p) (S.dumpType p)
+ 45
+ 46 ----
+ 47
+ 48 evalParams :: BIO m => TokenType -> EvalParams -> m ()
+ 49 evalParams tokenType p = eval tokenType (source p) (asciiLabel p) (stackTypeOptions p) (ramTypeOptions p) (dumpTypeOptions p)
+ 50
+ 51 eval :: BIO m => TokenType -> Source -> Bool -> StackType -> RAMType -> DumpType -> m ()
+ 52 eval tokenType source = evalTL $ tokenize tokenType source
+ 53
+ 54 evalTL :: BIO m => TokenList -> Bool -> StackType -> RAMType -> DumpType -> m ()
+ 55 evalTL tl ascii st rt dt = evalTL' =<< liftSafe (parseTL ascii tl) where evalTL' il = evalIL il st rt dt
+ 56
+ 57 evalIL :: BIO m => InstructionList -> StackType -> RAMType -> DumpType -> m ()
+ 58 evalIL il s ListRAMType = evalIL' il s []
+ 59 evalIL il s SeqRAMType = evalIL' il s Seq.empty
+ 60 evalIL il s SListRAMType = evalIL' il s SList.sListEmpty
+ 61 evalIL il s MapListRAMType = evalIL' il s MapList.mapListEmpty
+ 62
+ 63 evalIL' :: (REvaluator Symbol r m) => InstructionList -> StackType -> r -> DumpType -> m ()
+ 64 evalIL' il ListStackType = start il []
+ 65 evalIL' il SeqStackType = start il Seq.empty
+ 66 evalIL' il SListStackType = start il SList.sListEmpty
+ 67
+ 68 start :: (SREvaluator Symbol s r m) => InstructionList -> s -> r -> DumpType -> m ()
+ 69 start il s r dt = logDump dt =<< next (CU (Vector.fromList il) 0 (IS [])) s r
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html
new file mode 100644
index 000000000..313df0c28
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Evaluator (
+ 2 next
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 6
+ 7 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 8
+ 9 import HelVM.HelMA.Automaton.Instruction
+ 10
+ 11 import HelVM.HelMA.Automaton.Units.ALU as Stack
+ 12 import HelVM.HelMA.Automaton.Units.CPU as CPU
+ 13 import HelVM.HelMA.Automaton.Units.LSU as LSU
+ 14 import HelVM.HelMA.Automaton.Units.Unit
+ 15
+ 16 import HelVM.HelIO.Containers.LLIndexSafe
+ 17
+ 18 import Control.Type.Operator
+ 19
+ 20 import Prelude hiding (swap)
+ 21
+ 22 next :: (SREvaluator Symbol s r m) => ControlUnit -> s -> r -> m $ Unit s r
+ 23 next (CU il ic is) s r = doInstruction' =<< indexSafe il ic where doInstruction' i = doInstruction i (CU il (ic+1) is) s r
+ 24
+ 25 stackNext :: (SREvaluator Symbol s r m) => ControlUnit -> r -> s -> m (Unit s r)
+ 26 stackNext cu r s = next cu s r
+ 27
+ 28 cuNext :: (SREvaluator Symbol s r m) => r -> ControlUnit -> s -> m (Unit s r)
+ 29 cuNext r cu s = next cu s r
+ 30
+ 31 ----
+ 32
+ 33 doInstruction :: (SREvaluator Symbol s r m) => Instruction -> ControlUnit -> s -> r -> m (Unit s r)
+ 34 doInstruction (IAL i) cu s r = stackNext cu r =<< alInstruction i s
+ 35 doInstruction (ILS i) cu s r = uncurry (next cu) . sluToTuple =<< slInstruction i (LSU s r)
+ 36 doInstruction (IControl i) cu s r = uncurry (cuNext r). cpuToTuple =<< controlInstruction i (CPU cu s)
+ 37 doInstruction End cu s r = pure $ Unit cu s r
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html
new file mode 100644
index 000000000..ac7fd28f0
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelMA.Automaton.API.IOTypes
+ 7 import HelVM.HelMA.Automaton.Types.TokenType
+ 8 import HelVM.HelMA.Automaton.WrapTokenList
+ 9
+ 10 -- | Lexer
+ 11
+ 12 tokenize :: TokenType -> Source -> TokenList
+ 13 tokenize VisibleTokenType = tokenizeVisible
+ 14 tokenize _ = tokenizeWhite
+ 15
+ 16 tokenizeVisible :: Source -> TokenList
+ 17 tokenizeVisible = unWrapTokenList . readVisibleTokens
+ 18
+ 19 tokenizeWhite :: Source -> TokenList
+ 20 tokenizeWhite = whiteTokenListToTokenList . unWrapTokenList . readWhiteTokens
+ 21
+ 22 readVisibleTokens :: Source -> VisibleTokens
+ 23 readVisibleTokens source = readTextUnsafe source :: VisibleTokens
+ 24
+ 25 readWhiteTokens :: Source -> WhiteTokens
+ 26 readWhiteTokens source = readTextUnsafe source :: WhiteTokens
+ 27
+ 28 type VisibleTokens = WrapTokenList TokenList
+ 29
+ 30 type WhiteTokens = WrapTokenList WhiteTokenList
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html
new file mode 100644
index 000000000..10bbf0b57
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.OperandParsers where
+ 2
+ 3 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 4 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 5
+ 6 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 7
+ 8 import HelVM.HelIO.Collections.SList
+ 9 import HelVM.HelIO.Control.Safe
+ 10 import HelVM.HelIO.Digit.ToDigit
+ 11
+ 12 type OperandParser m a = TokenList -> m (a , TokenList)
+ 13
+ 14 ----
+ 15
+ 16 parseIndex :: MonadSafe m => OperandParser m Index
+ 17 parseIndex = parseInt
+ 18
+ 19 parseSymbol :: MonadSafe m => OperandParser m Symbol
+ 20 parseSymbol = parseInteger
+ 21
+ 22 parseLabel :: MonadSafe m => Bool -> OperandParser m Label
+ 23 parseLabel False = parseDigitString
+ 24 parseLabel True = parseAsciiString
+ 25
+ 26 ----
+ 27
+ 28 parseInt :: MonadSafe m => OperandParser m Int
+ 29 parseInt tl = parseInt' <$> parseInteger tl where
+ 30 parseInt' (integer , tl') = (fromIntegral integer , tl')
+ 31
+ 32 parseInteger :: MonadSafe m => OperandParser m Integer
+ 33 parseInteger [] = liftError "EOL"
+ 34 parseInteger (S : tl) = parseUtil makeIntegral2FromList tl
+ 35 parseInteger (T : tl) = negationIntegral <$> parseUtil makeIntegral2FromList tl
+ 36 parseInteger (N : tl) = pure (0 , tl )
+ 37
+ 38 negationIntegral :: (Integer , TokenList) -> (Integer , TokenList)
+ 39 negationIntegral (i , l) = (-i , l)
+ 40
+ 41 parseNatural :: MonadSafe m => OperandParser m Natural
+ 42 parseNatural = parseUtil makeIntegral2FromList
+ 43
+ 44 parseUtil :: MonadSafe m => (TokenList -> m a) -> OperandParser m a
+ 45 parseUtil maker = go ([] :: TokenList) where
+ 46 go acc [] = liftError $ show acc
+ 47 go acc (N:tl) = moveSafe (maker acc , tl)
+ 48 go acc (t:tl) = go (t : acc) tl
+ 49
+ 50 parseDigitString :: MonadSafe m => OperandParser m SString
+ 51 parseDigitString tl = moveSafe =<< parseString' makeDigitStringFromList tl
+ 52
+ 53 parseAsciiString :: MonadSafe m => OperandParser m SString
+ 54 parseAsciiString tl = moveSafe =<< parseString' makeAsciiString28FromList tl
+ 55
+ 56 moveSafe :: MonadSafe m => (m a , TokenList) -> m (a , TokenList)
+ 57 moveSafe (a , tl) = appendErrorTuple ("TokenList" , show tl) $ ( , tl) <$> a
+ 58
+ 59 parseString' :: MonadSafe m => (TokenList -> a) -> OperandParser m a
+ 60 parseString' maker tl = parseString'' <$> splitByN tl where
+ 61 parseString'' (acc , tl') = (maker acc , tl')
+ 62
+ 63 splitByN :: MonadSafe m => OperandParser m TokenList
+ 64 splitByN [] = liftError "Empty list"
+ 65 splitByN (N : tl) = pure ([] , tl)
+ 66 splitByN (t : tl) = splitByN' <$> splitByN tl where
+ 67 splitByN' (acc , tl') = (t:acc , tl')
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html
new file mode 100644
index 000000000..8f77e63a7
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Parser (
+ 2 flipParseVisible,
+ 3 flipParseWhite,
+ 4 parseVisible,
+ 5 parseWhite,
+ 6 parse,
+ 7 parseTL
+ 8 ) where
+ 9
+ 10 import HelVM.HelMA.Automata.WhiteSpace.Lexer
+ 11 import HelVM.HelMA.Automata.WhiteSpace.OperandParsers
+ 12 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 13
+ 14
+ 15 import HelVM.HelMA.Automaton.API.IOTypes
+ 16
+ 17 import HelVM.HelMA.Automaton.Instruction
+ 18 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 19 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 20 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 21 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 22
+ 23 import HelVM.HelMA.Automaton.Types.TokenType
+ 24
+ 25 import HelVM.HelIO.Control.Safe
+ 26
+ 27 -- FIXME
+ 28 flipParseVisible :: Bool -> Source -> Safe InstructionList
+ 29 flipParseVisible = flip parseVisible
+ 30
+ 31 flipParseWhite :: Bool -> Source -> Safe InstructionList
+ 32 flipParseWhite = flip parseWhite
+ 33
+ 34 parseVisible :: Source -> Bool -> Safe InstructionList
+ 35 parseVisible = parse VisibleTokenType
+ 36
+ 37 parseWhite :: Source -> Bool -> Safe InstructionList
+ 38 parseWhite = parse WhiteTokenType
+ 39
+ 40 parse :: MonadSafe m => TokenType -> Source -> Bool -> m InstructionList
+ 41 parse tokenType = flip parseTL . tokenize tokenType
+ 42
+ 43 parseTL :: MonadSafe m => Bool -> TokenList -> m InstructionList
+ 44 parseTL ascii = go where
+ 45 go :: MonadSafe m => TokenList -> m InstructionList
+ 46 go [] = pure []
+ 47 -- | IAL instructions
+ 48 go (S:S:tl') = go' =<< parseSymbol tl' where go' (symbol , tl'') = (IAL (Cons symbol) : ) <$> go tl''
+ 49 go (S:T:S:tl') = go' =<< parseIndex tl' where go' (index , tl'') = (IAL (SStatic index Copy) : ) <$> go tl''
+ 50 go (S:T:T:tl') = panic "STT" tl'
+ 51 go (S:T:N:tl') = go' =<< parseIndex tl' where go' (index , tl'') = (IAL (SStatic index Slide) : ) <$> go tl''
+ 52 go (S:N:S:tl') = (IAL Dup : ) <$> go tl'
+ 53 go (S:N:T:tl') = (IAL Swap : ) <$> go tl'
+ 54 go (S:N:N:tl') = (IAL Discard : ) <$> go tl'
+ 55 --Arithmetic
+ 56 go (T:S:S:S:tl') = (IAL (Binary Add) : ) <$> go tl'
+ 57 go (T:S:S:T:tl') = (IAL (Binary Sub) : ) <$> go tl'
+ 58 go (T:S:S:N:tl') = (IAL (Binary Mul) : ) <$> go tl'
+ 59 go (T:S:T:S:tl') = (IAL (Binary Div) : ) <$> go tl'
+ 60 go (T:S:T:T:tl') = (IAL (Binary Mod) : ) <$> go tl'
+ 61 go (T:S:T:N:tl') = panic "TSTN" tl'
+ 62 go (T:S:N:S:tl') = panic "TSNS" tl'
+ 63 go (T:S:N:T:tl') = panic "TSNT" tl'
+ 64 go (T:S:N:N:tl') = panic "TSNN" tl'
+ 65 -- | Heap access
+ 66 go (T:T:S:tl') = (ILS Store : ) <$> go tl'
+ 67 go (T:T:T:tl') = (ILS Load : ) <$> go tl'
+ 68 go (T:T:N:tl') = panic "TTN" tl'
+ 69 -- | IControl
+ 70 go (N:S:S:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (Mark label) : ) <$> go tl''
+ 71 go (N:S:T:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label Call ) : ) <$> go tl''
+ 72 go (N:S:N:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label Jump ) : ) <$> go tl''
+ 73 go (N:T:S:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label (Branch EZ)) : ) <$> go tl''
+ 74 go (N:T:T:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label (Branch LTZ)) : ) <$> go tl''
+ 75 go (N:T:N:tl') = (IControl Return : ) <$> go tl'
+ 76 go (N:N:S:tl') = panic "NNS" tl'
+ 77 go (N:N:T:tl') = panic "NNT" tl'
+ 78 go (N:N:N:tl') = (End : ) <$> go tl'
+ 79 -- | IO instructions
+ 80 go (T:N:S:S:tl') = (IAL (SIO OutputChar) : ) <$> go tl'
+ 81 go (T:N:S:T:tl') = (IAL (SIO OutputDec) : ) <$> go tl'
+ 82 go (T:N:S:N:tl') = panic "TNSN" tl'
+ 83 go (T:N:T:S:tl') = (ILS (MIO InputChar) : ) <$> go tl'
+ 84 go (T:N:T:T:tl') = (ILS (MIO InputDec) : ) <$> go tl'
+ 85 go (T:N:T:N:tl') = panic "TNTN" tl'
+ 86 go (T:N:N:S:tl') = panic "TNNS" tl'
+ 87 go (T:N:N:T:tl') = panic "TNNT" tl'
+ 88 go (T:N:N:N:tl') = panic "TNNN" tl'
+ 89 go tl' = panic (show tl') []
+ 90
+ 91 panic :: MonadSafe m => Text -> TokenList -> m InstructionList
+ 92 panic token tl = liftErrorTupleList [("Unrecognised tokenl" , token) , ("Rest tokens" , show tl)]
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html
new file mode 100644
index 000000000..7097b0beb
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.SimpleParams where
+ 2
+ 3 import HelVM.HelMA.Automaton.API.IOTypes
+ 4 import HelVM.HelMA.Automaton.Types.DumpType
+ 5 import HelVM.HelMA.Automaton.Types.RAMType
+ 6 import HelVM.HelMA.Automaton.Types.StackType
+ 7 import HelVM.HelMA.Automaton.Types.TokenType
+ 8
+ 9 -- | Construction for tests
+ 10 simpleParamsWithDefaultsAndWhiteTokenType :: Bool -> Source -> SimpleParams
+ 11 simpleParamsWithDefaultsAndWhiteTokenType = simpleParamsWithDefaults WhiteTokenType
+ 12
+ 13 simpleParamsWithDefaultsAndVisibleTokenType :: Bool -> Source -> SimpleParams
+ 14 simpleParamsWithDefaultsAndVisibleTokenType = simpleParamsWithDefaults VisibleTokenType
+ 15
+ 16 simpleParamsWithDefaults :: TokenType -> Bool -> Source -> SimpleParams
+ 17 simpleParamsWithDefaults tt = simpleParams tt (defaultStackType , defaultRAMType)
+ 18
+ 19 -- | Construction for benchmark
+ 20 simpleParamsWithWhiteTokenType :: (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 21 simpleParamsWithWhiteTokenType = simpleParams WhiteTokenType
+ 22
+ 23 simpleParamsWithVisibleTokenType :: (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 24 simpleParamsWithVisibleTokenType = simpleParams VisibleTokenType
+ 25
+ 26 simpleParams :: TokenType -> (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 27 simpleParams tt (st , rt) al s = SimpleParams
+ 28 { tokenType = tt
+ 29 , source = s
+ 30 , asciiLabel = al
+ 31 , stackType = st
+ 32 , ramType = rt
+ 33 , dumpType = Pretty
+ 34 }
+ 35
+ 36 -- | Type
+ 37 data SimpleParams = SimpleParams
+ 38 { tokenType :: !TokenType
+ 39 , source :: !Source
+ 40 , asciiLabel :: !Bool
+ 41 , stackType :: !StackType
+ 42 , ramType :: !RAMType
+ 43 , dumpType :: !DumpType
+ 44 }
+ 45
+ 46
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html
new file mode 100644
index 000000000..6cb7c3008
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Token where
+ 2
+ 3 import HelVM.HelIO.Collections.SList
+ 4 import HelVM.HelIO.Control.Safe
+ 5 import HelVM.HelIO.Digit.ToDigit
+ 6
+ 7 import Text.Read
+ 8
+ 9 import qualified Text.Show
+ 10
+ 11 data Token = S | T | N
+ 12 deriving stock (Bounded , Enum , Eq , Read , Show )
+ 13
+ 14 type TokenList = [Token]
+ 15 type TokenSList = SList Token
+ 16
+ 17 instance ToDigit Token where
+ 18 toDigit S = pure 0
+ 19 toDigit T = pure 1
+ 20 toDigit t = liftErrorWithPrefix "Wrong token" $ show t
+ 21
+ 22 ----
+ 23
+ 24 newtype WhiteToken = WhiteToken { unWhiteToken :: Token}
+ 25 deriving stock (Eq )
+ 26
+ 27 instance Show WhiteToken where
+ 28 show (WhiteToken S) = " "
+ 29 show (WhiteToken T) = "\t"
+ 30 show (WhiteToken N) = "\n"
+ 31
+ 32 -- | Scanner
+ 33 instance Read WhiteToken where
+ 34 readsPrec _ " " = [( WhiteToken S , "")]
+ 35 readsPrec _ "\t" = [( WhiteToken T , "")]
+ 36 readsPrec _ "\n" = [( WhiteToken N , "")]
+ 37 readsPrec _ _ = []
+ 38
+ 39 type WhiteTokenList = [WhiteToken]
+ 40
+ 41 whiteTokenListToTokenList :: WhiteTokenList -> TokenList
+ 42 whiteTokenListToTokenList = fmap unWhiteToken
+ 43
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html
new file mode 100644
index 000000000..5aabe2f22
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Automaton (
+ 2 evalParams,
+ 3 eval,
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automata.Zot.Evaluator
+ 7 import HelVM.HelMA.Automata.Zot.Expression
+ 8 import HelVM.HelMA.Automata.Zot.Parser
+ 9
+ 10 import HelVM.HelMA.Automaton.API.EvalParams
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14
+ 15 import HelVM.HelIO.Containers.Util
+ 16 import HelVM.HelIO.Control.Safe
+ 17
+ 18 import HelVM.HelIO.Digit.Digitable
+ 19 import HelVM.HelIO.Digit.ToDigit
+ 20
+ 21 import HelVM.HelIO.ListLikeUtil
+ 22
+ 23 import Control.Monad.Writer.Lazy
+ 24
+ 25 evalParams :: BIO m => EvalParams -> m ()
+ 26 evalParams p = wPutStr =<< eval (asciiLabel p) (source p) =<< wGetContents
+ 27
+ 28 eval :: MonadSafe m => Bool -> Source -> Input -> m Output
+ 29 eval False source input = pure $ showFoldable $ evalSource source input
+ 30 eval True source input = (makeAsciiText28 . convert . evalSource source) . showExpressionList =<< textToDL input
+ 31
+ 32 evalSource :: Source -> Input -> ExpressionDList
+ 33 evalSource source input = evalText $ source <> input
+ 34
+ 35 evalText :: Text -> ExpressionDList
+ 36 evalText = execWriter . evalExpressionList . parse
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html
new file mode 100644
index 000000000..6a1b85405
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Evaluator (
+ 2 evalExpressionList,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.Zot.Expression
+ 6
+ 7 import Control.Monad.Writer.Lazy
+ 8
+ 9 import qualified Data.ListLike as LL
+ 10
+ 11 -- | High-level Expressions
+ 12 evalExpressionList :: ExpressionList -> Out Expression
+ 13 evalExpressionList el = foldExpression el >><< outputExpression >>< printExpression
+ 14
+ 15 foldExpression :: ExpressionList -> Out Expression
+ 16 foldExpression = foldM (><) emptyExpression
+ 17
+ 18 emptyExpression :: Expression
+ 19 emptyExpression = contExpression iExpression
+ 20
+ 21 outputExpression :: Out Expression
+ 22 outputExpression = kExpression ><< kExpression ><< kExpression ><< kExpression ><< kExpression ><< kExpression >< iExpression
+ 23
+ 24 printExpression :: Expression
+ 25 printExpression = Expression innerPrintExpression
+ 26
+ 27 innerPrintExpression :: Expression -> Out Expression
+ 28 innerPrintExpression f = interrogateExpression f >>< Zero >>< One >>= tell . LL.singleton >> pure printExpression
+ 29
+ 30 interrogateExpression :: Expression -> Out Expression
+ 31 interrogateExpression f = f >< iExpression >>< iExpression >>< iExpression >>< kExpression
+ 32
+ 33 -- | Operators
+ 34 infixl 9 ><
+ 35 (><) :: Expression -> Expression -> Out Expression
+ 36 (><) Zero = (zeroExpression ><)
+ 37 (><) One = (oneExpression ><)
+ 38 (><) (Expression f) = f
+ 39
+ 40 infixl 6 >><
+ 41 (>><) :: Out Expression -> Expression -> Out Expression
+ 42 f >>< a = f >>= (>< a)
+ 43
+ 44 infixr 8 ><<
+ 45 (><<) :: Expression -> Out Expression -> Out Expression
+ 46 f ><< a = (f ><) =<< a
+ 47
+ 48 infixl 7 >><<
+ 49 (>><<) :: Out Expression -> Out Expression -> Out Expression
+ 50 f >><< a = f >>= (><< a)
+ 51
+ 52
+ 53 -- | Low-level Expressions
+ 54 zeroExpression :: Expression
+ 55 zeroExpression = contExpression $ Expression $ \ f -> f >< sExpression >>< kExpression
+ 56
+ 57 oneExpression :: Expression
+ 58 oneExpression = makeExpression $ \c -> contExpression $ makeExpression $ \l -> contExpression $ Expression $ \r -> c ><< l >< r
+ 59
+ 60 contExpression :: Expression -> Expression
+ 61 contExpression = Expression . flip (><)
+ 62
+ 63 sExpression :: Expression
+ 64 sExpression = makeExpression $ \x -> makeExpression $ \y -> Expression $ \z -> x >< z >><< y >< z
+ 65
+ 66 kExpression :: Expression
+ 67 kExpression = makeExpression $ makeExpression . const
+ 68
+ 69 iExpression :: Expression
+ 70 iExpression = makeExpression id
+ 71
+ 72 makeExpression :: (Expression -> Expression) -> Expression
+ 73 makeExpression f = Expression $ pure . f
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html
new file mode 100644
index 000000000..1176a44b3
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Expression where
+ 2
+ 3 import HelVM.HelIO.Control.Safe
+ 4
+ 5 import HelVM.HelIO.Containers.Util
+ 6 import HelVM.HelIO.Digit.Digitable
+ 7 import HelVM.HelIO.Digit.ToDigit
+ 8
+ 9 import Control.Monad.Writer.Lazy
+ 10
+ 11 import qualified Data.DList as D
+ 12
+ 13 import Text.Read
+ 14 import qualified Text.Show
+ 15
+ 16 showExpressionList :: ExpressionList -> Text
+ 17 showExpressionList = showFoldable
+ 18
+ 19 readExpressionList :: Text -> ExpressionList
+ 20 readExpressionList = stringToExpressionList . toString
+ 21
+ 22 stringToExpressionList :: String -> ExpressionList
+ 23 stringToExpressionList s = charToExpressionList =<< s
+ 24
+ 25 charToExpressionList :: Char -> ExpressionList
+ 26 charToExpressionList = maybeToList . rightToMaybe . charToExpressionSafe
+ 27
+ 28 charToExpression :: Char -> Expression
+ 29 charToExpression = unsafe . charToExpressionSafe
+ 30
+ 31 charToExpressionSafe :: MonadSafe m => Char -> m Expression
+ 32 charToExpressionSafe '0' = pure Zero
+ 33 charToExpressionSafe '1' = pure One
+ 34 charToExpressionSafe c = liftErrorWithPrefix "charToExpression" $ one c
+ 35
+ 36 -- | Types
+ 37 type ExpressionDList = D.DList Expression
+ 38
+ 39 type ExpressionList = [Expression]
+ 40
+ 41 data Expression = Zero | One | Expression (Expression -> Out Expression)
+ 42
+ 43 type Out = Writer ExpressionDList
+ 44
+ 45 instance Read Expression where
+ 46 readsPrec _ [] = []
+ 47 readsPrec _ (c : s) = [(charToExpression c , s)]
+ 48 readList s = [(stringToExpressionList s , "")]
+ 49
+ 50 instance Show Expression where
+ 51 show Zero = "0"
+ 52 show One = "1"
+ 53 show (Expression _) = "function"
+ 54 showList fs = (concatMap show fs <>)
+ 55
+ 56 instance Digitable Expression where
+ 57 fromDigit 0 = pure Zero
+ 58 fromDigit 1 = pure One
+ 59 fromDigit t = wrongToken t
+ 60
+ 61 instance ToDigit Expression where
+ 62 toDigit Zero = pure 0
+ 63 toDigit One = pure 1
+ 64 toDigit t = wrongToken t
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html
new file mode 100644
index 000000000..d8a3a6160
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Parser (
+ 2 parse,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.Zot.Expression
+ 6
+ 7 import qualified Data.Text as Text
+ 8
+ 9 parse :: Text -> ExpressionList
+ 10 parse = concatMap parseLine . lines
+ 11
+ 12 parseLine :: Text -> ExpressionList
+ 13 parseLine = readExpressionList . filter01 . Text.takeWhile (/= '#')
+ 14
+ 15 filter01 :: Text -> Text
+ 16 filter01 = Text.filter is01
+ 17
+ 18 is01 :: Char -> Bool
+ 19 is01 c = c == '0' || c == '1'
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html
new file mode 100644
index 000000000..8b25d1153
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.API.EvalParams where
+ 2
+ 3 import HelVM.HelMA.Automaton.API.IOTypes
+ 4 import HelVM.HelMA.Automaton.API.TypeOptions
+ 5
+ 6 import HelVM.HelMA.Automaton.Types.CellType
+ 7 import HelVM.HelMA.Automaton.Types.DumpType
+ 8 import HelVM.HelMA.Automaton.Types.IntCellType
+ 9 import HelVM.HelMA.Automaton.Types.RAMType
+ 10 import HelVM.HelMA.Automaton.Types.StackType
+ 11
+ 12 -- | Accessors
+ 13 ramTypeOptions :: EvalParams -> RAMType
+ 14 ramTypeOptions = ram . typeOptions
+ 15
+ 16 stackTypeOptions :: EvalParams -> StackType
+ 17 stackTypeOptions = stack . typeOptions
+ 18
+ 19 cellTypeOptions :: EvalParams -> CellType
+ 20 cellTypeOptions = cell . typeOptions
+ 21
+ 22 intCellTypeOptions :: EvalParams -> IntCellType
+ 23 intCellTypeOptions = intCell . typeOptions
+ 24
+ 25 dumpTypeOptions :: EvalParams -> DumpType
+ 26 dumpTypeOptions = dumpType . typeOptions
+ 27
+ 28 -- | Type
+ 29 data EvalParams = EvalParams
+ 30 { compile :: !Bool
+ 31 , asciiLabel :: !Bool
+ 32 , source :: !Source
+ 33 , typeOptions :: !TypeOptions
+ 34 }
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html
new file mode 100644
index 000000000..363cc695b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.API.TypeOptions where
+ 2
+ 3 import HelVM.HelMA.Automaton.Types.CellType
+ 4 import HelVM.HelMA.Automaton.Types.DumpType
+ 5 import HelVM.HelMA.Automaton.Types.IntCellType
+ 6 import HelVM.HelMA.Automaton.Types.RAMType
+ 7 import HelVM.HelMA.Automaton.Types.StackType
+ 8
+ 9 -- | Types
+ 10
+ 11 data TypeOptions = TypeOptions
+ 12 { ram :: !RAMType
+ 13 , stack :: !StackType
+ 14 , cell :: !CellType
+ 15 , intCell :: !IntCellType
+ 16 , dumpType :: !DumpType
+ 17 }
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html
new file mode 100644
index 000000000..031ebb36b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.IO.BusinessIO (
+ 2
+ 3 Element,
+ 4 BIO,
+ 5 BusinessIO,
+ 6
+ 7 wPutAsChar,
+ 8 wPutAsDec,
+ 9 wGetCharAs,
+ 10 wGetDecAs,
+ 11
+ 12 -- wPutIntAsChar,
+ 13 -- wPutIntAsDec,
+ 14 -- wGetCharAsInt,
+ 15 -- wGetDecAsInt,
+ 16
+ 17 wGetChar,
+ 18 wPutChar,
+ 19 wGetLine,
+ 20 wGetContents,
+ 21 wPutStr,
+ 22 wPutStrLn,
+ 23 wFlush,
+ 24 wLogStr,
+ 25 wLogStrLn,
+ 26 wLogShow,
+ 27
+ 28 logStr,
+ 29 flush,
+ 30 ) where
+ 31
+ 32 import HelVM.HelIO.Control.Control
+ 33 import HelVM.HelIO.Control.Safe
+ 34
+ 35 import HelVM.HelIO.ReadText
+ 36
+ 37 import Data.Default as Default
+ 38 import Data.Text.IO (getContents)
+ 39
+ 40 import System.IO hiding (getContents, getLine, hFlush, stderr, stdout)
+ 41
+ 42 type Element e = (ReadShow e , Integral e , Default e)
+ 43 type ReadShow e = (Read e , Show e)
+ 44 type BIO m = (MonadControl m , BusinessIO m)
+ 45
+ 46 class Monad m => BusinessIO m where
+ 47
+ 48 wPutAsChar :: Integral v => v -> m ()
+ 49 wPutAsDec :: Integral v => v -> m ()
+ 50 wGetCharAs :: Integral v => m v
+ 51 wGetDecAs :: Integral v => m v
+ 52
+ 53 wPutIntAsChar :: Int -> m ()
+ 54 wPutIntAsDec :: Int -> m ()
+ 55 wGetCharAsInt :: m Int
+ 56 wGetDecAsInt :: m Int
+ 57
+ 58 wGetChar :: m Char
+ 59 wGetLine :: m Text
+ 60 wGetContents :: m Text
+ 61 wPutChar :: Char -> m ()
+ 62 wPutStr :: Text -> m ()
+ 63 wPutStrLn :: Text -> m ()
+ 64 wLogStr :: Text -> m ()
+ 65 wLogStrLn :: Text -> m ()
+ 66 wLogShow :: Show s => s -> m ()
+ 67 wFlush :: m ()
+ 68
+ 69 wPutAsChar = wPutIntAsChar . fromIntegral
+ 70 wPutAsDec = wPutIntAsDec . fromIntegral
+ 71 wGetCharAs = fromIntegral <$> wGetCharAsInt
+ 72 wGetDecAs = fromIntegral <$> wGetDecAsInt
+ 73
+ 74 wPutIntAsChar = wPutChar . chr
+ 75 wPutIntAsDec = wPutStr . show
+ 76 wGetCharAsInt = ord <$> wGetChar
+ 77 wGetDecAsInt = readTextUnsafe <$> wGetLine
+ 78
+ 79 wPutStrLn s = wPutStr $ s <> "\n"
+ 80 wLogStrLn s = wLogStr $ s <> "\n"
+ 81 wLogShow = wLogStrLn . show
+ 82 wFlush = pass
+ 83
+ 84 logStr :: Text -> IO ()
+ 85 logStr = hPutStrLn stderr . toString
+ 86
+ 87 flush :: IO ()
+ 88 flush = hFlush stdout
+ 89
+ 90 instance BusinessIO IO where
+ 91 wGetChar = getChar
+ 92 wGetLine = getLine
+ 93 wGetContents = getContents
+ 94 wPutChar = putChar
+ 95 wPutStr = putText
+ 96 wPutStrLn = putTextLn
+ 97 wLogStr = logStr
+ 98 wFlush = flush
+ 99
+ 100 type ExceptTLegacy = ExceptT String
+ 101
+ 102 exceptTLegacy :: Monad m => m a -> ExceptTLegacy m a
+ 103 exceptTLegacy a = ExceptT $ pure <$> a
+ 104
+ 105 instance BusinessIO (ExceptT String IO) where --FIXXME
+ 106 wGetChar = exceptTLegacy getChar
+ 107 wGetLine = exceptTLegacy getLine
+ 108 wGetContents = exceptTLegacy getContents
+ 109 wPutChar = exceptTLegacy . putChar
+ 110 wPutStr = exceptTLegacy . putText
+ 111 wPutStrLn = exceptTLegacy . putTextLn
+ 112 wLogStr = exceptTLegacy . logStr
+ 113 wFlush = exceptTLegacy flush
+ 114
+ 115 instance BusinessIO (SafeT IO) where
+ 116 wGetChar = safeT getChar
+ 117 wGetLine = safeT getLine
+ 118 wGetContents = safeT getContents
+ 119 wPutChar = safeT . putChar
+ 120 wPutStr = safeT . putText
+ 121 wPutStrLn = safeT . putTextLn
+ 122 wLogStr = safeT . logStr
+ 123 wFlush = safeT flush
+ 124
+ 125 instance BusinessIO (ControlT IO) where
+ 126 wGetChar = controlT getChar
+ 127 wGetLine = controlT getLine
+ 128 wGetContents = controlT getContents
+ 129 wPutChar = controlT . putChar
+ 130 wPutStr = controlT . putText
+ 131 wPutStrLn = controlT . putTextLn
+ 132 wLogStr = controlT . logStr
+ 133 wFlush = controlT flush
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html
new file mode 100644
index 000000000..6d53f1fda
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 {-# LANGUAGE DeriveFunctor #-}
+ 2 module HelVM.HelMA.Automaton.IO.FreeIO (
+ 3 interpretFreeIOToBusinessIO,
+ 4 logInput,
+ 5 logOutput,
+ 6 FreeIO,
+ 7 ) where
+ 8
+ 9 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 10
+ 11 import HelVM.HelIO.Control.Control
+ 12 import HelVM.HelIO.Control.Safe
+ 13
+ 14 import Control.Monad.Free
+ 15 import Control.Natural
+ 16
+ 17 interpretFreeIOToBusinessIO :: BusinessIO m => FreeIO a -> m a
+ 18 interpretFreeIOToBusinessIO = foldFree interpretFreeIOFToBusinessIO
+ 19
+ 20 logInput :: FreeIO ~> FreeIO
+ 21 logInput = foldFree logInputF
+ 22
+ 23 logOutput :: FreeIO ~> FreeIO
+ 24 logOutput = foldFree logOutputF
+ 25
+ 26 ----
+ 27
+ 28 interpretFreeIOFToBusinessIO :: BusinessIO m => FreeIOF a -> m a
+ 29 interpretFreeIOFToBusinessIO (GetChar cd) = cd <$> wGetChar
+ 30 interpretFreeIOFToBusinessIO (GetLine cd) = cd <$> wGetLine
+ 31 interpretFreeIOFToBusinessIO (GetContents cd) = cd <$> wGetContents
+ 32 interpretFreeIOFToBusinessIO (PutChar c v) = wPutChar c $> v
+ 33 interpretFreeIOFToBusinessIO (PutStr s v) = wPutStr s $> v
+ 34 interpretFreeIOFToBusinessIO (PutStrLn s v) = wPutStrLn s $> v
+ 35 interpretFreeIOFToBusinessIO (LogStr s v) = wLogStr s $> v
+ 36 interpretFreeIOFToBusinessIO (LogStrLn s v) = wLogStrLn s $> v
+ 37 interpretFreeIOFToBusinessIO (Flush v) = wFlush $> v
+ 38
+ 39 ----
+ 40
+ 41 logInputF :: FreeIOF a -> FreeIO a
+ 42 logInputF (GetChar cd) = freeGetChar >>= (\c -> liftF $ LogStr (one c) (cd c))
+ 43 logInputF (GetLine cd) = freeGetLine >>= (\l -> liftF $ LogStr l (cd l))
+ 44 logInputF (GetContents cd) = freeGetContents >>= (\l -> liftF $ LogStr l (cd l))
+ 45 logInputF f = liftF f
+ 46
+ 47 logOutputF :: FreeIOF a -> FreeIO a
+ 48 logOutputF f@(PutChar c v) = liftF (LogStr (one c) v) *> liftF f
+ 49 logOutputF f@(PutStr s v) = liftF (LogStr s v) *> liftF f
+ 50 logOutputF f = liftF f
+ 51
+ 52 -- | Instances
+ 53 instance BusinessIO FreeIO where
+ 54 wGetChar = freeGetChar
+ 55 wGetLine = freeGetLine
+ 56 wGetContents = freeGetContents
+ 57 wPutChar = freePutChar
+ 58 wPutStr = freePutStr
+ 59 wPutStrLn = freePutStrLn
+ 60 wLogStr = freeLogStr
+ 61 wLogStrLn = freeLogStrLn
+ 62 wFlush = freeFlush
+ 63
+ 64 instance BusinessIO (SafeT FreeIO) where
+ 65 wGetChar = safeT freeGetChar
+ 66 wGetLine = safeT freeGetLine
+ 67 wGetContents = safeT freeGetContents
+ 68 wPutChar = safeT . freePutChar
+ 69 wPutStr = safeT . freePutStr
+ 70 wPutStrLn = safeT . freePutStrLn
+ 71 wLogStr = safeT . freeLogStr
+ 72 wLogStrLn = safeT . freeLogStrLn
+ 73 wFlush = safeT freeFlush
+ 74
+ 75 instance BusinessIO (ControlT FreeIO) where
+ 76 wGetChar = controlT freeGetChar
+ 77 wGetLine = controlT freeGetLine
+ 78 wGetContents = controlT freeGetContents
+ 79 wPutChar = controlT . freePutChar
+ 80 wPutStr = controlT . freePutStr
+ 81 wPutStrLn = controlT . freePutStrLn
+ 82 wLogStr = controlT . freeLogStr
+ 83 wLogStrLn = controlT . freeLogStrLn
+ 84 wFlush = controlT freeFlush
+ 85
+ 86 -- | Low level functions
+ 87 freeGetChar :: FreeIO Char
+ 88 freeGetChar = liftF $ GetChar id
+ 89
+ 90 freeGetLine :: FreeIO Text
+ 91 freeGetLine = liftF $ GetLine id
+ 92
+ 93 freeGetContents :: FreeIO Text
+ 94 freeGetContents = liftF $ GetContents id
+ 95
+ 96 freePutChar :: Char -> FreeIO ()
+ 97 freePutChar = liftF . flip PutChar ()
+ 98
+ 99 freePutStr :: Text -> FreeIO ()
+ 100 freePutStr = liftF . flip PutStr ()
+ 101
+ 102 freePutStrLn :: Text -> FreeIO ()
+ 103 freePutStrLn = liftF . flip PutStrLn ()
+ 104
+ 105 freeLogStr :: Text -> FreeIO ()
+ 106 freeLogStr = liftF . flip LogStr ()
+ 107
+ 108 freeLogStrLn :: Text -> FreeIO ()
+ 109 freeLogStrLn = liftF . flip LogStrLn ()
+ 110
+ 111 freeFlush :: FreeIO ()
+ 112 freeFlush = liftF $ Flush ()
+ 113
+ 114 -- | Types
+ 115 type FreeIO = Free FreeIOF
+ 116
+ 117 data FreeIOF a
+ 118 = GetChar (Char -> a)
+ 119 | GetLine (Text -> a)
+ 120 | GetContents (Text -> a)
+ 121 | PutChar Char a
+ 122 | PutStr Text a
+ 123 | PutStrLn Text a
+ 124 | LogStr Text a
+ 125 | LogStrLn Text a
+ 126 | Flush a
+ 127 deriving stock (Functor )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html
new file mode 100644
index 000000000..4bbc46214
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.IO.MockIO (
+ 2 ioExecMockIOBatch,
+ 3 ioExecMockIOWithInput,
+ 4
+ 5 safeExecMockIOBatch,
+ 6 safeExecMockIOWithInput,
+ 7
+ 8 execMockIOBatch,
+ 9 execMockIOWithInput,
+ 10
+ 11 runMockIO,
+ 12 createMockIO,
+ 13 calculateOutput,
+ 14 calculateLogged,
+ 15
+ 16 MockIO,
+ 17 MockIOData,
+ 18 ) where
+ 19
+ 20 import HelVM.HelMA.Automaton.API.IOTypes
+ 21 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 22
+ 23 import HelVM.HelIO.Control.Control
+ 24 import HelVM.HelIO.Control.Safe
+ 25
+ 26 import HelVM.HelIO.ListLikeUtil
+ 27
+ 28 import Data.Text as Text
+ 29
+ 30 ioExecMockIOBatch :: ControlT MockIO () -> IO MockIOData
+ 31 ioExecMockIOBatch = ioExecMockIOWithInput ""
+ 32
+ 33 ioExecMockIOWithInput :: Input -> ControlT MockIO () -> IO MockIOData
+ 34 ioExecMockIOWithInput i = safeToIO . safeExecMockIOWithInput i
+ 35
+ 36 safeExecMockIOBatch :: ControlT MockIO () -> Safe MockIOData
+ 37 safeExecMockIOBatch = safeExecMockIOWithInput ""
+ 38
+ 39 safeExecMockIOWithInput :: Input -> ControlT MockIO () -> Safe MockIOData
+ 40 safeExecMockIOWithInput i = pure . runMockIO i . runControlT
+ 41
+ 42 execMockIOBatch :: MockIO () -> MockIOData
+ 43 execMockIOBatch = execMockIOWithInput ""
+ 44
+ 45 execMockIOWithInput :: Input -> MockIO () -> MockIOData
+ 46 execMockIOWithInput i a = runMockIO i $ safeWithMessages <$> a
+ 47
+ 48 ----
+ 49
+ 50 runMockIO :: Input -> MockIO UnitSafeWithMessages -> MockIOData
+ 51 runMockIO i mockIO = flip mockDataLogStr mockIOData $ safeWithMessagesToText s
+ 52 where (s , mockIOData) = runState mockIO $ createMockIO i
+ 53
+ 54 createMockIO :: Input -> MockIOData
+ 55 createMockIO i = MockIOData (toString i) "" ""
+ 56
+ 57 calculateOutput :: MockIOData -> Output
+ 58 calculateOutput = calculateText . output
+ 59
+ 60 calculateLogged :: MockIOData -> Output
+ 61 calculateLogged = calculateText . logged
+ 62
+ 63 ----
+ 64
+ 65 instance BusinessIO MockIO where
+ 66 wGetChar = mockGetChar
+ 67 wGetLine = mockGetLine
+ 68 wGetContents = mockGetContent
+ 69 wPutChar = mockPutChar
+ 70 wPutStr = mockPutStr
+ 71 wLogStr = mockLogStr
+ 72
+ 73 instance BusinessIO (SafeT MockIO) where
+ 74 wGetChar = safeT mockGetChar
+ 75 wGetLine = safeT mockGetLine
+ 76 wGetContents = safeT mockGetContent
+ 77 wPutChar = safeT . mockPutChar
+ 78 wPutStr = safeT . mockPutStr
+ 79 wLogStr = safeT . mockLogStr
+ 80
+ 81 instance BusinessIO (ControlT MockIO) where
+ 82 wGetChar = mockGetCharSafe
+ 83 wGetLine = mockGetLineSafe
+ 84 wGetContents = controlT mockGetContent
+ 85 wPutChar = controlT . mockPutChar
+ 86 wPutStr = controlT . mockPutStr
+ 87 wLogStr = controlT . mockLogStr
+ 88
+ 89 ----
+ 90
+ 91 mockGetChar :: MonadMockIO m => m Char
+ 92 mockGetChar = mockGetChar' =<< get where
+ 93 mockGetChar' :: MonadMockIO m => MockIOData -> m Char
+ 94 mockGetChar' mockIO = orErrorTuple ("mockGetChar" , show mockIO) (top (input mockIO)) <$ put mockIO { input = orErrorTuple ("mockGetChar" , show mockIO) $ discard $ input mockIO }
+ 95
+ 96 mockGetLine :: MonadMockIO m => m Text
+ 97 mockGetLine = mockGetLine' =<< get where
+ 98 mockGetLine' :: MonadMockIO m => MockIOData -> m Text
+ 99 mockGetLine' mockIO = toText line <$ put mockIO { input = input' } where (line , input') = splitStringByLn $ input mockIO
+ 100
+ 101 mockGetContent :: MonadMockIO m => m Text
+ 102 mockGetContent = mockGetContent' =<< get where
+ 103 mockGetContent' :: MonadMockIO m => MockIOData -> m Text
+ 104 mockGetContent' mockIO = toText content <$ put mockIO { input = "" } where content = input mockIO
+ 105
+ 106 mockGetCharSafe :: MonadControlMockIO m => m Char
+ 107 mockGetCharSafe = mockGetChar' =<< get where
+ 108 mockGetChar' :: MonadControlMockIO m => MockIOData -> m Char
+ 109 mockGetChar' mockIO = appendErrorTuple ("mockGetCharSafe" , show mockIO) $ mockGetChar'' =<< unconsSafe (input mockIO) where
+ 110 mockGetChar'' (c, input') = put mockIO { input = input' } $> c
+ 111
+ 112 mockGetLineSafe :: MonadControlMockIO m => m Text
+ 113 mockGetLineSafe = mockGetLine' =<< get where
+ 114 mockGetLine' :: MonadControlMockIO m => MockIOData -> m Text
+ 115 mockGetLine' mockIO = toText line <$ put mockIO { input = input' } where (line , input') = splitStringByLn $ input mockIO
+ 116
+ 117
+ 118 mockPutChar :: Char -> MockIO ()
+ 119 mockPutChar = modify . mockDataPutChar
+ 120
+ 121 mockPutStr :: Text -> MockIO ()
+ 122 mockPutStr = modify . mockDataPutStr
+ 123
+ 124 mockLogStr :: Text -> MockIO ()
+ 125 mockLogStr = modify . mockDataLogStr
+ 126
+ 127 ----
+ 128
+ 129 mockDataPutChar :: Char -> MockIOData -> MockIOData
+ 130 mockDataPutChar char mockIO = mockIO { output = char : output mockIO }
+ 131
+ 132 mockDataPutStr :: Text -> MockIOData -> MockIOData
+ 133 mockDataPutStr text mockIO = mockIO { output = calculateString text <> output mockIO }
+ 134
+ 135 mockDataLogStr :: Text -> MockIOData -> MockIOData
+ 136 mockDataLogStr text mockIO = mockIO { logged = calculateString text <> logged mockIO }
+ 137
+ 138 ----
+ 139
+ 140 type MonadControlMockIO m = (MonadMockIO m , MonadControl m)
+ 141
+ 142 --type MonadSafeMockIO m = (MonadMockIO m , MonadSafe m)
+ 143
+ 144 type MonadMockIO m = MonadState MockIOData m
+ 145
+ 146 type MockIO = State MockIOData
+ 147
+ 148 calculateText :: String -> Output
+ 149 calculateText = Text.reverse . toText
+ 150
+ 151 calculateString :: Output -> String
+ 152 calculateString = toString . Text.reverse
+ 153
+ 154 data MockIOData = MockIOData
+ 155 { input :: !String
+ 156 , output :: !String
+ 157 , logged :: !String
+ 158 }
+ 159 deriving stock (Eq , Read , Show )
+ 160
+ 161 ----
+ 162
+ 163 splitStringByLn :: String -> (String , String)
+ 164 splitStringByLn = splitBy '\n'
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html
new file mode 100644
index 000000000..55759ae7a
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.ALInstruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 4
+ 5 -- | Constructors
+ 6
+ 7 blAnd :: Bool -> BinaryInstruction
+ 8 blAnd False = BAnd
+ 9 blAnd True = LAnd
+ 10
+ 11 blOr :: Bool -> BinaryInstruction
+ 12 blOr False = BOr
+ 13 blOr True = LOr
+ 14
+ 15 blXor :: Bool -> BinaryInstruction
+ 16 blXor False = BXor
+ 17 blXor True = LXor
+ 18
+ 19 blEQ :: Bool -> BinaryInstruction
+ 20 blEQ False = BEQ
+ 21 blEQ True = LEQ
+ 22
+ 23 blGT :: Bool -> BinaryInstruction
+ 24 blGT False = BGT
+ 25 blGT True = LGT
+ 26
+ 27 -- | Other functions
+ 28
+ 29 calculateOps :: Integral a => a -> a -> [BinaryInstruction] -> [a]
+ 30 calculateOps operand operand' = map (calculateOp operand operand')
+ 31
+ 32 calculateOp :: Integral a => a -> a -> BinaryInstruction -> a
+ 33 calculateOp operand operand' operation = doBinary operation operand' operand
+ 34
+ 35 doBinary :: Integral a => BinaryInstruction -> a -> a -> a
+ 36 doBinary Add = (+)
+ 37 doBinary Sub = (-)
+ 38 doBinary Mul = (*)
+ 39 doBinary Div = div
+ 40 doBinary Mod = mod
+ 41 doBinary o = error $ show o
+ 42
+ 43 -- | Types
+ 44
+ 45 data ALInstruction =
+ 46 Cons Integer
+ 47 | Unary !UnaryInstruction
+ 48 | Binary !BinaryInstruction
+ 49 | Binaries [BinaryInstruction]
+ 50 | SStatic !StackIndex !ManipulationInstruction
+ 51 | SDynamic !ManipulationInstruction
+ 52 | SIO !IOInstruction
+ 53 | Halibut
+ 54 | Pick
+ 55 | Dup
+ 56 | Rot
+ 57 | Swap
+ 58 | Discard
+ 59 deriving stock (Eq , Read , Show )
+ 60
+ 61 data UnaryInstruction = Neg | BNot | LNot
+ 62 deriving stock (Eq , Read , Show )
+ 63
+ 64 data BinaryInstruction =
+ 65 Add | Sub | Mul | Div | Mod
+ 66 | BAnd | BOr | BXor | BEQ | BGT
+ 67 | LAnd | LOr | LXor | LEQ | LGT
+ 68 deriving stock (Eq , Read , Show )
+ 69
+ 70 data ManipulationInstruction = Copy | Move | Slide
+ 71 deriving stock (Eq , Read , Show )
+ 72
+ 73 type StackIndex = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html
new file mode 100644
index 000000000..458afdd15
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.ControlInstruction where
+ 2
+ 3 import HelVM.HelIO.Collections.SList
+ 4
+ 5 isNotJump :: Integral e => BranchTest -> e -> Bool
+ 6 isNotJump t = not . isJump t
+ 7
+ 8 isJump :: Integral e => BranchTest -> e -> Bool
+ 9 isJump EZ e = e == 0
+ 10 isJump LTZ e = e < 0
+ 11 isJump GTZ e = e > 0
+ 12
+ 13 -- | Types
+ 14 data ControlInstruction =
+ 15 Mark !Label
+ 16 | CStatic !Label !LabelInstruction
+ 17 | CDynamic !LabelInstruction
+ 18 | Return
+ 19 deriving stock (Eq , Read , Show )
+ 20
+ 21 type Label = SString
+ 22
+ 23 data LabelInstruction = Call | Jump | Branch !BranchTest
+ 24 deriving stock (Eq , Read , Show )
+ 25
+ 26 data BranchTest = EZ | LTZ | GTZ
+ 27 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html
new file mode 100644
index 000000000..95df8d9ea
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.IOInstruction where
+ 2
+ 3 data IOInstruction =
+ 4 OutputChar
+ 5 | OutputDec
+ 6 | InputChar
+ 7 | InputDec
+ 8 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html
new file mode 100644
index 000000000..8e565b994
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.LSInstruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 4
+ 5 -- | Types
+ 6
+ 7 data LSInstruction =
+ 8 Load --Restore --Fetch
+ 9 | Store --Save
+ 10 | MIO !IOInstruction
+ 11 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.hs.html
new file mode 100644
index 000000000..9d7132219
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Instruction.hs.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 4 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 5 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 6
+ 7 import Data.Vector as Vector
+ 8
+ 9 isMark :: Label -> Instruction -> Bool
+ 10 isMark l (IControl (Mark l')) = l == l'
+ 11 isMark _ _ = False
+ 12
+ 13 -- | Types
+ 14
+ 15 data Instruction =
+ 16 IAL !ALInstruction
+ 17 | ILS !LSInstruction
+ 18 | IControl !ControlInstruction
+ 19 | End
+ 20 deriving stock (Eq , Read , Show )
+ 21
+ 22 type InstructionList = [Instruction]
+ 23 type InstructionVector = Vector Instruction
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html
new file mode 100644
index 000000000..bf8caca64
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.CellType where
+ 2
+ 3 -- | Constructors
+ 4 parseCellType :: String -> CellType
+ 5 parseCellType raw = valid $ readMaybe raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "CellType '" <> toText raw <> "' is not valid CellType. Valid cellTypes are : " <> show cellTypes
+ 8
+ 9 defaultCellType :: CellType
+ 10 defaultCellType = Word8Type
+ 11
+ 12 cellTypes :: [CellType]
+ 13 cellTypes = [Int8Type , Word8Type , Int16Type , Word16Type , Int32Type , Word32Type , Int64Type , Word64Type]
+ 14
+ 15 -- | Types
+ 16 data CellType = Int8Type | Word8Type | Int16Type | Word16Type | Int32Type | Word32Type | Int64Type | Word64Type
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html
new file mode 100644
index 000000000..62ed08dbf
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.DumpType where
+ 2
+ 3 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 4
+ 5 import HelVM.HelIO.Control.Logger
+ 6
+ 7 import HelVM.HelIO.Util
+ 8
+ 9 logDump :: (BIO m , Show d) => DumpType -> d -> m ()
+ 10 logDump dt d = logDump' $ dump dt d where
+ 11 logDump' Nothing = pass
+ 12 logDump' (Just t) = logMessageTuple ("dump" , t)
+ 13
+ 14 dump :: Show a => DumpType -> a -> Maybe Text
+ 15 dump No _ = Nothing
+ 16 dump Ugly a = Just $ show a
+ 17 dump Pretty a = Just $ showP a
+ 18
+ 19 -- | Constructors
+ 20 parseDumpType :: String -> DumpType
+ 21 parseDumpType raw = (valid . readMaybe) raw where
+ 22 valid (Just value) = value
+ 23 valid Nothing = error $ "DumpType '" <> toText raw <> "' is not valid DumpType. Valid dumpTypes are : " <> show dumpTypes
+ 24
+ 25 defaultDumpType :: DumpType
+ 26 defaultDumpType = No
+ 27
+ 28 dumpTypes :: [DumpType]
+ 29 dumpTypes = [No , Ugly , Pretty]
+ 30
+ 31 -- | Types
+ 32 data DumpType = No | Ugly | Pretty
+ 33 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html
new file mode 100644
index 000000000..6820efd95
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.IntCellType where
+ 2
+ 3 -- | Constructors
+ 4 parseIntCellType :: String -> IntCellType
+ 5 parseIntCellType raw = (valid . readMaybe) raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "IntCellType '" <> toText raw <> "' is not valid IntCellType. Valid intCellTypes are : " <> show intCellTypes
+ 8
+ 9 defaultIntCellType :: IntCellType
+ 10 defaultIntCellType = IntegerType
+ 11
+ 12 intCellTypes :: [IntCellType]
+ 13 intCellTypes = [Int8Type , Int16Type , Int32Type , Int64Type , IntegerType]
+ 14
+ 15 -- | Types
+ 16 data IntCellType = Int8Type | Int16Type | Int32Type | Int64Type | IntegerType
+ 17 deriving stock (Bounded , Enum , Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html
new file mode 100644
index 000000000..73ff87384
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.RAMType where
+ 2
+ 3 -- | Constructors
+ 4 parseRAMType :: String -> RAMType
+ 5 parseRAMType raw = (valid . readMaybe) raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "RAMType '" <> toText raw <> "' is not valid RAMType. Valid ramTypes are : " <> show ramTypes
+ 8
+ 9 defaultRAMType :: RAMType
+ 10 defaultRAMType = MapListRAMType
+ 11
+ 12 ramTypes :: [RAMType]
+ 13 ramTypes = [ListRAMType , SeqRAMType , SListRAMType , MapListRAMType]
+ 14
+ 15 -- | Types
+ 16 data RAMType = ListRAMType | SeqRAMType | SListRAMType | MapListRAMType
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html
new file mode 100644
index 000000000..9b8c8627c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.StackType where
+ 2
+ 3 -- | Constructors
+ 4 parseStackType :: String -> StackType
+ 5 parseStackType raw = valid $ readMaybe raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "StackType '" <> toText raw <> "' is not valid StackType. Valid stackTypes are : " <> show stackTypes
+ 8
+ 9 defaultStackType :: StackType
+ 10 defaultStackType = SeqStackType
+ 11
+ 12 stackTypes :: [StackType]
+ 13 stackTypes = [ListStackType , SeqStackType , SListStackType]
+ 14
+ 15 -- | Types
+ 16 data StackType = ListStackType | SeqStackType | SListStackType
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html
new file mode 100644
index 000000000..66779bcac
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.TokenType where
+ 2
+ 3 import HelVM.HelIO.SwitchEnum
+ 4
+ 5 -- | Constructors
+ 6 parseTokenType:: String -> TokenType
+ 7 parseTokenType raw = valid $ readMaybe raw where
+ 8 valid (Just value) = value
+ 9 valid Nothing = error $ "'" <> toText raw <> "' is not valid TokenType. Valid tokenTypes are : " <> show tokenTypes
+ 10
+ 11 defaultTokenType :: TokenType
+ 12 defaultTokenType = defaultEnum
+ 13
+ 14 tokenTypes :: [TokenType]
+ 15 tokenTypes = bothEnums
+ 16
+ 17 -- | Types
+ 18 data TokenType = VisibleTokenType | WhiteTokenType
+ 19 deriving stock (Bounded , Enum , Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html
new file mode 100644
index 000000000..ea19db0d8
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.ALU (
+ 2 doOutputChar2,
+ 3 doInputChar2,
+ 4 doInputDec2,
+ 5 divMod,
+ 6 sub,
+ 7 binaryInstruction,
+ 8 binaryInstructions,
+ 9 halibut,
+ 10 alInstruction,
+ 11 move,
+ 12 swap,
+ 13 discard,
+ 14 slide,
+ 15 dup,
+ 16 copy,
+ 17 flipPush1,
+ 18 charPush1,
+ 19 genericPush1,
+ 20 pop1,
+ 21 pop2,
+ 22 push1,
+ 23 push2,
+ 24 splitAt,
+ 25 drop,
+ 26 ALU,
+ 27 Stack,
+ 28 ) where
+ 29
+ 30 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 31 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 32
+ 33 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 34
+ 35 import HelVM.HelIO.Control.Safe
+ 36
+ 37 import HelVM.HelIO.Containers.LLIndexSafe
+ 38
+ 39 import HelVM.HelIO.ListLikeUtil
+ 40
+ 41 import Data.ListLike hiding (show)
+ 42 import Prelude hiding (divMod, drop, fromList, splitAt, swap)
+ 43
+ 44
+ 45 alInstruction :: ALU m ll element => ALInstruction -> ll -> m ll
+ 46 alInstruction (Cons i ) = push i
+ 47 alInstruction (Unary op) = error $ show op
+ 48 alInstruction (Binary op) = binaryInstruction op
+ 49 alInstruction (SDynamic op) = dynamicManipulation op
+ 50 alInstruction (SStatic i op) = staticManipulation op i
+ 51 alInstruction (SIO OutputChar) = doOutputChar2
+ 52 alInstruction (SIO OutputDec) = doOutputDec2
+ 53 alInstruction (SIO InputChar) = doInputChar2
+ 54 alInstruction Halibut = halibut
+ 55 alInstruction Pick = pick
+ 56 alInstruction Dup = dup
+ 57 alInstruction Rot = rot
+ 58 alInstruction Swap = swap
+ 59 alInstruction Discard = discard
+ 60 alInstruction op = error $ show op
+ 61
+ 62 -- | Arithmetic instructions
+ 63 divMod :: ALU m ll element => ll -> m ll
+ 64 divMod = binaryInstructions [Mod , Div]
+ 65
+ 66 sub :: ALU m ll element => ll -> m ll
+ 67 sub = binaryInstruction Sub
+ 68
+ 69 binaryInstruction :: ALU m ll element => BinaryInstruction -> ll -> m ll
+ 70 binaryInstruction i = binaryInstructions [i]
+ 71
+ 72 binaryInstructions :: ALU m ll element => [BinaryInstruction] -> ll -> m ll
+ 73 binaryInstructions il l = binaryInstructions' <$> pop2 l where
+ 74 binaryInstructions' (e , e', l') = pushList (calculateOps e e' il) l'
+ 75
+ 76 -- | IO instructions
+ 77 doOutputChar2 :: ALU m ll element => ll -> m ll
+ 78 doOutputChar2 l = doOutputChar' =<< pop1 l where
+ 79 doOutputChar' (e , l') = wPutAsChar e $> l'
+ 80
+ 81 doOutputDec2 :: ALU m ll element => ll -> m ll
+ 82 doOutputDec2 l = doOutputDec' =<< pop1 l where
+ 83 doOutputDec' (e , l') = wPutAsDec e $> l'
+ 84
+ 85 doInputChar2 :: ALU m ll element => ll -> m ll
+ 86 doInputChar2 l = doInputChar' <$> wGetCharAs where
+ 87 doInputChar' e = push1 e l
+ 88
+ 89 doInputDec2 :: ALU m ll element => ll -> m ll
+ 90 doInputDec2 l = doInputChar' <$> wGetCharAs where
+ 91 doInputChar' e = push1 e l
+ 92
+ 93 -- | Manipulation instructions
+ 94 dynamicManipulation :: ALU m ll element => ManipulationInstruction -> ll -> m ll
+ 95 dynamicManipulation op l = dynamicManipulation' =<< unconsSafe l where
+ 96 dynamicManipulation' (e , l') = staticManipulation op (fromIntegral e) l'
+ 97
+ 98 staticManipulation :: ALU m ll element => ManipulationInstruction -> Index -> ll -> m ll
+ 99 staticManipulation Copy = copy
+ 100 staticManipulation Move = move
+ 101 staticManipulation Slide = slide
+ 102
+ 103 -- | Halibut and Pick instructions
+ 104 halibut :: ALU m ll element => ll -> m ll
+ 105 halibut l = halibut' =<< pop1 l where
+ 106 halibut' (e , l')
+ 107 | 0 < i = move i l'
+ 108 | otherwise = copy (negate i) l'
+ 109 where i = fromIntegral e
+ 110
+ 111 pick :: ALU m ll element => ll -> m ll
+ 112 pick l = pick' =<< pop1 l where
+ 113 pick' (e , l')
+ 114 | 0 <= i = copy i l'
+ 115 | otherwise = move (negate i) l'
+ 116 where i = fromIntegral e
+ 117
+ 118 -- | Slide instructions
+ 119 slide :: ALU m ll element => Index -> ll -> m ll
+ 120 slide i l = slide' <$> pop1 l where
+ 121 slide' (e , l') = push1 e $ drop i l'
+ 122
+ 123 -- | Move instructions
+ 124 rot :: ALU m ll element => ll -> m ll
+ 125 rot = move 2
+ 126
+ 127 swap :: ALU m ll element => ll -> m ll
+ 128 swap = move 1
+ 129
+ 130 move :: ALU m ll element => Index -> ll -> m ll
+ 131 move i l = pure $ l1 <> l2 <> l3 where
+ 132 (l1 , l3) = splitAt 1 l'
+ 133 (l2 , l') = splitAt i l
+ 134
+ 135 -- | Copy instructions
+ 136 dup :: ALU m ll element => ll -> m ll
+ 137 dup = copy 0
+ 138
+ 139 copy :: ALU m ll element => Index -> ll -> m ll
+ 140 copy i l = flipPush1 l <$> l `indexSafe` i
+ 141
+ 142 -- | Pop instructions
+ 143 pop1 :: ALU m ll element => ll -> m (element , ll)
+ 144 pop1 l = appendErrorTuple ("l" , show l) $ unconsSafe l
+ 145
+ 146 pop2 :: ALU m ll element => ll -> m (element , element , ll)
+ 147 pop2 l = appendErrorTuple ("l" , show l) $ uncons2Safe l
+ 148
+ 149 -- | Push instructions
+ 150 push :: ALU m ll element => Integer -> ll -> m ll
+ 151 push i l = pure $ genericPush1 i l
+ 152
+ 153 flipPush1 :: Stack ll element => ll -> element -> ll
+ 154 flipPush1 = flip push1
+ 155
+ 156 charPush1 :: (Num element , Stack ll element) => Char -> ll -> ll
+ 157 charPush1 = genericPush1 . ord
+ 158
+ 159 genericPush1 :: (Integral v , Num element , Stack ll element) => v -> ll -> ll
+ 160 genericPush1 = push1 . fromIntegral
+ 161
+ 162 push1 :: Stack ll element => element -> ll -> ll
+ 163 push1 e = pushList [e]
+ 164
+ 165 push2 :: Stack ll element => element -> element -> ll -> ll
+ 166 push2 e e' = pushList [e , e']
+ 167
+ 168 pushList :: Stack ll element => [element] -> ll -> ll
+ 169 pushList es l = fromList es <> l
+ 170
+ 171 -- | Types
+ 172 type ALU m ll element = (BIO m , Stack ll element , Integral element)
+ 173
+ 174 type Stack ll element = (Show ll , ListLike ll element , IndexSafe ll element)
+ 175
+ 176 type Index = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html
new file mode 100644
index 000000000..e01d03cd4
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.CPU where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.ALU
+ 4
+ 5 import HelVM.HelMA.Automaton.Instruction
+ 6 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 7
+ 8 import HelVM.HelIO.Control.Safe
+ 9
+ 10 import Control.Type.Operator
+ 11
+ 12 import Data.ListLike hiding (show)
+ 13
+ 14 controlInstruction :: (ALU m ll element , Show element) => ControlInstruction -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 15 --controlInstruction :: ALU m ll element => ControlInstruction -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 16 controlInstruction (Mark _ ) = pure
+ 17 controlInstruction Return = popAddress
+ 18 controlInstruction (CDynamic Call ) = dynamicCall
+ 19 controlInstruction (CDynamic Jump ) = dynamicJump
+ 20 controlInstruction (CDynamic (Branch t)) = dynamicBranch t
+ 21 controlInstruction (CStatic l Call ) = staticCall l
+ 22 controlInstruction (CStatic l Jump ) = staticJump l
+ 23 controlInstruction (CStatic l (Branch t)) = staticBranch l t
+ 24
+ 25 popAddress :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 26 popAddress (CPU (CU il _ (IS (a : is))) s) = pure $ CPU (CU il a $ IS is) s
+ 27 popAddress (CPU (CU il _ (IS [] )) _) = liftErrorWithTupleList "Empty Return Stack" [("il" , show il)]
+ 28
+ 29 dynamicCall :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 30 dynamicCall (CPU (CU il ic (IS is)) s) = call <$> pop1 s where
+ 31 call (a , s') = CPU (CU il (fromIntegral a) (IS (ic : is))) s'
+ 32
+ 33 dynamicJump :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 34 dynamicJump (CPU (CU il _ is) s) = jump <$> pop1 s where
+ 35 jump (a , s') = CPU (CU il (fromIntegral a) is) s'
+ 36
+ 37 dynamicBranch :: (ALU m ll element , Show element) => BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 38 --dynamicBranch :: ALU m ll element => BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 39 dynamicBranch t (CPU (CU il ic is) s) = branch =<< pop2 s where
+ 40 -- dynamicBranch' (l , e , s') = liftErrorTupleList [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 41 branch (l , e , s')
+ 42 | isNotJump t e = liftErrorWithTupleList "isNotJump" [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 43 -- | isNotJump t e = pure $ CPU (CU il ic is) s'
+ 44 | otherwise = liftErrorWithTupleList "otherwise" [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 45 -- | otherwise = jump <$> findAddress il (show l) where jump ic' = CPU (CU il ic' is) s'
+ 46
+ 47 staticCall :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 48 staticCall l (CPU (CU il ic (IS is)) s) = call <$> findAddress il l where
+ 49 call a = CPU (CU il a (IS (ic : is))) s
+ 50
+ 51 staticJump :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 52 staticJump l (CPU (CU il _ is) s) = jump <$> findAddress il l where
+ 53 jump a = CPU (CU il a is) s
+ 54
+ 55 staticBranch :: ALU m ll element => Label -> BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 56 staticBranch l t (CPU (CU il ic is) s) = branch =<< pop1 s where
+ 57 branch (e , s')
+ 58 | isNotJump t e = pure $ CPU (CU il ic is) s'
+ 59 | otherwise = jump <$> findAddress il l where
+ 60 jump ic' = CPU (CU il ic' is) s'
+ 61
+ 62 findAddress :: MonadSafe m => InstructionVector -> Label -> m InstructionAddress
+ 63 findAddress il l = liftMaybeOrErrorTuple ("Undefined label", show l) $ findIndex (isMark l) il
+ 64
+ 65 cpuToTuple :: CentralProcessingUnit s -> (ControlUnit , s)
+ 66 cpuToTuple (CPU cu s) = (cu , s)
+ 67
+ 68 -- | Types
+ 69 data CentralProcessingUnit al = CPU
+ 70 { controlUnit :: ControlUnit
+ 71 , alu :: al
+ 72 }
+ 73 deriving stock (Show )
+ 74
+ 75 data ControlUnit = CU
+ 76 { program :: InstructionVector
+ 77 , programCounter :: InstructionCounter
+ 78 , returnStack :: InstructionStack
+ 79 }
+ 80 deriving stock (Show )
+ 81
+ 82 newtype InstructionStack = IS [InstructionAddress]
+ 83 deriving stock (Show )
+ 84
+ 85 type InstructionCounter = InstructionAddress
+ 86
+ 87 type InstructionAddress = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html
new file mode 100644
index 000000000..f06c468f8
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.LSU where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.ALU
+ 4 import qualified HelVM.HelMA.Automaton.Units.RAM as RAM
+ 5
+ 6 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 7
+ 8 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 9 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 10
+ 11 import Control.Type.Operator
+ 12
+ 13 slInstruction :: (LSU m s r element) => LSInstruction -> LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 14 slInstruction Load = load
+ 15 slInstruction Store = store
+ 16 slInstruction (MIO OutputChar) = loadOutputChar
+ 17 slInstruction (MIO OutputDec) = loadOutputDec
+ 18 slInstruction (MIO InputChar) = storeInputChar
+ 19 slInstruction (MIO InputDec) = storeInputDec
+ 20
+ 21 load :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 22 load (LSU s r) = load' <$> pop1 s where
+ 23 load' (address , s') = LSU (push1 (RAM.genericLoad r address) s') r
+ 24
+ 25 store :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 26 store (LSU s r) = store' <$> pop2 s where
+ 27 store' (value , address , s') = LSU s' $ RAM.store address value r
+ 28
+ 29 loadOutputChar :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 30 loadOutputChar (LSU s r) = loadOutputChar' =<< pop1 s where
+ 31 loadOutputChar' (address , s') = LSU s' r <$ wPutAsChar (RAM.genericLoad r address)
+ 32
+ 33 loadOutputDec :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 34 loadOutputDec (LSU s r) = doOutputDec' =<< pop1 s where
+ 35 doOutputDec' (address , s') = LSU s' r <$ wPutAsDec (RAM.genericLoad r address)
+ 36
+ 37 storeInputChar :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 38 storeInputChar (LSU s r) = storeInputChar' =<< pop1 s where
+ 39 storeInputChar' (address , s') = LSU s' . flip (RAM.store address) r <$> wGetCharAs
+ 40
+ 41 storeInputDec :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 42 storeInputDec (LSU s r) = storeInputDec' =<< pop1 s where
+ 43 storeInputDec' (address , s') = LSU s' . flip (RAM.store address) r <$> wGetDecAs
+ 44
+ 45 sluToTuple :: LoadStoreUnit s r -> (s , r)
+ 46 sluToTuple (LSU s r) = (s , r)
+ 47
+ 48 -- | Types
+ 49 type LSU m s r element = (ALU m s element , RAM.RAM r element)
+ 50
+ 51 data LoadStoreUnit s r = LSU
+ 52 { stack :: s
+ 53 , ram :: r
+ 54 }
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html
new file mode 100644
index 000000000..14c59981a
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.RAM (
+ 2 genericLoad,
+ 3 load,
+ 4 storeChar,
+ 5 genericStore,
+ 6 store,
+ 7 fromList,
+ 8 RAM,
+ 9 ) where
+ 10
+ 11 import HelVM.HelIO.Containers.LLIndexSafe
+ 12 import HelVM.HelIO.Containers.LLInsertDef
+ 13
+ 14 import Data.Default
+ 15 import Prelude hiding (divMod, drop, splitAt, swap)
+ 16
+ 17 genericLoad :: (Integral i , RAM ll element) => ll -> i -> element
+ 18 genericLoad l = load l . fromIntegral
+ 19
+ 20 load :: (RAM ll element) => ll -> Address -> element
+ 21 load l i = indexMaybe l i ?: def
+ 22
+ 23 storeChar :: (Num element , Integral address , RAM ll element) => address -> Char -> ll -> ll
+ 24 storeChar a char = genericStore a $ ord char
+ 25
+ 26 genericStore :: (Integral value , Num element , Integral address , RAM ll element) => address -> value -> ll -> ll
+ 27 genericStore a v = store a $ fromIntegral v
+ 28
+ 29 store :: (Integral a , RAM ll element) => a -> element -> ll -> ll
+ 30 store = insertDef . fromIntegral
+ 31
+ 32 -- | Types
+ 33 type RAM ll element = (Show ll , Default element , II ll element)
+ 34
+ 35 type II ll element = (InsertDef ll element , IndexSafe ll element)
+ 36
+ 37 type Address = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html
new file mode 100644
index 000000000..c8be4c41d
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.Unit where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.CPU
+ 4
+ 5 -- | Data types
+ 6 data Unit s r = Unit
+ 7 { unitCU :: ControlUnit
+ 8 , unitStack :: s
+ 9 , unitRAM :: r
+ 10 }
+ 11 deriving stock (Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html
new file mode 100644
index 000000000..41a99454c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.0-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.WrapTokenList where
+ 2
+ 3 import qualified Text.Read
+ 4 import qualified Text.Show
+ 5
+ 6 newtype WrapTokenList a = WrapTokenList { unWrapTokenList :: a }
+ 7 deriving stock (Eq )
+ 8
+ 9 ----
+ 10
+ 11 instance Show a => Show (WrapTokenList [a]) where
+ 12 show (WrapTokenList tokens) = show =<< tokens
+ 13
+ 14 instance Read a => Read (WrapTokenList [a]) where
+ 15 readsPrec _ source = [( WrapTokenList $ maybeToList . readMaybe . one =<< source , "")]
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html
new file mode 100644
index 000000000..4360f2d7c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton.hs.html
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton (
+ 2 evalSource,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 6 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 7 import HelVM.HelMA.Automata.BrainFuck.Lexer
+ 8 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 9 import HelVM.HelMA.Automata.BrainFuck.TableOfInstructions
+ 10 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 11
+ 12 import HelVM.HelMA.Automaton.API.IOTypes
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14 import HelVM.HelMA.Automaton.Types.DumpType
+ 15
+ 16 import Control.Type.Operator
+ 17
+ 18 evalSource :: (BIO m , Symbol e) => Source -> FullTape e -> DumpType -> m ()
+ 19 evalSource source tape dt = logDump dt =<< doInstruction ([] , tokenize source) tape
+ 20
+ 21 doInstruction :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 22 doInstruction table@(_ , Simple MoveR : _) tape = doInstruction (nextInst table) (moveHeadRight tape)
+ 23 doInstruction table@(_ , Simple MoveL : _) tape = doInstruction (nextInst table) (moveHeadLeft tape)
+ 24 doInstruction table@(_ , Simple Inc : _) tape = doInstruction (nextInst table) (wNextSymbol tape)
+ 25 doInstruction table@(_ , Simple Dec : _) tape = doInstruction (nextInst table) (wPrevSymbol tape)
+ 26 doInstruction table@(_ , Simple Output : _) tape = doOutputChar table tape
+ 27 doInstruction table@(_ , Simple Input : _) tape = doInputChar table tape
+ 28 doInstruction table@(_ , JmpPast : _) tape = doJmpPast table tape
+ 29 doInstruction table@(_ , JmpBack : _) tape = doJmpBack table tape
+ 30 doInstruction table@(_ , [] ) tape = doEnd table tape
+ 31
+ 32 doJmpPast :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 33 doJmpPast table tape@(_ , 0 : _) = doInstruction (jumpPast table) tape
+ 34 doJmpPast table tape = doInstruction (nextInst table) tape
+ 35
+ 36 doJmpBack :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 37 doJmpBack table tape@(_ , 0 : _) = doInstruction (nextInst table) tape
+ 38 doJmpBack table tape = doInstruction (jumpBack table) tape
+ 39
+ 40 -- | IO instructions
+ 41 doOutputChar :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 42 doOutputChar _ (_ , []) = error "Illegal State"
+ 43 doOutputChar table tape@(_ , e : _) = wPutChar (toChar e) *> doInstruction (nextInst table) tape
+ 44
+ 45 doInputChar :: (BIO m , Symbol e) => Table -> FullTape e -> m $ Unit e
+ 46 doInputChar table tape = (doInstruction (nextInst table) . flip writeSymbol tape) =<< wGetChar
+ 47
+ 48 -- | Terminate instruction
+ 49 doEnd :: BIO m => Table -> FullTape e -> m $ Unit e
+ 50 doEnd table tape = pure $ Unit table tape
+ 51
+ 52 -- | Types
+ 53 data Unit e = Unit
+ 54 { unitTable :: Table
+ 55 , unitTape :: FullTape e
+ 56 }
+ 57 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html
new file mode 100644
index 000000000..b5ff9ec69
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton.hs.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton (
+ 2 evalSource,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 6 import HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction
+ 7 import HelVM.HelMA.Automata.BrainFuck.Parser
+ 8 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 9 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 10
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 13 import HelVM.HelMA.Automaton.Types.DumpType
+ 14
+ 15 import HelVM.HelIO.Containers.LLIndexSafe
+ 16
+ 17 import Control.Type.Operator
+ 18
+ 19 evalSource :: (BIO m , Symbol e) => Source -> FullTape e -> DumpType -> m ()
+ 20 evalSource source tape dt = logDump dt =<< flip evalVector tape =<< parseAsVector source
+ 21
+ 22 evalVector :: (BIO m , Symbol e) => TreeInstructionVector -> FullTape e -> m $ Unit e
+ 23 evalVector iv = nextStep (IU iv 0)
+ 24
+ 25 nextStep :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 26 nextStep (IU iv ic) = doInstruction (iv `indexMaybe` ic) (IU iv $ ic + 1)
+ 27
+ 28 doInstruction :: (BIO m , Symbol e) => Maybe TreeInstruction -> InstructionUnit -> FullTape e -> m $ Unit e
+ 29 doInstruction (Just (Simple MoveR )) table tape = nextStep table (moveHeadRight tape)
+ 30 doInstruction (Just (Simple MoveL )) table tape = nextStep table (moveHeadLeft tape)
+ 31 doInstruction (Just (Simple Inc )) table tape = nextStep table (wNextSymbol tape)
+ 32 doInstruction (Just (Simple Dec )) table tape = nextStep table (wPrevSymbol tape)
+ 33 doInstruction (Just (Simple Output )) table tape = doOutputChar table tape
+ 34 doInstruction (Just (Simple Input )) table tape = doInputChar table tape
+ 35 doInstruction (Just (While iv )) table tape = doWhile iv table tape
+ 36 doInstruction Nothing table tape = doEnd table tape
+ 37
+ 38 doWhile :: (BIO m , Symbol e) => TreeInstructionVector -> InstructionUnit -> FullTape e -> m $ Unit e
+ 39 doWhile _ table tape@(_ , 0:_) = nextStep table tape
+ 40 doWhile iv table tape = doWhileWithTape =<< evalVector iv tape where
+ 41 doWhileWithTape :: (BIO m , Symbol e) => Unit e -> m $ Unit e
+ 42 doWhileWithTape = doWhile iv table . unitTape
+ 43
+ 44 -- | IO instructions
+ 45 doOutputChar :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 46 doOutputChar _ (_ , []) = error "Illegal State"
+ 47 doOutputChar table tape@(_ , e:_) = wPutChar (toChar e) *> nextStep table tape
+ 48
+ 49 doInputChar :: (BIO m , Symbol e) => InstructionUnit -> FullTape e -> m $ Unit e
+ 50 doInputChar table tape = (nextStep table . flip writeSymbol tape) =<< wGetChar
+ 51
+ 52 -- | Terminate instruction
+ 53 doEnd :: BIO m => InstructionUnit -> FullTape e -> m $ Unit e
+ 54 doEnd iu tape = pure $ Unit iu tape
+ 55
+ 56 -- | Types
+ 57 data Unit e = Unit
+ 58 { unitUI :: InstructionUnit
+ 59 , unitTape :: FullTape e
+ 60 }
+ 61 deriving stock (Eq , Show )
+ 62
+ 63 data InstructionUnit = IU !TreeInstructionVector !InstructionCounter
+ 64 deriving stock (Eq , Show )
+ 65
+ 66 type InstructionCounter = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html
new file mode 100644
index 000000000..05adcb87b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Automaton.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Automaton where
+ 2
+ 3 import qualified HelVM.HelMA.Automata.BrainFuck.Automaton.FlatAutomaton as Flat
+ 4 import qualified HelVM.HelMA.Automata.BrainFuck.Automaton.TreeAutomaton as Tree
+ 5
+ 6 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 7 import HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols
+ 8
+ 9 import HelVM.HelMA.Automaton.API.EvalParams
+ 10 import HelVM.HelMA.Automaton.API.IOTypes
+ 11 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 12
+ 13 import HelVM.HelMA.Automaton.Types.CellType
+ 14 import HelVM.HelMA.Automaton.Types.DumpType
+ 15
+ 16 simpleEval :: BIO m => (Bool , Source , CellType) -> m ()
+ 17 simpleEval (c , s , t) = eval c s t Pretty
+ 18
+ 19 ----
+ 20
+ 21 evalParams :: BIO m => EvalParams -> m ()
+ 22 evalParams p = eval (compile p) (source p) (cellTypeOptions p) (dumpTypeOptions p)
+ 23
+ 24 eval :: BIO m => Bool -> Source -> CellType -> DumpType -> m ()
+ 25 eval c s Int8Type = evalSource c s (newTape :: FullTape Int8)
+ 26 eval c s Word8Type = evalSource c s (newTape :: FullTape Word8)
+ 27 eval c s Int16Type = evalSource c s (newTape :: FullTape Int16)
+ 28 eval c s Word16Type = evalSource c s (newTape :: FullTape Word16)
+ 29 eval c s Int32Type = evalSource c s (newTape :: FullTape Int32)
+ 30 eval c s Word32Type = evalSource c s (newTape :: FullTape Word32)
+ 31 eval c s Int64Type = evalSource c s (newTape :: FullTape Int64)
+ 32 eval c s Word64Type = evalSource c s (newTape :: FullTape Word64)
+ 33
+ 34 evalSource :: (BIO m , Symbol e) => Bool -> Source -> FullTape e -> DumpType -> m ()
+ 35 evalSource False = Flat.evalSource
+ 36 evalSource True = Tree.evalSource
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html
new file mode 100644
index 000000000..bdb30e3fe
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 4
+ 5 import Text.Read
+ 6
+ 7 import qualified Text.Show
+ 8
+ 9 data FlatInstruction =
+ 10 Simple SimpleInstruction
+ 11 | JmpPast
+ 12 | JmpBack
+ 13 deriving stock (Eq )
+ 14
+ 15 type FlatTreeInstructionList = [FlatInstruction]
+ 16
+ 17 instance Show FlatInstruction where
+ 18 show (Simple i) = show i
+ 19 show JmpPast = "["
+ 20 show JmpBack = "]"
+ 21
+ 22 instance Read FlatInstruction where
+ 23 readsPrec _ ">" = [( Simple MoveR , "")]
+ 24 readsPrec _ "<" = [( Simple MoveL , "")]
+ 25 readsPrec _ "+" = [( Simple Inc , "")]
+ 26 readsPrec _ "-" = [( Simple Dec , "")]
+ 27 readsPrec _ "." = [( Simple Output , "")]
+ 28 readsPrec _ "," = [( Simple Input , "")]
+ 29 readsPrec _ "[" = [( JmpPast , "")]
+ 30 readsPrec _ "]" = [( JmpBack , "")]
+ 31 readsPrec _ _ = []
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html
new file mode 100644
index 000000000..d40c09792
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction where
+ 2
+ 3 import Text.Read
+ 4 import qualified Text.Show
+ 5
+ 6 data SimpleInstruction =
+ 7 MoveR
+ 8 | MoveL
+ 9 | Inc
+ 10 | Dec
+ 11 | Output
+ 12 | Input
+ 13 deriving stock (Bounded , Enum , Eq )
+ 14
+ 15 instance Show SimpleInstruction where
+ 16 show MoveR = ">"
+ 17 show MoveL = "<"
+ 18 show Inc = "+"
+ 19 show Dec = "-"
+ 20 show Output = "."
+ 21 show Input = ","
+ 22
+ 23 instance Read SimpleInstruction where
+ 24 readsPrec _ ">" = [( MoveR , "")]
+ 25 readsPrec _ "<" = [( MoveL , "")]
+ 26 readsPrec _ "+" = [( Inc , "")]
+ 27 readsPrec _ "-" = [( Dec , "")]
+ 28 readsPrec _ "." = [( Output , "")]
+ 29 readsPrec _ "," = [( Input , "")]
+ 30 readsPrec _ _ = []
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html
new file mode 100644
index 000000000..f7c5c74b9
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction.hs.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.SimpleInstruction
+ 4
+ 5 import Data.DList
+ 6 import qualified Data.ListLike as LL
+ 7 import Data.Vector
+ 8
+ 9 import qualified Text.Show
+ 10
+ 11 data TreeInstruction =
+ 12 Simple SimpleInstruction
+ 13 | While !TreeInstructionVector
+ 14 deriving stock (Eq )
+ 15
+ 16 type TreeInstructionList = [TreeInstruction]
+ 17 type TreeInstructionDList = DList TreeInstruction
+ 18 type TreeInstructionVector = Vector TreeInstruction
+ 19
+ 20 instance Show TreeInstruction where
+ 21 show (Simple i) = show i
+ 22 show (While il) = "[" <> (show =<< LL.toList il) <> "]"
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html
new file mode 100644
index 000000000..7987dc7b9
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Lexer.hs.html
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelMA.Automaton.API.IOTypes
+ 7 import HelVM.HelMA.Automaton.WrapTokenList
+ 8
+ 9 -- | Lexer
+ 10 tokenize :: Source -> FlatTreeInstructionList
+ 11 tokenize = unWrapTokenList . readTokens
+ 12
+ 13 readTokens :: Source -> Tokens
+ 14 readTokens source = readTextUnsafe source :: Tokens
+ 15
+ 16 type Tokens = WrapTokenList FlatTreeInstructionList
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html
new file mode 100644
index 000000000..88eb4e52f
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Parser.hs.html
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Parser where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction as Flat
+ 4 import HelVM.HelMA.Automata.BrainFuck.Instruction.TreeInstruction as Tree
+ 5 import HelVM.HelMA.Automata.BrainFuck.Lexer
+ 6
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8
+ 9 import HelVM.HelIO.Control.Safe
+ 10 import HelVM.HelIO.ListLikeUtil
+ 11
+ 12 import Data.ListLike hiding (show)
+ 13
+ 14 import qualified Data.DList as D
+ 15
+ 16 type OperandParser m a = FlatTreeInstructionList -> m (a , FlatTreeInstructionList)
+ 17
+ 18 parseAsVector :: MonadSafe m => Source -> m TreeInstructionVector
+ 19 parseAsVector = parseFILAsVector . tokenize
+ 20
+ 21 parseFILAsVector :: MonadSafe m => FlatTreeInstructionList -> m TreeInstructionVector
+ 22 parseFILAsVector fil = fromList <$> parseFIL fil
+ 23
+ 24 parseFIL :: MonadSafe m => FlatTreeInstructionList -> m TreeInstructionList
+ 25 parseFIL (Flat.Simple i : fil) = (Tree.Simple i : ) <$> parseFIL fil
+ 26 parseFIL [] = pure []
+ 27 parseFIL (Flat.JmpBack : fil) = liftErrorWithPrefix "JmpBack" $ show fil
+ 28 parseFIL (Flat.JmpPast : fil) = addWhile =<< parseWhile fil where
+ 29 addWhile (i , fil') = (i : ) <$> parseFIL fil'
+ 30
+ 31 parseWhile :: MonadSafe m => OperandParser m TreeInstruction
+ 32 parseWhile fil = buildWhile <$> parseWhileD fil where
+ 33 buildWhile :: (TreeInstructionDList , FlatTreeInstructionList) -> (TreeInstruction , FlatTreeInstructionList)
+ 34 buildWhile (idl , fil') = (buildWhileFromDList idl , fil')
+ 35
+ 36 buildWhileFromDList :: TreeInstructionDList -> TreeInstruction
+ 37 buildWhileFromDList = Tree.While . convert
+ 38
+ 39 parseWhileD :: MonadSafe m => OperandParser m TreeInstructionDList
+ 40 parseWhileD = go D.empty where
+ 41 go :: MonadSafe m => TreeInstructionDList -> FlatTreeInstructionList -> m (TreeInstructionDList , FlatTreeInstructionList)
+ 42 go acc (Flat.Simple i : fil) = go (acc `snoc` Tree.Simple i ) fil
+ 43 go acc [] = liftErrorWithPrefix "End of List" $ show acc
+ 44 go acc (Flat.JmpBack : fil) = pure (acc , fil)
+ 45 go acc (Flat.JmpPast : fil) = snocInstruction =<< parseWhile fil where
+ 46 snocInstruction :: MonadSafe m => (TreeInstruction , FlatTreeInstructionList) -> m (TreeInstructionDList , FlatTreeInstructionList)
+ 47 snocInstruction (i , fil') = go (acc `snoc` i) fil'
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html
new file mode 100644
index 000000000..e276c86f8
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.Symbol.hs.html
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.Symbol (
+ 2 Symbol,
+ 3 def,
+ 4 next,
+ 5 prev,
+ 6 fromChar,
+ 7 toChar
+ 8 ) where
+ 9
+ 10 import Data.Default (Default)
+ 11
+ 12 import qualified Data.Default as Default
+ 13 import qualified Relude.Extra as Extra
+ 14
+ 15 def :: Symbol e => e
+ 16 def = Default.def
+ 17
+ 18 next :: Symbol e => e -> e
+ 19 next = Extra.next
+ 20
+ 21 prev :: Symbol e => e -> e
+ 22 prev = Extra.prev
+ 23
+ 24 class (Bounded e , Default e , Enum e , Eq e , Num e , Show e) => Symbol e where
+ 25 fromChar :: Char -> e
+ 26 toChar :: e -> Char
+ 27
+ 28 --
+ 29
+ 30 instance Symbol Int where
+ 31 fromChar = ord
+ 32 toChar = chr
+ 33
+ 34 instance Symbol Word where
+ 35 fromChar = fromIntegral . ord
+ 36 toChar = chr . fromIntegral
+ 37
+ 38 instance Symbol Int8 where
+ 39 fromChar = fromIntegral . ord
+ 40 toChar = chr . normalizeMod . fromIntegral
+ 41
+ 42 instance Symbol Word8 where
+ 43 fromChar = fromIntegral . ord
+ 44 toChar = chr . fromIntegral
+ 45
+ 46 instance Symbol Int16 where
+ 47 fromChar = fromIntegral . ord
+ 48 toChar = chr . normalizeMod . fromIntegral
+ 49
+ 50 instance Symbol Word16 where
+ 51 fromChar = fromIntegral . ord
+ 52 toChar = chr . fromIntegral
+ 53
+ 54 instance Symbol Int32 where
+ 55 fromChar = fromIntegral . ord
+ 56 toChar = chr . normalizeMod . fromIntegral
+ 57
+ 58 instance Symbol Word32 where
+ 59 fromChar = fromIntegral . ord
+ 60 toChar = chr . fromIntegral
+ 61
+ 62 instance Symbol Int64 where
+ 63 fromChar = fromIntegral . ord
+ 64 toChar = chr . normalizeMod . fromIntegral
+ 65
+ 66 instance Symbol Word64 where
+ 67 fromChar = fromIntegral . ord
+ 68 toChar = chr . fromIntegral
+ 69 --
+ 70
+ 71 countSymbols :: (Integral e) => e
+ 72 countSymbols = 256
+ 73
+ 74 modifyMod :: (Integral e) => (e -> e) -> e -> e
+ 75 modifyMod f i = f (i + countSymbols) `mod` countSymbols
+ 76
+ 77 normalizeMod :: (Integral e) => e -> e
+ 78 normalizeMod = modifyMod id
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html
new file mode 100644
index 000000000..78fc0f8ac
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.TableOfInstructions.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.TableOfInstructions where
+ 2
+ 3 import HelVM.HelMA.Automata.BrainFuck.Instruction.FlatInstruction
+ 4
+ 5 type HalfTable = FlatTreeInstructionList
+ 6 type Table = (HalfTable , HalfTable)
+ 7 type TableD = Table -> Table
+ 8
+ 9 prevInst :: TableD
+ 10 prevInst (inst : prev , next) = (prev , inst : next)
+ 11 prevInst ([] , _) = error "End of the table"
+ 12
+ 13 nextInst :: TableD
+ 14 nextInst (prev , inst : next) = (inst : prev , next)
+ 15 nextInst (_ , []) = error "End of the table"
+ 16
+ 17 matchPrevJmp :: TableD
+ 18 matchPrevJmp table@(JmpPast : _ , _) = table
+ 19 matchPrevJmp table@(JmpBack : _ , _) = (matchPrevJmp . prevInst . jumpBack) table
+ 20 matchPrevJmp table = jumpBack table
+ 21
+ 22 matchNextJmp :: TableD
+ 23 matchNextJmp table@(_ , JmpBack : _) = nextInst table
+ 24 matchNextJmp table@(_ , JmpPast : _) = (matchNextJmp . jumpPast) table
+ 25 matchNextJmp table = jumpPast table
+ 26
+ 27 jumpPast :: TableD
+ 28 jumpPast = matchNextJmp . nextInst
+ 29
+ 30 jumpBack :: TableD
+ 31 jumpBack = matchPrevJmp . prevInst
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html
new file mode 100644
index 000000000..df2083506
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols.hs.html
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.BrainFuck.TapeOfSymbols (
+ 2 FullTape,
+ 3 newTape,
+ 4 moveHeadRight,
+ 5 moveHeadLeft,
+ 6 wNextSymbol,
+ 7 wPrevSymbol,
+ 8 writeSymbol
+ 9 ) where
+ 10
+ 11 import HelVM.HelMA.Automata.BrainFuck.Symbol
+ 12
+ 13 ----
+ 14
+ 15 type D a = a -> a
+ 16 type FullTape e = (HalfTape e , HalfTape e)
+ 17 type FullTapeD e = D (FullTape e)
+ 18
+ 19 type HalfTape e = [e]
+ 20
+ 21 ----
+ 22
+ 23 newTape :: (Symbol e) => FullTape e
+ 24 newTape = ([def] , [def])
+ 25
+ 26 moveHeadRight :: (Symbol e) => FullTapeD e
+ 27 moveHeadRight (cell:left , right) = pad (left , cell:right)
+ 28 moveHeadRight ([] , _) = error "End of the Tape"
+ 29
+ 30 moveHeadLeft :: (Symbol e) => FullTapeD e
+ 31 moveHeadLeft (left , cell:right) = pad (cell:left , right)
+ 32 moveHeadLeft (_ , []) = error "End of the Tape"
+ 33
+ 34 pad :: (Symbol e) => FullTapeD e
+ 35 pad ([] , []) = newTape
+ 36 pad ([] , right) = ([def] , right)
+ 37 pad (left , []) = (left , [def])
+ 38 pad tape = tape
+ 39
+ 40 ----
+ 41
+ 42 wNextSymbol :: (Symbol e) => FullTapeD e
+ 43 wNextSymbol = modifyCell next
+ 44
+ 45 wPrevSymbol :: (Symbol e) => FullTapeD e
+ 46 wPrevSymbol = modifyCell prev
+ 47
+ 48 writeSymbol :: (Symbol e) => Char -> FullTapeD e
+ 49 writeSymbol symbol = modifyCell (const $ fromChar symbol)
+ 50
+ 51 modifyCell :: D e -> FullTapeD e
+ 52 modifyCell f (left , cell:right) = (left , f cell:right)
+ 53 modifyCell _ (_ , []) = error "End of the Tape"
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html
new file mode 100644
index 000000000..378891022
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Cat.Automaton.hs.html
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Cat.Automaton (
+ 2 evalParams,
+ 3 eval
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automaton.API.EvalParams
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 9
+ 10 evalParams :: BIO m => EvalParams -> m ()
+ 11 evalParams = eval . source
+ 12
+ 13 eval :: BusinessIO m => Source -> m ()
+ 14 eval = wPutStr
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html
new file mode 100644
index 000000000..17e805bdf
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Addressing.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Addressing (
+ 2 genericFindAddress,
+ 3 findAddress,
+ 4 genericNextLabel,
+ 5 nextLabel
+ 6 ) where
+ 7
+ 8 import HelVM.HelMA.Automata.ETA.Symbol
+ 9 import HelVM.HelMA.Automata.ETA.Token
+ 10
+ 11 import HelVM.HelIO.Containers.LLIndexSafe
+ 12
+ 13 import HelVM.HelIO.Control.Safe
+ 14
+ 15 import Data.ListLike hiding (show)
+ 16
+ 17 import Prelude hiding (length, splitAt)
+ 18
+ 19 import qualified Data.Vector as Vector
+ 20
+ 21 ----
+ 22
+ 23 genericFindAddress :: (MonadSafe m , Integral cell) => Vector.Vector Token -> cell -> m InstructionAddress
+ 24 genericFindAddress il = findAddress il . fromIntegral
+ 25
+ 26 findAddress :: MonadSafe m => Vector.Vector Token -> Int -> m InstructionAddress
+ 27 findAddress _ 1 = pure 0
+ 28 findAddress il address = appendErrorTupleList [("il" , show il) , ("address" , show address)] ((+1) <$> indexSafe (Vector.elemIndices R il) (address-2))
+ 29
+ 30 ----
+ 31
+ 32 genericNextLabel :: Integral cell => Vector.Vector Token -> InstructionAddress -> cell
+ 33 genericNextLabel il = fromIntegral . nextLabel il
+ 34
+ 35 nextLabel :: Vector.Vector Token -> InstructionAddress -> Int
+ 36 nextLabel il ic = length (Vector.elemIndices R il') + 2 where (il' , _) = splitAt ic il
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html
new file mode 100644
index 000000000..62f4c6348
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Automaton.hs.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 ) where
+ 6
+ 7 import HelVM.HelMA.Automata.ETA.Evaluator
+ 8 import HelVM.HelMA.Automata.ETA.Lexer
+ 9 import HelVM.HelMA.Automata.ETA.OperandParsers
+ 10 import HelVM.HelMA.Automata.ETA.Symbol
+ 11 import HelVM.HelMA.Automata.ETA.Token
+ 12
+ 13 import HelVM.HelMA.Automaton.API.EvalParams
+ 14 import HelVM.HelMA.Automaton.API.IOTypes
+ 15
+ 16 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 17 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 18
+ 19 import HelVM.HelMA.Automaton.Types.DumpType
+ 20 import HelVM.HelMA.Automaton.Types.StackType
+ 21
+ 22 import HelVM.HelIO.Collections.SList as SList
+ 23
+ 24 import Prelude hiding (divMod)
+ 25
+ 26 import qualified Data.Sequence as Seq
+ 27 import qualified Data.Vector as Vector
+ 28
+ 29 simpleEval :: BIO m => (Bool , Source , StackType) -> m ()
+ 30 simpleEval (c , s , t) = eval c s t Pretty
+ 31
+ 32 ----
+ 33
+ 34 evalParams :: BIO m => EvalParams -> m ()
+ 35 evalParams p = eval (compile p) (source p) (stackTypeOptions p) (dumpTypeOptions p)
+ 36
+ 37 eval :: (Evaluator Symbol m) => Bool -> Source -> StackType -> DumpType -> m ()
+ 38 eval compile source = evalTL compile (tokenize source)
+ 39
+ 40 evalTL :: (Evaluator Symbol m) => Bool -> TokenList -> StackType -> DumpType -> m ()
+ 41 evalTL c tl ListStackType = start c tl []
+ 42 evalTL c tl SeqStackType = start c tl Seq.empty
+ 43 evalTL c tl SListStackType = start c tl SList.sListEmpty
+ 44
+ 45 start :: (SEvaluator Symbol s m) => Bool -> TokenList -> s -> DumpType -> m ()
+ 46 start _ tl s dt = logDump dt =<< next (IU (Vector.fromList tl) 0) s
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html
new file mode 100644
index 000000000..50abd12dd
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Evaluator.hs.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Evaluator (
+ 2 next,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.ETA.Addressing
+ 6 import HelVM.HelMA.Automata.ETA.OperandParsers
+ 7 import HelVM.HelMA.Automata.ETA.Token
+ 8
+ 9 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 10
+ 11 import HelVM.HelMA.Automaton.Units.ALU as Stack
+ 12
+ 13 import Control.Type.Operator
+ 14
+ 15 import Prelude hiding (divMod)
+ 16
+ 17 next :: (SEvaluator e s m) => InstructionUnit -> s -> m $ Unit s
+ 18 next iu s = doInstruction' =<< nextIU iu where doInstruction' (t , iu') = doInstruction t iu' s
+ 19
+ 20 doInstruction :: (SEvaluator e s m) => Maybe Token -> InstructionUnit -> s -> m $ Unit s
+ 21 -- | IO instructions
+ 22 doInstruction (Just O) iu s = next iu =<< doOutputChar2 s
+ 23 doInstruction (Just I) iu s = next iu =<< doInputChar2 s
+ 24
+ 25 -- | Stack instructions
+ 26 doInstruction (Just N) iu s = next' =<< parseNumber iu where next' (symbol , iu') = next iu' (push1 symbol s)
+ 27 doInstruction (Just H) iu s = next iu =<< halibut s
+ 28
+ 29 -- | Arithmetic
+ 30 doInstruction (Just S) iu s = next iu =<< sub s
+ 31 doInstruction (Just E) iu s = next iu =<< divMod s
+ 32
+ 33 -- | Control
+ 34 doInstruction (Just R) iu s = next iu s
+ 35 doInstruction (Just A) iu@(IU il ic) s = (next iu . flipPush1 s . genericNextLabel il) ic
+ 36 doInstruction (Just T) iu@(IU il _ ) s = transfer =<< pop2 s where
+ 37 transfer (_ , 0 , s') = next iu s'
+ 38 transfer (0 , _ , _ ) = doEnd iu s
+ 39 transfer (l , _ , s') = next' =<< genericFindAddress il l where next' address = next (IU il address) s'
+ 40 doInstruction Nothing iu s = doEnd iu s
+ 41
+ 42 -- | Terminate instruction
+ 43 doEnd :: (SEvaluator e s m) => InstructionUnit -> s -> m $ Unit s
+ 44 doEnd iu s = pure $ Unit iu s
+ 45
+ 46 -- | Types
+ 47
+ 48 data Unit s = Unit
+ 49 { unitIU :: !InstructionUnit
+ 50 , unitStack :: s
+ 51 }
+ 52 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html
new file mode 100644
index 000000000..cdb64831c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Lexer.hs.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.ETA.Token
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelIO.Util
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.WrapTokenList
+ 9
+ 10 -- | Lexer
+ 11 tokenize :: Source -> TokenList
+ 12 tokenize = whiteTokenListToTokenList . unWrapTokenList . readTokens
+ 13
+ 14 readTokens :: Source -> WhiteTokens
+ 15 readTokens source = (readTextUnsafe . toUppers) source :: WhiteTokens
+ 16
+ 17 -- | Types
+ 18 type WhiteTokens = WrapTokenList WhiteTokenList
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html
new file mode 100644
index 000000000..7131374a0
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.OperandParsers.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.OperandParsers where
+ 2
+ 3 import HelVM.HelMA.Automata.ETA.Symbol
+ 4 import HelVM.HelMA.Automata.ETA.Token
+ 5
+ 6 import HelVM.HelIO.Containers.LLIndexSafe
+ 7 import HelVM.HelIO.Control.Safe
+ 8 import HelVM.HelIO.Digit.ToDigit
+ 9
+ 10 import qualified Data.Vector as Vector
+ 11
+ 12 parseNumber :: (MonadSafe m , Integral a) => OperandIUParser m a
+ 13 parseNumber iu = go [] =<< nextIU iu where
+ 14 go :: (MonadSafe m , Integral a) => TokenList -> (Maybe Token, InstructionUnit) -> m (a, InstructionUnit)
+ 15 go acc (Nothing , iu') = ( , iu') <$> makeIntegral7FromList acc
+ 16 go acc (Just E , iu') = ( , iu') <$> makeIntegral7FromList acc
+ 17 go acc (Just R , iu') = go acc =<< nextIU iu'
+ 18 go acc (Just t , iu') = go (t : acc) =<< nextIU iu'
+ 19
+ 20 nextIU :: MonadSafe m => OperandIUParser m (Maybe Token)
+ 21 nextIU iu@(IU il ic)
+ 22 | ic < Vector.length il = wrap <$> indexSafe il ic
+ 23 | otherwise = pure (Nothing , iu)
+ 24 where wrap i = (Just i, IU il (ic+1))
+ 25
+ 26 -- | Types
+ 27 data InstructionUnit = IU !TokenVector !InstructionCounter
+ 28 deriving stock (Eq , Read , Show )
+ 29
+ 30 type OperandIUParser m a = InstructionUnit -> m (a , InstructionUnit)
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html
new file mode 100644
index 000000000..b73b3b4c0
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.ETA.Token.hs.html
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.ETA.Token where
+ 2
+ 3 import HelVM.HelIO.Control.Safe
+ 4 import HelVM.HelIO.Digit.ToDigit
+ 5
+ 6 import Data.Vector as Vector
+ 7
+ 8 import qualified Text.Read
+ 9 import qualified Text.Show
+ 10
+ 11 data Token = E | T | A | O | I | N | S | H | R
+ 12 deriving stock (Bounded , Enum , Eq , Read , Show )
+ 13
+ 14 type TokenList = [Token]
+ 15 type TokenVector = Vector Token
+ 16
+ 17 instance ToDigit Token where
+ 18 toDigit H = pure 0
+ 19 toDigit T = pure 1
+ 20 toDigit A = pure 2
+ 21 toDigit O = pure 3
+ 22 toDigit I = pure 4
+ 23 toDigit N = pure 5
+ 24 toDigit S = pure 6
+ 25 toDigit t = liftErrorWithPrefix "Wrong token" $ show t
+ 26
+ 27 ----
+ 28
+ 29 newtype WhiteToken = WhiteToken { unWhiteToken :: Token}
+ 30 deriving stock (Eq )
+ 31
+ 32 type WhiteTokenList = [WhiteToken]
+ 33
+ 34 instance Show WhiteToken where
+ 35 show (WhiteToken R) = "\n"
+ 36 show (WhiteToken t) = show t
+ 37
+ 38 -- | Scanner
+ 39 instance Read WhiteToken where
+ 40 readsPrec _ "\n" = [( WhiteToken R , "")]
+ 41 readsPrec _ "E" = [( WhiteToken E , "")]
+ 42 readsPrec _ "T" = [( WhiteToken T , "")]
+ 43 readsPrec _ "A" = [( WhiteToken A , "")]
+ 44 readsPrec _ "O" = [( WhiteToken O , "")]
+ 45 readsPrec _ "I" = [( WhiteToken I , "")]
+ 46 readsPrec _ "N" = [( WhiteToken N , "")]
+ 47 readsPrec _ "S" = [( WhiteToken S , "")]
+ 48 readsPrec _ "H" = [( WhiteToken H , "")]
+ 49 readsPrec _ _ = []
+ 50
+ 51 tokenToWhiteTokenPair :: Token -> (WhiteToken , String)
+ 52 tokenToWhiteTokenPair t = (WhiteToken t , "")
+ 53
+ 54 whiteTokenListToTokenList :: WhiteTokenList -> TokenList
+ 55 whiteTokenListToTokenList = fmap unWhiteToken
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html
new file mode 100644
index 000000000..89e5d37a4
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Rev.Automaton.hs.html
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Rev.Automaton (
+ 2 evalParams,
+ 3 eval
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automaton.API.EvalParams
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 9
+ 10 import qualified Data.Text as Text
+ 11
+ 12 evalParams :: BIO m => EvalParams -> m ()
+ 13 evalParams = eval . source
+ 14
+ 15 eval :: BusinessIO m => Source -> m ()
+ 16 eval = evalLines . lines
+ 17
+ 18 evalLines :: BusinessIO m => [Source] -> m ()
+ 19 evalLines ll = doOutput $ unlines $ Text.reverse <$> ll
+ 20
+ 21 doOutput :: BusinessIO m => Source -> m ()
+ 22 doOutput = wPutStr
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html
new file mode 100644
index 000000000..12d2eadea
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Automaton.hs.html
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 ) where
+ 6
+ 7 import HelVM.HelMA.Automata.SubLeq.Evaluator
+ 8 import HelVM.HelMA.Automata.SubLeq.Lexer
+ 9
+ 10 import HelVM.HelMA.Automaton.API.EvalParams
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 15
+ 16 import HelVM.HelMA.Automaton.Types.DumpType
+ 17 import HelVM.HelMA.Automaton.Types.RAMType
+ 18
+ 19 import qualified HelVM.HelIO.Collections.MapList as MapList
+ 20 import qualified HelVM.HelIO.Collections.SList as SList
+ 21
+ 22 import qualified Data.Sequence as Seq
+ 23
+ 24 simpleEval :: BIO m => RAMType -> Source -> m ()
+ 25 simpleEval rt s = eval s rt Pretty
+ 26
+ 27 ----
+ 28
+ 29 evalParams :: BIO m => EvalParams -> m ()
+ 30 evalParams p = eval (source p) (ramTypeOptions p) (dumpTypeOptions p)
+ 31
+ 32 eval :: BIO m => Source -> RAMType -> DumpType -> m ()
+ 33 eval source = evalIL $ tokenize source
+ 34
+ 35 evalIL :: Evaluator e m => [e] -> RAMType -> DumpType -> m ()
+ 36 evalIL = flip evalIL'
+ 37
+ 38 evalIL' :: Evaluator e m => RAMType -> [e] -> DumpType -> m ()
+ 39 evalIL' ListRAMType = start
+ 40 evalIL' SeqRAMType = start . Seq.fromList
+ 41 evalIL' SListRAMType = start . SList.sListFromList
+ 42 evalIL' MapListRAMType = start . MapList.mapListFromList
+ 43
+ 44 start :: REvaluator e r m => r -> DumpType -> m ()
+ 45 start r dt = logDump dt =<< doInstruction 0 r
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html
new file mode 100644
index 000000000..d442c9f2e
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Evaluator.hs.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Evaluator (
+ 2 doInstruction,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 6 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 7
+ 8 import HelVM.HelMA.Automaton.Units.RAM as RAM
+ 9
+ 10 import Control.Type.Operator
+ 11
+ 12 doInstruction :: REvaluator e r m => e -> r -> m $ Unit e r
+ 13 doInstruction ic ram
+ 14 | ic < 0 = doEnd ic ram
+ 15 | src < 0 = doInputChar dst ic ram
+ 16 | dst < 0 = doOutputChar src ic ram
+ 17 | otherwise = doInstruction ic' $ store dst diff ram
+ 18 where
+ 19 src = genericLoad ram ic
+ 20 dst = genericLoad ram $ ic + 1
+ 21 diff = genericLoad ram dst - genericLoad ram src
+ 22 ic'
+ 23 | diff <= 0 = genericLoad ram $ ic + 2
+ 24 | otherwise = ic + 3
+ 25
+ 26 -- | IO instructions
+ 27 doOutputChar :: REvaluator e r m => e -> e -> r -> m $ Unit e r
+ 28 doOutputChar address ic ram = wPutAsChar (genericLoad ram address) *> doInstruction (ic+3) ram
+ 29
+ 30 doInputChar :: REvaluator e r m => e -> e -> r -> m $ Unit e r
+ 31 doInputChar address ic ram = doInputChar' =<< wGetChar where
+ 32 doInputChar' char = doInstruction (ic+3) $ storeChar address char ram
+ 33
+ 34 -- | Terminate instruction
+ 35 doEnd :: REvaluator e r m => e -> r -> m $ Unit e r
+ 36 doEnd ic ram = pure $ Unit ic ram
+ 37
+ 38 -- | Types
+ 39 data Unit ic ram = Unit
+ 40 { unitIU :: ic
+ 41 , unitRAM :: ram
+ 42 }
+ 43 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html
new file mode 100644
index 000000000..beead8144
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.SubLeq.Lexer.hs.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.SubLeq.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.SubLeq.Symbol
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelIO.Util
+ 7 import HelVM.HelMA.Automaton.API.IOTypes
+ 8
+ 9 import qualified Text.Read as Read
+ 10 import qualified Text.Show as Show
+ 11
+ 12 tokenize :: Source -> SymbolList
+ 13 tokenize source = (maybeToList . readTextMaybe) =<< splitOneOf " \t\n" source
+ 14
+ 15 readSymbols :: Source -> Symbols
+ 16 readSymbols source = readTextUnsafe source :: Symbols
+ 17
+ 18 ----
+ 19
+ 20 newtype Symbols = Symbols SymbolList
+ 21
+ 22 instance Show Symbols where
+ 23 show (Symbols symbols) = toString $ unwords $ shows symbols
+ 24
+ 25 instance Read Symbols where
+ 26 readsPrec _ source = [( Symbols $ tokenize $ toText source , "")]
+ 27
+ 28 ----
+ 29
+ 30 shows :: SymbolList -> [Text]
+ 31 shows symbols = show <$> symbols
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html
new file mode 100644
index 000000000..6baaa7248
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Automaton.hs.html
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Automaton (
+ 2 simpleEval,
+ 3 evalParams,
+ 4 eval,
+ 5 evalIL,
+ 6 evalTL,
+ 7 start,
+ 8 ) where
+ 9
+ 10 import HelVM.HelMA.Automata.WhiteSpace.Evaluator
+ 11 import HelVM.HelMA.Automata.WhiteSpace.Lexer
+ 12 import HelVM.HelMA.Automata.WhiteSpace.Parser
+ 13 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 14 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 15
+ 16 import HelVM.HelMA.Automaton.API.EvalParams
+ 17 import HelVM.HelMA.Automaton.API.IOTypes
+ 18
+ 19 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 20 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 21
+ 22 import HelVM.HelMA.Automaton.Instruction
+ 23
+ 24 import HelVM.HelMA.Automaton.Units.CPU as CPU
+ 25
+ 26 import HelVM.HelMA.Automaton.Types.DumpType
+ 27 import HelVM.HelMA.Automaton.Types.RAMType
+ 28 import HelVM.HelMA.Automaton.Types.StackType
+ 29 import HelVM.HelMA.Automaton.Types.TokenType
+ 30
+ 31 import HelVM.HelIO.Control.Safe
+ 32
+ 33 import Prelude hiding (swap)
+ 34
+ 35 import qualified HelVM.HelMA.Automata.WhiteSpace.SimpleParams as S
+ 36
+ 37 import qualified HelVM.HelIO.Collections.MapList as MapList
+ 38 import qualified HelVM.HelIO.Collections.SList as SList
+ 39
+ 40 import qualified Data.Sequence as Seq
+ 41 import qualified Data.Vector as Vector
+ 42
+ 43 simpleEval :: BIO m => S.SimpleParams -> m ()
+ 44 simpleEval p = eval (S.tokenType p) (S.source p) (S.asciiLabel p) (S.stackType p) (S.ramType p) (S.dumpType p)
+ 45
+ 46 ----
+ 47
+ 48 evalParams :: BIO m => TokenType -> EvalParams -> m ()
+ 49 evalParams tokenType p = eval tokenType (source p) (asciiLabel p) (stackTypeOptions p) (ramTypeOptions p) (dumpTypeOptions p)
+ 50
+ 51 eval :: BIO m => TokenType -> Source -> Bool -> StackType -> RAMType -> DumpType -> m ()
+ 52 eval tokenType source = evalTL $ tokenize tokenType source
+ 53
+ 54 evalTL :: BIO m => TokenList -> Bool -> StackType -> RAMType -> DumpType -> m ()
+ 55 evalTL tl ascii st rt dt = evalTL' =<< liftSafe (parseTL ascii tl) where evalTL' il = evalIL il st rt dt
+ 56
+ 57 evalIL :: BIO m => InstructionList -> StackType -> RAMType -> DumpType -> m ()
+ 58 evalIL il s ListRAMType = evalIL' il s []
+ 59 evalIL il s SeqRAMType = evalIL' il s Seq.empty
+ 60 evalIL il s SListRAMType = evalIL' il s SList.sListEmpty
+ 61 evalIL il s MapListRAMType = evalIL' il s MapList.mapListEmpty
+ 62
+ 63 evalIL' :: (REvaluator Symbol r m) => InstructionList -> StackType -> r -> DumpType -> m ()
+ 64 evalIL' il ListStackType = start il []
+ 65 evalIL' il SeqStackType = start il Seq.empty
+ 66 evalIL' il SListStackType = start il SList.sListEmpty
+ 67
+ 68 start :: (SREvaluator Symbol s r m) => InstructionList -> s -> r -> DumpType -> m ()
+ 69 start il s r dt = logDump dt =<< next (CU (Vector.fromList il) 0 (IS [])) s r
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html
new file mode 100644
index 000000000..313df0c28
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Evaluator.hs.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Evaluator (
+ 2 next
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 6
+ 7 import HelVM.HelMA.Automaton.IO.EvaluatorIO
+ 8
+ 9 import HelVM.HelMA.Automaton.Instruction
+ 10
+ 11 import HelVM.HelMA.Automaton.Units.ALU as Stack
+ 12 import HelVM.HelMA.Automaton.Units.CPU as CPU
+ 13 import HelVM.HelMA.Automaton.Units.LSU as LSU
+ 14 import HelVM.HelMA.Automaton.Units.Unit
+ 15
+ 16 import HelVM.HelIO.Containers.LLIndexSafe
+ 17
+ 18 import Control.Type.Operator
+ 19
+ 20 import Prelude hiding (swap)
+ 21
+ 22 next :: (SREvaluator Symbol s r m) => ControlUnit -> s -> r -> m $ Unit s r
+ 23 next (CU il ic is) s r = doInstruction' =<< indexSafe il ic where doInstruction' i = doInstruction i (CU il (ic+1) is) s r
+ 24
+ 25 stackNext :: (SREvaluator Symbol s r m) => ControlUnit -> r -> s -> m (Unit s r)
+ 26 stackNext cu r s = next cu s r
+ 27
+ 28 cuNext :: (SREvaluator Symbol s r m) => r -> ControlUnit -> s -> m (Unit s r)
+ 29 cuNext r cu s = next cu s r
+ 30
+ 31 ----
+ 32
+ 33 doInstruction :: (SREvaluator Symbol s r m) => Instruction -> ControlUnit -> s -> r -> m (Unit s r)
+ 34 doInstruction (IAL i) cu s r = stackNext cu r =<< alInstruction i s
+ 35 doInstruction (ILS i) cu s r = uncurry (next cu) . sluToTuple =<< slInstruction i (LSU s r)
+ 36 doInstruction (IControl i) cu s r = uncurry (cuNext r). cpuToTuple =<< controlInstruction i (CPU cu s)
+ 37 doInstruction End cu s r = pure $ Unit cu s r
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html
new file mode 100644
index 000000000..ac7fd28f0
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Lexer.hs.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Lexer where
+ 2
+ 3 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 4
+ 5 import HelVM.HelIO.ReadText
+ 6 import HelVM.HelMA.Automaton.API.IOTypes
+ 7 import HelVM.HelMA.Automaton.Types.TokenType
+ 8 import HelVM.HelMA.Automaton.WrapTokenList
+ 9
+ 10 -- | Lexer
+ 11
+ 12 tokenize :: TokenType -> Source -> TokenList
+ 13 tokenize VisibleTokenType = tokenizeVisible
+ 14 tokenize _ = tokenizeWhite
+ 15
+ 16 tokenizeVisible :: Source -> TokenList
+ 17 tokenizeVisible = unWrapTokenList . readVisibleTokens
+ 18
+ 19 tokenizeWhite :: Source -> TokenList
+ 20 tokenizeWhite = whiteTokenListToTokenList . unWrapTokenList . readWhiteTokens
+ 21
+ 22 readVisibleTokens :: Source -> VisibleTokens
+ 23 readVisibleTokens source = readTextUnsafe source :: VisibleTokens
+ 24
+ 25 readWhiteTokens :: Source -> WhiteTokens
+ 26 readWhiteTokens source = readTextUnsafe source :: WhiteTokens
+ 27
+ 28 type VisibleTokens = WrapTokenList TokenList
+ 29
+ 30 type WhiteTokens = WrapTokenList WhiteTokenList
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html
new file mode 100644
index 000000000..10bbf0b57
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.OperandParsers.hs.html
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.OperandParsers where
+ 2
+ 3 import HelVM.HelMA.Automata.WhiteSpace.Symbol
+ 4 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 5
+ 6 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 7
+ 8 import HelVM.HelIO.Collections.SList
+ 9 import HelVM.HelIO.Control.Safe
+ 10 import HelVM.HelIO.Digit.ToDigit
+ 11
+ 12 type OperandParser m a = TokenList -> m (a , TokenList)
+ 13
+ 14 ----
+ 15
+ 16 parseIndex :: MonadSafe m => OperandParser m Index
+ 17 parseIndex = parseInt
+ 18
+ 19 parseSymbol :: MonadSafe m => OperandParser m Symbol
+ 20 parseSymbol = parseInteger
+ 21
+ 22 parseLabel :: MonadSafe m => Bool -> OperandParser m Label
+ 23 parseLabel False = parseDigitString
+ 24 parseLabel True = parseAsciiString
+ 25
+ 26 ----
+ 27
+ 28 parseInt :: MonadSafe m => OperandParser m Int
+ 29 parseInt tl = parseInt' <$> parseInteger tl where
+ 30 parseInt' (integer , tl') = (fromIntegral integer , tl')
+ 31
+ 32 parseInteger :: MonadSafe m => OperandParser m Integer
+ 33 parseInteger [] = liftError "EOL"
+ 34 parseInteger (S : tl) = parseUtil makeIntegral2FromList tl
+ 35 parseInteger (T : tl) = negationIntegral <$> parseUtil makeIntegral2FromList tl
+ 36 parseInteger (N : tl) = pure (0 , tl )
+ 37
+ 38 negationIntegral :: (Integer , TokenList) -> (Integer , TokenList)
+ 39 negationIntegral (i , l) = (-i , l)
+ 40
+ 41 parseNatural :: MonadSafe m => OperandParser m Natural
+ 42 parseNatural = parseUtil makeIntegral2FromList
+ 43
+ 44 parseUtil :: MonadSafe m => (TokenList -> m a) -> OperandParser m a
+ 45 parseUtil maker = go ([] :: TokenList) where
+ 46 go acc [] = liftError $ show acc
+ 47 go acc (N:tl) = moveSafe (maker acc , tl)
+ 48 go acc (t:tl) = go (t : acc) tl
+ 49
+ 50 parseDigitString :: MonadSafe m => OperandParser m SString
+ 51 parseDigitString tl = moveSafe =<< parseString' makeDigitStringFromList tl
+ 52
+ 53 parseAsciiString :: MonadSafe m => OperandParser m SString
+ 54 parseAsciiString tl = moveSafe =<< parseString' makeAsciiString28FromList tl
+ 55
+ 56 moveSafe :: MonadSafe m => (m a , TokenList) -> m (a , TokenList)
+ 57 moveSafe (a , tl) = appendErrorTuple ("TokenList" , show tl) $ ( , tl) <$> a
+ 58
+ 59 parseString' :: MonadSafe m => (TokenList -> a) -> OperandParser m a
+ 60 parseString' maker tl = parseString'' <$> splitByN tl where
+ 61 parseString'' (acc , tl') = (maker acc , tl')
+ 62
+ 63 splitByN :: MonadSafe m => OperandParser m TokenList
+ 64 splitByN [] = liftError "Empty list"
+ 65 splitByN (N : tl) = pure ([] , tl)
+ 66 splitByN (t : tl) = splitByN' <$> splitByN tl where
+ 67 splitByN' (acc , tl') = (t:acc , tl')
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html
new file mode 100644
index 000000000..8f77e63a7
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Parser.hs.html
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Parser (
+ 2 flipParseVisible,
+ 3 flipParseWhite,
+ 4 parseVisible,
+ 5 parseWhite,
+ 6 parse,
+ 7 parseTL
+ 8 ) where
+ 9
+ 10 import HelVM.HelMA.Automata.WhiteSpace.Lexer
+ 11 import HelVM.HelMA.Automata.WhiteSpace.OperandParsers
+ 12 import HelVM.HelMA.Automata.WhiteSpace.Token
+ 13
+ 14
+ 15 import HelVM.HelMA.Automaton.API.IOTypes
+ 16
+ 17 import HelVM.HelMA.Automaton.Instruction
+ 18 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 19 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 20 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 21 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 22
+ 23 import HelVM.HelMA.Automaton.Types.TokenType
+ 24
+ 25 import HelVM.HelIO.Control.Safe
+ 26
+ 27 -- FIXME
+ 28 flipParseVisible :: Bool -> Source -> Safe InstructionList
+ 29 flipParseVisible = flip parseVisible
+ 30
+ 31 flipParseWhite :: Bool -> Source -> Safe InstructionList
+ 32 flipParseWhite = flip parseWhite
+ 33
+ 34 parseVisible :: Source -> Bool -> Safe InstructionList
+ 35 parseVisible = parse VisibleTokenType
+ 36
+ 37 parseWhite :: Source -> Bool -> Safe InstructionList
+ 38 parseWhite = parse WhiteTokenType
+ 39
+ 40 parse :: MonadSafe m => TokenType -> Source -> Bool -> m InstructionList
+ 41 parse tokenType = flip parseTL . tokenize tokenType
+ 42
+ 43 parseTL :: MonadSafe m => Bool -> TokenList -> m InstructionList
+ 44 parseTL ascii = go where
+ 45 go :: MonadSafe m => TokenList -> m InstructionList
+ 46 go [] = pure []
+ 47 -- | IAL instructions
+ 48 go (S:S:tl') = go' =<< parseSymbol tl' where go' (symbol , tl'') = (IAL (Cons symbol) : ) <$> go tl''
+ 49 go (S:T:S:tl') = go' =<< parseIndex tl' where go' (index , tl'') = (IAL (SStatic index Copy) : ) <$> go tl''
+ 50 go (S:T:T:tl') = panic "STT" tl'
+ 51 go (S:T:N:tl') = go' =<< parseIndex tl' where go' (index , tl'') = (IAL (SStatic index Slide) : ) <$> go tl''
+ 52 go (S:N:S:tl') = (IAL Dup : ) <$> go tl'
+ 53 go (S:N:T:tl') = (IAL Swap : ) <$> go tl'
+ 54 go (S:N:N:tl') = (IAL Discard : ) <$> go tl'
+ 55 --Arithmetic
+ 56 go (T:S:S:S:tl') = (IAL (Binary Add) : ) <$> go tl'
+ 57 go (T:S:S:T:tl') = (IAL (Binary Sub) : ) <$> go tl'
+ 58 go (T:S:S:N:tl') = (IAL (Binary Mul) : ) <$> go tl'
+ 59 go (T:S:T:S:tl') = (IAL (Binary Div) : ) <$> go tl'
+ 60 go (T:S:T:T:tl') = (IAL (Binary Mod) : ) <$> go tl'
+ 61 go (T:S:T:N:tl') = panic "TSTN" tl'
+ 62 go (T:S:N:S:tl') = panic "TSNS" tl'
+ 63 go (T:S:N:T:tl') = panic "TSNT" tl'
+ 64 go (T:S:N:N:tl') = panic "TSNN" tl'
+ 65 -- | Heap access
+ 66 go (T:T:S:tl') = (ILS Store : ) <$> go tl'
+ 67 go (T:T:T:tl') = (ILS Load : ) <$> go tl'
+ 68 go (T:T:N:tl') = panic "TTN" tl'
+ 69 -- | IControl
+ 70 go (N:S:S:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (Mark label) : ) <$> go tl''
+ 71 go (N:S:T:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label Call ) : ) <$> go tl''
+ 72 go (N:S:N:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label Jump ) : ) <$> go tl''
+ 73 go (N:T:S:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label (Branch EZ)) : ) <$> go tl''
+ 74 go (N:T:T:tl') = go' =<< parseLabel ascii tl' where go' (label , tl'') = (IControl (CStatic label (Branch LTZ)) : ) <$> go tl''
+ 75 go (N:T:N:tl') = (IControl Return : ) <$> go tl'
+ 76 go (N:N:S:tl') = panic "NNS" tl'
+ 77 go (N:N:T:tl') = panic "NNT" tl'
+ 78 go (N:N:N:tl') = (End : ) <$> go tl'
+ 79 -- | IO instructions
+ 80 go (T:N:S:S:tl') = (IAL (SIO OutputChar) : ) <$> go tl'
+ 81 go (T:N:S:T:tl') = (IAL (SIO OutputDec) : ) <$> go tl'
+ 82 go (T:N:S:N:tl') = panic "TNSN" tl'
+ 83 go (T:N:T:S:tl') = (ILS (MIO InputChar) : ) <$> go tl'
+ 84 go (T:N:T:T:tl') = (ILS (MIO InputDec) : ) <$> go tl'
+ 85 go (T:N:T:N:tl') = panic "TNTN" tl'
+ 86 go (T:N:N:S:tl') = panic "TNNS" tl'
+ 87 go (T:N:N:T:tl') = panic "TNNT" tl'
+ 88 go (T:N:N:N:tl') = panic "TNNN" tl'
+ 89 go tl' = panic (show tl') []
+ 90
+ 91 panic :: MonadSafe m => Text -> TokenList -> m InstructionList
+ 92 panic token tl = liftErrorTupleList [("Unrecognised tokenl" , token) , ("Rest tokens" , show tl)]
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html
new file mode 100644
index 000000000..7097b0beb
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.SimpleParams.hs.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.SimpleParams where
+ 2
+ 3 import HelVM.HelMA.Automaton.API.IOTypes
+ 4 import HelVM.HelMA.Automaton.Types.DumpType
+ 5 import HelVM.HelMA.Automaton.Types.RAMType
+ 6 import HelVM.HelMA.Automaton.Types.StackType
+ 7 import HelVM.HelMA.Automaton.Types.TokenType
+ 8
+ 9 -- | Construction for tests
+ 10 simpleParamsWithDefaultsAndWhiteTokenType :: Bool -> Source -> SimpleParams
+ 11 simpleParamsWithDefaultsAndWhiteTokenType = simpleParamsWithDefaults WhiteTokenType
+ 12
+ 13 simpleParamsWithDefaultsAndVisibleTokenType :: Bool -> Source -> SimpleParams
+ 14 simpleParamsWithDefaultsAndVisibleTokenType = simpleParamsWithDefaults VisibleTokenType
+ 15
+ 16 simpleParamsWithDefaults :: TokenType -> Bool -> Source -> SimpleParams
+ 17 simpleParamsWithDefaults tt = simpleParams tt (defaultStackType , defaultRAMType)
+ 18
+ 19 -- | Construction for benchmark
+ 20 simpleParamsWithWhiteTokenType :: (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 21 simpleParamsWithWhiteTokenType = simpleParams WhiteTokenType
+ 22
+ 23 simpleParamsWithVisibleTokenType :: (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 24 simpleParamsWithVisibleTokenType = simpleParams VisibleTokenType
+ 25
+ 26 simpleParams :: TokenType -> (StackType, RAMType) -> Bool -> Source -> SimpleParams
+ 27 simpleParams tt (st , rt) al s = SimpleParams
+ 28 { tokenType = tt
+ 29 , source = s
+ 30 , asciiLabel = al
+ 31 , stackType = st
+ 32 , ramType = rt
+ 33 , dumpType = Pretty
+ 34 }
+ 35
+ 36 -- | Type
+ 37 data SimpleParams = SimpleParams
+ 38 { tokenType :: !TokenType
+ 39 , source :: !Source
+ 40 , asciiLabel :: !Bool
+ 41 , stackType :: !StackType
+ 42 , ramType :: !RAMType
+ 43 , dumpType :: !DumpType
+ 44 }
+ 45
+ 46
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html
new file mode 100644
index 000000000..6cb7c3008
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.WhiteSpace.Token.hs.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.WhiteSpace.Token where
+ 2
+ 3 import HelVM.HelIO.Collections.SList
+ 4 import HelVM.HelIO.Control.Safe
+ 5 import HelVM.HelIO.Digit.ToDigit
+ 6
+ 7 import Text.Read
+ 8
+ 9 import qualified Text.Show
+ 10
+ 11 data Token = S | T | N
+ 12 deriving stock (Bounded , Enum , Eq , Read , Show )
+ 13
+ 14 type TokenList = [Token]
+ 15 type TokenSList = SList Token
+ 16
+ 17 instance ToDigit Token where
+ 18 toDigit S = pure 0
+ 19 toDigit T = pure 1
+ 20 toDigit t = liftErrorWithPrefix "Wrong token" $ show t
+ 21
+ 22 ----
+ 23
+ 24 newtype WhiteToken = WhiteToken { unWhiteToken :: Token}
+ 25 deriving stock (Eq )
+ 26
+ 27 instance Show WhiteToken where
+ 28 show (WhiteToken S) = " "
+ 29 show (WhiteToken T) = "\t"
+ 30 show (WhiteToken N) = "\n"
+ 31
+ 32 -- | Scanner
+ 33 instance Read WhiteToken where
+ 34 readsPrec _ " " = [( WhiteToken S , "")]
+ 35 readsPrec _ "\t" = [( WhiteToken T , "")]
+ 36 readsPrec _ "\n" = [( WhiteToken N , "")]
+ 37 readsPrec _ _ = []
+ 38
+ 39 type WhiteTokenList = [WhiteToken]
+ 40
+ 41 whiteTokenListToTokenList :: WhiteTokenList -> TokenList
+ 42 whiteTokenListToTokenList = fmap unWhiteToken
+ 43
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html
new file mode 100644
index 000000000..5aabe2f22
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Automaton.hs.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Automaton (
+ 2 evalParams,
+ 3 eval,
+ 4 ) where
+ 5
+ 6 import HelVM.HelMA.Automata.Zot.Evaluator
+ 7 import HelVM.HelMA.Automata.Zot.Expression
+ 8 import HelVM.HelMA.Automata.Zot.Parser
+ 9
+ 10 import HelVM.HelMA.Automaton.API.EvalParams
+ 11 import HelVM.HelMA.Automaton.API.IOTypes
+ 12
+ 13 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 14
+ 15 import HelVM.HelIO.Containers.Util
+ 16 import HelVM.HelIO.Control.Safe
+ 17
+ 18 import HelVM.HelIO.Digit.Digitable
+ 19 import HelVM.HelIO.Digit.ToDigit
+ 20
+ 21 import HelVM.HelIO.ListLikeUtil
+ 22
+ 23 import Control.Monad.Writer.Lazy
+ 24
+ 25 evalParams :: BIO m => EvalParams -> m ()
+ 26 evalParams p = wPutStr =<< eval (asciiLabel p) (source p) =<< wGetContents
+ 27
+ 28 eval :: MonadSafe m => Bool -> Source -> Input -> m Output
+ 29 eval False source input = pure $ showFoldable $ evalSource source input
+ 30 eval True source input = (makeAsciiText28 . convert . evalSource source) . showExpressionList =<< textToDL input
+ 31
+ 32 evalSource :: Source -> Input -> ExpressionDList
+ 33 evalSource source input = evalText $ source <> input
+ 34
+ 35 evalText :: Text -> ExpressionDList
+ 36 evalText = execWriter . evalExpressionList . parse
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html
new file mode 100644
index 000000000..6a1b85405
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Evaluator.hs.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Evaluator (
+ 2 evalExpressionList,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.Zot.Expression
+ 6
+ 7 import Control.Monad.Writer.Lazy
+ 8
+ 9 import qualified Data.ListLike as LL
+ 10
+ 11 -- | High-level Expressions
+ 12 evalExpressionList :: ExpressionList -> Out Expression
+ 13 evalExpressionList el = foldExpression el >><< outputExpression >>< printExpression
+ 14
+ 15 foldExpression :: ExpressionList -> Out Expression
+ 16 foldExpression = foldM (><) emptyExpression
+ 17
+ 18 emptyExpression :: Expression
+ 19 emptyExpression = contExpression iExpression
+ 20
+ 21 outputExpression :: Out Expression
+ 22 outputExpression = kExpression ><< kExpression ><< kExpression ><< kExpression ><< kExpression ><< kExpression >< iExpression
+ 23
+ 24 printExpression :: Expression
+ 25 printExpression = Expression innerPrintExpression
+ 26
+ 27 innerPrintExpression :: Expression -> Out Expression
+ 28 innerPrintExpression f = interrogateExpression f >>< Zero >>< One >>= tell . LL.singleton >> pure printExpression
+ 29
+ 30 interrogateExpression :: Expression -> Out Expression
+ 31 interrogateExpression f = f >< iExpression >>< iExpression >>< iExpression >>< kExpression
+ 32
+ 33 -- | Operators
+ 34 infixl 9 ><
+ 35 (><) :: Expression -> Expression -> Out Expression
+ 36 (><) Zero = (zeroExpression ><)
+ 37 (><) One = (oneExpression ><)
+ 38 (><) (Expression f) = f
+ 39
+ 40 infixl 6 >><
+ 41 (>><) :: Out Expression -> Expression -> Out Expression
+ 42 f >>< a = f >>= (>< a)
+ 43
+ 44 infixr 8 ><<
+ 45 (><<) :: Expression -> Out Expression -> Out Expression
+ 46 f ><< a = (f ><) =<< a
+ 47
+ 48 infixl 7 >><<
+ 49 (>><<) :: Out Expression -> Out Expression -> Out Expression
+ 50 f >><< a = f >>= (><< a)
+ 51
+ 52
+ 53 -- | Low-level Expressions
+ 54 zeroExpression :: Expression
+ 55 zeroExpression = contExpression $ Expression $ \ f -> f >< sExpression >>< kExpression
+ 56
+ 57 oneExpression :: Expression
+ 58 oneExpression = makeExpression $ \c -> contExpression $ makeExpression $ \l -> contExpression $ Expression $ \r -> c ><< l >< r
+ 59
+ 60 contExpression :: Expression -> Expression
+ 61 contExpression = Expression . flip (><)
+ 62
+ 63 sExpression :: Expression
+ 64 sExpression = makeExpression $ \x -> makeExpression $ \y -> Expression $ \z -> x >< z >><< y >< z
+ 65
+ 66 kExpression :: Expression
+ 67 kExpression = makeExpression $ makeExpression . const
+ 68
+ 69 iExpression :: Expression
+ 70 iExpression = makeExpression id
+ 71
+ 72 makeExpression :: (Expression -> Expression) -> Expression
+ 73 makeExpression f = Expression $ pure . f
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html
new file mode 100644
index 000000000..0e41ae008
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Expression.hs.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Expression where
+ 2
+ 3 import HelVM.HelIO.Control.Safe
+ 4
+ 5 import HelVM.HelIO.Containers.Util
+ 6 import HelVM.HelIO.Digit.Digitable
+ 7 import HelVM.HelIO.Digit.ToDigit
+ 8
+ 9 import Control.Monad.Writer.Lazy
+ 10
+ 11 import qualified Data.DList as D
+ 12
+ 13 import Text.Read
+ 14 import qualified Text.Show
+ 15
+ 16 showExpressionList :: ExpressionList -> Text
+ 17 showExpressionList = showFoldable
+ 18
+ 19 readExpressionList :: Text -> ExpressionList
+ 20 readExpressionList = stringToExpressionList . toString
+ 21
+ 22 stringToExpressionList :: String -> ExpressionList
+ 23 stringToExpressionList s = charToExpressionList =<< s
+ 24
+ 25 charToExpressionList :: Char -> ExpressionList
+ 26 charToExpressionList = maybeToList . rightToMaybe . charToExpressionSafe
+ 27
+ 28 charToExpression :: Char -> Expression
+ 29 charToExpression = unsafe . charToExpressionSafe
+ 30
+ 31 charToExpressionSafe :: MonadSafe m => Char -> m Expression
+ 32 charToExpressionSafe '0' = pure Zero
+ 33 charToExpressionSafe '1' = pure One
+ 34 charToExpressionSafe c = liftErrorWithPrefix "charToExpression" $ one c
+ 35
+ 36 -- | Types
+ 37 type ExpressionDList = D.DList Expression
+ 38
+ 39 type ExpressionList = [Expression]
+ 40
+ 41 data Expression = Zero | One | Expression (Expression -> Out Expression)
+ 42
+ 43 type Out = Writer ExpressionDList
+ 44
+ 45 instance Read Expression where
+ 46 readsPrec _ [] = []
+ 47 readsPrec _ (c : s) = [(charToExpression c , s)]
+ 48 readList s = [(stringToExpressionList s , "")]
+ 49
+ 50 instance Show Expression where
+ 51 show Zero = "0"
+ 52 show One = "1"
+ 53 show (Expression _) = "function"
+ 54 showList fs = (concatMap show fs <>)
+ 55
+ 56 instance Digitable Expression where
+ 57 fromDigit 0 = pure Zero
+ 58 fromDigit 1 = pure One
+ 59 fromDigit t = wrongToken t
+ 60
+ 61 instance ToDigit Expression where
+ 62 toDigit Zero = pure 0
+ 63 toDigit One = pure 1
+ 64 toDigit t = wrongToken t
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html
new file mode 100644
index 000000000..d8a3a6160
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automata.Zot.Parser.hs.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automata.Zot.Parser (
+ 2 parse,
+ 3 ) where
+ 4
+ 5 import HelVM.HelMA.Automata.Zot.Expression
+ 6
+ 7 import qualified Data.Text as Text
+ 8
+ 9 parse :: Text -> ExpressionList
+ 10 parse = concatMap parseLine . lines
+ 11
+ 12 parseLine :: Text -> ExpressionList
+ 13 parseLine = readExpressionList . filter01 . Text.takeWhile (/= '#')
+ 14
+ 15 filter01 :: Text -> Text
+ 16 filter01 = Text.filter is01
+ 17
+ 18 is01 :: Char -> Bool
+ 19 is01 c = c == '0' || c == '1'
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html
new file mode 100644
index 000000000..8b25d1153
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.API.EvalParams.hs.html
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.API.EvalParams where
+ 2
+ 3 import HelVM.HelMA.Automaton.API.IOTypes
+ 4 import HelVM.HelMA.Automaton.API.TypeOptions
+ 5
+ 6 import HelVM.HelMA.Automaton.Types.CellType
+ 7 import HelVM.HelMA.Automaton.Types.DumpType
+ 8 import HelVM.HelMA.Automaton.Types.IntCellType
+ 9 import HelVM.HelMA.Automaton.Types.RAMType
+ 10 import HelVM.HelMA.Automaton.Types.StackType
+ 11
+ 12 -- | Accessors
+ 13 ramTypeOptions :: EvalParams -> RAMType
+ 14 ramTypeOptions = ram . typeOptions
+ 15
+ 16 stackTypeOptions :: EvalParams -> StackType
+ 17 stackTypeOptions = stack . typeOptions
+ 18
+ 19 cellTypeOptions :: EvalParams -> CellType
+ 20 cellTypeOptions = cell . typeOptions
+ 21
+ 22 intCellTypeOptions :: EvalParams -> IntCellType
+ 23 intCellTypeOptions = intCell . typeOptions
+ 24
+ 25 dumpTypeOptions :: EvalParams -> DumpType
+ 26 dumpTypeOptions = dumpType . typeOptions
+ 27
+ 28 -- | Type
+ 29 data EvalParams = EvalParams
+ 30 { compile :: !Bool
+ 31 , asciiLabel :: !Bool
+ 32 , source :: !Source
+ 33 , typeOptions :: !TypeOptions
+ 34 }
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html
new file mode 100644
index 000000000..363cc695b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.API.TypeOptions.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.API.TypeOptions where
+ 2
+ 3 import HelVM.HelMA.Automaton.Types.CellType
+ 4 import HelVM.HelMA.Automaton.Types.DumpType
+ 5 import HelVM.HelMA.Automaton.Types.IntCellType
+ 6 import HelVM.HelMA.Automaton.Types.RAMType
+ 7 import HelVM.HelMA.Automaton.Types.StackType
+ 8
+ 9 -- | Types
+ 10
+ 11 data TypeOptions = TypeOptions
+ 12 { ram :: !RAMType
+ 13 , stack :: !StackType
+ 14 , cell :: !CellType
+ 15 , intCell :: !IntCellType
+ 16 , dumpType :: !DumpType
+ 17 }
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html
new file mode 100644
index 000000000..4d449c18b
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.BusinessIO.hs.html
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.IO.BusinessIO (
+ 2
+ 3 Element,
+ 4 BIO,
+ 5 BusinessIO,
+ 6
+ 7 wPutAsChar,
+ 8 wPutAsDec,
+ 9 wGetCharAs,
+ 10 wGetDecAs,
+ 11
+ 12 -- wPutIntAsChar,
+ 13 -- wPutIntAsDec,
+ 14 -- wGetCharAsInt,
+ 15 -- wGetDecAsInt,
+ 16
+ 17 wGetChar,
+ 18 wPutChar,
+ 19 wGetLine,
+ 20 wGetContents,
+ 21 wPutStr,
+ 22 wPutStrLn,
+ 23 wFlush,
+ 24 wLogStr,
+ 25 wLogStrLn,
+ 26 wLogShow,
+ 27
+ 28 logStr,
+ 29 flush,
+ 30 ) where
+ 31
+ 32 import HelVM.HelIO.Control.Control
+ 33 import HelVM.HelIO.Control.Safe
+ 34
+ 35 import HelVM.HelIO.ReadText
+ 36
+ 37 import Data.Default as Default
+ 38 import Data.Text.IO (getContents)
+ 39
+ 40 import System.IO hiding (getContents, getLine, hFlush, stderr, stdout)
+ 41
+ 42 type Element e = (ReadShow e , Integral e , Default e)
+ 43 type ReadShow e = (Read e , Show e)
+ 44 type BIO m = (MonadControl m , BusinessIO m)
+ 45
+ 46 class Monad m => BusinessIO m where
+ 47
+ 48 wPutAsChar :: Integral v => v -> m ()
+ 49 wPutAsDec :: Integral v => v -> m ()
+ 50 wGetCharAs :: Integral v => m v
+ 51 wGetDecAs :: Integral v => m v
+ 52
+ 53 wPutIntAsChar :: Int -> m ()
+ 54 wPutIntAsDec :: Int -> m ()
+ 55 wGetCharAsInt :: m Int
+ 56 wGetDecAsInt :: m Int
+ 57
+ 58 wGetChar :: m Char
+ 59 wGetLine :: m Text
+ 60 wGetContents :: m Text
+ 61 wPutChar :: Char -> m ()
+ 62 wPutStr :: Text -> m ()
+ 63 wPutStrLn :: Text -> m ()
+ 64 wLogStr :: Text -> m ()
+ 65 wLogStrLn :: Text -> m ()
+ 66 wLogShow :: Show s => s -> m ()
+ 67 wFlush :: m ()
+ 68
+ 69 wPutAsChar = wPutIntAsChar . fromIntegral
+ 70 wPutAsDec = wPutIntAsDec . fromIntegral
+ 71 wGetCharAs = fromIntegral <$> wGetCharAsInt
+ 72 wGetDecAs = fromIntegral <$> wGetDecAsInt
+ 73
+ 74 wPutIntAsChar = wPutChar . chr
+ 75 wPutIntAsDec = wPutStr . show
+ 76 wGetCharAsInt = ord <$> wGetChar
+ 77 wGetDecAsInt = readTextUnsafe <$> wGetLine
+ 78
+ 79 wPutStrLn s = wPutStr $ s <> "\n"
+ 80 wLogStrLn s = wLogStr $ s <> "\n"
+ 81 wLogShow = wLogStrLn . show
+ 82 wFlush = pass
+ 83
+ 84 logStr :: Text -> IO ()
+ 85 logStr = hPutStrLn stderr . toString
+ 86
+ 87 flush :: IO ()
+ 88 flush = hFlush stdout
+ 89
+ 90 instance BusinessIO IO where
+ 91 wGetChar = getChar
+ 92 wGetLine = getLine
+ 93 wGetContents = getContents
+ 94 wPutChar = putChar
+ 95 wPutStr = putText
+ 96 wPutStrLn = putTextLn
+ 97 wLogStr = logStr
+ 98 wFlush = flush
+ 99
+ 100 type ExceptTLegacy = ExceptT String
+ 101
+ 102 exceptTLegacy :: Monad m => m a -> ExceptTLegacy m a
+ 103 exceptTLegacy a = ExceptT $ pure <$> a
+ 104
+ 105 instance BusinessIO (ExceptT String IO) where --FIXXME
+ 106 wGetChar = exceptTLegacy getChar
+ 107 wGetLine = exceptTLegacy getLine
+ 108 wGetContents = exceptTLegacy getContents
+ 109 wPutChar = exceptTLegacy . putChar
+ 110 wPutStr = exceptTLegacy . putText
+ 111 wPutStrLn = exceptTLegacy . putTextLn
+ 112 wLogStr = exceptTLegacy . logStr
+ 113 wFlush = exceptTLegacy flush
+ 114
+ 115 instance BusinessIO (SafeT IO) where
+ 116 wGetChar = safeT getChar
+ 117 wGetLine = safeT getLine
+ 118 wGetContents = safeT getContents
+ 119 wPutChar = safeT . putChar
+ 120 wPutStr = safeT . putText
+ 121 wPutStrLn = safeT . putTextLn
+ 122 wLogStr = safeT . logStr
+ 123 wFlush = safeT flush
+ 124
+ 125 instance BusinessIO (ControlT IO) where
+ 126 wGetChar = controlT getChar
+ 127 wGetLine = controlT getLine
+ 128 wGetContents = controlT getContents
+ 129 wPutChar = controlT . putChar
+ 130 wPutStr = controlT . putText
+ 131 wPutStrLn = controlT . putTextLn
+ 132 wLogStr = controlT . logStr
+ 133 wFlush = controlT flush
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html
new file mode 100644
index 000000000..6d53f1fda
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.FreeIO.hs.html
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 {-# LANGUAGE DeriveFunctor #-}
+ 2 module HelVM.HelMA.Automaton.IO.FreeIO (
+ 3 interpretFreeIOToBusinessIO,
+ 4 logInput,
+ 5 logOutput,
+ 6 FreeIO,
+ 7 ) where
+ 8
+ 9 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 10
+ 11 import HelVM.HelIO.Control.Control
+ 12 import HelVM.HelIO.Control.Safe
+ 13
+ 14 import Control.Monad.Free
+ 15 import Control.Natural
+ 16
+ 17 interpretFreeIOToBusinessIO :: BusinessIO m => FreeIO a -> m a
+ 18 interpretFreeIOToBusinessIO = foldFree interpretFreeIOFToBusinessIO
+ 19
+ 20 logInput :: FreeIO ~> FreeIO
+ 21 logInput = foldFree logInputF
+ 22
+ 23 logOutput :: FreeIO ~> FreeIO
+ 24 logOutput = foldFree logOutputF
+ 25
+ 26 ----
+ 27
+ 28 interpretFreeIOFToBusinessIO :: BusinessIO m => FreeIOF a -> m a
+ 29 interpretFreeIOFToBusinessIO (GetChar cd) = cd <$> wGetChar
+ 30 interpretFreeIOFToBusinessIO (GetLine cd) = cd <$> wGetLine
+ 31 interpretFreeIOFToBusinessIO (GetContents cd) = cd <$> wGetContents
+ 32 interpretFreeIOFToBusinessIO (PutChar c v) = wPutChar c $> v
+ 33 interpretFreeIOFToBusinessIO (PutStr s v) = wPutStr s $> v
+ 34 interpretFreeIOFToBusinessIO (PutStrLn s v) = wPutStrLn s $> v
+ 35 interpretFreeIOFToBusinessIO (LogStr s v) = wLogStr s $> v
+ 36 interpretFreeIOFToBusinessIO (LogStrLn s v) = wLogStrLn s $> v
+ 37 interpretFreeIOFToBusinessIO (Flush v) = wFlush $> v
+ 38
+ 39 ----
+ 40
+ 41 logInputF :: FreeIOF a -> FreeIO a
+ 42 logInputF (GetChar cd) = freeGetChar >>= (\c -> liftF $ LogStr (one c) (cd c))
+ 43 logInputF (GetLine cd) = freeGetLine >>= (\l -> liftF $ LogStr l (cd l))
+ 44 logInputF (GetContents cd) = freeGetContents >>= (\l -> liftF $ LogStr l (cd l))
+ 45 logInputF f = liftF f
+ 46
+ 47 logOutputF :: FreeIOF a -> FreeIO a
+ 48 logOutputF f@(PutChar c v) = liftF (LogStr (one c) v) *> liftF f
+ 49 logOutputF f@(PutStr s v) = liftF (LogStr s v) *> liftF f
+ 50 logOutputF f = liftF f
+ 51
+ 52 -- | Instances
+ 53 instance BusinessIO FreeIO where
+ 54 wGetChar = freeGetChar
+ 55 wGetLine = freeGetLine
+ 56 wGetContents = freeGetContents
+ 57 wPutChar = freePutChar
+ 58 wPutStr = freePutStr
+ 59 wPutStrLn = freePutStrLn
+ 60 wLogStr = freeLogStr
+ 61 wLogStrLn = freeLogStrLn
+ 62 wFlush = freeFlush
+ 63
+ 64 instance BusinessIO (SafeT FreeIO) where
+ 65 wGetChar = safeT freeGetChar
+ 66 wGetLine = safeT freeGetLine
+ 67 wGetContents = safeT freeGetContents
+ 68 wPutChar = safeT . freePutChar
+ 69 wPutStr = safeT . freePutStr
+ 70 wPutStrLn = safeT . freePutStrLn
+ 71 wLogStr = safeT . freeLogStr
+ 72 wLogStrLn = safeT . freeLogStrLn
+ 73 wFlush = safeT freeFlush
+ 74
+ 75 instance BusinessIO (ControlT FreeIO) where
+ 76 wGetChar = controlT freeGetChar
+ 77 wGetLine = controlT freeGetLine
+ 78 wGetContents = controlT freeGetContents
+ 79 wPutChar = controlT . freePutChar
+ 80 wPutStr = controlT . freePutStr
+ 81 wPutStrLn = controlT . freePutStrLn
+ 82 wLogStr = controlT . freeLogStr
+ 83 wLogStrLn = controlT . freeLogStrLn
+ 84 wFlush = controlT freeFlush
+ 85
+ 86 -- | Low level functions
+ 87 freeGetChar :: FreeIO Char
+ 88 freeGetChar = liftF $ GetChar id
+ 89
+ 90 freeGetLine :: FreeIO Text
+ 91 freeGetLine = liftF $ GetLine id
+ 92
+ 93 freeGetContents :: FreeIO Text
+ 94 freeGetContents = liftF $ GetContents id
+ 95
+ 96 freePutChar :: Char -> FreeIO ()
+ 97 freePutChar = liftF . flip PutChar ()
+ 98
+ 99 freePutStr :: Text -> FreeIO ()
+ 100 freePutStr = liftF . flip PutStr ()
+ 101
+ 102 freePutStrLn :: Text -> FreeIO ()
+ 103 freePutStrLn = liftF . flip PutStrLn ()
+ 104
+ 105 freeLogStr :: Text -> FreeIO ()
+ 106 freeLogStr = liftF . flip LogStr ()
+ 107
+ 108 freeLogStrLn :: Text -> FreeIO ()
+ 109 freeLogStrLn = liftF . flip LogStrLn ()
+ 110
+ 111 freeFlush :: FreeIO ()
+ 112 freeFlush = liftF $ Flush ()
+ 113
+ 114 -- | Types
+ 115 type FreeIO = Free FreeIOF
+ 116
+ 117 data FreeIOF a
+ 118 = GetChar (Char -> a)
+ 119 | GetLine (Text -> a)
+ 120 | GetContents (Text -> a)
+ 121 | PutChar Char a
+ 122 | PutStr Text a
+ 123 | PutStrLn Text a
+ 124 | LogStr Text a
+ 125 | LogStrLn Text a
+ 126 | Flush a
+ 127 deriving stock (Functor )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html
new file mode 100644
index 000000000..4bbc46214
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.IO.MockIO.hs.html
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.IO.MockIO (
+ 2 ioExecMockIOBatch,
+ 3 ioExecMockIOWithInput,
+ 4
+ 5 safeExecMockIOBatch,
+ 6 safeExecMockIOWithInput,
+ 7
+ 8 execMockIOBatch,
+ 9 execMockIOWithInput,
+ 10
+ 11 runMockIO,
+ 12 createMockIO,
+ 13 calculateOutput,
+ 14 calculateLogged,
+ 15
+ 16 MockIO,
+ 17 MockIOData,
+ 18 ) where
+ 19
+ 20 import HelVM.HelMA.Automaton.API.IOTypes
+ 21 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 22
+ 23 import HelVM.HelIO.Control.Control
+ 24 import HelVM.HelIO.Control.Safe
+ 25
+ 26 import HelVM.HelIO.ListLikeUtil
+ 27
+ 28 import Data.Text as Text
+ 29
+ 30 ioExecMockIOBatch :: ControlT MockIO () -> IO MockIOData
+ 31 ioExecMockIOBatch = ioExecMockIOWithInput ""
+ 32
+ 33 ioExecMockIOWithInput :: Input -> ControlT MockIO () -> IO MockIOData
+ 34 ioExecMockIOWithInput i = safeToIO . safeExecMockIOWithInput i
+ 35
+ 36 safeExecMockIOBatch :: ControlT MockIO () -> Safe MockIOData
+ 37 safeExecMockIOBatch = safeExecMockIOWithInput ""
+ 38
+ 39 safeExecMockIOWithInput :: Input -> ControlT MockIO () -> Safe MockIOData
+ 40 safeExecMockIOWithInput i = pure . runMockIO i . runControlT
+ 41
+ 42 execMockIOBatch :: MockIO () -> MockIOData
+ 43 execMockIOBatch = execMockIOWithInput ""
+ 44
+ 45 execMockIOWithInput :: Input -> MockIO () -> MockIOData
+ 46 execMockIOWithInput i a = runMockIO i $ safeWithMessages <$> a
+ 47
+ 48 ----
+ 49
+ 50 runMockIO :: Input -> MockIO UnitSafeWithMessages -> MockIOData
+ 51 runMockIO i mockIO = flip mockDataLogStr mockIOData $ safeWithMessagesToText s
+ 52 where (s , mockIOData) = runState mockIO $ createMockIO i
+ 53
+ 54 createMockIO :: Input -> MockIOData
+ 55 createMockIO i = MockIOData (toString i) "" ""
+ 56
+ 57 calculateOutput :: MockIOData -> Output
+ 58 calculateOutput = calculateText . output
+ 59
+ 60 calculateLogged :: MockIOData -> Output
+ 61 calculateLogged = calculateText . logged
+ 62
+ 63 ----
+ 64
+ 65 instance BusinessIO MockIO where
+ 66 wGetChar = mockGetChar
+ 67 wGetLine = mockGetLine
+ 68 wGetContents = mockGetContent
+ 69 wPutChar = mockPutChar
+ 70 wPutStr = mockPutStr
+ 71 wLogStr = mockLogStr
+ 72
+ 73 instance BusinessIO (SafeT MockIO) where
+ 74 wGetChar = safeT mockGetChar
+ 75 wGetLine = safeT mockGetLine
+ 76 wGetContents = safeT mockGetContent
+ 77 wPutChar = safeT . mockPutChar
+ 78 wPutStr = safeT . mockPutStr
+ 79 wLogStr = safeT . mockLogStr
+ 80
+ 81 instance BusinessIO (ControlT MockIO) where
+ 82 wGetChar = mockGetCharSafe
+ 83 wGetLine = mockGetLineSafe
+ 84 wGetContents = controlT mockGetContent
+ 85 wPutChar = controlT . mockPutChar
+ 86 wPutStr = controlT . mockPutStr
+ 87 wLogStr = controlT . mockLogStr
+ 88
+ 89 ----
+ 90
+ 91 mockGetChar :: MonadMockIO m => m Char
+ 92 mockGetChar = mockGetChar' =<< get where
+ 93 mockGetChar' :: MonadMockIO m => MockIOData -> m Char
+ 94 mockGetChar' mockIO = orErrorTuple ("mockGetChar" , show mockIO) (top (input mockIO)) <$ put mockIO { input = orErrorTuple ("mockGetChar" , show mockIO) $ discard $ input mockIO }
+ 95
+ 96 mockGetLine :: MonadMockIO m => m Text
+ 97 mockGetLine = mockGetLine' =<< get where
+ 98 mockGetLine' :: MonadMockIO m => MockIOData -> m Text
+ 99 mockGetLine' mockIO = toText line <$ put mockIO { input = input' } where (line , input') = splitStringByLn $ input mockIO
+ 100
+ 101 mockGetContent :: MonadMockIO m => m Text
+ 102 mockGetContent = mockGetContent' =<< get where
+ 103 mockGetContent' :: MonadMockIO m => MockIOData -> m Text
+ 104 mockGetContent' mockIO = toText content <$ put mockIO { input = "" } where content = input mockIO
+ 105
+ 106 mockGetCharSafe :: MonadControlMockIO m => m Char
+ 107 mockGetCharSafe = mockGetChar' =<< get where
+ 108 mockGetChar' :: MonadControlMockIO m => MockIOData -> m Char
+ 109 mockGetChar' mockIO = appendErrorTuple ("mockGetCharSafe" , show mockIO) $ mockGetChar'' =<< unconsSafe (input mockIO) where
+ 110 mockGetChar'' (c, input') = put mockIO { input = input' } $> c
+ 111
+ 112 mockGetLineSafe :: MonadControlMockIO m => m Text
+ 113 mockGetLineSafe = mockGetLine' =<< get where
+ 114 mockGetLine' :: MonadControlMockIO m => MockIOData -> m Text
+ 115 mockGetLine' mockIO = toText line <$ put mockIO { input = input' } where (line , input') = splitStringByLn $ input mockIO
+ 116
+ 117
+ 118 mockPutChar :: Char -> MockIO ()
+ 119 mockPutChar = modify . mockDataPutChar
+ 120
+ 121 mockPutStr :: Text -> MockIO ()
+ 122 mockPutStr = modify . mockDataPutStr
+ 123
+ 124 mockLogStr :: Text -> MockIO ()
+ 125 mockLogStr = modify . mockDataLogStr
+ 126
+ 127 ----
+ 128
+ 129 mockDataPutChar :: Char -> MockIOData -> MockIOData
+ 130 mockDataPutChar char mockIO = mockIO { output = char : output mockIO }
+ 131
+ 132 mockDataPutStr :: Text -> MockIOData -> MockIOData
+ 133 mockDataPutStr text mockIO = mockIO { output = calculateString text <> output mockIO }
+ 134
+ 135 mockDataLogStr :: Text -> MockIOData -> MockIOData
+ 136 mockDataLogStr text mockIO = mockIO { logged = calculateString text <> logged mockIO }
+ 137
+ 138 ----
+ 139
+ 140 type MonadControlMockIO m = (MonadMockIO m , MonadControl m)
+ 141
+ 142 --type MonadSafeMockIO m = (MonadMockIO m , MonadSafe m)
+ 143
+ 144 type MonadMockIO m = MonadState MockIOData m
+ 145
+ 146 type MockIO = State MockIOData
+ 147
+ 148 calculateText :: String -> Output
+ 149 calculateText = Text.reverse . toText
+ 150
+ 151 calculateString :: Output -> String
+ 152 calculateString = toString . Text.reverse
+ 153
+ 154 data MockIOData = MockIOData
+ 155 { input :: !String
+ 156 , output :: !String
+ 157 , logged :: !String
+ 158 }
+ 159 deriving stock (Eq , Read , Show )
+ 160
+ 161 ----
+ 162
+ 163 splitStringByLn :: String -> (String , String)
+ 164 splitStringByLn = splitBy '\n'
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html
new file mode 100644
index 000000000..55759ae7a
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.ALInstruction.hs.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.ALInstruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 4
+ 5 -- | Constructors
+ 6
+ 7 blAnd :: Bool -> BinaryInstruction
+ 8 blAnd False = BAnd
+ 9 blAnd True = LAnd
+ 10
+ 11 blOr :: Bool -> BinaryInstruction
+ 12 blOr False = BOr
+ 13 blOr True = LOr
+ 14
+ 15 blXor :: Bool -> BinaryInstruction
+ 16 blXor False = BXor
+ 17 blXor True = LXor
+ 18
+ 19 blEQ :: Bool -> BinaryInstruction
+ 20 blEQ False = BEQ
+ 21 blEQ True = LEQ
+ 22
+ 23 blGT :: Bool -> BinaryInstruction
+ 24 blGT False = BGT
+ 25 blGT True = LGT
+ 26
+ 27 -- | Other functions
+ 28
+ 29 calculateOps :: Integral a => a -> a -> [BinaryInstruction] -> [a]
+ 30 calculateOps operand operand' = map (calculateOp operand operand')
+ 31
+ 32 calculateOp :: Integral a => a -> a -> BinaryInstruction -> a
+ 33 calculateOp operand operand' operation = doBinary operation operand' operand
+ 34
+ 35 doBinary :: Integral a => BinaryInstruction -> a -> a -> a
+ 36 doBinary Add = (+)
+ 37 doBinary Sub = (-)
+ 38 doBinary Mul = (*)
+ 39 doBinary Div = div
+ 40 doBinary Mod = mod
+ 41 doBinary o = error $ show o
+ 42
+ 43 -- | Types
+ 44
+ 45 data ALInstruction =
+ 46 Cons Integer
+ 47 | Unary !UnaryInstruction
+ 48 | Binary !BinaryInstruction
+ 49 | Binaries [BinaryInstruction]
+ 50 | SStatic !StackIndex !ManipulationInstruction
+ 51 | SDynamic !ManipulationInstruction
+ 52 | SIO !IOInstruction
+ 53 | Halibut
+ 54 | Pick
+ 55 | Dup
+ 56 | Rot
+ 57 | Swap
+ 58 | Discard
+ 59 deriving stock (Eq , Read , Show )
+ 60
+ 61 data UnaryInstruction = Neg | BNot | LNot
+ 62 deriving stock (Eq , Read , Show )
+ 63
+ 64 data BinaryInstruction =
+ 65 Add | Sub | Mul | Div | Mod
+ 66 | BAnd | BOr | BXor | BEQ | BGT
+ 67 | LAnd | LOr | LXor | LEQ | LGT
+ 68 deriving stock (Eq , Read , Show )
+ 69
+ 70 data ManipulationInstruction = Copy | Move | Slide
+ 71 deriving stock (Eq , Read , Show )
+ 72
+ 73 type StackIndex = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html
new file mode 100644
index 000000000..458afdd15
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.ControlInstruction.hs.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.ControlInstruction where
+ 2
+ 3 import HelVM.HelIO.Collections.SList
+ 4
+ 5 isNotJump :: Integral e => BranchTest -> e -> Bool
+ 6 isNotJump t = not . isJump t
+ 7
+ 8 isJump :: Integral e => BranchTest -> e -> Bool
+ 9 isJump EZ e = e == 0
+ 10 isJump LTZ e = e < 0
+ 11 isJump GTZ e = e > 0
+ 12
+ 13 -- | Types
+ 14 data ControlInstruction =
+ 15 Mark !Label
+ 16 | CStatic !Label !LabelInstruction
+ 17 | CDynamic !LabelInstruction
+ 18 | Return
+ 19 deriving stock (Eq , Read , Show )
+ 20
+ 21 type Label = SString
+ 22
+ 23 data LabelInstruction = Call | Jump | Branch !BranchTest
+ 24 deriving stock (Eq , Read , Show )
+ 25
+ 26 data BranchTest = EZ | LTZ | GTZ
+ 27 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html
new file mode 100644
index 000000000..95df8d9ea
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.IOInstruction.hs.html
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.IOInstruction where
+ 2
+ 3 data IOInstruction =
+ 4 OutputChar
+ 5 | OutputDec
+ 6 | InputChar
+ 7 | InputDec
+ 8 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html
new file mode 100644
index 000000000..8e565b994
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.LSInstruction.hs.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction.LSInstruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 4
+ 5 -- | Types
+ 6
+ 7 data LSInstruction =
+ 8 Load --Restore --Fetch
+ 9 | Store --Save
+ 10 | MIO !IOInstruction
+ 11 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.hs.html
new file mode 100644
index 000000000..9d7132219
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Instruction.hs.html
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Instruction where
+ 2
+ 3 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 4 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 5 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 6
+ 7 import Data.Vector as Vector
+ 8
+ 9 isMark :: Label -> Instruction -> Bool
+ 10 isMark l (IControl (Mark l')) = l == l'
+ 11 isMark _ _ = False
+ 12
+ 13 -- | Types
+ 14
+ 15 data Instruction =
+ 16 IAL !ALInstruction
+ 17 | ILS !LSInstruction
+ 18 | IControl !ControlInstruction
+ 19 | End
+ 20 deriving stock (Eq , Read , Show )
+ 21
+ 22 type InstructionList = [Instruction]
+ 23 type InstructionVector = Vector Instruction
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html
new file mode 100644
index 000000000..bf8caca64
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.CellType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.CellType where
+ 2
+ 3 -- | Constructors
+ 4 parseCellType :: String -> CellType
+ 5 parseCellType raw = valid $ readMaybe raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "CellType '" <> toText raw <> "' is not valid CellType. Valid cellTypes are : " <> show cellTypes
+ 8
+ 9 defaultCellType :: CellType
+ 10 defaultCellType = Word8Type
+ 11
+ 12 cellTypes :: [CellType]
+ 13 cellTypes = [Int8Type , Word8Type , Int16Type , Word16Type , Int32Type , Word32Type , Int64Type , Word64Type]
+ 14
+ 15 -- | Types
+ 16 data CellType = Int8Type | Word8Type | Int16Type | Word16Type | Int32Type | Word32Type | Int64Type | Word64Type
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html
new file mode 100644
index 000000000..62ed08dbf
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.DumpType.hs.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.DumpType where
+ 2
+ 3 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 4
+ 5 import HelVM.HelIO.Control.Logger
+ 6
+ 7 import HelVM.HelIO.Util
+ 8
+ 9 logDump :: (BIO m , Show d) => DumpType -> d -> m ()
+ 10 logDump dt d = logDump' $ dump dt d where
+ 11 logDump' Nothing = pass
+ 12 logDump' (Just t) = logMessageTuple ("dump" , t)
+ 13
+ 14 dump :: Show a => DumpType -> a -> Maybe Text
+ 15 dump No _ = Nothing
+ 16 dump Ugly a = Just $ show a
+ 17 dump Pretty a = Just $ showP a
+ 18
+ 19 -- | Constructors
+ 20 parseDumpType :: String -> DumpType
+ 21 parseDumpType raw = (valid . readMaybe) raw where
+ 22 valid (Just value) = value
+ 23 valid Nothing = error $ "DumpType '" <> toText raw <> "' is not valid DumpType. Valid dumpTypes are : " <> show dumpTypes
+ 24
+ 25 defaultDumpType :: DumpType
+ 26 defaultDumpType = No
+ 27
+ 28 dumpTypes :: [DumpType]
+ 29 dumpTypes = [No , Ugly , Pretty]
+ 30
+ 31 -- | Types
+ 32 data DumpType = No | Ugly | Pretty
+ 33 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html
new file mode 100644
index 000000000..6820efd95
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.IntCellType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.IntCellType where
+ 2
+ 3 -- | Constructors
+ 4 parseIntCellType :: String -> IntCellType
+ 5 parseIntCellType raw = (valid . readMaybe) raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "IntCellType '" <> toText raw <> "' is not valid IntCellType. Valid intCellTypes are : " <> show intCellTypes
+ 8
+ 9 defaultIntCellType :: IntCellType
+ 10 defaultIntCellType = IntegerType
+ 11
+ 12 intCellTypes :: [IntCellType]
+ 13 intCellTypes = [Int8Type , Int16Type , Int32Type , Int64Type , IntegerType]
+ 14
+ 15 -- | Types
+ 16 data IntCellType = Int8Type | Int16Type | Int32Type | Int64Type | IntegerType
+ 17 deriving stock (Bounded , Enum , Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html
new file mode 100644
index 000000000..73ff87384
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.RAMType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.RAMType where
+ 2
+ 3 -- | Constructors
+ 4 parseRAMType :: String -> RAMType
+ 5 parseRAMType raw = (valid . readMaybe) raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "RAMType '" <> toText raw <> "' is not valid RAMType. Valid ramTypes are : " <> show ramTypes
+ 8
+ 9 defaultRAMType :: RAMType
+ 10 defaultRAMType = MapListRAMType
+ 11
+ 12 ramTypes :: [RAMType]
+ 13 ramTypes = [ListRAMType , SeqRAMType , SListRAMType , MapListRAMType]
+ 14
+ 15 -- | Types
+ 16 data RAMType = ListRAMType | SeqRAMType | SListRAMType | MapListRAMType
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html
new file mode 100644
index 000000000..9b8c8627c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.StackType.hs.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.StackType where
+ 2
+ 3 -- | Constructors
+ 4 parseStackType :: String -> StackType
+ 5 parseStackType raw = valid $ readMaybe raw where
+ 6 valid (Just value) = value
+ 7 valid Nothing = error $ "StackType '" <> toText raw <> "' is not valid StackType. Valid stackTypes are : " <> show stackTypes
+ 8
+ 9 defaultStackType :: StackType
+ 10 defaultStackType = SeqStackType
+ 11
+ 12 stackTypes :: [StackType]
+ 13 stackTypes = [ListStackType , SeqStackType , SListStackType]
+ 14
+ 15 -- | Types
+ 16 data StackType = ListStackType | SeqStackType | SListStackType
+ 17 deriving stock (Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html
new file mode 100644
index 000000000..66779bcac
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Types.TokenType.hs.html
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Types.TokenType where
+ 2
+ 3 import HelVM.HelIO.SwitchEnum
+ 4
+ 5 -- | Constructors
+ 6 parseTokenType:: String -> TokenType
+ 7 parseTokenType raw = valid $ readMaybe raw where
+ 8 valid (Just value) = value
+ 9 valid Nothing = error $ "'" <> toText raw <> "' is not valid TokenType. Valid tokenTypes are : " <> show tokenTypes
+ 10
+ 11 defaultTokenType :: TokenType
+ 12 defaultTokenType = defaultEnum
+ 13
+ 14 tokenTypes :: [TokenType]
+ 15 tokenTypes = bothEnums
+ 16
+ 17 -- | Types
+ 18 data TokenType = VisibleTokenType | WhiteTokenType
+ 19 deriving stock (Bounded , Enum , Eq , Read , Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html
new file mode 100644
index 000000000..ea19db0d8
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.ALU.hs.html
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.ALU (
+ 2 doOutputChar2,
+ 3 doInputChar2,
+ 4 doInputDec2,
+ 5 divMod,
+ 6 sub,
+ 7 binaryInstruction,
+ 8 binaryInstructions,
+ 9 halibut,
+ 10 alInstruction,
+ 11 move,
+ 12 swap,
+ 13 discard,
+ 14 slide,
+ 15 dup,
+ 16 copy,
+ 17 flipPush1,
+ 18 charPush1,
+ 19 genericPush1,
+ 20 pop1,
+ 21 pop2,
+ 22 push1,
+ 23 push2,
+ 24 splitAt,
+ 25 drop,
+ 26 ALU,
+ 27 Stack,
+ 28 ) where
+ 29
+ 30 import HelVM.HelMA.Automaton.Instruction.ALInstruction
+ 31 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 32
+ 33 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 34
+ 35 import HelVM.HelIO.Control.Safe
+ 36
+ 37 import HelVM.HelIO.Containers.LLIndexSafe
+ 38
+ 39 import HelVM.HelIO.ListLikeUtil
+ 40
+ 41 import Data.ListLike hiding (show)
+ 42 import Prelude hiding (divMod, drop, fromList, splitAt, swap)
+ 43
+ 44
+ 45 alInstruction :: ALU m ll element => ALInstruction -> ll -> m ll
+ 46 alInstruction (Cons i ) = push i
+ 47 alInstruction (Unary op) = error $ show op
+ 48 alInstruction (Binary op) = binaryInstruction op
+ 49 alInstruction (SDynamic op) = dynamicManipulation op
+ 50 alInstruction (SStatic i op) = staticManipulation op i
+ 51 alInstruction (SIO OutputChar) = doOutputChar2
+ 52 alInstruction (SIO OutputDec) = doOutputDec2
+ 53 alInstruction (SIO InputChar) = doInputChar2
+ 54 alInstruction Halibut = halibut
+ 55 alInstruction Pick = pick
+ 56 alInstruction Dup = dup
+ 57 alInstruction Rot = rot
+ 58 alInstruction Swap = swap
+ 59 alInstruction Discard = discard
+ 60 alInstruction op = error $ show op
+ 61
+ 62 -- | Arithmetic instructions
+ 63 divMod :: ALU m ll element => ll -> m ll
+ 64 divMod = binaryInstructions [Mod , Div]
+ 65
+ 66 sub :: ALU m ll element => ll -> m ll
+ 67 sub = binaryInstruction Sub
+ 68
+ 69 binaryInstruction :: ALU m ll element => BinaryInstruction -> ll -> m ll
+ 70 binaryInstruction i = binaryInstructions [i]
+ 71
+ 72 binaryInstructions :: ALU m ll element => [BinaryInstruction] -> ll -> m ll
+ 73 binaryInstructions il l = binaryInstructions' <$> pop2 l where
+ 74 binaryInstructions' (e , e', l') = pushList (calculateOps e e' il) l'
+ 75
+ 76 -- | IO instructions
+ 77 doOutputChar2 :: ALU m ll element => ll -> m ll
+ 78 doOutputChar2 l = doOutputChar' =<< pop1 l where
+ 79 doOutputChar' (e , l') = wPutAsChar e $> l'
+ 80
+ 81 doOutputDec2 :: ALU m ll element => ll -> m ll
+ 82 doOutputDec2 l = doOutputDec' =<< pop1 l where
+ 83 doOutputDec' (e , l') = wPutAsDec e $> l'
+ 84
+ 85 doInputChar2 :: ALU m ll element => ll -> m ll
+ 86 doInputChar2 l = doInputChar' <$> wGetCharAs where
+ 87 doInputChar' e = push1 e l
+ 88
+ 89 doInputDec2 :: ALU m ll element => ll -> m ll
+ 90 doInputDec2 l = doInputChar' <$> wGetCharAs where
+ 91 doInputChar' e = push1 e l
+ 92
+ 93 -- | Manipulation instructions
+ 94 dynamicManipulation :: ALU m ll element => ManipulationInstruction -> ll -> m ll
+ 95 dynamicManipulation op l = dynamicManipulation' =<< unconsSafe l where
+ 96 dynamicManipulation' (e , l') = staticManipulation op (fromIntegral e) l'
+ 97
+ 98 staticManipulation :: ALU m ll element => ManipulationInstruction -> Index -> ll -> m ll
+ 99 staticManipulation Copy = copy
+ 100 staticManipulation Move = move
+ 101 staticManipulation Slide = slide
+ 102
+ 103 -- | Halibut and Pick instructions
+ 104 halibut :: ALU m ll element => ll -> m ll
+ 105 halibut l = halibut' =<< pop1 l where
+ 106 halibut' (e , l')
+ 107 | 0 < i = move i l'
+ 108 | otherwise = copy (negate i) l'
+ 109 where i = fromIntegral e
+ 110
+ 111 pick :: ALU m ll element => ll -> m ll
+ 112 pick l = pick' =<< pop1 l where
+ 113 pick' (e , l')
+ 114 | 0 <= i = copy i l'
+ 115 | otherwise = move (negate i) l'
+ 116 where i = fromIntegral e
+ 117
+ 118 -- | Slide instructions
+ 119 slide :: ALU m ll element => Index -> ll -> m ll
+ 120 slide i l = slide' <$> pop1 l where
+ 121 slide' (e , l') = push1 e $ drop i l'
+ 122
+ 123 -- | Move instructions
+ 124 rot :: ALU m ll element => ll -> m ll
+ 125 rot = move 2
+ 126
+ 127 swap :: ALU m ll element => ll -> m ll
+ 128 swap = move 1
+ 129
+ 130 move :: ALU m ll element => Index -> ll -> m ll
+ 131 move i l = pure $ l1 <> l2 <> l3 where
+ 132 (l1 , l3) = splitAt 1 l'
+ 133 (l2 , l') = splitAt i l
+ 134
+ 135 -- | Copy instructions
+ 136 dup :: ALU m ll element => ll -> m ll
+ 137 dup = copy 0
+ 138
+ 139 copy :: ALU m ll element => Index -> ll -> m ll
+ 140 copy i l = flipPush1 l <$> l `indexSafe` i
+ 141
+ 142 -- | Pop instructions
+ 143 pop1 :: ALU m ll element => ll -> m (element , ll)
+ 144 pop1 l = appendErrorTuple ("l" , show l) $ unconsSafe l
+ 145
+ 146 pop2 :: ALU m ll element => ll -> m (element , element , ll)
+ 147 pop2 l = appendErrorTuple ("l" , show l) $ uncons2Safe l
+ 148
+ 149 -- | Push instructions
+ 150 push :: ALU m ll element => Integer -> ll -> m ll
+ 151 push i l = pure $ genericPush1 i l
+ 152
+ 153 flipPush1 :: Stack ll element => ll -> element -> ll
+ 154 flipPush1 = flip push1
+ 155
+ 156 charPush1 :: (Num element , Stack ll element) => Char -> ll -> ll
+ 157 charPush1 = genericPush1 . ord
+ 158
+ 159 genericPush1 :: (Integral v , Num element , Stack ll element) => v -> ll -> ll
+ 160 genericPush1 = push1 . fromIntegral
+ 161
+ 162 push1 :: Stack ll element => element -> ll -> ll
+ 163 push1 e = pushList [e]
+ 164
+ 165 push2 :: Stack ll element => element -> element -> ll -> ll
+ 166 push2 e e' = pushList [e , e']
+ 167
+ 168 pushList :: Stack ll element => [element] -> ll -> ll
+ 169 pushList es l = fromList es <> l
+ 170
+ 171 -- | Types
+ 172 type ALU m ll element = (BIO m , Stack ll element , Integral element)
+ 173
+ 174 type Stack ll element = (Show ll , ListLike ll element , IndexSafe ll element)
+ 175
+ 176 type Index = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html
new file mode 100644
index 000000000..e01d03cd4
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.CPU.hs.html
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.CPU where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.ALU
+ 4
+ 5 import HelVM.HelMA.Automaton.Instruction
+ 6 import HelVM.HelMA.Automaton.Instruction.ControlInstruction
+ 7
+ 8 import HelVM.HelIO.Control.Safe
+ 9
+ 10 import Control.Type.Operator
+ 11
+ 12 import Data.ListLike hiding (show)
+ 13
+ 14 controlInstruction :: (ALU m ll element , Show element) => ControlInstruction -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 15 --controlInstruction :: ALU m ll element => ControlInstruction -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 16 controlInstruction (Mark _ ) = pure
+ 17 controlInstruction Return = popAddress
+ 18 controlInstruction (CDynamic Call ) = dynamicCall
+ 19 controlInstruction (CDynamic Jump ) = dynamicJump
+ 20 controlInstruction (CDynamic (Branch t)) = dynamicBranch t
+ 21 controlInstruction (CStatic l Call ) = staticCall l
+ 22 controlInstruction (CStatic l Jump ) = staticJump l
+ 23 controlInstruction (CStatic l (Branch t)) = staticBranch l t
+ 24
+ 25 popAddress :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 26 popAddress (CPU (CU il _ (IS (a : is))) s) = pure $ CPU (CU il a $ IS is) s
+ 27 popAddress (CPU (CU il _ (IS [] )) _) = liftErrorWithTupleList "Empty Return Stack" [("il" , show il)]
+ 28
+ 29 dynamicCall :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 30 dynamicCall (CPU (CU il ic (IS is)) s) = call <$> pop1 s where
+ 31 call (a , s') = CPU (CU il (fromIntegral a) (IS (ic : is))) s'
+ 32
+ 33 dynamicJump :: ALU m ll element => CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 34 dynamicJump (CPU (CU il _ is) s) = jump <$> pop1 s where
+ 35 jump (a , s') = CPU (CU il (fromIntegral a) is) s'
+ 36
+ 37 dynamicBranch :: (ALU m ll element , Show element) => BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 38 --dynamicBranch :: ALU m ll element => BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 39 dynamicBranch t (CPU (CU il ic is) s) = branch =<< pop2 s where
+ 40 -- dynamicBranch' (l , e , s') = liftErrorTupleList [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 41 branch (l , e , s')
+ 42 | isNotJump t e = liftErrorWithTupleList "isNotJump" [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 43 -- | isNotJump t e = pure $ CPU (CU il ic is) s'
+ 44 | otherwise = liftErrorWithTupleList "otherwise" [("t" , show t) , ("il" , show il) , ("ic" , show ic), ("is" , show is) , ("l" , show l) , ("e" , show e) , ("s'", show s')]
+ 45 -- | otherwise = jump <$> findAddress il (show l) where jump ic' = CPU (CU il ic' is) s'
+ 46
+ 47 staticCall :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 48 staticCall l (CPU (CU il ic (IS is)) s) = call <$> findAddress il l where
+ 49 call a = CPU (CU il a (IS (ic : is))) s
+ 50
+ 51 staticJump :: ALU m ll element => Label -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 52 staticJump l (CPU (CU il _ is) s) = jump <$> findAddress il l where
+ 53 jump a = CPU (CU il a is) s
+ 54
+ 55 staticBranch :: ALU m ll element => Label -> BranchTest -> CentralProcessingUnit ll -> m $ CentralProcessingUnit ll
+ 56 staticBranch l t (CPU (CU il ic is) s) = branch =<< pop1 s where
+ 57 branch (e , s')
+ 58 | isNotJump t e = pure $ CPU (CU il ic is) s'
+ 59 | otherwise = jump <$> findAddress il l where
+ 60 jump ic' = CPU (CU il ic' is) s'
+ 61
+ 62 findAddress :: MonadSafe m => InstructionVector -> Label -> m InstructionAddress
+ 63 findAddress il l = liftMaybeOrErrorTuple ("Undefined label", show l) $ findIndex (isMark l) il
+ 64
+ 65 cpuToTuple :: CentralProcessingUnit s -> (ControlUnit , s)
+ 66 cpuToTuple (CPU cu s) = (cu , s)
+ 67
+ 68 -- | Types
+ 69 data CentralProcessingUnit al = CPU
+ 70 { controlUnit :: ControlUnit
+ 71 , alu :: al
+ 72 }
+ 73 deriving stock (Show )
+ 74
+ 75 data ControlUnit = CU
+ 76 { program :: InstructionVector
+ 77 , programCounter :: InstructionCounter
+ 78 , returnStack :: InstructionStack
+ 79 }
+ 80 deriving stock (Show )
+ 81
+ 82 newtype InstructionStack = IS [InstructionAddress]
+ 83 deriving stock (Show )
+ 84
+ 85 type InstructionCounter = InstructionAddress
+ 86
+ 87 type InstructionAddress = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html
new file mode 100644
index 000000000..f06c468f8
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.LSU.hs.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.LSU where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.ALU
+ 4 import qualified HelVM.HelMA.Automaton.Units.RAM as RAM
+ 5
+ 6 import HelVM.HelMA.Automaton.IO.BusinessIO
+ 7
+ 8 import HelVM.HelMA.Automaton.Instruction.IOInstruction
+ 9 import HelVM.HelMA.Automaton.Instruction.LSInstruction
+ 10
+ 11 import Control.Type.Operator
+ 12
+ 13 slInstruction :: (LSU m s r element) => LSInstruction -> LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 14 slInstruction Load = load
+ 15 slInstruction Store = store
+ 16 slInstruction (MIO OutputChar) = loadOutputChar
+ 17 slInstruction (MIO OutputDec) = loadOutputDec
+ 18 slInstruction (MIO InputChar) = storeInputChar
+ 19 slInstruction (MIO InputDec) = storeInputDec
+ 20
+ 21 load :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 22 load (LSU s r) = load' <$> pop1 s where
+ 23 load' (address , s') = LSU (push1 (RAM.genericLoad r address) s') r
+ 24
+ 25 store :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 26 store (LSU s r) = store' <$> pop2 s where
+ 27 store' (value , address , s') = LSU s' $ RAM.store address value r
+ 28
+ 29 loadOutputChar :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 30 loadOutputChar (LSU s r) = loadOutputChar' =<< pop1 s where
+ 31 loadOutputChar' (address , s') = LSU s' r <$ wPutAsChar (RAM.genericLoad r address)
+ 32
+ 33 loadOutputDec :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 34 loadOutputDec (LSU s r) = doOutputDec' =<< pop1 s where
+ 35 doOutputDec' (address , s') = LSU s' r <$ wPutAsDec (RAM.genericLoad r address)
+ 36
+ 37 storeInputChar :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 38 storeInputChar (LSU s r) = storeInputChar' =<< pop1 s where
+ 39 storeInputChar' (address , s') = LSU s' . flip (RAM.store address) r <$> wGetCharAs
+ 40
+ 41 storeInputDec :: LSU m s r element => LoadStoreUnit s r -> m $ LoadStoreUnit s r
+ 42 storeInputDec (LSU s r) = storeInputDec' =<< pop1 s where
+ 43 storeInputDec' (address , s') = LSU s' . flip (RAM.store address) r <$> wGetDecAs
+ 44
+ 45 sluToTuple :: LoadStoreUnit s r -> (s , r)
+ 46 sluToTuple (LSU s r) = (s , r)
+ 47
+ 48 -- | Types
+ 49 type LSU m s r element = (ALU m s element , RAM.RAM r element)
+ 50
+ 51 data LoadStoreUnit s r = LSU
+ 52 { stack :: s
+ 53 , ram :: r
+ 54 }
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html
new file mode 100644
index 000000000..c66cf9943
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.RAM.hs.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.RAM (
+ 2 genericLoad,
+ 3 load,
+ 4 storeChar,
+ 5 genericStore,
+ 6 store,
+ 7 fromList,
+ 8 RAM,
+ 9 ) where
+ 10
+ 11 import HelVM.HelIO.Containers.LLIndexSafe
+ 12 import HelVM.HelIO.Containers.LLInsertDef
+ 13
+ 14 import Data.Default
+ 15 import Prelude hiding (divMod, drop, splitAt, swap)
+ 16
+ 17 genericLoad :: (Integral i , RAM ll element) => ll -> i -> element
+ 18 genericLoad l = load l . fromIntegral
+ 19
+ 20 load :: (RAM ll element) => ll -> Address -> element
+ 21 load l i = indexMaybe l i ?: def
+ 22
+ 23 storeChar :: (Num element , Integral address , RAM ll element) => address -> Char -> ll -> ll
+ 24 storeChar a char = genericStore a $ ord char
+ 25
+ 26 genericStore :: (Integral value , Num element , Integral address , RAM ll element) => address -> value -> ll -> ll
+ 27 genericStore a v = store a $ fromIntegral v
+ 28
+ 29 store :: (Integral a , RAM ll element) => a -> element -> ll -> ll
+ 30 store = insertDef . fromIntegral
+ 31
+ 32 -- | Types
+ 33 type RAM ll element = (Show ll , Default element , II ll element)
+ 34
+ 35 type II ll element = (InsertDef ll element , IndexSafe ll element)
+ 36
+ 37 type Address = Int
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html
new file mode 100644
index 000000000..c8be4c41d
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.Units.Unit.hs.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.Units.Unit where
+ 2
+ 3 import HelVM.HelMA.Automaton.Units.CPU
+ 4
+ 5 -- | Data types
+ 6 data Unit s r = Unit
+ 7 { unitCU :: ControlUnit
+ 8 , unitStack :: s
+ 9 , unitRAM :: r
+ 10 }
+ 11 deriving stock (Show )
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html
new file mode 100644
index 000000000..41a99454c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/helma-0.7.2.1-inplace/HelVM.HelMA.Automaton.WrapTokenList.hs.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+never executed always true always false
+
+
+ 1 module HelVM.HelMA.Automaton.WrapTokenList where
+ 2
+ 3 import qualified Text.Read
+ 4 import qualified Text.Show
+ 5
+ 6 newtype WrapTokenList a = WrapTokenList { unWrapTokenList :: a }
+ 7 deriving stock (Eq )
+ 8
+ 9 ----
+ 10
+ 11 instance Show a => Show (WrapTokenList [a]) where
+ 12 show (WrapTokenList tokens) = show =<< tokens
+ 13
+ 14 instance Read a => Read (WrapTokenList [a]) where
+ 15 readsPrec _ source = [( WrapTokenList $ maybeToList . readMaybe . one =<< source , "")]
+
+
+
+
diff --git a/docs/reports/hpc/html/helma-test/hpc_index.html b/docs/reports/hpc/html/helma-test/hpc_index.html
new file mode 100644
index 000000000..e65d82404
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/hpc_index.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/html/helma-test/hpc_index_alt.html b/docs/reports/hpc/html/helma-test/hpc_index_alt.html
new file mode 100644
index 000000000..ea06c54cd
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/hpc_index_alt.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/html/helma-test/hpc_index_exp.html b/docs/reports/hpc/html/helma-test/hpc_index_exp.html
new file mode 100644
index 000000000..70e33aaaa
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/hpc_index_exp.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/hpc/html/helma-test/hpc_index_fun.html b/docs/reports/hpc/html/helma-test/hpc_index_fun.html
new file mode 100644
index 000000000..75e5cf18c
--- /dev/null
+++ b/docs/reports/hpc/html/helma-test/hpc_index_fun.html
@@ -0,0 +1,177 @@
+
+
diff --git a/docs/reports/stan.html b/docs/reports/stan.html
index 3355ca8cb..1efc6681f 100644
--- a/docs/reports/stan.html
+++ b/docs/reports/stan.html
@@ -1,5 +1,5 @@
-Stan Report This is the Haskell Static Analysis report generated by Stan
Stan Info In this section, you can find the general information about the used Stan tool, compile-time and run-time environment variables and settings, including build information, system data and execution configurations.
Stan Version Version 0.0.1.0 Git Revision UNKNOWN Release Date UNKNOWN System Info Operating System linux Architecture x86_64 Compiler ghc Compiler Version 8.10 Environment Environment Variables STAN_USE_DEFAULT_CONFIG=True TOML configuration files /home/kamil-adam/git/helvm/helma/.stan.toml CLI arguments -s --hide-solution report
Project Info Information about the analysed project
Project name helma Cabal Files helma.cabal HIE Files Directory .hie Files Number 118
Analysis Info Summary stats from the static analysis
Modules 118 LoC 5155 Extensions 32 SafeHaskell Extensions 0 Available inspections 44 Checked inspections 44 Found Observations 0 Ignored Observations 0
Static Analysis Summary Here you can find the overall conclusion based on the various metadata and gathered information during the work of Stan on this project.
Project health: 100% This number was calculated based on the total number of used inspections and the number of triggered inspections in the project. The calculated number also defines the overall project health status. The project is healthy Excellent work! Stan haven't found any vulnerabilities in the code. Congratulations! Your project has zero vulnerabilities! Stan carefully run all configured inspection and found 0 observations and vulnerabilities to the project. Observations Based on the analysis results, Stan found different vulnerabilities distributed among the analysed files. In Stan terminology, we call such vulnerability as Observation. Below you can see the more detailed information about each observation, and find the possible ways to fix them for your project.
Configurations This section describes the final Stan configuration that was used on the project and explains how this result was assembled. Stan runtime settings have many parts, and each of them can come from different configuration sources. Stan is using Environment variables, TOML configuration file and CLI arguments to get the final results. If some option is specified through the multiple sources, the most prioritized one is used.
Configuration Process Information Information and warnings that were gathered during the configuration assemble process. This helps to understand how different parts of the configurations were retrieved.
No TOML value is specified for key: check No CLI option specified for: checks configChecks is set through the source: TOML No TOML value is specified for key: remove No CLI option specified for: remove configRemoved is set through the source: TOML No TOML value is specified for key: ignore No CLI option specified for: ignore configIgnored is set through the source: TOML Report Explained Inspections List of Inspections used for analysing the project
Explore Inspection STAN-0001 Inspection STAN-0001 Partial: base/head
Usage of partial function 'head' for lists
Warning
Possible solutions Replace list with 'NonEmpty' from 'Data.List.NonEmpty' Use explicit pattern-matching over lists Explore Inspection STAN-0002 Inspection STAN-0002 Partial: base/tail
Usage of partial function 'tail' for lists
Warning
Possible solutions Replace list with 'NonEmpty' from 'Data.List.NonEmpty' Use explicit pattern-matching over lists Explore Inspection STAN-0003 Inspection STAN-0003 Partial: base/init
Usage of partial function 'init' for lists
Warning
Possible solutions Replace list with 'NonEmpty' from 'Data.List.NonEmpty' Use explicit pattern-matching over lists Explore Inspection STAN-0004 Inspection STAN-0004 Partial: base/last
Usage of partial function 'last' for lists
Warning
Possible solutions Replace list with 'NonEmpty' from 'Data.List.NonEmpty' Use explicit pattern-matching over lists Explore Inspection STAN-0005 Inspection STAN-0005 Partial: base/!!
Usage of partial function '!!' for lists
Warning
Explore Inspection STAN-0006 Inspection STAN-0006 Partial: base/cycle
Usage of partial function 'cycle' for lists
Warning
Possible solutions Replace list with 'NonEmpty' from 'Data.List.NonEmpty' Use explicit pattern-matching over lists Explore Inspection STAN-0007 Inspection STAN-0007 Partial: base/genericIndex
Usage of partial function 'genericIndex' for lists
Warning
Explore Inspection STAN-0008 Inspection STAN-0008 Partial: base/fromJust
Usage of partial function 'fromJust' for 'Maybe'
Warning
Possible solutions Use explicit pattern-matching over Maybe Use one of the standard functions: 'maybe', 'fromMaybe' Explore Inspection STAN-0009 Inspection STAN-0009 Partial: base/read
Usage of partial function 'read' for parsing 'String'
Warning
Possible solutions Use 'readMaybe' or 'readEither' to handle failed parsing Explore Inspection STAN-0010 Inspection STAN-0010 Partial: base/succ
Usage of partial function 'succ' for enumerable types
Warning
Possible solutions Use '(+ 1)' for integral types (but be aware of arithmetic overflow) {Extra dependency} Use 'next' from 'Relude.Extra.Enum' in 'relude' Explore Inspection STAN-0011 Inspection STAN-0011 Partial: base/pred
Usage of partial function 'pred' for enumerable types
Warning
Possible solutions Use '(- 1)' for integral types (but be aware of arithmetic overflow) {Extra dependency} Use 'prev' from 'Relude.Extra.Enum' in 'relude' Explore Inspection STAN-0012 Inspection STAN-0012 Partial: base/toEnum
Usage of partial function 'toEnum' for enumerable types
Warning
Possible solutions {Extra dependency} Use 'safeToEnum' from 'Relude.Extra.Enum' in 'relude' Explore Inspection STAN-0013 Inspection STAN-0013 Partial: base/maximum
Usage of partial function 'maximum' for
Warning
Explore Inspection STAN-0014 Inspection STAN-0014 Partial: base/minimum
Usage of partial function 'minimum' for
Warning
Explore Inspection STAN-0015 Inspection STAN-0015 Partial: base/maximumBy
Usage of partial function 'maximumBy' for
Warning
Explore Inspection STAN-0016 Inspection STAN-0016 Partial: base/minimumBy
Usage of partial function 'minimumBy' for
Warning
Explore Inspection STAN-0017 Inspection STAN-0017 Partial: base/foldl1
Usage of partial function 'foldl1' for
Warning
Explore Inspection STAN-0018 Inspection STAN-0018 Partial: base/foldl1'
Usage of partial function 'foldl1'' for lists
Warning
Possible solutions Replace list with 'NonEmpty' from 'Data.List.NonEmpty' Use explicit pattern-matching over lists Explore Inspection STAN-0019 Inspection STAN-0019 Partial: base/foldr1
Usage of partial function 'foldr1' for
Warning
Explore Inspection STAN-0020 Inspection STAN-0020 Partial: base/fromList
Usage of partial function 'fromList' for
Warning
Explore Inspection STAN-0021 Inspection STAN-0021 Partial: base/fromInteger
Usage of partial function 'fromInteger' for
Warning
Explore Inspection STAN-0101 Inspection STAN-0101 Infinite: base/reverse
Usage of the 'reverse' function that hangs on infinite lists
PotentialBug
Possible solutions Don't use 'reverse' if you expect your function to work with infinite lists {Extra dependency} Use the 'slist' library for fast and safe functions on infinite lists Explore Inspection STAN-0102 Inspection STAN-0102 Infinite: base/isSuffixOf
Usage of the 'isSuffixOf' function that hangs on infinite lists
PotentialBug
Possible solutions Don't use 'isSuffixOf' if you expect your function to work with infinite lists {Extra dependency} Use the 'slist' library for fast and safe functions on infinite lists Explore Inspection STAN-0103 Inspection STAN-0103 Infinite: base/length
Usage of the 'length' function that hangs on infinite lists
PotentialBug
Possible solutions Don't use 'length' if you expect your function to work with infinite lists {Extra dependency} Use the 'slist' library for fast and safe functions on infinite lists Explore Inspection STAN-0104 Inspection STAN-0104 Infinite: base/genericLength
Usage of the 'genericLength' function that hangs on infinite lists
PotentialBug
Possible solutions Don't use 'genericLength' if you expect your function to work with infinite lists {Extra dependency} Use the 'slist' library for fast and safe functions on infinite lists Explore Inspection STAN-0105 Inspection STAN-0105 Infinite: base/sum
Usage of the 'sum' function that hangs on infinite lists
PotentialBug
Possible solutions Don't use 'sum' if you expect your function to work with infinite lists {Extra dependency} Use the 'slist' library for fast and safe functions on infinite lists Explore Inspection STAN-0106 Inspection STAN-0106 Infinite: base/product
Usage of the 'product' function that hangs on infinite lists
PotentialBug
Possible solutions Don't use 'product' if you expect your function to work with infinite lists {Extra dependency} Use the 'slist' library for fast and safe functions on infinite lists Explore Inspection STAN-0201 Inspection STAN-0201 Anti-pattern: [0 .. length xs]
Creating a list with wrong number of indices
PotentialBug
Possible solutions Replace '[0 .. length xs]' with '[0 .. length xs - 1]' Use 'zip [0 ..] xs` to work with list of pairs: index and element Explore Inspection STAN-0202 Inspection STAN-0202 Anti-pattern: foldl
Usage of space-leaking function 'foldl'
Error
Possible solutions Replace 'foldl' with 'foldl'' Use 'foldr (flip . f)` instead of 'foldl f' Explore Inspection STAN-0203 Inspection STAN-0203 Anti-pattern: Data.ByteString.Char8.pack
Usage of 'pack' function that doesn't handle Unicode characters
Error
Possible solutions Convert to 'Text' and use 'encodeUtf8' from 'Data.Text.Encoding' {Extra dependency} Use 'encodeUtf8' from 'relude' {Extra dependency} Use the 'utf8-string' package Explore Inspection STAN-0204 Inspection STAN-0204 Anti-pattern: HashMap size
Usage of 'size' or 'length' for 'HashMap' that runs in linear time
Performance
Possible solutions {Extra dependency} Switch to 'Map' from 'containers' Explore Inspection STAN-0205 Inspection STAN-0205 Anti-pattern: HashSet size
Usage of 'size' or 'length' for 'HashSet' that runs in linear time
Performance
Possible solutions {Extra dependency} Switch to 'Set' from 'containers' Explore Inspection STAN-0206 Inspection STAN-0206 Data types with non-strict fields
Defining lazy fields in data types can lead to unexpected space leaks
Performance
Possible solutions Add '!' before the type, e.g. !Int or !(Maybe Bool) Enable the 'StrictData' extension: {-# LANGUAGE StrictData #-} Explore Inspection STAN-0207 Inspection STAN-0207 Anti-pattern: Foldable methods on possibly error-prone structures
Usage of Foldable methods on (,), Maybe, Either
PotentialBug
Possible solutions Use more explicit functions with specific monomorphic types Explore Inspection STAN-0208 Inspection STAN-0208 Anti-pattern: Slow 'length' for Text
Usage of 'length' for 'Text' that runs in linear time
Performance
Possible solutions {Extra dependency} Switch to 'ByteString' from 'bytestring' Explore Inspection STAN-0209 Inspection STAN-0209 Anti-pattern: Slow 'nub' for lists
Usage of 'nub' on lists that runs in quadratic time
Performance
Possible solutions {Extra dependency} Switch list to 'Set' from 'containers' {Extra dependency} Use 'ordNub/hashNub/sortNub/unstableNub' from 'relude' {Extra dependency} Use 'nubOrd' from 'containers' {Extra dependency} Use 'nubOrd' from 'extra' Explore Inspection STAN-0210 Inspection STAN-0210 Anti-pattern: Slow 'for_' on ranges
Usage of 'for_' or 'forM_' on numerical ranges is slow
Performance
Possible solutions {Extra dependency} Use 'loop' library for fast monadic looping Explore Inspection STAN-0211 Inspection STAN-0211 Anti-pattern: '</>' for URLs
Usage of '</>' for URLs results in the errors on Windows
Error
Possible solutions {Extra dependency} Use type-safe library for URLs Concatenate URLs with slashes '/' Explore Inspection STAN-0212 Inspection STAN-0212 Anti-pattern: unsafe functions
Usage of unsafe functions breaks referential transparency
Error
Possible solutions Remove 'undefined' or at least replace with 'error' to give better error messages Replace 'unsafeCoerce' with 'coerce' Rewrite the code to avoid using 'unsafePerformIO' and other unsafe IO functions Explore Inspection STAN-0213 Inspection STAN-0213 Anti-pattern: Pattern matching on '_'
Pattern matching on '_' for sum types can create maintainability issues
Warning
Possible solutions Pattern match on each constructor explicitly Add meaningful names to holes, e.g. '_anyOtherFailure' Explore Inspection STAN-0214 Inspection STAN-0214 Anti-pattern: use 'compare'
Usage of multiple comparison operators instead of single 'compare'
Performance
Possible solutions Rewrite code to use single 'compare' instead of many comparison operators Explore Inspection STAN-0215 Inspection STAN-0215 Anti-pattern: Slashes in paths
Usage of '/' or '\' in paths results in the errors on different operation systems
Error
Possible solutions {Extra dependency} Use '</>' operator from 'filepath' Explore Inspection STAN-0301 Inspection STAN-0301 Missing fixity declaration for operator
Using the implicit default fixity for operator: infixl 9
Style
Possible solutions Add 'infix[l|r]' declaration to the operator with explicit precedence Explore Inspection STAN-0302 Inspection STAN-0302 Big tuples
Using tuples of big size (>= 4) can decrease code readability
Style
Possible solutions Consider defining and using a custom data type to improve code comprehension Severity We are using the following severity system to indicate the observation level
Severity Description Style Code style issues. Usually harmless. Performance Serious defects that could cause slowness and space leaking. PotentialBug Human errors in code. Warning Potential runtime errors on some inputs. Error Dangerous behaviour.