summaryrefslogtreecommitdiff
path: root/src/demo.sh
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-04-04 15:14:39 +0100
committerAlasdair Armstrong2018-04-05 18:40:36 +0100
commit09fca718c6e850a3a94db399fd1744dc537bbe41 (patch)
tree0d679d573f87236ee02e1ffe623d2e031a940ccb /src/demo.sh
parent3604e9e94b766147b482c4c653c4d09bb4ee7a7c (diff)
Cleanup repository by removing old and generated files
Rename l2.ott to sail.ott
Diffstat (limited to 'src/demo.sh')
-rwxr-xr-xsrc/demo.sh50
1 files changed, 0 insertions, 50 deletions
diff --git a/src/demo.sh b/src/demo.sh
deleted file mode 100755
index 1c8f2e30..00000000
--- a/src/demo.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-
-# directory of our Power ISA to Sail generator
-POWERISA="../../../rsem/idl/power"
-# restricted set of instructions to translate
-MNEMO="stwu,stw,mr,addi,lwz,bclr,or"
-
-REBUILD=0
-
-run () {
- printf "\n# $1\n"
- printf "$ $2"
- read ignore
- eval $2
-}
-
-while getopts ":r" opt; do
- case $opt in
- r)
- REBUILD=1
- ;;
- \?)
- echo "Invalid option: -$OPTARG" >&2
- ;;
- esac
-done
-
-rebuild () {
- run "Building Sail" "make clean sail lib"
-
- run "Generating the Sail interpreter from Power ISA (restricted to: $MNEMO)" \
- "make -C $POWERISA clean extract EXPORT_MNEMO=$MNEMO"
-
- run "Type-checking Sail Power model" "make -C $POWERISA check"
- run "Copying Power model locally to run tests" \
- "cp $POWERISA/generated/extract-full.sail test/power.sail"
- #git diff test/power.sail
-
- run "Translating Power model from Sail to OCaml via Lem" "make power"
-}
-
-DEMO="./run_power.native --interactive --file test/main.bin"
-
-if [ $REBUILD -eq 1 ]; then
- rebuild
- run "Starting interactive interpreter (press 'h' for help)" \
- "$DEMO"
-else
- $DEMO
-fi