├── www ├── swift.css ├── alcf │ ├── swift.css │ └── build.sh ├── wiki │ ├── stack.odg │ ├── concepts.odg │ ├── stack-1.png │ ├── stack-2.png │ ├── turbine-model.odg │ ├── turbine-model.png │ ├── concepts-control.png │ └── concepts-dataflow.png ├── css │ └── swift.css └── build.sh ├── dev ├── .gitignore ├── conda │ ├── .gitignore │ ├── linux-aarch64 │ │ ├── deps.sh │ │ ├── .gitignore │ │ └── build.sh │ ├── linux-64 │ │ ├── .gitignore │ │ ├── deps.sh │ │ └── build.sh │ ├── osx-64 │ │ ├── .gitignore │ │ └── deps.sh │ ├── osx-arm64 │ │ └── .gitignore │ ├── pkgs-ant.yaml │ ├── pkgs-zsh.yaml │ ├── env-R.yaml │ ├── pkgs-tk.yaml │ ├── pkgs-ncurses.yaml │ ├── pkgs-clang.yaml │ ├── pkgs-gcc.yaml │ ├── deactivate.sh │ ├── settings-R.sed │ └── helpers.zsh ├── build │ ├── .gitignore │ └── examples │ │ └── README.adoc ├── debian │ ├── install-readme.md │ ├── README.md │ ├── remove-debs.sh │ ├── clean-work.sh │ └── configure-all.sh ├── jenkins │ ├── spack-cfg-gce.yaml │ └── tools.py ├── github-actions │ └── settings.sed ├── m4 │ └── ifblank.m4 ├── devguide.txt ├── git-svn │ └── svn-authors.txt └── report-versions.sh ├── lb ├── code │ ├── apps │ │ ├── .gitignore │ │ └── batcher.txt │ ├── version.txt │ ├── maint │ │ ├── debian-bin │ │ │ ├── compat │ │ │ ├── docs │ │ │ └── changelog.m4 │ │ ├── debian-dev │ │ │ ├── compat │ │ │ ├── docs │ │ │ └── changelog.m4 │ │ ├── .gitignore │ │ ├── version.mkf │ │ ├── mpi_version3_test.c │ │ └── depend.sh │ ├── tests │ │ ├── .gitignore │ │ ├── qs_priority.sh │ │ ├── qs_idle_workers.sh │ │ ├── qs_node_target.sh │ │ ├── parallel-task.sh │ │ ├── qs_basic.sh │ │ └── init.sh │ ├── m4 │ │ ├── README.adoc │ │ └── ifblank.m4 │ ├── src │ │ ├── .gitignore │ │ ├── mpe-settings.h.in │ │ └── module.mk.in │ ├── .gitignore │ ├── NOTICE │ └── bootstrap └── docs │ └── README.md ├── mpe ├── .gitignore └── list-events.sh ├── turbine ├── code │ ├── etc │ │ └── help │ │ │ └── footer.txt │ ├── maint │ │ ├── debian │ │ │ ├── compat │ │ │ ├── docs │ │ │ └── changelog.m4 │ │ ├── version.mkf │ │ ├── find-tclConfig.tcl │ │ ├── jenkins.sh │ │ └── check.sh │ ├── py │ │ ├── .gitignore │ │ └── .flake8 │ ├── version.txt │ ├── src │ │ ├── tcl │ │ │ ├── jvm │ │ │ │ ├── Notes.txt │ │ │ │ └── module.mk.in │ │ │ ├── python │ │ │ │ ├── .gitignore │ │ │ │ └── Notes.txt │ │ │ ├── static-pkg │ │ │ │ ├── .gitignore │ │ │ │ └── module.mk.in │ │ │ ├── adlb │ │ │ │ └── module.mk.in │ │ │ ├── blob │ │ │ │ └── blob.i │ │ │ ├── turbine │ │ │ │ └── module.mk.in │ │ │ ├── julia │ │ │ │ ├── module.mk.in │ │ │ │ └── tcl-julia.h │ │ │ ├── c-utils │ │ │ │ └── module.mk.in │ │ │ ├── About.txt │ │ │ ├── module.mk.in │ │ │ └── mpe │ │ │ │ └── module.mk.in │ │ ├── turbine │ │ │ └── .gitignore │ │ ├── util │ │ │ ├── .gitignore │ │ │ └── module.mk.in │ │ └── executables │ │ │ ├── .gitignore │ │ │ ├── module.mk.in │ │ │ └── turbine_sh.manifest │ ├── tests │ │ ├── mpi-io.data │ │ ├── staticapp-bundled-1.1.data │ │ ├── sleeps-3.txt │ │ ├── coasters │ │ │ ├── wrapper.sh │ │ │ ├── coaster-std-out-err.check.sh │ │ │ └── coaster-env-args.check.sh │ │ ├── batcher.txt │ │ ├── readfile.txt │ │ ├── staticapp-bundled-1.2.data │ │ ├── runbin.zsh.in │ │ ├── staticapp-1-lib.tcl │ │ ├── .gitignore │ │ ├── coaster-exec-local.conf │ │ └── hook.tcl │ ├── bin │ │ ├── .gitignore │ │ └── turbine-read-doubles │ ├── m4 │ │ └── README.adoc │ ├── lib │ │ └── .gitignore │ ├── scripts │ │ ├── .gitignore │ │ ├── main-wrap │ │ │ └── settings │ │ │ │ ├── flags.g++.sh │ │ │ │ ├── flags.xlc.sh │ │ │ │ ├── flags.gcc.sh │ │ │ │ ├── machine.vanilla-g++.sh │ │ │ │ ├── machine.vanilla-gcc.sh │ │ │ │ └── machine.vesta-xlc.sh │ │ └── submit │ │ │ ├── ec2 │ │ │ ├── module.mk.in │ │ │ ├── config.template │ │ │ └── test-ec2.swift │ │ │ ├── pbs │ │ │ └── module.mk.in │ │ │ ├── psij │ │ │ └── module.mk.in │ │ │ ├── sge │ │ │ └── module.mk.in │ │ │ ├── cray │ │ │ └── module.mk.in │ │ │ ├── slurm │ │ │ └── module.mk.in │ │ │ ├── theta │ │ │ └── module.mk.in │ │ │ ├── cobalt │ │ │ ├── module.mk.in │ │ │ └── turbine-cobalt-submit.sh │ │ │ └── lsf │ │ │ └── module.mk.in │ ├── bootstrap │ ├── NOTICE │ ├── .gitignore │ └── README.txt └── docs │ ├── .gitignore │ ├── swift.css │ └── README.md ├── c-utils └── code │ ├── version.txt │ ├── maint │ ├── debian-bin │ │ ├── compat │ │ ├── docs │ │ └── changelog.m4 │ ├── debian-dev │ │ ├── compat │ │ ├── docs │ │ └── changelog.m4 │ ├── version.mkf │ ├── depend.sh │ └── check.sh │ ├── src │ ├── .gitignore │ ├── vint.c │ └── module.mk.in │ ├── tests │ ├── .gitignore │ ├── readfile.txt │ ├── log.sh │ ├── random.sh │ ├── heap.sh │ ├── list.sh │ ├── table.sh │ ├── tree.sh │ ├── table_bp.sh │ ├── table_ip.sh │ ├── table_lp.sh │ ├── ptr-array.sh │ ├── rbtree.sh │ ├── rbtree_bp.sh │ ├── tools.sh │ └── dyn_array_i.sh │ ├── Changes.txt │ ├── .gitignore │ ├── bootstrap │ └── NOTICE ├── stc ├── code │ ├── etc │ │ ├── version.txt │ │ ├── turbine-version.txt │ │ ├── help │ │ │ ├── options-2.txt │ │ │ ├── turbine.txt │ │ │ └── stc-header.txt │ │ └── vim │ │ │ ├── ftdetect │ │ │ └── swift.vim │ │ │ └── README │ ├── maint │ │ ├── debian │ │ │ ├── compat │ │ │ ├── docs │ │ │ └── changelog.m4 │ │ └── version.mkf │ ├── lib │ │ ├── guava-18.0.jar │ │ ├── junit-4.12.jar │ │ ├── commons-cli-1.2.jar │ │ ├── commons-io-2.4.jar │ │ ├── jacocoant-0.7.2.jar │ │ ├── hamcrest-core-1.3.jar │ │ ├── jacocoagent-0.7.2.jar │ │ ├── log4j-api-2.23.1.jar │ │ ├── log4j-core-2.23.1.jar │ │ ├── commons-lang3-3.3.2.jar │ │ ├── log4j-1.2-api-2.23.1.jar │ │ └── antlr-3.5-complete-no-st3.jar │ ├── META-INF │ │ └── MANIFEST.MF │ ├── src │ │ └── exm │ │ │ └── stc │ │ │ ├── common │ │ │ ├── util │ │ │ │ └── Out.java │ │ │ └── lang │ │ │ │ └── Pragmas.java │ │ │ ├── jvm │ │ │ └── runtime │ │ │ │ ├── Task.java │ │ │ │ ├── InvalidReadException.java │ │ │ │ ├── JVMRuntime.java │ │ │ │ ├── DoubleWriteException.java │ │ │ │ └── LogicException.java │ │ │ └── frontend │ │ │ └── WalkMode.java │ ├── bootstrap │ ├── .gitignore │ └── NOTICE ├── docs │ ├── .gitignore │ ├── README.md │ └── logs │ │ ├── .gitignore │ │ ├── dag1.swift │ │ └── dag2.swift ├── tests │ ├── 1671-autowrap-struct.exp │ ├── 409-foreach.args │ ├── 568-hostmap-1.args │ ├── 573-range-4.exp │ ├── 630-app.exp │ ├── 712-argp.args │ ├── 713-argp.args │ ├── 920-wait-1.exp │ ├── 970-loop.args │ ├── 017-toplevel.exp │ ├── 018-toplevel.exp │ ├── 316-array-build.stcargs │ ├── 317-array-build.stcargs │ ├── 333-arrays-4.exp │ ├── 711-argv-accept.args │ ├── 980-wavefront-1.args │ ├── 985-wavefront-2.args │ ├── 161-autowrap.exp │ ├── 225-branch-assign.exp │ ├── 226-branch-assign.exp │ ├── 490-bag.exp │ ├── 562-file-3.exp │ ├── 563-glob.args │ ├── 634-app-fail.check.sh │ ├── 925-liftwait-1.exp │ ├── 963-updateable-arr.args │ ├── 291-chain-statements.exp │ ├── 390-multidimensional-11.exp │ ├── 396-multidimensional-17.exp │ ├── 500-strings-1.exp │ ├── 569-url.exp │ ├── 610-par-1.setup.sh │ ├── 630-app.check.sh │ ├── 631-app.exp │ ├── 636-echo.sh │ ├── 666-swiftk-type.check.sh │ ├── 694-file-array.exp │ ├── 833-opt-regression.exp │ ├── 900-mapreduce-1.check.sh │ ├── 964-updateable-wait.args │ ├── opencode │ │ ├── 003-comment.swift │ │ ├── 010-define-int.swift │ │ ├── 005-eval-ints.swift │ │ ├── 070-assign-int.swift │ │ ├── 020-double-define.swift │ │ └── 080-assign-int-2.swift │ ├── 391-multidimensional-12.exp │ ├── 5601-file-propagate.check.sh │ ├── 5692-url.exp │ ├── 620-include-1.exp │ ├── 637-app.exp │ ├── 712-argp.exp │ ├── 714-compile-arg.args │ ├── 730-printf.exp │ ├── 9851-wavefront-cancel-refcount.args │ ├── 986-sudoku.args │ ├── 5601-file-propagate.setup.sh │ ├── 589-big-loop.args │ ├── 714-compile-arg.stcargs │ ├── 900-mapreduce-1.args │ ├── 040-default-arg.exp │ ├── 117-multiassign-1.exp │ ├── 182-globals-1.exp │ ├── 310-arrays-10.exp │ ├── 316-array-build.check.sh │ ├── 317-array-build.check.sh │ ├── 4091-foreach.setup.sh │ ├── 432.txt │ ├── 5151-void-1.exp │ ├── 519-string-format-op.exp │ ├── 560-file-1.setup.sh │ ├── 562-file-3.setup.sh │ ├── 690-file.setup.sh │ ├── 760-hdf-1.check.sh │ ├── include │ │ ├── import_061.swift │ │ ├── import_060.swift │ │ ├── module_620.swift │ │ └── header-620.swift │ ├── .gitignore │ ├── 566-file.check.sh │ ├── 630-app.setup.sh │ ├── 653-typevar.exp │ ├── 850-checkpoint.setup.sh │ ├── 851-checkpoint.setup.sh │ ├── 9851-wavefront-cancel-refcount.stcargs │ ├── 163-autowrap-loc.exp │ ├── 190-propagate.swift │ ├── 316-array-build.setup.sh │ ├── 317-array-build.setup.sh │ ├── 4091-foreach.check.sh │ ├── 423-forloops-4.exp │ ├── 425-forloops-6.exp │ ├── 568-hostmap-1.check.sh │ ├── 682-app-pipeline.check.sh │ ├── 833-opt-regression.stcargs │ ├── 638-app.exp │ ├── 638-app.setup.sh │ ├── 680-app.exp │ ├── 6921-file-map.setup.sh │ ├── 922-wait-deep.exp │ ├── 013-function-overload.exp │ ├── 4091-foreach.exp │ ├── 5671-lines.data │ ├── 683-app-implicit-input.setup.sh │ ├── 871-work-types.setup.sh │ ├── 293-chain-printfs.swift │ ├── 450-assoc-array.exp │ ├── 592.data │ ├── 7451-clock-fmt.swift │ ├── 7451-clock-fmt.check.sh │ ├── 122-sub-error-1.swift │ ├── 454-assoc-array.exp │ ├── 528-unicode-extended.exp │ ├── 561-file-2.setup.sh │ ├── 7452-clock-fmt.check.sh │ ├── 683-produce.sh │ ├── 710-argc.args │ ├── 822-argc.swift │ ├── 116-invalid-assign-3.swift │ ├── 5262-hex-octal-invalid.swift │ ├── 593-blob-read.data │ ├── 594-blob-write.check.sh │ ├── 631-app-cat.sh │ ├── 138-func-err.swift │ ├── 139-func-err.swift │ ├── 463-assoc-array-err.swift │ ├── 5261-hex-octal-invalid.swift │ ├── 573-range-4.swift │ ├── 6301-app-string.swift │ ├── 009-backslashhash.swift │ ├── 6390-echostderr.sh │ ├── 746-system-1.swift │ ├── 811-numberformat-success.exp │ ├── 829-overload-regression.swift │ ├── 910-iterate-1.swift │ ├── 021-tuple.swift │ ├── 331-arrays-compile-error-2.swift │ ├── 384-structoarray.check.sh │ ├── 404-foreach-5.swift │ ├── 420-for-loop-1.swift │ ├── 460-assoc-array-err.swift │ ├── 462-assoc-array-err.swift │ ├── 601-builtin-1.swift │ ├── 638-app.check.sh │ ├── 639-app.exp │ ├── 988-matrix.exp │ ├── 101-error.check.sh │ ├── 210-if-1.swift │ ├── 421-for-loop-2.swift │ ├── 430-struct-construct.swift │ ├── 634-fail-app.sh │ ├── 711-argv-accept.swift │ ├── 7610-data.json │ ├── 900-mapreduce-1.setup.sh │ ├── 983.funcs.tcl │ ├── 000-noop.swift │ ├── 022-tuple.swift │ ├── 137-func-err.swift │ ├── 492-bag.exp │ ├── 731-trace.swift │ ├── 972-empty-loop.swift │ ├── find-test.sh │ ├── 400-foreach-1.exp │ ├── 405-foreach-6.exp │ ├── 509-strings-10.swift │ ├── 566-file.swift │ ├── 587-foreach-range-8.swift │ ├── 635-app.setup.sh │ ├── funcs.tcl │ ├── 113-declare-assign.swift │ ├── 181-global-assign.swift │ ├── 735-priority-1.swift │ ├── 002-define-empty-function.swift │ ├── 017-toplevel.swift │ ├── 275-common-subexpression-opt-1.swift │ ├── 461-assoc-array-err.swift │ ├── 471-assoc-array-err.swift │ ├── 707-pick-regexp.swift │ ├── 110-plus-1.swift │ ├── 115-invalid-assign-2.swift │ ├── 180-global-assign.swift │ ├── 690-file.check.sh │ ├── 832-opt-regression.exp │ ├── 040-default-arg.swift │ ├── 052-keyword-arg-error.swift │ ├── 114-invalid-assign-1.swift │ ├── 215-if.swift │ ├── 422-forloops-3.exp │ ├── 585-foreach-range-6.exp │ ├── 636-app.setup.sh │ ├── clean.sh │ ├── 053-keyword-arg-error.swift │ ├── 111-plus-1-noparens.swift │ ├── 308-arrays-8.swift │ ├── 421-for-loop-2.exp │ ├── 5693-url.swift │ ├── 655-typevar-err.swift │ ├── 7452-clock-fmt.swift │ ├── 150-token-name-clash.swift │ ├── 215-minus.swift │ ├── 440-forloop.swift │ ├── 580-foreach-range-1.exp │ ├── 581-foreach-range-2.exp │ ├── 634-app-fail.setup.sh │ ├── 640-typevar.swift │ ├── 641-typevar.swift │ ├── 695-app-coasters.coaster.conf │ ├── 870-work-types.swift │ ├── 366-structs-7.swift │ ├── 500-strings-1.swift │ ├── 661-subtype.swift │ ├── 740-sleep.swift │ ├── 061-import.swift │ ├── 119-invalid-assign.swift │ ├── 127-func-err-3.swift │ ├── 217-minus-trace.swift │ ├── 569-url.swift │ ├── 715-worker-counts.swift │ ├── 427-forloops-8.exp │ ├── 453-assoc-array.exp │ ├── 125-func-err-1.swift │ ├── 420-for-loop-1.exp │ ├── 427-forloops-8.swift │ ├── 6390-app.setup.sh │ ├── 651-typevar.swift │ ├── 675-polymorphic.setup.sh │ ├── 871-work-types.swift │ ├── valgrind-patterns.grep │ ├── 105-sleep.swift │ ├── 128-func-err-4.swift │ ├── 167-autowrap-struct.exp │ ├── 311-arrays-11.swift │ ├── 713-argp.swift │ ├── 003-define-nomain-1.swift │ ├── 126-func-err-2.swift │ ├── 371-structfail-2.swift │ ├── 590-blob1.swift │ ├── 630-app.swift │ ├── 007-assert-2.swift │ ├── 147-overload-err.swift │ ├── 372-structfail-3.swift │ ├── 472-assoc-array-err.swift │ ├── 514c-string-multiline.swift │ ├── 5152-propagate.swift │ ├── 586-foreach-range-7.exp │ ├── 631-app.setup.sh │ ├── 712-argp.swift │ ├── 008-assert-3.swift │ ├── 050-keyword-arg-error.swift │ ├── 132-func-err-8.swift │ ├── 1632-autowrap-node-loc.setup.sh │ ├── 390-multidimensional-11.swift │ ├── 648-typevar.swift │ ├── 813-numberformat-err.swift │ ├── 001-define-function-1.swift │ ├── 051-keyword-arg-error.swift │ ├── 318-array-lookup.swift │ ├── 514b-string-multiline.swift │ ├── 5601-file-propagate.swift │ ├── 5691-url.swift │ ├── 591-blob-floats.swift │ ├── 594-blob-write.swift │ ├── 812-numberformat-err.swift │ ├── 010-function-call-1.swift │ ├── 380-structoarray.swift │ ├── 527-unicode.exp │ ├── 535-copy-1.swift │ ├── 580-foreach-range-1.swift │ ├── 663-subtype.swift │ ├── 682-wc.sh │ ├── 707-pick-regexp.check.sh │ ├── 120-sub-1.swift │ ├── 129-func-err-5.swift │ ├── 130-func-err-6.swift │ ├── 465-assoc-array-err.swift │ ├── 490-bag.swift │ ├── 689-parloc-1.swift │ ├── 694-file-array.swift │ ├── 720-pow.swift │ ├── 806-double-warn.swift │ ├── 012-function-overload.swift │ ├── 134-func-err-10.swift │ ├── 314-arrays-14.swift │ ├── 467-assoc-array-err.swift │ ├── 610-par-1.swift │ ├── 643-typevar.swift │ ├── 6921-file-map.swift │ ├── 730-printf.swift │ ├── 736-priority-2.swift │ ├── 807-dup-func.swift │ ├── 121-def-ordering-1.swift │ ├── 131-func-err-7.swift │ ├── 332-arrays-compile-error-3.swift │ ├── 464-assoc-array-err.swift │ ├── 646-typevar.swift │ ├── 030-shadow.swift │ ├── 260-expressions-1.swift │ ├── 270-conditional-deadlock-1.swift │ ├── 526-hex-octal.swift │ ├── 5671-lines-1.swift │ ├── 650-typevar.swift │ ├── 060-import.swift │ ├── 1461-func-err.swift │ ├── 505-strings-6.swift │ ├── 564-file_read.swift │ ├── 632-app.setup.sh │ ├── 871-work-types.check.sh │ ├── 962-updateable.swift │ ├── 136-func-warn-12.swift │ ├── 205-nest-1.swift │ ├── 291-chain-statements.swift │ ├── 562-file-3.swift │ ├── 6392-app-quote.swift │ ├── 750-pragma-1.setup.sh │ ├── 751-pragma-2.setup.sh │ ├── 018-toplevel.swift │ ├── 133-func-err-9.swift │ ├── 146-func-err.swift │ ├── 343-multidimensionalsimple-4.swift │ ├── 647-typevar.swift │ ├── 112-noparens.swift │ ├── 370-structfail-1.swift │ ├── 988-matrix.swift │ ├── 207-nest.swift │ ├── 292-chain-statements.swift │ ├── 306-arrays-6.swift │ ├── 5698-url.swift │ ├── 117-multiassign-1.swift │ ├── 211-if-2.swift │ ├── 271-conditional-deadlock-2.swift │ ├── 272-conditional-deadlock-3.swift │ ├── 468-assoc-array-err.swift │ ├── 636-app.swift │ ├── 664-subtype.swift │ ├── 006-assert-1.swift │ ├── 3441-multidimensional.swift │ ├── 466-assoc-array-err.swift │ ├── 470-assoc-array-err.swift │ ├── 5611-file-analysis.swift │ ├── 642-typevar.swift │ ├── 656-typevar.swift │ ├── 810-numberformat-err.swift │ ├── 8561-file-misuse.swift │ ├── 101-error.swift │ ├── 148-overload-err.swift │ ├── 491-bag.exp │ ├── 587-foreach-range-8.check.sh │ ├── 633-app-fail.swift │ ├── 714-compile-arg.swift │ ├── 805-array-brackets.swift │ ├── 821-opt-regression.swift │ ├── 396-multidimensional-17.swift │ ├── 428-forloop-string.swift │ ├── 5697-url.exp │ ├── 920-wait-1.swift │ ├── 005-define-function-2.swift │ ├── 015-main-1.swift │ ├── 135-func-err-11.swift │ ├── 705-split.check.sh │ ├── 760-hdf-1.swift │ ├── 7910-python-1.swift │ ├── 404-foreach-5.exp │ ├── 454-assoc-array.swift │ ├── 514-string-multiline.check.sh │ ├── 585-foreach-range-6.swift │ ├── 636-app.check.sh │ ├── 645-typevar.swift │ ├── 683-consume.sh │ ├── 921-wait-2.swift │ ├── 123-sub-error-2.swift │ ├── 213-if-3.swift │ ├── 261-expressions-2.swift │ ├── 3012-arrays.swift │ ├── 315-arrays-15.swift │ ├── 330-arrays-compile-error-1.swift │ ├── 400-foreach-1.swift │ ├── 401-foreach-2.swift │ ├── 481-exists.swift │ ├── 665-subtype.swift │ ├── 666-swiftk-type.swift │ ├── 6921-file-map.check.sh │ ├── 693-file-map-loop.swift │ ├── 016-main-2.swift │ ├── 206-nest-error-1.swift │ ├── 312-arrays-12.swift │ ├── 356-nested-insert.swift │ ├── 632-split.sh │ ├── 644-typevar.swift │ ├── 649-typevar.swift │ ├── 388-arrayostruct-2.swift │ ├── 570-range-1.check.sh │ ├── 814-parseint.swift │ ├── 709-join.check.sh │ ├── 220-elseif-1.swift │ ├── 469-assoc-array-err.swift │ ├── 522-floats-3.swift │ ├── 525-sci.swift │ ├── 5695-url.swift │ ├── 581-foreach-range-2.swift │ ├── 593-blob-read.swift │ ├── 041-keyword-arg.swift │ ├── 5694-url.swift │ ├── 695-app-coasters.cleanup.sh │ ├── 831-opt-regression.swift │ ├── 242-operators-3.swift │ ├── 309-arrays-9.swift │ ├── 422-forloops-3.swift │ ├── 670-typedef.swift │ ├── 825-opt-regression.swift │ ├── 241-operators-2.swift │ ├── 290-chain-statements.swift │ ├── 620-include-1.swift │ ├── 631-app.swift │ ├── 634-app-fail.swift │ ├── 660-subtype.swift │ ├── 675-polymorphic.check.sh │ ├── 316-array-build.task.sh │ ├── 317-array-build.task.sh │ ├── 517-external.swift │ ├── 5696-url.swift │ ├── 682-make-data.sh │ ├── 020-tuple.swift │ ├── 368-structs-wait.swift │ ├── 405-foreach-6.swift │ ├── 406-foreach-7.swift │ ├── 652-typevar-err.swift │ ├── 182-globals-1.swift │ ├── 250-switch-1.swift │ ├── 550-blob-1.swift │ ├── 5612-mktemp.swift │ ├── 635-app.check.sh │ ├── 806-double-warn.check.sh │ ├── adlb-test-env.sh │ ├── 164-autowrap-loc-fail.swift │ ├── 335-arrays-runtime-error.swift │ └── 344-multidimensional-5.swift └── bench │ ├── fs │ ├── About.txt │ └── chirp-scripts │ │ ├── local-server.zsh │ │ └── bb.zsh │ ├── suite │ ├── wavefront │ │ ├── lib │ │ ├── runs │ │ │ └── weakscale │ │ │ │ ├── param-gen.py │ │ │ │ ├── params.txt │ │ │ │ └── filter.sh │ │ ├── rc-level-test.sh │ │ └── o-level-takeone-test.sh │ ├── ensemble │ │ ├── lib │ │ └── gen_models.sh │ ├── portfolio4s-2 │ │ └── README │ ├── README.txt │ ├── uts │ │ ├── lib │ │ │ └── pkgIndex.tcl │ │ ├── uts-src │ │ │ └── uts_leaf.h │ │ ├── rc-level-test.sh │ │ └── o-level-takeone-test.sh │ ├── sweep │ │ ├── lib │ │ │ └── pkgIndex.tcl │ │ ├── rc-level-test.sh │ │ └── o-level-takeone-test.sh │ ├── reducetree │ │ ├── o-level-takeone-test.sh │ │ └── rc-level-test.sh │ └── util │ │ └── lognorm_test.c │ ├── util │ ├── make-package.sh │ ├── About.txt │ ├── make-package.tcl │ └── tools.zsh │ ├── foreach-1D │ ├── foreach-1D.procs.txt │ └── foreach-1D.util.txt │ ├── About.txt │ ├── dataflow │ └── run.sh │ └── foreach-sum │ └── foreach-sum.cfg └── NOTICE /www/swift.css: -------------------------------------------------------------------------------- 1 | css/swift.css -------------------------------------------------------------------------------- /dev/.gitignore: -------------------------------------------------------------------------------- 1 | devguide.html 2 | -------------------------------------------------------------------------------- /dev/conda/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | -------------------------------------------------------------------------------- /dev/conda/linux-aarch64/deps.sh: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lb/code/apps/.gitignore: -------------------------------------------------------------------------------- 1 | *.x 2 | -------------------------------------------------------------------------------- /lb/code/version.txt: -------------------------------------------------------------------------------- 1 | 1.0.5 2 | -------------------------------------------------------------------------------- /mpe/.gitignore: -------------------------------------------------------------------------------- 1 | README.html 2 | -------------------------------------------------------------------------------- /turbine/code/etc/help/footer.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /c-utils/code/version.txt: -------------------------------------------------------------------------------- 1 | 0.6.4 2 | -------------------------------------------------------------------------------- /lb/code/maint/debian-bin/compat: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /lb/code/maint/debian-dev/compat: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /stc/code/etc/version.txt: -------------------------------------------------------------------------------- 1 | 1.0.5 2 | -------------------------------------------------------------------------------- /stc/code/maint/debian/compat: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /stc/code/maint/debian/docs: -------------------------------------------------------------------------------- 1 | README 2 | -------------------------------------------------------------------------------- /stc/docs/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | *.x 3 | -------------------------------------------------------------------------------- /stc/tests/1671-autowrap-struct.exp: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /stc/tests/409-foreach.args: -------------------------------------------------------------------------------- 1 | --n=20 2 | -------------------------------------------------------------------------------- /stc/tests/568-hostmap-1.args: -------------------------------------------------------------------------------- 1 | 12345 2 | -------------------------------------------------------------------------------- /stc/tests/573-range-4.exp: -------------------------------------------------------------------------------- 1 | x,0.0 2 | -------------------------------------------------------------------------------- /stc/tests/630-app.exp: -------------------------------------------------------------------------------- 1 | Hello World 2 | -------------------------------------------------------------------------------- /stc/tests/712-argp.args: -------------------------------------------------------------------------------- 1 | one two 2 | -------------------------------------------------------------------------------- /stc/tests/713-argp.args: -------------------------------------------------------------------------------- 1 | arg1, 2 | -------------------------------------------------------------------------------- /stc/tests/920-wait-1.exp: -------------------------------------------------------------------------------- 1 | trace: 3 2 | -------------------------------------------------------------------------------- /stc/tests/970-loop.args: -------------------------------------------------------------------------------- 1 | -N=3 -C=2 2 | -------------------------------------------------------------------------------- /turbine/code/maint/debian/compat: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /turbine/code/py/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | -------------------------------------------------------------------------------- /turbine/code/version.txt: -------------------------------------------------------------------------------- 1 | 1.4.4 2 | -------------------------------------------------------------------------------- /turbine/docs/.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | -------------------------------------------------------------------------------- /www/alcf/swift.css: -------------------------------------------------------------------------------- 1 | ../css/swift.css -------------------------------------------------------------------------------- /c-utils/code/maint/debian-bin/compat: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /c-utils/code/maint/debian-dev/compat: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /c-utils/code/src/.gitignore: -------------------------------------------------------------------------------- 1 | c-utils.h 2 | -------------------------------------------------------------------------------- /stc/bench/fs/About.txt: -------------------------------------------------------------------------------- 1 | Filesystem tests 2 | -------------------------------------------------------------------------------- /stc/bench/suite/wavefront/lib: -------------------------------------------------------------------------------- 1 | ../sweep/lib -------------------------------------------------------------------------------- /stc/code/etc/turbine-version.txt: -------------------------------------------------------------------------------- 1 | 1.4.2 2 | -------------------------------------------------------------------------------- /stc/tests/017-toplevel.exp: -------------------------------------------------------------------------------- 1 | HELLO Juan 2 | -------------------------------------------------------------------------------- /stc/tests/018-toplevel.exp: -------------------------------------------------------------------------------- 1 | HELLO Juan 2 | -------------------------------------------------------------------------------- /stc/tests/316-array-build.stcargs: -------------------------------------------------------------------------------- 1 | -p 2 | -------------------------------------------------------------------------------- /stc/tests/317-array-build.stcargs: -------------------------------------------------------------------------------- 1 | -p 2 | -------------------------------------------------------------------------------- /stc/tests/333-arrays-4.exp: -------------------------------------------------------------------------------- 1 | trace: 1 2 | -------------------------------------------------------------------------------- /stc/tests/711-argv-accept.args: -------------------------------------------------------------------------------- 1 | -v -x 2 | -------------------------------------------------------------------------------- /stc/tests/980-wavefront-1.args: -------------------------------------------------------------------------------- 1 | -N=7 2 | -------------------------------------------------------------------------------- /stc/tests/985-wavefront-2.args: -------------------------------------------------------------------------------- 1 | -N=2 2 | -------------------------------------------------------------------------------- /turbine/code/src/tcl/jvm/Notes.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lb/code/maint/debian-bin/docs: -------------------------------------------------------------------------------- 1 | version.txt 2 | -------------------------------------------------------------------------------- /lb/code/maint/debian-dev/docs: -------------------------------------------------------------------------------- 1 | version.txt 2 | -------------------------------------------------------------------------------- /stc/bench/suite/ensemble/lib: -------------------------------------------------------------------------------- 1 | ../embarrassing/lib -------------------------------------------------------------------------------- /stc/tests/161-autowrap.exp: -------------------------------------------------------------------------------- 1 | trace: x was set 2 | -------------------------------------------------------------------------------- /stc/tests/225-branch-assign.exp: -------------------------------------------------------------------------------- 1 | RESULT: 1 2 | -------------------------------------------------------------------------------- /stc/tests/226-branch-assign.exp: -------------------------------------------------------------------------------- 1 | RESULT:1 2 | -------------------------------------------------------------------------------- /stc/tests/490-bag.exp: -------------------------------------------------------------------------------- 1 | trace: 1 2 | trace: 2 3 | -------------------------------------------------------------------------------- /stc/tests/562-file-3.exp: -------------------------------------------------------------------------------- 1 | trace: alice.txt 2 | -------------------------------------------------------------------------------- /stc/tests/563-glob.args: -------------------------------------------------------------------------------- 1 | -S=/usr/lib/*.so 2 | -------------------------------------------------------------------------------- /stc/tests/634-app-fail.check.sh: -------------------------------------------------------------------------------- 1 | rm outfile 2 | -------------------------------------------------------------------------------- /stc/tests/925-liftwait-1.exp: -------------------------------------------------------------------------------- 1 | trace: 1,4,9,16 2 | -------------------------------------------------------------------------------- /stc/tests/963-updateable-arr.args: -------------------------------------------------------------------------------- 1 | --N=500 2 | -------------------------------------------------------------------------------- /turbine/docs/swift.css: -------------------------------------------------------------------------------- 1 | ../../www/css/swift.css -------------------------------------------------------------------------------- /stc/tests/291-chain-statements.exp: -------------------------------------------------------------------------------- 1 | trace: 1,1,1 2 | -------------------------------------------------------------------------------- /stc/tests/390-multidimensional-11.exp: -------------------------------------------------------------------------------- 1 | trace: 1 2 | -------------------------------------------------------------------------------- /stc/tests/396-multidimensional-17.exp: -------------------------------------------------------------------------------- 1 | trace: 1 2 | -------------------------------------------------------------------------------- /stc/tests/500-strings-1.exp: -------------------------------------------------------------------------------- 1 | trace: hello world 2 | -------------------------------------------------------------------------------- /stc/tests/569-url.exp: -------------------------------------------------------------------------------- 1 | echo: ftp://host/path/file 2 | -------------------------------------------------------------------------------- /stc/tests/610-par-1.setup.sh: -------------------------------------------------------------------------------- 1 | export TEST_PROCS=6 2 | -------------------------------------------------------------------------------- /stc/tests/630-app.check.sh: -------------------------------------------------------------------------------- 1 | rm 630-helloworld.txt 2 | -------------------------------------------------------------------------------- /stc/tests/631-app.exp: -------------------------------------------------------------------------------- 1 | Hello World 2 | trace: DONE 3 | -------------------------------------------------------------------------------- /stc/tests/636-echo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo $2 > $1 3 | -------------------------------------------------------------------------------- /stc/tests/666-swiftk-type.check.sh: -------------------------------------------------------------------------------- 1 | rm 666-out.tmp 2 | -------------------------------------------------------------------------------- /stc/tests/694-file-array.exp: -------------------------------------------------------------------------------- 1 | trace: /dev/null 2 | -------------------------------------------------------------------------------- /stc/tests/833-opt-regression.exp: -------------------------------------------------------------------------------- 1 | trace: DONE: 0.0 2 | -------------------------------------------------------------------------------- /stc/tests/900-mapreduce-1.check.sh: -------------------------------------------------------------------------------- 1 | rm -r 900-data 2 | -------------------------------------------------------------------------------- /stc/tests/964-updateable-wait.args: -------------------------------------------------------------------------------- 1 | --limit=100 2 | -------------------------------------------------------------------------------- /stc/tests/opencode/003-comment.swift: -------------------------------------------------------------------------------- 1 | # comment 2 | -------------------------------------------------------------------------------- /stc/tests/opencode/010-define-int.swift: -------------------------------------------------------------------------------- 1 | int i; 2 | -------------------------------------------------------------------------------- /stc/tests/391-multidimensional-12.exp: -------------------------------------------------------------------------------- 1 | trace: 1,2,3,3 2 | -------------------------------------------------------------------------------- /stc/tests/5601-file-propagate.check.sh: -------------------------------------------------------------------------------- 1 | rm 5601-*.txt 2 | -------------------------------------------------------------------------------- /stc/tests/5692-url.exp: -------------------------------------------------------------------------------- 1 | echo: http://www.example.com 2 | -------------------------------------------------------------------------------- /stc/tests/620-include-1.exp: -------------------------------------------------------------------------------- 1 | INCLUDE: 0 2 | IMPORT: 0 3 | -------------------------------------------------------------------------------- /stc/tests/637-app.exp: -------------------------------------------------------------------------------- 1 | quick brown fox 2 | [ lazy dog ] 3 | -------------------------------------------------------------------------------- /stc/tests/712-argp.exp: -------------------------------------------------------------------------------- 1 | 712-argp.*tic,one,two,default 2 | -------------------------------------------------------------------------------- /stc/tests/714-compile-arg.args: -------------------------------------------------------------------------------- 1 | --runtime-arg=SUCCESS 2 | -------------------------------------------------------------------------------- /stc/tests/730-printf.exp: -------------------------------------------------------------------------------- 1 | 14, 3.14, hello$ 2 | nextline 3 | -------------------------------------------------------------------------------- /stc/tests/9851-wavefront-cancel-refcount.args: -------------------------------------------------------------------------------- 1 | --N=2 2 | -------------------------------------------------------------------------------- /stc/tests/986-sudoku.args: -------------------------------------------------------------------------------- 1 | --board=dummy --split1=32 2 | -------------------------------------------------------------------------------- /turbine/code/src/turbine/.gitignore: -------------------------------------------------------------------------------- 1 | turbine-version.h 2 | -------------------------------------------------------------------------------- /c-utils/code/tests/.gitignore: -------------------------------------------------------------------------------- 1 | *.out 2 | *.x 3 | *.result 4 | -------------------------------------------------------------------------------- /dev/build/.gitignore: -------------------------------------------------------------------------------- 1 | install.txt 2 | swift-t-settings.sh 3 | -------------------------------------------------------------------------------- /lb/code/apps/batcher.txt: -------------------------------------------------------------------------------- 1 | sleep 1 2 | echo HI 3 | sleep 1 4 | -------------------------------------------------------------------------------- /lb/docs/README.md: -------------------------------------------------------------------------------- 1 | All docs are now in the gh-pages branch. 2 | -------------------------------------------------------------------------------- /stc/docs/README.md: -------------------------------------------------------------------------------- 1 | All docs are now in the gh-pages branch. 2 | -------------------------------------------------------------------------------- /stc/tests/5601-file-propagate.setup.sh: -------------------------------------------------------------------------------- 1 | touch 5601-f.txt 2 | -------------------------------------------------------------------------------- /stc/tests/589-big-loop.args: -------------------------------------------------------------------------------- 1 | -bound=100000 -sleeptime=0 2 | 3 | -------------------------------------------------------------------------------- /stc/tests/714-compile-arg.stcargs: -------------------------------------------------------------------------------- 1 | -A"compile_arg=SUCCESS!" 2 | -------------------------------------------------------------------------------- /stc/tests/900-mapreduce-1.args: -------------------------------------------------------------------------------- 1 | -data=900-data -count=10 2 | -------------------------------------------------------------------------------- /turbine/code/maint/debian/docs: -------------------------------------------------------------------------------- 1 | README.txt 2 | version.txt 3 | -------------------------------------------------------------------------------- /turbine/code/src/util/.gitignore: -------------------------------------------------------------------------------- 1 | debug-tokens.tcl 2 | debug.h -------------------------------------------------------------------------------- /turbine/code/tests/mpi-io.data: -------------------------------------------------------------------------------- 1 | 123 2 | 456 3 | 789 4 | 101 5 | -------------------------------------------------------------------------------- /c-utils/code/maint/debian-bin/docs: -------------------------------------------------------------------------------- 1 | README.txt 2 | version.txt 3 | -------------------------------------------------------------------------------- /c-utils/code/maint/debian-dev/docs: -------------------------------------------------------------------------------- 1 | README.txt 2 | version.txt 3 | -------------------------------------------------------------------------------- /lb/code/tests/.gitignore: -------------------------------------------------------------------------------- 1 | *.x 2 | *.out 3 | *.result 4 | *.xml 5 | -------------------------------------------------------------------------------- /stc/docs/logs/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | *.dot 3 | *.png 4 | *.pdf 5 | -------------------------------------------------------------------------------- /stc/tests/040-default-arg.exp: -------------------------------------------------------------------------------- 1 | provided: 2 2 | not provided: 1 3 | -------------------------------------------------------------------------------- /stc/tests/117-multiassign-1.exp: -------------------------------------------------------------------------------- 1 | trace: 1,2,3 2 | trace: 4,3,2 3 | -------------------------------------------------------------------------------- /stc/tests/182-globals-1.exp: -------------------------------------------------------------------------------- 1 | trace: 2,hello world,0,3.14,-3.14 2 | -------------------------------------------------------------------------------- /stc/tests/310-arrays-10.exp: -------------------------------------------------------------------------------- 1 | trace: 1,2,3 2 | trace: 3.14,1.0,2.0 3 | -------------------------------------------------------------------------------- /stc/tests/316-array-build.check.sh: -------------------------------------------------------------------------------- 1 | rm test-316-*.data input.txt 2 | -------------------------------------------------------------------------------- /stc/tests/317-array-build.check.sh: -------------------------------------------------------------------------------- 1 | rm test-317-*.data input.txt 2 | -------------------------------------------------------------------------------- /stc/tests/4091-foreach.setup.sh: -------------------------------------------------------------------------------- 1 | touch 4091-A 2 | touch 4091-B 3 | -------------------------------------------------------------------------------- /stc/tests/432.txt: -------------------------------------------------------------------------------- 1 | The quick brown fox jumped over the lazy dog. 2 | -------------------------------------------------------------------------------- /stc/tests/5151-void-1.exp: -------------------------------------------------------------------------------- 1 | trace: done! 2 | trace: LOOKUP DONE 3 | -------------------------------------------------------------------------------- /stc/tests/519-string-format-op.exp: -------------------------------------------------------------------------------- 1 | trace: 1 3.14 Hello World 2 | -------------------------------------------------------------------------------- /stc/tests/560-file-1.setup.sh: -------------------------------------------------------------------------------- 1 | echo "hello world!" > ./alice.txt 2 | -------------------------------------------------------------------------------- /stc/tests/562-file-3.setup.sh: -------------------------------------------------------------------------------- 1 | echo "hello world!" > ./alice.txt 2 | -------------------------------------------------------------------------------- /stc/tests/690-file.setup.sh: -------------------------------------------------------------------------------- 1 | echo "hello world!" > ./alice.txt 2 | -------------------------------------------------------------------------------- /stc/tests/760-hdf-1.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm A.hdf 4 | 5 | -------------------------------------------------------------------------------- /stc/tests/include/import_061.swift: -------------------------------------------------------------------------------- 1 | 2 | float a_variable = 1.0; 3 | -------------------------------------------------------------------------------- /stc/tests/opencode/005-eval-ints.swift: -------------------------------------------------------------------------------- 1 | 2 | 2; 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /stc/tests/opencode/070-assign-int.swift: -------------------------------------------------------------------------------- 1 | int i; 2 | 3 | i = 2; 4 | -------------------------------------------------------------------------------- /turbine/code/bin/.gitignore: -------------------------------------------------------------------------------- 1 | turbine 2 | turbine-pilot 3 | mpi-cp 4 | -------------------------------------------------------------------------------- /turbine/code/src/tcl/python/.gitignore: -------------------------------------------------------------------------------- 1 | turbine-python-version.h 2 | -------------------------------------------------------------------------------- /turbine/code/src/tcl/static-pkg/.gitignore: -------------------------------------------------------------------------------- 1 | tcl-turbine-src.h 2 | -------------------------------------------------------------------------------- /turbine/docs/README.md: -------------------------------------------------------------------------------- 1 | All docs are now in the gh-pages branch. 2 | -------------------------------------------------------------------------------- /lb/code/m4/README.adoc: -------------------------------------------------------------------------------- 1 | These may be hard links to swift-t/dev/m4/*.m4 2 | -------------------------------------------------------------------------------- /lb/code/maint/.gitignore: -------------------------------------------------------------------------------- 1 | # Appears on OSX: 2 | mpi_version3_test.dSYM 3 | -------------------------------------------------------------------------------- /lb/code/maint/version.mkf: -------------------------------------------------------------------------------- 1 | 2 | VERSION = $(shell cat version.txt) 3 | -------------------------------------------------------------------------------- /stc/code/etc/help/options-2.txt: -------------------------------------------------------------------------------- 1 | -E 2 | Just preprocess 3 | -------------------------------------------------------------------------------- /stc/tests/.gitignore: -------------------------------------------------------------------------------- 1 | *.ic 2 | *.out 3 | *.stc.* 4 | *.xpt 5 | *.xml 6 | -------------------------------------------------------------------------------- /stc/tests/566-file.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -eu 3 | 4 | rm 566.txt 5 | -------------------------------------------------------------------------------- /stc/tests/630-app.setup.sh: -------------------------------------------------------------------------------- 1 | echo "Hello World" > 630-helloworld.txt 2 | -------------------------------------------------------------------------------- /stc/tests/653-typevar.exp: -------------------------------------------------------------------------------- 1 | Hello world! 2 | Test! 3 | 1234 4 | 1234.0 5 | -------------------------------------------------------------------------------- /stc/tests/850-checkpoint.setup.sh: -------------------------------------------------------------------------------- 1 | export TURBINE_XPT_FILE="./850.xpt" 2 | -------------------------------------------------------------------------------- /stc/tests/851-checkpoint.setup.sh: -------------------------------------------------------------------------------- 1 | export TURBINE_XPT_FILE="./851.xpt" 2 | -------------------------------------------------------------------------------- /stc/tests/9851-wavefront-cancel-refcount.stcargs: -------------------------------------------------------------------------------- 1 | -F cancel-refcounts 2 | -------------------------------------------------------------------------------- /turbine/code/src/executables/.gitignore: -------------------------------------------------------------------------------- 1 | turbine_sh 2 | turbine_sh.c 3 | -------------------------------------------------------------------------------- /c-utils/code/maint/version.mkf: -------------------------------------------------------------------------------- 1 | 2 | VERSION = $(shell cat version.txt) 3 | -------------------------------------------------------------------------------- /stc/code/maint/version.mkf: -------------------------------------------------------------------------------- 1 | 2 | VERSION = $(shell cat etc/version.txt) 3 | -------------------------------------------------------------------------------- /stc/tests/163-autowrap-loc.exp: -------------------------------------------------------------------------------- 1 | HELLO 0 2 | HELLO 1 3 | HELLO 2 4 | HELLO 3 5 | -------------------------------------------------------------------------------- /stc/tests/190-propagate.swift: -------------------------------------------------------------------------------- 1 | 2 | int i = 3; 3 | void v = propagate(i); 4 | -------------------------------------------------------------------------------- /stc/tests/316-array-build.setup.sh: -------------------------------------------------------------------------------- 1 | echo "INPUT DATA" > input.txt 2 | 3 | -------------------------------------------------------------------------------- /stc/tests/317-array-build.setup.sh: -------------------------------------------------------------------------------- 1 | echo "INPUT DATA" > input.txt 2 | 3 | -------------------------------------------------------------------------------- /stc/tests/4091-foreach.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rm 4091-A 3 | rm 4091-B 4 | -------------------------------------------------------------------------------- /stc/tests/423-forloops-4.exp: -------------------------------------------------------------------------------- 1 | trace: fib,25,=,75025 2 | trace: fib_25,75025 3 | -------------------------------------------------------------------------------- /stc/tests/425-forloops-6.exp: -------------------------------------------------------------------------------- 1 | trace: fib,25,=,75025 2 | trace: fib_25,75025 3 | -------------------------------------------------------------------------------- /stc/tests/568-hostmap-1.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | rm tmp.txt 5 | -------------------------------------------------------------------------------- /stc/tests/682-app-pipeline.check.sh: -------------------------------------------------------------------------------- 1 | rm output-[012].data count-[012].data 2 | -------------------------------------------------------------------------------- /stc/tests/833-opt-regression.stcargs: -------------------------------------------------------------------------------- 1 | -F value-number -f dead-code-elim 2 | -------------------------------------------------------------------------------- /turbine/code/m4/README.adoc: -------------------------------------------------------------------------------- 1 | These may be hard links to swift-t/dev/m4/*.m4 2 | -------------------------------------------------------------------------------- /turbine/code/maint/version.mkf: -------------------------------------------------------------------------------- 1 | 2 | VERSION = $(shell cat version.txt) 3 | -------------------------------------------------------------------------------- /stc/bench/suite/portfolio4s-2/README: -------------------------------------------------------------------------------- 1 | This is the Portfolio4S-2-bench from RDCEP 2 | -------------------------------------------------------------------------------- /stc/tests/638-app.exp: -------------------------------------------------------------------------------- 1 | the quick brown fox jumped over the lazy dog 2 | DONE 3 | -------------------------------------------------------------------------------- /stc/tests/638-app.setup.sh: -------------------------------------------------------------------------------- 1 | # create files 2 | touch jumped over the lazy dog 3 | -------------------------------------------------------------------------------- /stc/tests/680-app.exp: -------------------------------------------------------------------------------- 1 | trace: original,100 2 | trace: top10,1,2,3,4,5,6,7,8,9,10 3 | -------------------------------------------------------------------------------- /stc/tests/6921-file-map.setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | rm -f ./6921-test.txt 4 | -------------------------------------------------------------------------------- /stc/tests/922-wait-deep.exp: -------------------------------------------------------------------------------- 1 | trace: DONE 1 2 | trace: DONE 2 3 | trace: DONE 3 4 | -------------------------------------------------------------------------------- /c-utils/code/tests/readfile.txt: -------------------------------------------------------------------------------- 1 | line1 2 | line2 x y 3 | line3 4 | 5 | line4 6 | end 7 | -------------------------------------------------------------------------------- /stc/bench/suite/README.txt: -------------------------------------------------------------------------------- 1 | A collection of benchmarks used for the PACT'13 paper 2 | -------------------------------------------------------------------------------- /stc/code/etc/vim/ftdetect/swift.vim: -------------------------------------------------------------------------------- 1 | au BufRead,BufNewFile *.swift set filetype=swift 2 | -------------------------------------------------------------------------------- /stc/tests/013-function-overload.exp: -------------------------------------------------------------------------------- 1 | trace: got an int,1 2 | trace: got a float,1.0 3 | -------------------------------------------------------------------------------- /stc/tests/4091-foreach.exp: -------------------------------------------------------------------------------- 1 | 4091-A one 2 | 4091-A two 3 | 4091-B one 4 | 4091-B two 5 | -------------------------------------------------------------------------------- /stc/tests/5671-lines.data: -------------------------------------------------------------------------------- 1 | 2 | 123 3 | 456 4 | 789 # JUNK 5 | 6 | 1011 7 | 8 | END 9 | -------------------------------------------------------------------------------- /stc/tests/683-app-implicit-input.setup.sh: -------------------------------------------------------------------------------- 1 | # Remove existing dir 2 | rm -rf ./tmp-683 3 | -------------------------------------------------------------------------------- /stc/tests/871-work-types.setup.sh: -------------------------------------------------------------------------------- 1 | export TURBINE_t0_WORKERS=1 2 | export PROCS=4 3 | -------------------------------------------------------------------------------- /stc/tests/include/import_060.swift: -------------------------------------------------------------------------------- 1 | // Create temporaries 2 | trace(1 + 2 * 3 / 4); 3 | -------------------------------------------------------------------------------- /stc/bench/util/make-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | tclsh make-package.tcl > pkgIndex.tcl 4 | -------------------------------------------------------------------------------- /stc/tests/293-chain-printfs.swift: -------------------------------------------------------------------------------- 1 | 2 | import io; 3 | 4 | printf("p1") => printf("p2"); 5 | -------------------------------------------------------------------------------- /stc/tests/450-assoc-array.exp: -------------------------------------------------------------------------------- 1 | trace: 1,hello world 2 | trace: 2,goodbye 3 | trace: B,1,2 4 | -------------------------------------------------------------------------------- /stc/tests/592.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/stc/tests/592.data -------------------------------------------------------------------------------- /stc/tests/7451-clock-fmt.swift: -------------------------------------------------------------------------------- 1 | 2 | import sys; 3 | 4 | trace(clock_format("%Y", 100)); 5 | -------------------------------------------------------------------------------- /www/wiki/stack.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/www/wiki/stack.odg -------------------------------------------------------------------------------- /dev/debian/install-readme.md: -------------------------------------------------------------------------------- 1 | 2 | To install the Swift/T Debian packages, run ./install-debs.sh -------------------------------------------------------------------------------- /stc/tests/7451-clock-fmt.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | grep -q 1969 $TURBINE_OUTPUT 5 | -------------------------------------------------------------------------------- /turbine/code/tests/staticapp-bundled-1.1.data: -------------------------------------------------------------------------------- 1 | the quick brown fox jumped over the lazy dog 2 | -------------------------------------------------------------------------------- /www/wiki/concepts.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/www/wiki/concepts.odg -------------------------------------------------------------------------------- /www/wiki/stack-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/www/wiki/stack-1.png -------------------------------------------------------------------------------- /www/wiki/stack-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/www/wiki/stack-2.png -------------------------------------------------------------------------------- /dev/conda/linux-64/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore local copies: 2 | meta.yaml 3 | settings.sed 4 | 5 | *.log 6 | -------------------------------------------------------------------------------- /dev/conda/osx-64/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore local copies: 2 | meta.yaml 3 | settings.sed 4 | 5 | *.log 6 | -------------------------------------------------------------------------------- /dev/conda/osx-arm64/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore local copies: 2 | meta.yaml 3 | settings.sed 4 | 5 | *.log 6 | -------------------------------------------------------------------------------- /dev/debian/README.md: -------------------------------------------------------------------------------- 1 | 2 | To make the Debian packages, you need: 3 | 4 | APT: devscripts debhelper 5 | -------------------------------------------------------------------------------- /dev/jenkins/spack-cfg-gce.yaml: -------------------------------------------------------------------------------- 1 | config: 2 | build_stage: 3 | - /tmp/$user.swift-t/spack-stage 4 | -------------------------------------------------------------------------------- /lb/code/src/.gitignore: -------------------------------------------------------------------------------- 1 | # These are generated by configure 2 | adlb-version.h 3 | mpe-settings.h 4 | -------------------------------------------------------------------------------- /stc/tests/122-sub-error-1.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | main { 4 | f(); 5 | } 6 | -------------------------------------------------------------------------------- /stc/tests/454-assoc-array.exp: -------------------------------------------------------------------------------- 1 | trace: 1,test,1,1 2 | trace: 2,testing,2,1 3 | trace: 3,tested,3,1 4 | -------------------------------------------------------------------------------- /stc/tests/528-unicode-extended.exp: -------------------------------------------------------------------------------- 1 | trace: 𓀀𓅸 𓉀 𓐮 2 | trace: 𠀀 𠀁 𠀂 𠀃 𠀄 𠀅 𠀆 𠀇 𠀈 𠀉 𠀊 𠀋 3 | -------------------------------------------------------------------------------- /stc/tests/561-file-2.setup.sh: -------------------------------------------------------------------------------- 1 | echo "hello world!" > ./alice.txt 2 | echo "bye world!" > ./joe.txt 3 | -------------------------------------------------------------------------------- /stc/tests/7452-clock-fmt.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | grep -q "1969.*T.*" $TURBINE_OUTPUT 5 | -------------------------------------------------------------------------------- /turbine/code/lib/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated Tcl/C code 2 | *_tcl.c 3 | # Mac shared objects 4 | *.dylib 5 | -------------------------------------------------------------------------------- /turbine/code/tests/sleeps-3.txt: -------------------------------------------------------------------------------- 1 | declare file 1 tmp.txt 2 | 3 | sleep 0 4 | sleep 0 5 | sleep 0 6 | -------------------------------------------------------------------------------- /dev/conda/linux-aarch64/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore local copies: 2 | meta.yaml 3 | settings.sed 4 | 5 | *.log 6 | -------------------------------------------------------------------------------- /stc/code/lib/guava-18.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/stc/code/lib/guava-18.0.jar -------------------------------------------------------------------------------- /stc/code/lib/junit-4.12.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/stc/code/lib/junit-4.12.jar -------------------------------------------------------------------------------- /stc/tests/683-produce.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | dir=$1 3 | mkdir -p $dir 4 | echo "TEST" > $dir/tmp.txt 5 | -------------------------------------------------------------------------------- /stc/tests/710-argc.args: -------------------------------------------------------------------------------- 1 | -v -a=file1.txt file2.txt --exec="prog thing1 thing2" --help file4.txt -n=n=3 2 | -------------------------------------------------------------------------------- /stc/tests/822-argc.swift: -------------------------------------------------------------------------------- 1 | 2 | import sys; 3 | 4 | // THIS-TEST-SHOULD-NOT-COMPILE 5 | int x = argc + 1; 6 | -------------------------------------------------------------------------------- /stc/tests/opencode/020-double-define.swift: -------------------------------------------------------------------------------- 1 | 2 | # THIS-TEST-SHOULD-FAIL 3 | int i; 4 | int i; 5 | i = 2; 6 | -------------------------------------------------------------------------------- /www/wiki/turbine-model.odg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/www/wiki/turbine-model.odg -------------------------------------------------------------------------------- /www/wiki/turbine-model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/www/wiki/turbine-model.png -------------------------------------------------------------------------------- /c-utils/code/Changes.txt: -------------------------------------------------------------------------------- 1 | 2 | 0.0.3: 3 | 4 | Initial use of branch structure and Swift/T release conventions 5 | -------------------------------------------------------------------------------- /stc/tests/116-invalid-assign-3.swift: -------------------------------------------------------------------------------- 1 | //THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | int k; 4 | k = k; 5 | r = k; 6 | -------------------------------------------------------------------------------- /stc/tests/5262-hex-octal-invalid.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | main { 3 | int x = 0o9132; 4 | } 5 | -------------------------------------------------------------------------------- /stc/tests/593-blob-read.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/stc/tests/593-blob-read.data -------------------------------------------------------------------------------- /stc/tests/594-blob-write.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -eu 2 | 3 | od -t f8 A.blob | grep -q 0.5 4 | rm A.blob 5 | 6 | -------------------------------------------------------------------------------- /stc/tests/631-app-cat.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cat "$1" 3 | cp "$1" "$2" 4 | echo "$3" >> "$2" 5 | echo "$4" >> "$2" 6 | -------------------------------------------------------------------------------- /turbine/code/scripts/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated settings files 2 | turbine-config.sh 3 | turbine-build-config.sh 4 | -------------------------------------------------------------------------------- /www/wiki/concepts-control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/www/wiki/concepts-control.png -------------------------------------------------------------------------------- /stc/code/lib/commons-cli-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/stc/code/lib/commons-cli-1.2.jar -------------------------------------------------------------------------------- /stc/code/lib/commons-io-2.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/stc/code/lib/commons-io-2.4.jar -------------------------------------------------------------------------------- /stc/code/lib/jacocoant-0.7.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/stc/code/lib/jacocoant-0.7.2.jar -------------------------------------------------------------------------------- /stc/tests/138-func-err.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | main { 4 | 5 | import something; 6 | } 7 | -------------------------------------------------------------------------------- /stc/tests/139-func-err.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | main { 4 | 5 | typedef int test; 6 | } 7 | -------------------------------------------------------------------------------- /stc/tests/463-assoc-array-err.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | main { 4 | float A[notype]; 5 | } 6 | -------------------------------------------------------------------------------- /stc/tests/5261-hex-octal-invalid.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | main { 4 | trace(0x123G); 5 | } 6 | -------------------------------------------------------------------------------- /stc/tests/573-range-4.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | main { 4 | foreach x in [0:0.5:1.0] { 5 | trace("x",x); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /stc/tests/6301-app-string.swift: -------------------------------------------------------------------------------- 1 | string echo = "echo"; 2 | app f(string s) { 3 | echo s; 4 | } 5 | f("HELLO"); 6 | -------------------------------------------------------------------------------- /turbine/code/src/tcl/adlb/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | DIR := src/tcl/adlb 3 | 4 | TCL_ADLB_SRC := $(DIR)/tcl-adlb.c 5 | 6 | -------------------------------------------------------------------------------- /turbine/code/src/tcl/blob/blob.i: -------------------------------------------------------------------------------- 1 | 2 | %module blob 3 | %{ 4 | #include "blob.h" 5 | %} 6 | 7 | %include "blob.h" 8 | -------------------------------------------------------------------------------- /www/wiki/concepts-dataflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/www/wiki/concepts-dataflow.png -------------------------------------------------------------------------------- /c-utils/code/.gitignore: -------------------------------------------------------------------------------- 1 | lib/ 2 | debian 3 | install.txt 4 | source.txt 5 | c-utils-config.h 6 | c-utils-config.h.in 7 | -------------------------------------------------------------------------------- /c-utils/code/src/vint.c: -------------------------------------------------------------------------------- 1 | #include "vint.h" 2 | 3 | // Currently empty, just include vint.h to make sure it all compiles 4 | -------------------------------------------------------------------------------- /dev/build/examples/README.adoc: -------------------------------------------------------------------------------- 1 | 2 | = Examples 3 | 4 | This contains some swift-t-settings files for known systems. 5 | -------------------------------------------------------------------------------- /dev/conda/osx-64/deps.sh: -------------------------------------------------------------------------------- 1 | 2 | # osx-64 DEPS SH 3 | # For OSX/Intel, we rely on Clang: 4 | 5 | USE_GCC=0 6 | USE_ZSH=0 7 | -------------------------------------------------------------------------------- /dev/conda/pkgs-ant.yaml: -------------------------------------------------------------------------------- 1 | # pkgs-ant.yaml: START 2 | # Extra packages for ant 3 | - ant 4 | # pkgs-ant.yaml: STOP 5 | -------------------------------------------------------------------------------- /dev/conda/pkgs-zsh.yaml: -------------------------------------------------------------------------------- 1 | # pkgs-zsh.yaml: START 2 | # Extra packages for zsh 3 | - zsh 4 | # pkgs-zsh.yaml: STOP 5 | -------------------------------------------------------------------------------- /stc/code/lib/hamcrest-core-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/stc/code/lib/hamcrest-core-1.3.jar -------------------------------------------------------------------------------- /stc/code/lib/jacocoagent-0.7.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/stc/code/lib/jacocoagent-0.7.2.jar -------------------------------------------------------------------------------- /stc/code/lib/log4j-api-2.23.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/stc/code/lib/log4j-api-2.23.1.jar -------------------------------------------------------------------------------- /stc/code/lib/log4j-core-2.23.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/stc/code/lib/log4j-core-2.23.1.jar -------------------------------------------------------------------------------- /stc/tests/009-backslashhash.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | // Invalid escape code 3 | s = "hello\#fail"; 4 | -------------------------------------------------------------------------------- /stc/tests/6390-echostderr.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # echo to stderr instead of stdout for testing 3 | echo "$@" >&2 4 | -------------------------------------------------------------------------------- /stc/tests/746-system-1.swift: -------------------------------------------------------------------------------- 1 | import string; 2 | import sys; 3 | system(split("echo hello")); 4 | system1("echo hello"); 5 | -------------------------------------------------------------------------------- /stc/tests/811-numberformat-success.exp: -------------------------------------------------------------------------------- 1 | trace: Leading zeroes:,90 2 | trace: Leading zeroes neg:,-7 3 | trace: Zero:,0 4 | -------------------------------------------------------------------------------- /stc/tests/829-overload-regression.swift: -------------------------------------------------------------------------------- 1 | import assert; 2 | 3 | //THIS-TEST-SHOULD-NOT-COMPILE 4 | assertEqual(1, 1); 5 | -------------------------------------------------------------------------------- /stc/tests/910-iterate-1.swift: -------------------------------------------------------------------------------- 1 | 2 | main { 3 | iterate i { 4 | trace(i); 5 | } until (i >= 10) 6 | } 7 | -------------------------------------------------------------------------------- /dev/conda/env-R.yaml: -------------------------------------------------------------------------------- 1 | # env-R.yaml: START 2 | # Extra environment setting for R 3 | - ENABLE_R=1 4 | # env-R.yaml: STOP 5 | -------------------------------------------------------------------------------- /mpe/list-events.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Sorter for list-events.x 4 | 5 | LOG=$1 6 | 7 | ./list-events.x ${LOG} | sort -n 8 | -------------------------------------------------------------------------------- /stc/code/lib/commons-lang3-3.3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/stc/code/lib/commons-lang3-3.3.2.jar -------------------------------------------------------------------------------- /stc/code/lib/log4j-1.2-api-2.23.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/stc/code/lib/log4j-1.2-api-2.23.1.jar -------------------------------------------------------------------------------- /stc/tests/021-tuple.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | main { 4 | // Non-matching args 5 | x = (1, 2); 6 | } 7 | -------------------------------------------------------------------------------- /stc/tests/331-arrays-compile-error-2.swift: -------------------------------------------------------------------------------- 1 | //THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | main { 4 | int A[] = 1; 5 | } 6 | 7 | -------------------------------------------------------------------------------- /stc/tests/384-structoarray.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | grep -q "trace: 81,81" ${TURBINE_OUTPUT} || exit 1 4 | 5 | exit 0 6 | -------------------------------------------------------------------------------- /stc/tests/404-foreach-5.swift: -------------------------------------------------------------------------------- 1 | 2 | main { 3 | 4 | foreach x, i in [15:30] { 5 | trace(i, x); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /stc/tests/420-for-loop-1.swift: -------------------------------------------------------------------------------- 1 | 2 | for (int i = 0, int j = 1; i < 10; i = i + 1, j = j * 2) { 3 | trace(i, j); 4 | } 5 | -------------------------------------------------------------------------------- /stc/tests/460-assoc-array-err.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | main { 3 | int A[string]; 4 | A[1] = 1; 5 | } 6 | -------------------------------------------------------------------------------- /stc/tests/462-assoc-array-err.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | main { 3 | A[1] = 1; 4 | A["2"] = 2; 5 | } 6 | -------------------------------------------------------------------------------- /stc/tests/601-builtin-1.swift: -------------------------------------------------------------------------------- 1 | 2 | // Will be plus 3 | (int o) p(int i1, int i2) "turbine" "0.0.1" "plus"; 4 | 5 | main {} 6 | -------------------------------------------------------------------------------- /stc/tests/638-app.check.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # clean up files created by setup.sh 3 | rm -f jumped over the lazy dog 4 | -------------------------------------------------------------------------------- /stc/tests/639-app.exp: -------------------------------------------------------------------------------- 1 | one two three four five 2 | DONE1 3 | ein zwei drei vier fuenf sechs sieben acht neun zehn 4 | DONE2 5 | -------------------------------------------------------------------------------- /stc/tests/988-matrix.exp: -------------------------------------------------------------------------------- 1 | row 0: 1.0000 4.0000 7.0000 2 | row 1: 2.0000 5.0000 8.0000 3 | row 2: 3.0000 6.0000 9.0000 4 | 5 | -------------------------------------------------------------------------------- /stc/tests/opencode/080-assign-int-2.swift: -------------------------------------------------------------------------------- 1 | 2 | int i; 3 | int j; 4 | # i = 2+2; not in swift-0 5 | # j = i; not in swift-0 6 | -------------------------------------------------------------------------------- /turbine/code/scripts/main-wrap/settings/flags.g++.sh: -------------------------------------------------------------------------------- 1 | 2 | # Flags for G++ 3 | 4 | STD= 5 | PIC=-fPIC 6 | SHARED=-shared 7 | -------------------------------------------------------------------------------- /turbine/code/src/tcl/static-pkg/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | DIR := src/tcl/static-pkg 3 | 4 | STATIC_PKG_SRC += $(DIR)/static-pkg.c 5 | -------------------------------------------------------------------------------- /turbine/code/src/tcl/turbine/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | DIR := src/tcl/turbine 3 | 4 | TCL_TURBINE_SRC += $(DIR)/tcl-turbine.c 5 | 6 | -------------------------------------------------------------------------------- /dev/conda/pkgs-tk.yaml: -------------------------------------------------------------------------------- 1 | # pkgs-tk.yaml: START 2 | # Extra packages for tk 3 | - m4_getenv(SPEC_TK) 4 | # pkgs-tk.yaml: STOP 5 | -------------------------------------------------------------------------------- /stc/tests/101-error.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -ex 2 | 3 | grep -q "MY USER ERROR MESSAGE" ${TURBINE_OUTPUT} || exit 1 4 | 5 | exit 0 6 | -------------------------------------------------------------------------------- /stc/tests/210-if-1.swift: -------------------------------------------------------------------------------- 1 | 2 | int a; 3 | a = 1; 4 | 5 | if (a) 6 | { 7 | int b; 8 | b = 1; 9 | trace(b); 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/421-for-loop-2.swift: -------------------------------------------------------------------------------- 1 | 2 | main { 3 | for (int i = 0; i < 10; i = i + 1) { 4 | trace(i); 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /stc/tests/430-struct-construct.swift: -------------------------------------------------------------------------------- 1 | type mystruct { 2 | int x; 3 | int y[]; 4 | } 5 | 6 | 7 | S = mystruct(1, [1,2,3]); 8 | -------------------------------------------------------------------------------- /stc/tests/634-fail-app.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # app that returns an error return code 3 | OUT=$1 4 | echo "hello" > "$OUT" 5 | return 1 6 | -------------------------------------------------------------------------------- /stc/tests/711-argv-accept.swift: -------------------------------------------------------------------------------- 1 | 2 | import io; 3 | import sys; 4 | 5 | // THIS-TEST-SHOULD-NOT-RUN 6 | 7 | argv_accept("v"); 8 | -------------------------------------------------------------------------------- /stc/tests/7610-data.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": [ 9, 8, 7 ], 3 | "keys": { "key1":5, "key2":6 }, 4 | "d1": { "d2": 42 } 5 | } 6 | -------------------------------------------------------------------------------- /stc/tests/900-mapreduce-1.setup.sh: -------------------------------------------------------------------------------- 1 | mkdir -p 900-data 2 | for i in $(seq 0 9); do 3 | touch "./900-data/input-${i}.txt" 4 | done 5 | -------------------------------------------------------------------------------- /stc/tests/983.funcs.tcl: -------------------------------------------------------------------------------- 1 | 2 | namespace eval funcs { 3 | proc f_983 { x A } { 4 | puts "x: $x A: $A" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /turbine/code/scripts/main-wrap/settings/flags.xlc.sh: -------------------------------------------------------------------------------- 1 | 2 | # Flags for XLC 3 | 4 | STD="" 5 | PIC=-qpic 6 | SHARED=-qmkshrobj 7 | -------------------------------------------------------------------------------- /turbine/code/src/tcl/jvm/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | # MODULE TCL-JVM 3 | 4 | DIR := src/tcl/jvm 5 | 6 | TCL_JVM_SRC := $(DIR)/tcl-jvm.c 7 | -------------------------------------------------------------------------------- /turbine/code/tests/coasters/wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Current date : $(date)" 4 | echo "Running on $(hostname -f)" 5 | -------------------------------------------------------------------------------- /stc/code/lib/antlr-3.5-complete-no-st3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/stc/code/lib/antlr-3.5-complete-no-st3.jar -------------------------------------------------------------------------------- /stc/tests/000-noop.swift: -------------------------------------------------------------------------------- 1 | 2 | // Test noop statements 3 | // Regression test for #207 4 | 5 | 6 | main 7 | { 8 | ; 9 | } 10 | -------------------------------------------------------------------------------- /stc/tests/022-tuple.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | main { 4 | // Tuple as function arg 5 | trace((1,2,3)); 6 | } 7 | -------------------------------------------------------------------------------- /stc/tests/137-func-err.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | main { 4 | (int x) f (int y) { 5 | x = y; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /stc/tests/492-bag.exp: -------------------------------------------------------------------------------- 1 | Elem@0: 1 2 | Elem@0: 2 3 | Elem@1: 3 4 | Elem@1: 4 5 | XX Elem: 1 6 | XX Elem: 2 7 | YY Elem: 3 8 | YY Elem: 4 9 | -------------------------------------------------------------------------------- /stc/tests/731-trace.swift: -------------------------------------------------------------------------------- 1 | 2 | main 3 | { 4 | int a; 5 | int b; 6 | a = 2; 7 | b = 1; 8 | 9 | trace(a,b); 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/972-empty-loop.swift: -------------------------------------------------------------------------------- 1 | 2 | // COMPILE-ONLY-TEST 3 | main { 4 | for (; true; ) { 5 | int j = 1; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /stc/tests/find-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | SCRIPT_DIR=`dirname $0` 3 | SEARCH=$1 4 | ls ${SCRIPT_DIR}/*.swift | nl | grep "$1" 5 | -------------------------------------------------------------------------------- /turbine/code/scripts/main-wrap/settings/flags.gcc.sh: -------------------------------------------------------------------------------- 1 | 2 | # Flags for GCC 3 | 4 | STD="-std=gnu99" 5 | PIC=-fPIC 6 | SHARED=-shared 7 | -------------------------------------------------------------------------------- /turbine/code/tests/batcher.txt: -------------------------------------------------------------------------------- 1 | touch tests/data/1.txt 2 | touch tests/data/2.txt 3 | touch tests/data/3.txt 4 | touch tests/data/4.txt 5 | -------------------------------------------------------------------------------- /turbine/code/tests/readfile.txt: -------------------------------------------------------------------------------- 1 | 2 | jkl 3 | 4 | iop 5 | iop 6 | 7 | end 8 | 9 | # hi 10 | #hi2 11 | j k l m n 12 | -------------------------------------------------------------------------------- /dev/conda/pkgs-ncurses.yaml: -------------------------------------------------------------------------------- 1 | # pkgs-ncurses.yaml: START 2 | # Extra packages for ncurses 3 | - ncurses 4 | # pkgs-ncurses.yaml: STOP 5 | -------------------------------------------------------------------------------- /stc/bench/foreach-1D/foreach-1D.procs.txt: -------------------------------------------------------------------------------- 1 | 128 2 | 256 3 | 512 4 | 1024 5 | 2048 6 | 4096 7 | 8192 8 | 16384 9 | 32768 10 | 65536 11 | -------------------------------------------------------------------------------- /stc/bench/suite/uts/lib/pkgIndex.tcl: -------------------------------------------------------------------------------- 1 | # Hand-written pkgIndex 2 | 3 | package ifneeded uts 0.0 [list load [file join $dir libuts.so]] 4 | 5 | -------------------------------------------------------------------------------- /stc/tests/400-foreach-1.exp: -------------------------------------------------------------------------------- 1 | trace: 0,1 2 | trace: 1,2 3 | trace: 5,3 4 | trace: 6,4 5 | trace: 1 6 | trace: 2 7 | trace: 3 8 | trace: 4 9 | -------------------------------------------------------------------------------- /stc/tests/405-foreach-6.exp: -------------------------------------------------------------------------------- 1 | trace: 0,1 2 | trace: 1,2 3 | trace: 5,3 4 | trace: 6,4 5 | trace: 1 6 | trace: 2 7 | trace: 3 8 | trace: 4 9 | -------------------------------------------------------------------------------- /stc/tests/509-strings-10.swift: -------------------------------------------------------------------------------- 1 | //THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | main { 4 | string s = "hi"; 5 | int A[]; 6 | A[s] = 3; 7 | } 8 | -------------------------------------------------------------------------------- /stc/tests/566-file.swift: -------------------------------------------------------------------------------- 1 | import files; 2 | 3 | main { 4 | foreach i in [1:3] { 5 | file f<"566.txt"> = write("test"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /stc/tests/587-foreach-range-8.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | main { 4 | @nosplit 5 | foreach i in [1:100] { 6 | trace(i); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /stc/tests/635-app.setup.sh: -------------------------------------------------------------------------------- 1 | dirname=`dirname $0` 2 | testdir=`cd $dirname; pwd` 3 | 4 | cat /dev/urandom | head -c 10000 > 635-rand.tmp 5 | -------------------------------------------------------------------------------- /stc/tests/funcs.tcl: -------------------------------------------------------------------------------- 1 | 2 | # General settings for Swift/T extension functions 3 | 4 | puts PACKAGEPROVIDE 5 | 6 | package provide funcs 0.0 7 | -------------------------------------------------------------------------------- /turbine/code/scripts/submit/ec2/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | DIR := scripts/submit/ec2 3 | 4 | SCRIPTS_SUBMIT += $(DIR)/turbine-setup-ec2.zsh 5 | 6 | -------------------------------------------------------------------------------- /turbine/code/src/executables/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | DIR := src/executables 3 | 4 | TURBINE_EXECUTABLE_MANIFESTS += $(DIR)/turbine_sh.manifest 5 | -------------------------------------------------------------------------------- /turbine/code/src/tcl/julia/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | # MODULE TCL-JULIA 3 | 4 | DIR := src/tcl/julia 5 | 6 | TCL_JULIA_SRC := $(DIR)/tcl-julia.c 7 | -------------------------------------------------------------------------------- /dev/conda/pkgs-clang.yaml: -------------------------------------------------------------------------------- 1 | # pkgs-clang.yaml: START 2 | # Extra packages for clang 3 | - m4_getenv(SPEC_CLANG) 4 | # pkgs-clang.yaml: STOP 5 | -------------------------------------------------------------------------------- /lb/code/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | lib/ 3 | 4 | deps.txt 5 | source.txt 6 | system-libs.txt 7 | 8 | # Link to Debian control files 9 | debian 10 | -------------------------------------------------------------------------------- /stc/docs/logs/dag1.swift: -------------------------------------------------------------------------------- 1 | 2 | import unix; 3 | 4 | void v1, v2; 5 | v1 = sleep(1); 6 | wait (v1) { v2 = sleep(1); } 7 | wait (v2) { sleep(1); } 8 | -------------------------------------------------------------------------------- /stc/tests/113-declare-assign.swift: -------------------------------------------------------------------------------- 1 | 2 | main 3 | { 4 | int x = 2; 5 | int y = 4; 6 | int z; 7 | 8 | z = x + y; 9 | } 10 | -------------------------------------------------------------------------------- /stc/tests/181-global-assign.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-CAUSE-WARNING 2 | // Shouldn't raise errors if globals unread 3 | 4 | int x = 10; 5 | -------------------------------------------------------------------------------- /stc/tests/735-priority-1.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | main { 4 | foreach i in [1:100] { 5 | @prio=(i)sleep_trace(0.01, i); 6 | } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /turbine/code/py/.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | ignore = W504, E203, E221, E222, E226, E231, E241, E266, E271, E272, E302, E305, E401, E402, E701, E702, E722 -------------------------------------------------------------------------------- /turbine/code/src/tcl/c-utils/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | # MODULE C-UTILS 3 | 4 | DIR := src/tcl/c-utils 5 | 6 | TCL_C_UTILS_SRC := $(DIR)/tcl-c-utils.c 7 | -------------------------------------------------------------------------------- /turbine/code/tests/staticapp-bundled-1.2.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/swift-lang/swift-t/HEAD/turbine/code/tests/staticapp-bundled-1.2.data -------------------------------------------------------------------------------- /dev/debian/remove-debs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # REMOVE DEBS 4 | # Uninstall Swift/T 5 | 6 | sudo dpkg --remove stc turbine adlbx-dev exmcutils-dev 7 | -------------------------------------------------------------------------------- /stc/tests/002-define-empty-function.swift: -------------------------------------------------------------------------------- 1 | 2 | (int x) myfun (int y) { 3 | x = 0; 4 | 5 | } 6 | 7 | 8 | main { 9 | 10 | 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/017-toplevel.swift: -------------------------------------------------------------------------------- 1 | import io; 2 | 3 | /* Check support for top-level code */ 4 | 5 | string name = "Juan"; 6 | printf("HELLO %s", name); 7 | -------------------------------------------------------------------------------- /lb/code/src/mpe-settings.h.in: -------------------------------------------------------------------------------- 1 | 2 | #ifndef MPE_SETTINGS_H 3 | #define MPE_SETTINGS_H 4 | 5 | #define ADLB_ENABLE_MPE @ADLB_ENABLE_MPE@ 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /lb/code/tests/qs_priority.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | THIS=$0 5 | EXEC=${THIS%.sh}.x 6 | OUTPUT=${THIS%.sh}.out 7 | 8 | ${EXEC} > ${OUTPUT} 2>&1 9 | -------------------------------------------------------------------------------- /stc/tests/275-common-subexpression-opt-1.swift: -------------------------------------------------------------------------------- 1 | 2 | main { 3 | foreach i in [1:10] { 4 | trace(i+1); 5 | trace(i+1); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /stc/tests/461-assoc-array-err.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | main { 3 | int A[string]; 4 | A["1"] = 1; 5 | 6 | trace(A[1]); 7 | } 8 | -------------------------------------------------------------------------------- /stc/tests/471-assoc-array-err.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | // Can't use blobs as keys 4 | 5 | 6 | main { 7 | float A[blob]; 8 | } 9 | -------------------------------------------------------------------------------- /stc/tests/707-pick-regexp.swift: -------------------------------------------------------------------------------- 1 | 2 | import string; 3 | 4 | L = [ "abc", "k32", "kb2", "bac" ]; 5 | S = pick_regexp(".b.*", L); 6 | trace(join(S, " ")); 7 | -------------------------------------------------------------------------------- /www/css/swift.css: -------------------------------------------------------------------------------- 1 | 2 | /* Swift/T guide customizations */ 3 | 4 | a:visited { 5 | color: gray; 6 | } 7 | h5 { 8 | font-size: 0.8em; 9 | } 10 | -------------------------------------------------------------------------------- /lb/code/tests/qs_idle_workers.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | THIS=$0 5 | EXEC=${THIS%.sh}.x 6 | OUTPUT=${THIS%.sh}.out 7 | 8 | ${EXEC} > ${OUTPUT} 2>&1 9 | -------------------------------------------------------------------------------- /lb/code/tests/qs_node_target.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | THIS=$0 5 | EXEC=${THIS%.sh}.x 6 | OUTPUT=${THIS%.sh}.out 7 | 8 | ${EXEC} > ${OUTPUT} 2>&1 9 | -------------------------------------------------------------------------------- /stc/bench/foreach-1D/foreach-1D.util.txt: -------------------------------------------------------------------------------- 1 | 97.80% 2 | 97.74% 3 | 97.55% 4 | 97.52% 5 | 97.42% 6 | 96.75% 7 | 96.81% 8 | 95.91% 9 | 93.58% 10 | 94.57% 11 | -------------------------------------------------------------------------------- /stc/tests/110-plus-1.swift: -------------------------------------------------------------------------------- 1 | 2 | main 3 | { 4 | int x; 5 | int y; 6 | int z; 7 | 8 | x = 1; 9 | y = 2; 10 | 11 | (z) = x + y; 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/115-invalid-assign-2.swift: -------------------------------------------------------------------------------- 1 | //THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | (int r) f (int x) { 4 | int k = 2; 5 | k = x + 1; 6 | r = k + 1; 7 | } 8 | -------------------------------------------------------------------------------- /stc/tests/180-global-assign.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | int x; 4 | 5 | f() { 6 | // Globals are read-only in functions 7 | x = 2; 8 | } 9 | -------------------------------------------------------------------------------- /stc/tests/690-file.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Look for filename output at end of line 4 | grep -q "alice.txt$" ${TURBINE_OUTPUT} 5 | 6 | rm -f alice.txt 7 | -------------------------------------------------------------------------------- /stc/tests/832-opt-regression.exp: -------------------------------------------------------------------------------- 1 | hello 0 2 | hello 1 3 | hello 2 4 | hello 3 5 | hello 4 6 | hello 5 7 | hello 6 8 | hello 7 9 | hello 8 10 | hello 9 11 | -------------------------------------------------------------------------------- /turbine/code/tests/runbin.zsh.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Set up and run test case 4 | 5 | BIN=$1 6 | 7 | pwd 8 | echo $PATH 9 | ${VALGRIND} ${BIN} 10 | -------------------------------------------------------------------------------- /stc/bench/suite/wavefront/runs/weakscale/param-gen.py: -------------------------------------------------------------------------------- 1 | from math import sqrt 2 | for x, y in [(2**i, int(round(sqrt(2**i)*300))) for i in range(13)]: print x, y 3 | 4 | -------------------------------------------------------------------------------- /stc/tests/040-default-arg.swift: -------------------------------------------------------------------------------- 1 | import io; 2 | 3 | f(string m, int x = 1) { 4 | printf("%s: %i", m, x); 5 | } 6 | 7 | f("provided", 2); 8 | f("not provided"); 9 | -------------------------------------------------------------------------------- /stc/tests/052-keyword-arg-error.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | // Not allowed to have varargs with optional 3 | 4 | f(int x=0, int ...more) { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /stc/tests/114-invalid-assign-1.swift: -------------------------------------------------------------------------------- 1 | //THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | (int r) f (int x) { 4 | x = 1; // should not be able to assign to argument 5 | } 6 | -------------------------------------------------------------------------------- /stc/tests/215-if.swift: -------------------------------------------------------------------------------- 1 | 2 | main { 3 | // Regression test for bug where 1 can be interpreted as float or int 4 | if (1) { 5 | trace("hello"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /stc/tests/422-forloops-3.exp: -------------------------------------------------------------------------------- 1 | trace: 0,is less than,5 2 | trace: 1,is less than,5 3 | trace: 2,is less than,5 4 | trace: 3,is less than,5 5 | trace: 4,is less than,5 6 | -------------------------------------------------------------------------------- /stc/tests/585-foreach-range-6.exp: -------------------------------------------------------------------------------- 1 | trace: 5 2 | trace: 6 3 | trace: 7 4 | trace: 8 5 | trace: 9 6 | trace: 10 7 | trace: 11 8 | trace: 12 9 | trace: 13 10 | -------------------------------------------------------------------------------- /stc/tests/636-app.setup.sh: -------------------------------------------------------------------------------- 1 | dirname=`dirname $0` 2 | testdir=`cd $dirname; pwd` 3 | 4 | if [ ! -f 636-echo.sh ]; then 5 | ln -s ${testdir}/636-echo.sh . 6 | fi 7 | -------------------------------------------------------------------------------- /stc/tests/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Clean up test suite outputs 4 | 5 | rm -f *.tic 6 | rm -f *.ic 7 | rm -f *.out 8 | rm -f *.stc.* 9 | 10 | exit 0 11 | -------------------------------------------------------------------------------- /lb/code/tests/parallel-task.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ex 3 | 4 | THIS=$0 5 | EXEC=${THIS%.sh}.x 6 | OUTPUT=${THIS%.sh}.out 7 | 8 | mpiexec -n 4 ${EXEC} > ${OUTPUT} 2>&1 9 | -------------------------------------------------------------------------------- /lb/code/tests/qs_basic.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | THIS=$0 5 | EXEC=$(dirname ${THIS})/workq_bench.x 6 | OUTPUT=${THIS%.sh}.out 7 | 8 | ${EXEC} > ${OUTPUT} 2>&1 9 | -------------------------------------------------------------------------------- /stc/bench/util/About.txt: -------------------------------------------------------------------------------- 1 | 2 | SWIFT/T BENCHMARK UTILITIES 3 | 4 | Before running benchmarks, you must run ./make-package.sh 5 | in this directory to create pkgIndex.tcl 6 | -------------------------------------------------------------------------------- /stc/tests/053-keyword-arg-error.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | // Not allowed to have optional before required 3 | 4 | f(int x=0, int y) { 5 | 6 | } 7 | 8 | -------------------------------------------------------------------------------- /stc/tests/111-plus-1-noparens.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | main 4 | { 5 | int x; 6 | int y; 7 | int z; 8 | 9 | x = 1; 10 | y = 2; 11 | 12 | z = x + y; 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/308-arrays-8.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | (int M[]) f () { 4 | M[-1] = 13; 5 | M[-2] = 37; 6 | } 7 | 8 | main { 9 | trace(f()[-1], f()[-2]); 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/421-for-loop-2.exp: -------------------------------------------------------------------------------- 1 | trace: 0 2 | trace: 1 3 | trace: 2 4 | trace: 3 5 | trace: 4 6 | trace: 5 7 | trace: 6 8 | trace: 7 9 | trace: 8 10 | trace: 9 11 | -------------------------------------------------------------------------------- /stc/tests/5693-url.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | main () { 4 | // Can't assign URL to file 5 | file f = input_url("http://url.com"); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /stc/tests/655-typevar-err.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | // Don't support unions with type vars 4 | f(T|bag x) "turbine" "0.0" "f"; 5 | 6 | f(1); 7 | -------------------------------------------------------------------------------- /stc/tests/7452-clock-fmt.swift: -------------------------------------------------------------------------------- 1 | 2 | import sys; 3 | 4 | // trace(clock_format(CLOCK_FMT_ISO8601, 100)); 5 | trace(clock_format(CLOCK_FMT_ISO8601, clock_seconds())); 6 | -------------------------------------------------------------------------------- /turbine/code/scripts/submit/ec2/config.template: -------------------------------------------------------------------------------- 1 | Host *.amazonaws.com 2 | User TURBINE_USER 3 | IdentityFile TURBINE_EC2_KEY 4 | StrictHostKeyChecking no 5 | -------------------------------------------------------------------------------- /stc/tests/150-token-name-clash.swift: -------------------------------------------------------------------------------- 1 | 2 | // exposes problem with name clashes 3 | 4 | main { 5 | 6 | int declare_variable = 0; 7 | int program = 0; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /stc/tests/215-minus.swift: -------------------------------------------------------------------------------- 1 | 2 | main 3 | { 4 | int a; 5 | int b; 6 | int c; 7 | a = 2; 8 | b = 1; 9 | 10 | (c) = a - b; 11 | 12 | trace(c); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/440-forloop.swift: -------------------------------------------------------------------------------- 1 | /* Regression test - combination of for loop and global scope */ 2 | 3 | int x; 4 | 5 | for (x = 0; x < 1; x = x + 1) { } 6 | 7 | trace(x); 8 | -------------------------------------------------------------------------------- /stc/tests/580-foreach-range-1.exp: -------------------------------------------------------------------------------- 1 | trace: 1 2 | trace: 2 3 | trace: 3 4 | trace: 4 5 | trace: 5 6 | trace: 6 7 | trace: 7 8 | trace: 8 9 | trace: 9 10 | trace: 10 11 | -------------------------------------------------------------------------------- /stc/tests/581-foreach-range-2.exp: -------------------------------------------------------------------------------- 1 | trace: 1 2 | trace: 2 3 | trace: 3 4 | trace: 4 5 | trace: 5 6 | trace: 6 7 | trace: 7 8 | trace: 8 9 | trace: 9 10 | trace: 10 11 | -------------------------------------------------------------------------------- /stc/tests/634-app-fail.setup.sh: -------------------------------------------------------------------------------- 1 | dirname=`dirname $0` 2 | testdir=`cd $dirname; pwd` 3 | 4 | if [ ! -f 634-fail-app.sh ]; then 5 | ln -s ${testdir}/634-fail-app.sh . 6 | fi 7 | -------------------------------------------------------------------------------- /stc/tests/640-typevar.swift: -------------------------------------------------------------------------------- 1 | // COMPILE-ONLY-TEST 2 | 3 | 4 | (T x) f (T y) "package" "0.0.0" "f"; 5 | 6 | main { 7 | int x = f(1); 8 | trace(x); 9 | } 10 | -------------------------------------------------------------------------------- /stc/tests/641-typevar.swift: -------------------------------------------------------------------------------- 1 | // COMPILE-ONLY-TEST 2 | 3 | 4 | (int x) f (T y) "package" "0.0.0" "f"; 5 | 6 | main { 7 | int x = f(1); 8 | trace(x); 9 | } 10 | -------------------------------------------------------------------------------- /stc/tests/695-app-coasters.coaster.conf: -------------------------------------------------------------------------------- 1 | export WORKER_MODE=local 2 | export IPADDR=127.0.0.1 3 | export SERVICE_PORT=53321 4 | export JOBSPERNODE=4 5 | export LOGDIR=$(pwd) 6 | -------------------------------------------------------------------------------- /stc/tests/870-work-types.swift: -------------------------------------------------------------------------------- 1 | 2 | // SKIP-THIS-TEST #136 3 | 4 | pragma worktypedef t0; 5 | 6 | @dispatch=t0 7 | app f() { "echo" "hello" ; } 8 | 9 | f(); 10 | -------------------------------------------------------------------------------- /dev/conda/pkgs-gcc.yaml: -------------------------------------------------------------------------------- 1 | # pkgs-gcc.yaml: START 2 | # Extra packages for gcc 3 | - gcc 4 | m4_ifelse(m4_getenv(USE_ZLIB),1, 5 | ` - zlib' 6 | ) 7 | # pkgs-gcc.yaml: STOP 8 | -------------------------------------------------------------------------------- /stc/bench/About.txt: -------------------------------------------------------------------------------- 1 | 2 | SWIFT/T BENCHMARKS 3 | 4 | First, generate the package utilities: see util/About.txt 5 | 6 | Then, find test-specific directions in the test directory. 7 | -------------------------------------------------------------------------------- /stc/bench/suite/ensemble/gen_models.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for i in `seq 10` 4 | do 5 | FILE=model$i.data 6 | head -c 64K /dev/urandom > $FILE 7 | echo $FILE created 8 | done 9 | -------------------------------------------------------------------------------- /stc/tests/366-structs-7.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | type tt { 4 | int x; 5 | } 6 | 7 | (tt ret) f () { 8 | ret.x = 1; 9 | } 10 | 11 | main { 12 | trace(f().x); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/500-strings-1.swift: -------------------------------------------------------------------------------- 1 | 2 | (int r) f (string x) { 3 | r = 1; 4 | trace(x); 5 | } 6 | 7 | main { 8 | string x = "hello world\n"; 9 | f(x); 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/661-subtype.swift: -------------------------------------------------------------------------------- 1 | import assert; 2 | 3 | type superint int; 4 | 5 | superint y; 6 | 7 | y = superint(2); 8 | 9 | trace(y); 10 | assertEqual(y, 2, "y"); 11 | -------------------------------------------------------------------------------- /stc/tests/740-sleep.swift: -------------------------------------------------------------------------------- 1 | 2 | import io; 3 | import sys; 4 | 5 | main 6 | { 7 | void v = sleep(0.5); 8 | int i = zero(v); 9 | printf("zero: %i\n", i); 10 | } 11 | -------------------------------------------------------------------------------- /turbine/code/scripts/submit/pbs/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | DIR := scripts/submit/pbs 3 | 4 | SCRIPTS_SUBMIT += $(DIR)/turbine-pbs-run.zsh \ 5 | $(DIR)/turbine-pbs.sh.m4 6 | -------------------------------------------------------------------------------- /turbine/code/scripts/submit/psij/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | DIR := scripts/submit/psij 3 | 4 | SCRIPTS_SUBMIT += $(DIR)/turbine-psij-run.zsh 5 | SCRIPTS_SUBMIT += $(DIR)/turbine2psij.py 6 | -------------------------------------------------------------------------------- /turbine/code/scripts/submit/sge/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | DIR := scripts/submit/sge 3 | 4 | SCRIPTS_SUBMIT += $(DIR)/turbine-sge-run.zsh \ 5 | $(DIR)/turbine-sge.sh.m4 6 | -------------------------------------------------------------------------------- /lb/code/NOTICE: -------------------------------------------------------------------------------- 1 | lb is distributed under the terms of the Apache 2.0 license. 2 | Details of the license are available at: 3 | 4 | http://www.apache.org/licenses/LICENSE-2.0.txt 5 | -------------------------------------------------------------------------------- /stc/bench/util/make-package.tcl: -------------------------------------------------------------------------------- 1 | 2 | set name "bench" 3 | set version "0.0.1" 4 | 5 | puts [ ::pkg::create -name $name -version $version \ 6 | -source "bench.tcl" ] 7 | -------------------------------------------------------------------------------- /stc/code/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Ant-Version: Apache Ant 1.8.1 3 | Created-By: 1.6.0_22-b22 (Sun Microsystems Inc.) 4 | Main-Class: exm.parser.Main 5 | 6 | -------------------------------------------------------------------------------- /stc/tests/061-import.swift: -------------------------------------------------------------------------------- 1 | import include.import_061; 2 | 3 | // Regression test for global variable declarations - issue #784 4 | // COMPILE-ONLY-TEST 5 | 6 | trace(a_variable); 7 | -------------------------------------------------------------------------------- /stc/tests/119-invalid-assign.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | // THIS-TEST-SHOULD-NOT-RUN 4 | main { 5 | int x; 6 | foreach i in [1:10] { 7 | x = i; 8 | } 9 | trace(x); 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/127-func-err-3.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | main () { 4 | 5 | } 6 | 7 | // THIS-TEST-SHOULD-NOT-COMPILE 8 | // - no varargs in return value 9 | (int ...x) f () { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/217-minus-trace.swift: -------------------------------------------------------------------------------- 1 | 2 | main 3 | { 4 | int a; 5 | int b; 6 | int c; 7 | 8 | a = 2; 9 | b = 1; 10 | (c) = a - b; 11 | 12 | trace(a,b,c); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/569-url.swift: -------------------------------------------------------------------------------- 1 | 2 | app echo(url i) 3 | { 4 | "echo" "echo:" i; 5 | } 6 | 7 | main 8 | { 9 | url f = input_url("ftp://host/path/file"); 10 | echo(f); 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/715-worker-counts.swift: -------------------------------------------------------------------------------- 1 | 2 | main { 3 | trace("workers",turbine_workers()); 4 | trace("servers",adlb_servers()); 5 | trace("engines",turbine_engines()); 6 | } 7 | -------------------------------------------------------------------------------- /turbine/code/scripts/submit/cray/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | DIR := scripts/submit/cray 3 | 4 | SCRIPTS_SUBMIT += $(DIR)/turbine-cray.sh.m4 5 | SCRIPTS_SUBMIT += $(DIR)/turbine-cray-run.zsh 6 | -------------------------------------------------------------------------------- /turbine/code/scripts/submit/slurm/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | DIR := scripts/submit/slurm 3 | 4 | SCRIPTS_SUBMIT += $(DIR)/turbine-slurm.sh.m4 5 | SCRIPTS_SUBMIT += $(DIR)/turbine-slurm-run.zsh 6 | -------------------------------------------------------------------------------- /turbine/code/scripts/submit/theta/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | DIR := scripts/submit/theta 3 | 4 | SCRIPTS_SUBMIT += $(DIR)/turbine-theta-run.zsh 5 | SCRIPTS_SUBMIT += $(DIR)/turbine-theta.sh.m4 6 | -------------------------------------------------------------------------------- /dev/debian/clean-work.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Remove Debian work directories 4 | 5 | find . \( -name ".deb-work-*" -o -name "*-deb-tgz-*" \) -a -type d | \ 6 | xargs -r -n 1 -- rm -r 7 | -------------------------------------------------------------------------------- /lb/code/src/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | DIR := src 4 | 5 | SRCS += $(shell find $(DIR) -name "*.c" ) 6 | OBJS += $(patsubst %.c, %.o, $(SRCS)) 7 | DEPS += $(patsubst %.c, %.d, $(SRCS)) 8 | 9 | -------------------------------------------------------------------------------- /stc/code/etc/help/turbine.txt: -------------------------------------------------------------------------------- 1 | -t : 2 | Turbine pass-through 3 | Pass - to Turbine 4 | Use this to access other Turbine features 5 | -------------------------------------------------------------------------------- /stc/tests/427-forloops-8.exp: -------------------------------------------------------------------------------- 1 | trace: 1.0 2 | trace: 2.0 3 | trace: 3.0 4 | trace: 4.0 5 | trace: 5.0 6 | trace: 6.0 7 | trace: 7.0 8 | trace: 8.0 9 | trace: 9.0 10 | trace: 10.0 11 | -------------------------------------------------------------------------------- /stc/tests/453-assoc-array.exp: -------------------------------------------------------------------------------- 1 | \\[hello\\]\\[0.10\\]=foo 2 | \\[hello\\]\\[0.20\\]=bar 3 | \\[bye bye\\]\\[3.14\\]=baz 4 | \\[bye bye\\]\\[-1.00\\]=santa 5 | \\[bye bye \\]\\[2.71\\]=rudolph 6 | -------------------------------------------------------------------------------- /turbine/code/scripts/submit/cobalt/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | DIR := scripts/submit/cobalt 3 | 4 | SCRIPTS_SUBMIT += $(DIR)/turbine-cobalt-run.zsh 5 | SCRIPTS_SUBMIT += $(DIR)/turbine-cobalt.sh.m4 6 | -------------------------------------------------------------------------------- /turbine/code/src/tcl/About.txt: -------------------------------------------------------------------------------- 1 | 2 | These source files are Tcl extensions or utilities 3 | for making Tcl extensions. The Tcl extensions follow 4 | some Tcl C source style conventions. 5 | -------------------------------------------------------------------------------- /turbine/code/src/tcl/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | DIR := src/tcl 3 | 4 | TCL_LIB = @TCL_LIB_SPEC@ 5 | 6 | TCL_LINK_FLAGS = -DUSE_TCL_STUBS -fPIC $(TCL_LIB) 7 | 8 | TCL_TURBINE_SRC += $(DIR)/util.c 9 | -------------------------------------------------------------------------------- /lb/code/maint/mpi_version3_test.c: -------------------------------------------------------------------------------- 1 | #include "mpi.h" 2 | 3 | #if MPI_VERSION < 3 4 | #error "MPI_VERSION 3 or greater required!" 5 | #endif 6 | 7 | int main(int argc, char** argv) { return 0; } 8 | -------------------------------------------------------------------------------- /stc/tests/125-func-err-1.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | main () { 4 | 5 | } 6 | 7 | // THIS-TEST-SHOULD-NOT-COMPILE 8 | // - no varargs in composite function 9 | (int r) f (int... x) { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/420-for-loop-1.exp: -------------------------------------------------------------------------------- 1 | trace: 0,1 2 | trace: 1,2 3 | trace: 2,4 4 | trace: 3,8 5 | trace: 4,16 6 | trace: 5,32 7 | trace: 6,64 8 | trace: 7,128 9 | trace: 8,256 10 | trace: 9,512 11 | -------------------------------------------------------------------------------- /stc/tests/427-forloops-8.swift: -------------------------------------------------------------------------------- 1 | 2 | main { 3 | // Check that int->float promotion works ok in for loop 4 | for (float i = 0; i < 10; i = i + 1) 5 | { 6 | trace(i + 1.0); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /stc/tests/6390-app.setup.sh: -------------------------------------------------------------------------------- 1 | dirname=`dirname $0` 2 | testdir=`cd $dirname; pwd` 3 | 4 | script=6390-echostderr.sh 5 | if [ ! -f ./${script} ]; then 6 | ln -s ${testdir}/${script} . 7 | fi 8 | -------------------------------------------------------------------------------- /stc/tests/651-typevar.swift: -------------------------------------------------------------------------------- 1 | // COMPILE-ONLY-TEST 2 | 3 | 4 | (int i) f (T in1[]) "package" "0.0.0" "f"; 5 | 6 | main { 7 | int i = f([1, 2, 3]); 8 | trace(i); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /stc/tests/675-polymorphic.setup.sh: -------------------------------------------------------------------------------- 1 | #Create file that test expects 2 | 3 | echo "HELLO" > tmp1.txt 4 | echo "BYE" > tmp2.txt 5 | tar cvvzf test_675.tgz tmp1.txt tmp2.txt 6 | rm tmp1.txt tmp2.txt 7 | -------------------------------------------------------------------------------- /stc/tests/871-work-types.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-RUN 3 | 4 | pragma worktypedef t0; 5 | 6 | @dispatch=t0 7 | f() "turbine" "1.0" 8 | [ "puts hello" ]; 9 | 10 | f(); 11 | -------------------------------------------------------------------------------- /stc/tests/valgrind-patterns.grep: -------------------------------------------------------------------------------- 1 | Conditional jump or move depends 2 | Invalid free 3 | Mismatched free 4 | Invalid read 5 | Invalid write 6 | Source and destination 7 | definitely lost: [^0] 8 | -------------------------------------------------------------------------------- /turbine/code/tests/staticapp-1-lib.tcl: -------------------------------------------------------------------------------- 1 | # Minimal library file to link into static app 2 | package provide staticapp-1 0.1 3 | 4 | proc helloworld { msg } { 5 | puts "Hello world: $msg" 6 | } 7 | -------------------------------------------------------------------------------- /dev/conda/deactivate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [[ ! -z ${R_LIBS_USER_BACKUP+x} ]]; then 4 | export R_LIBS_USER="$R_LIBS_USER_BACKUP" 5 | unset R_LIBS_USER_BACKUP 6 | else 7 | unset R_LIBS_USER 8 | fi -------------------------------------------------------------------------------- /stc/code/src/exm/stc/common/util/Out.java: -------------------------------------------------------------------------------- 1 | package exm.stc.common.util; 2 | 3 | /** 4 | * Simulate output arguments - useful hack 5 | */ 6 | public class Out { 7 | public T val = null; 8 | } 9 | -------------------------------------------------------------------------------- /stc/tests/105-sleep.swift: -------------------------------------------------------------------------------- 1 | 2 | app (file o) s(int i) 3 | { 4 | "sleep" i; 5 | } 6 | 7 | main 8 | { 9 | int k; 10 | k = 2; 11 | wait (s(k)) { 12 | trace("DONE"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /stc/tests/128-func-err-4.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | main () { 4 | 5 | } 6 | 7 | // THIS-TEST-SHOULD-NOT-COMPILE 8 | // - no varargs in return value 9 | (int ...x) f(int x) "turbine" "0.0.2" "f"; 10 | -------------------------------------------------------------------------------- /stc/tests/167-autowrap-struct.exp: -------------------------------------------------------------------------------- 1 | trace: .*person {name Bob age 100} 2 | trace: people {.*0 {name X age 1}.*} 3 | trace: people {.*1 {name Bob age 100}.*} 4 | trace: people {.*2 {name X age 1}.*} 5 | -------------------------------------------------------------------------------- /stc/tests/311-arrays-11.swift: -------------------------------------------------------------------------------- 1 | // COMPILE-ONLY-TEST 2 | main { 3 | // [1,2,3] could either be int[] or float[]. 4 | // Check that compiler handles ambiguity 5 | trace([1,2,3][0]); 6 | } 7 | -------------------------------------------------------------------------------- /stc/tests/713-argp.swift: -------------------------------------------------------------------------------- 1 | import sys; 2 | // THIS-TEST-SHOULD-NOT-RUN 3 | string arg1 = argp(0); 4 | string arg2 = argp(1); 5 | // Invalid arg 6 | string arg3 = argp(2); 7 | trace(arg1, arg2, arg3); 8 | -------------------------------------------------------------------------------- /turbine/code/tests/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.x 3 | *.result 4 | *.out 5 | *.lastrun 6 | *.tmp 7 | 8 | # Generated by configure 9 | runbin.zsh 10 | 11 | staticapp-1.c 12 | staticapp-bundled-1.c 13 | -------------------------------------------------------------------------------- /c-utils/code/src/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | DIR := src 3 | 4 | SRCS += $(shell find $(DIR) -name "*.c" ! -name "*-template.c") 5 | OBJS += $(patsubst %.c, %.o, $(SRCS)) 6 | DEPS += $(patsubst %.c, %.d, $(SRCS)) 7 | -------------------------------------------------------------------------------- /stc/bench/suite/uts/uts-src/uts_leaf.h: -------------------------------------------------------------------------------- 1 | #ifndef __UTS_LEAF_H 2 | #define __UTS_LEAF_H 3 | 4 | #include 5 | 6 | int DLLEXPORT uts_leaf_init(Tcl_Interp *interp); 7 | 8 | #endif // __UTS_LEAF_H 9 | -------------------------------------------------------------------------------- /stc/code/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # STC bootstrap 4 | # This does nothing- it is just here to be like the other modules 5 | # for building Debian packages 6 | 7 | autoconf 8 | 9 | exit 0 10 | -------------------------------------------------------------------------------- /stc/tests/003-define-nomain-1.swift: -------------------------------------------------------------------------------- 1 | // COMPILE-ONLY-TEST 2 | // because there is no main function 3 | (int output) func(int a, int b) 4 | { 5 | int i; 6 | int j; 7 | output = 0; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /stc/tests/126-func-err-2.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | main () { 4 | 5 | } 6 | 7 | // THIS-TEST-SHOULD-NOT-COMPILE 8 | // - no varargs in composite function 9 | (int r) f (string ...args) { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/371-structfail-2.swift: -------------------------------------------------------------------------------- 1 | //THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | type t { 4 | int a; 5 | int b; 6 | } 7 | 8 | main { 9 | t.a = 1; 10 | t.b = 2; 11 | t.c = 3; 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/590-blob1.swift: -------------------------------------------------------------------------------- 1 | 2 | import blob; 3 | 4 | main { 5 | blob b; 6 | string s = "howdy"; 7 | b = blob_from_string(s); 8 | string t = string_from_blob(b); 9 | trace(t); 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/630-app.swift: -------------------------------------------------------------------------------- 1 | 2 | app () f (file inp, string s, int i) { 3 | "cat" @inp; 4 | } 5 | 6 | main { 7 | file x = input_file("630-helloworld.txt"); 8 | f(x, "Bob", 1); 9 | } 10 | -------------------------------------------------------------------------------- /turbine/code/scripts/submit/lsf/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | # LSF MODULE 3 | 4 | DIR := scripts/submit/lsf 5 | 6 | SCRIPTS_SUBMIT += $(DIR)/turbine-lsf-run.zsh \ 7 | $(DIR)/turbine-lsf.sh.m4 8 | -------------------------------------------------------------------------------- /stc/tests/007-assert-2.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-RUN 3 | // check that asserts fail as expected 4 | 5 | import assert; 6 | 7 | main { 8 | assert(false, "false"); // should fail 9 | } 10 | -------------------------------------------------------------------------------- /stc/tests/147-overload-err.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | 4 | f(int x) { 5 | 6 | } 7 | 8 | f(float x) { 9 | 10 | } 11 | 12 | 13 | // Invalid usage of function 14 | trace(f); 15 | -------------------------------------------------------------------------------- /stc/tests/372-structfail-3.swift: -------------------------------------------------------------------------------- 1 | //THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | type t { 4 | int a; 5 | int b; 6 | } 7 | 8 | main { 9 | t.a = 1; 10 | t.b = 2; 11 | trace(t.c); 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/472-assoc-array-err.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | // Use invalid type as array key in constructor expression. 3 | 4 | main { 5 | int k[] = [1,2,3]; 6 | 7 | trace({ k: 1 }[k]); 8 | } 9 | -------------------------------------------------------------------------------- /stc/tests/514c-string-multiline.swift: -------------------------------------------------------------------------------- 1 | import assert; 2 | // SKIP-THIS-TEST 3 | 4 | main () { 5 | 6 | string t4 = 7 | """ 8 | aaa \\ 9 | """; 10 | assertEqual(t4, "\naaa \\\n", "t4"); 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/5152-propagate.swift: -------------------------------------------------------------------------------- 1 | 2 | import files; 3 | import io; 4 | 5 | void o = make_void(); 6 | void w = make_void(); 7 | int i = 3+4; 8 | 9 | void a = propagate(o,w,i); 10 | a => printf("OK"); 11 | -------------------------------------------------------------------------------- /stc/tests/586-foreach-range-7.exp: -------------------------------------------------------------------------------- 1 | trace: 5 2 | trace: 6 3 | trace: 7 4 | trace: 8 5 | trace: 9 6 | trace: 10 7 | trace: 11 8 | trace: 12 9 | trace: 13 10 | trace: 14 11 | trace: 15 12 | trace: 16 13 | -------------------------------------------------------------------------------- /stc/tests/631-app.setup.sh: -------------------------------------------------------------------------------- 1 | dirname=`dirname $0` 2 | testdir=`cd $dirname; pwd` 3 | 4 | echo "Hello World" > helloworld.txt 5 | if [ ! -f 631-app-cat.sh ]; then 6 | ln -s ${testdir}/631-app-cat.sh . 7 | fi 8 | -------------------------------------------------------------------------------- /stc/tests/712-argp.swift: -------------------------------------------------------------------------------- 1 | import sys; 2 | 3 | string prog = argp(0); 4 | string arg1 = argp(1); 5 | string arg2 = argp(2, "default"); 6 | string arg3 = argp(3, "default"); 7 | trace(prog, arg1, arg2, arg3); 8 | -------------------------------------------------------------------------------- /turbine/code/tests/coaster-exec-local.conf: -------------------------------------------------------------------------------- 1 | export WORKER_MODE=local 2 | export IPADDR=127.0.0.1 3 | export SERVICE_PORT=53363 4 | export JOBSPERNODE=4 5 | export LOGDIR=$(pwd) 6 | export WORKER_LOG_DIR=$(pwd) 7 | -------------------------------------------------------------------------------- /dev/github-actions/settings.sed: -------------------------------------------------------------------------------- 1 | # sed edits to swift-t-settings.sh 2 | 3 | s/ENABLE_PYTHON=0/ENABLE_PYTHON=1/ 4 | s/MAKE_PARALLELISM=1/MAKE_PARALLELISM=4/ 5 | 6 | # Local Variables: 7 | # mode: sh; 8 | # End: 9 | -------------------------------------------------------------------------------- /stc/tests/008-assert-3.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-RUN 3 | // check that asserts fail as expected 4 | 5 | import assert; 6 | 7 | main { 8 | assertEqual(-1, 1, "-1 != 1"); // should fail 9 | } 10 | -------------------------------------------------------------------------------- /stc/tests/050-keyword-arg-error.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | 4 | f(int x=0, int y=0) { 5 | trace(x, y); 6 | } 7 | 8 | // Cannot provide keyword arg before positional 9 | f(y=2, 5); 10 | -------------------------------------------------------------------------------- /stc/tests/132-func-err-8.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | // Check can't define conflicting function 4 | (int x) trace (int y) { 5 | x = y; 6 | } 7 | 8 | main { 9 | trace(1); 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/1632-autowrap-node-loc.setup.sh: -------------------------------------------------------------------------------- 1 | # Need at least two workers for host targeting 2 | if [[ -z "${TEST_ADLB_WORKERS-}" || "$TEST_ADLB_WORKERS" -lt 2 ]] ; then 3 | export TEST_ADLB_WORKERS=2 4 | fi 5 | 6 | -------------------------------------------------------------------------------- /stc/tests/390-multidimensional-11.swift: -------------------------------------------------------------------------------- 1 | // Minimal test for nested array insertion 2 | () f () { 3 | int A[][]; 4 | A[0][0] = 1; 5 | trace(A[0][0]); 6 | } 7 | 8 | main { 9 | f(); 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/648-typevar.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | 4 | (int i) f (T in1, T in2) "package" "0.0.0" "f"; 5 | 6 | main { 7 | int i = f(1.0, "test"); 8 | trace(i); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /stc/tests/813-numberformat-err.swift: -------------------------------------------------------------------------------- 1 | import io; 2 | import sys; 3 | 4 | // THIS-TEST-SHOULD-NOT-RUN 5 | main { 6 | // Should only accept decimals 7 | int N = toint("0x1232"); 8 | trace(N); 9 | } 10 | -------------------------------------------------------------------------------- /stc/code/src/exm/stc/jvm/runtime/Task.java: -------------------------------------------------------------------------------- 1 | package exm.stc.jvm.runtime; 2 | 3 | /** 4 | * Task interface. Idea is currently to implement as closure 5 | */ 6 | public interface Task { 7 | public void run(); 8 | } 9 | -------------------------------------------------------------------------------- /stc/tests/001-define-function-1.swift: -------------------------------------------------------------------------------- 1 | 2 | (int output) func(int a, int b) 3 | { 4 | // UNSET-VARIABLE-EXPECTED 5 | int i; 6 | int j; 7 | output = 0; 8 | } 9 | 10 | main 11 | { 12 | int a; 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/051-keyword-arg-error.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | /* Not allow to specify required arg with keyword */ 4 | 5 | myfunction(int x) { 6 | trace(x); 7 | } 8 | 9 | myfunction(x=1); 10 | -------------------------------------------------------------------------------- /stc/tests/318-array-lookup.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-RUN 2 | 3 | // Test failing array lookup 4 | 5 | main { 6 | A[0] = 1; 7 | 8 | f(A); 9 | } 10 | 11 | f (int A[]) { 12 | trace(A[1]); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/514b-string-multiline.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | main { 4 | 5 | // Check that we handle bad escape code gracefully 6 | string x = 7 | """ 8 | \x"""; 9 | } 10 | -------------------------------------------------------------------------------- /stc/tests/5601-file-propagate.swift: -------------------------------------------------------------------------------- 1 | 2 | import io; 3 | import unix; 4 | 5 | file f1 = input("5601-f.txt"); 6 | file f2<"5601-copy.txt">; 7 | void v = propagate(f2); 8 | f2 = cp(f1); 9 | v => printf("OK"); 10 | -------------------------------------------------------------------------------- /stc/tests/5691-url.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | // Trying to use url as file 4 | import files; 5 | 6 | main { 7 | url f = input_url("ftp://host/path/file"); 8 | trace(read(f)); 9 | } 10 | -------------------------------------------------------------------------------- /stc/tests/591-blob-floats.swift: -------------------------------------------------------------------------------- 1 | 2 | import blob; 3 | 4 | main { 5 | float A[]; 6 | blob b; 7 | foreach i in [0:2] 8 | { 9 | A[i] = itof(i); 10 | } 11 | b = blob_from_floats(A); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /stc/tests/594-blob-write.swift: -------------------------------------------------------------------------------- 1 | 2 | import blob; 3 | import io; 4 | 5 | main 6 | { 7 | float A[] = [0.2, 0.3, 0.4, 0.5]; 8 | blob b = blob_from_floats(A); 9 | file f<"A.blob"> = blob_write(b); 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/812-numberformat-err.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-RUN 3 | import io; 4 | import sys; 5 | 6 | main { 7 | // Invalid trailing character 8 | int N = toint("1232b"); 9 | trace(N); 10 | } 11 | -------------------------------------------------------------------------------- /stc/bench/suite/wavefront/runs/weakscale/params.txt: -------------------------------------------------------------------------------- 1 | 1 300 2 | 2 424 3 | 4 600 4 | 8 849 5 | 16 1200 6 | 32 1697 7 | 64 2400 8 | 128 3394 9 | 256 4800 10 | 512 6788 11 | 1024 9600 12 | 2048 13576 13 | 4096 19200 14 | -------------------------------------------------------------------------------- /stc/code/maint/debian/changelog.m4: -------------------------------------------------------------------------------- 1 | stc (M4_STC_VERSION) unstable; urgency=low 2 | 3 | * See http://swift-lang.org for change history 4 | 5 | -- Justin M Wozniak Mon, 22 Aug 2016 11:22:54 -0600 6 | -------------------------------------------------------------------------------- /stc/tests/010-function-call-1.swift: -------------------------------------------------------------------------------- 1 | 2 | (int output) func(int a, int b) 3 | { 4 | // UNSET-VARIABLE-EXPECTED 5 | int i; 6 | int j; 7 | (output) = a + b; 8 | } 9 | 10 | main 11 | { 12 | int d; 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/380-structoarray.swift: -------------------------------------------------------------------------------- 1 | type soa { 2 | int A[]; 3 | int B[]; 4 | } 5 | 6 | 7 | main { 8 | soa a; 9 | a.A[0] = 1; 10 | a.B[0] = 2; 11 | 12 | trace(a.A[0], a.B[0]); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /stc/tests/527-unicode.exp: -------------------------------------------------------------------------------- 1 | trace: ゠ ァ ア ィ イ ゥ ウ ェ エ ォ オ カ ガ キ ギ ク グ ケ ゲ コ ゴ サ ザ シ ジ ス ズ セ ゼ ソ ゾ タ ダ チ ヂ ッ ツ ヅ テ デ ト ド ナ ニ ヌ ネ ノ ハ バ パ ヒ ビ ピ フ ブ プ ヘ ベ ペ ホ ボ ポ マ ミ ム メ モ ャ ヤ ュ ユ ョ ヨ ラ リ ル レ ロ ヮ ワ ヰ ヱ ヲ ン ヴ ヵ ヶ ヷ ヸ ヹ ヺ ・ ー ヽ ヾ ヿ 2 | -------------------------------------------------------------------------------- /stc/tests/535-copy-1.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | main { 4 | int x = 1; 5 | int y = x; 6 | float a = 12.3; 7 | float b = a; 8 | string i = "hello"; 9 | string j = i; 10 | 11 | trace(y, b, j); 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/580-foreach-range-1.swift: -------------------------------------------------------------------------------- 1 | 2 | import assert; 3 | 4 | main { 5 | foreach x in [1:10] { 6 | trace(x); 7 | assert(x >= 1, ">= 1"); 8 | assert(x <= 10, "<= 10"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/663-subtype.swift: -------------------------------------------------------------------------------- 1 | import assert; 2 | 3 | 4 | // THIS-TEST-SHOULD-NOT-COMPILE 5 | type superint int; 6 | 7 | main { 8 | int x = 0; 9 | superint y = x; // Can't promote int to superint 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/682-wc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # WC 4 | # Redirection script 5 | 6 | INPUT=$1 7 | OUTPUT=$2 8 | 9 | source helpers.sh 10 | 11 | nonempty INPUT 12 | nonempty OUTPUT 13 | 14 | wc -l ${INPUT} > ${OUTPUT} 15 | -------------------------------------------------------------------------------- /stc/tests/707-pick-regexp.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | N=$( grep "trace: " $TURBINE_OUTPUT | wc -w ) 5 | if [ $N != 4 ] 6 | then 7 | echo "Should have 4 tokens on 'trace:' line!" 8 | exit 1 9 | fi 10 | -------------------------------------------------------------------------------- /turbine/code/src/tcl/julia/tcl-julia.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * tcl-julia.h 4 | * 5 | * Created on: Jun 2, 2014 6 | * Author: wozniak 7 | */ 8 | 9 | #pragma once 10 | 11 | void tcl_julia_init(Tcl_Interp* interp); 12 | -------------------------------------------------------------------------------- /turbine/code/src/tcl/mpe/module.mk.in: -------------------------------------------------------------------------------- 1 | 2 | # MODULE MPE 3 | 4 | # Even if MPE is disabled, we compile the mpe.o 5 | # object (full of noops) 6 | 7 | DIR := src/tcl/mpe 8 | 9 | TCL_MPE_SRC := $(DIR)/tcl-mpe.c 10 | -------------------------------------------------------------------------------- /lb/code/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -eu 3 | 4 | # ADLB/X Bootstrap 5 | 6 | rm -rf autom4te.cache 7 | 8 | echo "ADLB: bootstrap: running autoreconf..." 9 | autoreconf --force --install 10 | echo "ADLB: bootstrap: OK" 11 | -------------------------------------------------------------------------------- /lb/code/maint/debian-bin/changelog.m4: -------------------------------------------------------------------------------- 1 | adlbx (M4_ADLBX_VERSION) unstable; urgency=low 2 | 3 | * See http://swift-lang.org for change history 4 | 5 | -- Justin M Wozniak Mon, 22 Aug 2016 11:22:54 -0600 6 | -------------------------------------------------------------------------------- /stc/code/.gitignore: -------------------------------------------------------------------------------- 1 | /.settings 2 | source.txt 3 | /classes/ 4 | /test-classes/ 5 | /test-output/ 6 | /lib/stc.jar 7 | /lib/stc-tests.jar 8 | /src/exm/stc/ast/antlr/** 9 | /conf/stc-env.sh 10 | /build/ 11 | 12 | debian 13 | -------------------------------------------------------------------------------- /stc/tests/120-sub-1.swift: -------------------------------------------------------------------------------- 1 | 2 | (int o) sub(int a, int b) 3 | { 4 | (o) = a + b; 5 | } 6 | 7 | main 8 | { 9 | int x; 10 | int y; 11 | int z; 12 | 13 | x = 1; 14 | y = 2; 15 | 16 | z = sub(x,y); 17 | } 18 | -------------------------------------------------------------------------------- /stc/tests/129-func-err-5.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | // THIS-TEST-SHOULD-NOT-COMPILE 4 | main () { 5 | // Test typechecking with varargs 6 | f(1); 7 | f("notint"); 8 | } 9 | 10 | () f(int args) "turbine" "0.0.2" "f"; 11 | -------------------------------------------------------------------------------- /stc/tests/130-func-err-6.swift: -------------------------------------------------------------------------------- 1 | //THIS-TEST-SHOULD-NOT-COMPILE 2 | // Don't support polymorphic input arguments in composite functions 3 | main { 4 | f(1); 5 | } 6 | 7 | f (int|float x) { 8 | trace(x); 9 | } 10 | -------------------------------------------------------------------------------- /stc/tests/465-assoc-array-err.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | main { 4 | float A[]; 5 | A[1] = 0.1; 6 | 7 | f(A); 8 | } 9 | 10 | 11 | f (float A[float]) { 12 | trace("CALLED F"); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/490-bag.swift: -------------------------------------------------------------------------------- 1 | main { 2 | bag b; 3 | 4 | b += 1; 5 | b += 1; 6 | b += 2; 7 | 8 | f(b); 9 | } 10 | 11 | 12 | () f (bag X) { 13 | foreach x in X { 14 | trace(x); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /stc/tests/689-parloc-1.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | import io; 4 | 5 | @par @dispatch=WORKER (void v) f_init(int n) "f" "0.0" "f_init_tcl"; 6 | 7 | // Integer not location 8 | @location=0 @par=2 f_init(10); 9 | -------------------------------------------------------------------------------- /stc/tests/694-file-array.swift: -------------------------------------------------------------------------------- 1 | // SKIP-O0-TEST for memory leak 2 | 3 | file A[]; 4 | 5 | A[0] = input("/dev/null"); 6 | 7 | trace_filename(A[0]); 8 | 9 | trace_filename(file f) { 10 | trace(filename(f)); 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/720-pow.swift: -------------------------------------------------------------------------------- 1 | 2 | import math; 3 | 4 | main 5 | { 6 | int n = 3; 7 | int d = 2; 8 | 9 | int T = toInt(pow_integer(n,d)); 10 | 11 | foreach i in [0:T-1] 12 | { 13 | trace(i); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /stc/tests/806-double-warn.swift: -------------------------------------------------------------------------------- 1 | 2 | // Tests error handling: make sure warning output is clean 3 | 4 | main { 5 | // UNSET-VARIABLE-EXPECTED 6 | // This should only cause a single unused variable warning 7 | int i; 8 | } 9 | -------------------------------------------------------------------------------- /turbine/code/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -eu 3 | 4 | # Turbine bootstrap 5 | 6 | rm -rf autom4te.cache 7 | 8 | echo "Turbine: running autoreconf..." 9 | autoreconf --force --install 10 | echo "Turbine: bootstrap: OK" 11 | -------------------------------------------------------------------------------- /dev/debian/configure-all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # DEBIAN CONFIGURE ALL 5 | # Configure everything to make Debian packages 6 | 7 | dev/build/rebuild-all.sh -c -m 8 | cd stc/code 9 | autoconf 10 | ./configure -q 11 | -------------------------------------------------------------------------------- /lb/code/maint/debian-dev/changelog.m4: -------------------------------------------------------------------------------- 1 | adlbx-dev (M4_ADLBX_VERSION) unstable; urgency=low 2 | 3 | * See http://swift-lang.org for change history 4 | 5 | -- Justin M Wozniak Mon, 22 Aug 2016 11:22:54 -0600 6 | -------------------------------------------------------------------------------- /stc/bench/suite/sweep/lib/pkgIndex.tcl: -------------------------------------------------------------------------------- 1 | # Hand-written pkgIndex 2 | 3 | package ifneeded lognorm 0.0 [list source [file join $dir lognorm.tcl]] 4 | package ifneeded lognorm_task 0.0 [list source [file join $dir lognorm_task.tcl]] 5 | 6 | -------------------------------------------------------------------------------- /stc/tests/012-function-overload.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | f(int a) { 4 | trace("got an int", a); 5 | } 6 | 7 | f(float a) { 8 | trace("got a float", a); 9 | } 10 | 11 | int x = 1; 12 | f(x); 13 | 14 | float y = 1.0; 15 | f(y); 16 | -------------------------------------------------------------------------------- /stc/tests/134-func-err-10.swift: -------------------------------------------------------------------------------- 1 | type x { 2 | int a; 3 | int b; 4 | } 5 | import assert; 6 | main { 7 | // Check can define variable with same name as type 8 | int x = 3; 9 | 10 | assertEqual(x, 3, "x"); 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/314-arrays-14.swift: -------------------------------------------------------------------------------- 1 | import assert; 2 | /// Check that empty array constructors work right. 3 | main { 4 | int B[][] = [[]]; 5 | assertEqual(size(B), 1, "size(B)"); 6 | assertEqual(size(B[0]), 0, "size(B[0])"); 7 | } 8 | -------------------------------------------------------------------------------- /stc/tests/467-assoc-array-err.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | main { 4 | float A[string]; 5 | float B[int]; 6 | 7 | A = B; 8 | } 9 | 10 | 11 | f (float A[]) { 12 | trace("CALLED F"); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/610-par-1.swift: -------------------------------------------------------------------------------- 1 | 2 | // SKIP-THIS-TEST 3 | 4 | import io; 5 | 6 | @par @dispatch=WORKER (void v) f(int i) "funcs_610" "0.0" "f"; 7 | 8 | printf("HI"); 9 | 10 | @par=3 f(3); 11 | @par=3 f(4); 12 | @par=3 f(5); 13 | -------------------------------------------------------------------------------- /stc/tests/643-typevar.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | 4 | (T out) f (T arr[], int i) "package" "0.0.0" "f"; 5 | 6 | main { 7 | float A[] = [1, 2.0, 3]; 8 | int x = f(A, 1); 9 | trace(x); 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/6921-file-map.swift: -------------------------------------------------------------------------------- 1 | import files; 2 | 3 | main { 4 | file x<"6921-test.txt"> = f(); 5 | 6 | string s = read(x); 7 | trace(s); 8 | } 9 | 10 | (file o) f() { 11 | o = input("6921-file-map.swift"); 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/730-printf.swift: -------------------------------------------------------------------------------- 1 | 2 | import io; 3 | 4 | main { 5 | int i = 14; 6 | float pi = 3.1415; 7 | string hello = "hello"; 8 | string format = "%i, %0.2f, %s\nnextline"; 9 | printf(format, i, pi, hello); 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/736-priority-2.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | main { 4 | foreach i in [1:100] { 5 | @prio=i trace_comp(i); 6 | } 7 | } 8 | 9 | 10 | () trace_comp (int x) { 11 | wait (x) { 12 | trace(x); 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /stc/tests/807-dup-func.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | // Ensure clean output - no stack trace 4 | 5 | F(int i, file f1) "mr2" "0.0" [ "puts ohai" ]; 6 | F(int i, file f1) "mr2" "0.0" [ "puts ohai" ]; 7 | 8 | main {} 9 | -------------------------------------------------------------------------------- /turbine/code/maint/debian/changelog.m4: -------------------------------------------------------------------------------- 1 | turbine (M4_TURBINE_VERSION) unstable; urgency=low 2 | 3 | * See http://swift-lang.org for change history 4 | 5 | -- Justin M Wozniak Mon, 22 Aug 2016 11:22:54 -0600 6 | -------------------------------------------------------------------------------- /turbine/code/maint/find-tclConfig.tcl: -------------------------------------------------------------------------------- 1 | 2 | # FIND TCLCONFIG TCL 3 | # Find the directory containing tclConfig.sh 4 | # From: https://wiki.tcl-lang.org/page/Finding+out+tclConfig.sh 5 | 6 | puts [ ::tcl::pkgconfig get libdir,install ] 7 | -------------------------------------------------------------------------------- /turbine/code/tests/hook.tcl: -------------------------------------------------------------------------------- 1 | 2 | set comm [ adlb::comm_leaders ] 3 | 4 | puts HOWDY 5 | 6 | set x "hello" 7 | turbine::c::bcast $comm 0 x 8 | puts "x: $x" 9 | 10 | turbine::c::copy_to $comm tests/mpi-io.data /tmp/wozniak 11 | -------------------------------------------------------------------------------- /c-utils/code/maint/debian-bin/changelog.m4: -------------------------------------------------------------------------------- 1 | exmcutils (M4_CUTILS_VERSION) unstable; urgency=low 2 | 3 | * See http://swift-lang.org for change history 4 | 5 | -- Justin M Wozniak Mon, 22 Aug 2016 11:22:54 -0600 6 | -------------------------------------------------------------------------------- /dev/jenkins/tools.py: -------------------------------------------------------------------------------- 1 | 2 | def print_list(L): 3 | for t in L: 4 | print(str(t)) 5 | 6 | 7 | def abort(msg): 8 | stop(msg, code=1) 9 | 10 | 11 | def stop(msg, code=0): 12 | print(msg) 13 | exit(code) 14 | -------------------------------------------------------------------------------- /dev/m4/ifblank.m4: -------------------------------------------------------------------------------- 1 | # Define missing macros for earlier versions of m4/autoconf 2 | 3 | # Replace with equivalent expression 4 | ifdef([m4_ifblank],[], [ 5 | m4_define([m4_ifblank], 6 | [m4_if(m4_normalize([[$1]]), [], [$2], [$3])])]) 7 | -------------------------------------------------------------------------------- /lb/code/m4/ifblank.m4: -------------------------------------------------------------------------------- 1 | # Define missing macros for earlier versions of m4/autoconf 2 | 3 | # Replace with equivalent expression 4 | ifdef([m4_ifblank],[], [ 5 | m4_define([m4_ifblank], 6 | [m4_if(m4_normalize([[$1]]), [], [$2], [$3])])]) 7 | -------------------------------------------------------------------------------- /stc/docs/logs/dag2.swift: -------------------------------------------------------------------------------- 1 | 2 | (void z) f1(void v) "turbine" "0.0" 3 | [ "puts f1" ]; 4 | 5 | (void z) f2(void v) "turbine" "0.0" 6 | [ "puts f2" ]; 7 | 8 | void v0 = propagate(); 9 | void v1 = f1(v0); 10 | void v2 = f2(v1); 11 | -------------------------------------------------------------------------------- /stc/tests/121-def-ordering-1.swift: -------------------------------------------------------------------------------- 1 | 2 | // Test out that functions can be used before they are defined 3 | 4 | import assert; 5 | 6 | main { 7 | assertEqual(f(), 1, ""); 8 | } 9 | 10 | (int r) f () { 11 | r = 1; 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/131-func-err-7.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | import io; 4 | 5 | // Check that can't define conflicting global variable 6 | global const int trace = 1; 7 | 8 | main { 9 | printf("%d", trace); 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/332-arrays-compile-error-3.swift: -------------------------------------------------------------------------------- 1 | //THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | (int a) f (int b[]) { 4 | int A[]; 5 | A[0] = 1; 6 | A[1] = 2; 7 | b = A; // This assignment invalid 8 | 9 | a = 0; 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/464-assoc-array-err.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | main { 4 | float A[string]; 5 | A["test"] = 0.1; 6 | 7 | f(A); 8 | } 9 | 10 | 11 | f (float A[]) { 12 | trace("CALLED F"); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/646-typevar.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | 4 | (T out1, T out2) f (T i) "package" "0.0.0" "f"; 5 | 6 | main { 7 | float x; 8 | int y; 9 | x, y = f(1); 10 | trace(x, y); 11 | } 12 | 13 | 14 | -------------------------------------------------------------------------------- /c-utils/code/maint/debian-dev/changelog.m4: -------------------------------------------------------------------------------- 1 | exmcutils-dev (M4_CUTILS_VERSION) unstable; urgency=low 2 | 3 | * See http://swift-lang.org for change history 4 | 5 | -- Justin M Wozniak Mon, 22 Aug 2016 11:22:54 -0600 6 | -------------------------------------------------------------------------------- /c-utils/code/tests/log.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TESTS=$( dirname $0 ) 4 | 5 | set -x 6 | 7 | THIS=$0 8 | BIN=${THIS%.sh}.x 9 | OUTPUT=${THIS%.sh}.out 10 | 11 | ${BIN} >& ${OUTPUT} 12 | [[ ${?} == 0 ]] || exit 1 13 | 14 | exit 0 15 | -------------------------------------------------------------------------------- /c-utils/code/tests/random.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TESTS=$( dirname $0 ) 4 | 5 | set -x 6 | 7 | THIS=$0 8 | BIN=${THIS%.sh}.x 9 | OUTPUT=${THIS%.sh}.out 10 | 11 | ${BIN} >& ${OUTPUT} 12 | [[ ${?} == 0 ]] || exit 1 13 | 14 | exit 0 15 | -------------------------------------------------------------------------------- /dev/conda/linux-64/deps.sh: -------------------------------------------------------------------------------- 1 | 2 | # linux-64 DEPS SH 3 | 4 | export USE_NCURSES=1 5 | # For some reason zlib is not found on linux-64, Python 3.8 6 | # as of 2024-12-11: 7 | # Needed for all linux-64 as of 2024-12-17 8 | export USE_ZLIB=1 9 | -------------------------------------------------------------------------------- /stc/tests/030-shadow.swift: -------------------------------------------------------------------------------- 1 | import io; 2 | 3 | main { 4 | string trace = "Hello world"; 5 | trace2(trace); 6 | 7 | string int = "not an int"; 8 | trace2(int); 9 | } 10 | 11 | trace2(string out) { 12 | trace(out); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/260-expressions-1.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | (int r) f () { 4 | r = 0; 5 | } 6 | 7 | main { 8 | 9 | // Check that return value discarding works 10 | f(); 11 | int x; 12 | 13 | x = f(); 14 | trace(x); 15 | } 16 | -------------------------------------------------------------------------------- /stc/tests/270-conditional-deadlock-1.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | main { 4 | 5 | int a; 6 | // Detect this deadlock! 7 | if (a) { 8 | a = 2; 9 | } else { 10 | a = 3; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/526-hex-octal.swift: -------------------------------------------------------------------------------- 1 | // Hex literal support 2 | import assert; 3 | main { 4 | assertEqual(0x3041, 12353, "Hex Check 1"); 5 | assertEqual(-0x1f414, -128020, "Hex Check 2"); 6 | 7 | assertEqual(0o123, 83, "Octal Check 1"); 8 | } 9 | -------------------------------------------------------------------------------- /stc/tests/5671-lines-1.swift: -------------------------------------------------------------------------------- 1 | 2 | import io; 3 | import files; 4 | 5 | main 6 | { 7 | string A[] = file_lines(input_file("5671-lines.data")); 8 | foreach s, i in A 9 | { 10 | printf("string %i is %s", i, s); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/650-typevar.swift: -------------------------------------------------------------------------------- 1 | 2 | // COMPILE-ONLY-TEST 3 | 4 | // Leave unbound typevar S, should not cause problems 5 | 6 | (T x) f (T y) "package" "0.0.0" "f"; 7 | 8 | main { 9 | int x = f(1); 10 | trace(x); 11 | } 12 | -------------------------------------------------------------------------------- /turbine/code/scripts/submit/ec2/test-ec2.swift: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | app () hostname() 5 | { 6 | "/bin/hostname" 7 | } 8 | 9 | main 10 | { 11 | foreach i in [0:9] 12 | { 13 | hostname(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /turbine/code/tests/coasters/coaster-std-out-err.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [[ -s "test2.out" ]] && echo "test-2.out present : PASS" || echo "FAIL" 4 | [[ -f "test2.err" ]] && echo "test-2.err present : PASS" || echo "FAIL" 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /stc/tests/060-import.swift: -------------------------------------------------------------------------------- 1 | /* 2 | * Regression test for compiler bug with temporary naming at top level 3 | * in different files 4 | */ 5 | 6 | import include.import_060; 7 | 8 | import assert; 9 | 10 | assertEqual(1 + 1, 2, ""); 11 | -------------------------------------------------------------------------------- /stc/tests/1461-func-err.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | (file o) f(file o) "turbine" "0.0" 4 | [ "exec cp <> <>" ]; 5 | 6 | main 7 | { 8 | file i = input("i.txt"); 9 | file o<"o.txt">; 10 | o = f(i); 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/505-strings-6.swift: -------------------------------------------------------------------------------- 1 | 2 | // Check relationship operators on strings 3 | 4 | import assert; 5 | 6 | main { 7 | assert("hello" == "hello", "hello != hello"); 8 | assert("hello" != "goodbye", "hello == goodbye"); 9 | } 10 | -------------------------------------------------------------------------------- /stc/tests/564-file_read.swift: -------------------------------------------------------------------------------- 1 | 2 | import io; 3 | import files; 4 | import sys; 5 | 6 | //usage stc 564-file_read.tcl 7 | main 8 | { 9 | file f = input_file("/etc/passwd"); 10 | string s = read(f); 11 | printf("%s\n", s); 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/632-app.setup.sh: -------------------------------------------------------------------------------- 1 | dirname=`dirname $0` 2 | testdir=`cd $dirname; pwd` 3 | 4 | echo 'one 5 | two 6 | three 7 | four 8 | five 9 | six' > lines.txt 10 | if [ ! -f 632-split.sh ]; then 11 | ln -s ${testdir}/632-split.sh . 12 | fi 13 | -------------------------------------------------------------------------------- /stc/tests/871-work-types.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | grep -q "Custom work" ${TURBINE_OUTPUT} 5 | if grep -q "while executing" ${TURBINE_OUTPUT} 6 | then 7 | echo "Output should not contain Tcl stack trace." 8 | exit 1 9 | fi 10 | -------------------------------------------------------------------------------- /stc/tests/962-updateable.swift: -------------------------------------------------------------------------------- 1 | 2 | // COMPILE-ONLY-TEST 3 | // Regression test for bug passing updateablefloats 4 | main { 5 | updateable_float x = 1.0; 6 | 7 | f(x); 8 | } 9 | 10 | f(updateable_float x) { 11 | trace(x); 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/136-func-warn-12.swift: -------------------------------------------------------------------------------- 1 | // COMPILE-ONLY-TEST 2 | // THIS-TEST-SHOULD-CAUSE-WARNING 3 | 4 | (int x) f (int y) { 5 | x = y; 6 | } 7 | 8 | main { 9 | // Check that @ is ignored but causes warning 10 | int x = @f(2); 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/205-nest-1.swift: -------------------------------------------------------------------------------- 1 | 2 | main 3 | { 4 | int a; 5 | a = 1; 6 | 7 | { 8 | int b; 9 | b = 1; 10 | trace(b); 11 | } 12 | 13 | { 14 | int b; 15 | b = 1; 16 | trace(b); 17 | } 18 | 19 | trace(a); 20 | } 21 | -------------------------------------------------------------------------------- /stc/tests/291-chain-statements.swift: -------------------------------------------------------------------------------- 1 | import sys; 2 | 3 | 4 | main { 5 | // Check that declaration of y and z is visible in main block scope 6 | int x = 1 => 7 | int y = 1 => 8 | int z = 1; 9 | trace(x, y, z); 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/562-file-3.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | (file o) q () { 4 | o = input_file("alice.txt"); 5 | } 6 | 7 | main { 8 | file f = q(); 9 | 10 | // Test waiting on file 11 | wait (f) { 12 | trace(filename(f)); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /stc/tests/6392-app-quote.swift: -------------------------------------------------------------------------------- 1 | // Bug for app quoting 2 | 3 | import files; 4 | import assert; 5 | 6 | app (file out) echo (string args[]) { 7 | "echo" args @stdout=out; 8 | } 9 | 10 | assertEqual("\"\n", read(echo(["\""])), "echo quote"); 11 | -------------------------------------------------------------------------------- /stc/tests/750-pragma-1.setup.sh: -------------------------------------------------------------------------------- 1 | # Need at least two workers for additional work types 2 | if [[ -z "${TEST_ADLB_WORKERS-}" || "$TEST_ADLB_WORKERS" -lt 2 ]] ; then 3 | export TEST_ADLB_WORKERS=2 4 | fi 5 | 6 | export TURBINE_A_NEW_WORK_TYPE_WORKERS=1 7 | -------------------------------------------------------------------------------- /stc/tests/751-pragma-2.setup.sh: -------------------------------------------------------------------------------- 1 | # Need at least two workers for additional work types 2 | if [[ -z "${TEST_ADLB_WORKERS-}" || "$TEST_ADLB_WORKERS" -lt 2 ]] ; then 3 | export TEST_ADLB_WORKERS=2 4 | fi 5 | 6 | export TURBINE_A_NEW_WORK_TYPE_WORKERS=1 7 | -------------------------------------------------------------------------------- /dev/conda/settings-R.sed: -------------------------------------------------------------------------------- 1 | # settings-R.sed: START 2 | # Extra Swift/T build settings for R 3 | 4 | s@ENABLE_R=0@ENABLE_R=1@ 5 | s@R_INSTALL=.*@R_INSTALL="$R_HOME"@ 6 | 7 | # Local Variables: 8 | # mode: sh; 9 | # End: 10 | # settings-R.sed: STOP 11 | -------------------------------------------------------------------------------- /stc/bench/suite/wavefront/runs/weakscale/filter.sh: -------------------------------------------------------------------------------- 1 | while read a b 2 | do 3 | echo $a $b 4 | sed -e "s/nodes=[0-9]*/nodes=$a/" \ 5 | -e "s/WAVEFRONT_N=[0-9]\+/WAVEFRONT_N=$b/" \ 6 | ./bw-aprun.sh > ./bw-aprun.n$a.sh 7 | 8 | done < params.txt 9 | -------------------------------------------------------------------------------- /stc/tests/018-toplevel.swift: -------------------------------------------------------------------------------- 1 | import io; 2 | 3 | /* Check support for referencing top-level variable from other functions*/ 4 | 5 | string name = "Juan"; 6 | 7 | say_hello(); 8 | 9 | 10 | say_hello() { 11 | printf("HELLO %s", name); 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/133-func-err-9.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | (int x) trace2 (int y) { 4 | x = y; 5 | } 6 | 7 | 8 | // Check can't define conflicting variable 9 | global const int trace2 = 3; 10 | main { 11 | trace(trace2); 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/146-func-err.swift: -------------------------------------------------------------------------------- 1 | // Duplicate argument names 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | 4 | // Reuse same arg name 5 | (int o) f (int i1, int i1) "turbine" "0.0" [ 6 | "set <> 0" 7 | ]; 8 | 9 | main { 10 | trace(f(1, 2)); 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/343-multidimensionalsimple-4.swift: -------------------------------------------------------------------------------- 1 | // Basic test to make sure that multidimensional arrays work 2 | 3 | main { 4 | int M[][]; 5 | int M1[]; 6 | 7 | M[0] = M1; 8 | 9 | M1[3] = 1; 10 | 11 | trace(M[0][3]); 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/647-typevar.swift: -------------------------------------------------------------------------------- 1 | // COMPILE-ONLY-TEST 2 | 3 | 4 | (T1 out1, T2 out2) f (T1 in1, T2 in2) "package" "0.0.0" "f"; 5 | 6 | main { 7 | float x; 8 | string y; 9 | x, y = f(1.0, "test"); 10 | trace(x, y); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Swift/T was developed at the University of Chicago and Argonne National 2 | Laboratory and is distributed under the terms of the Apache 2.0 license. 3 | Details of the license are available at: 4 | 5 | http://www.apache.org/licenses/LICENSE-2.0.txt 6 | -------------------------------------------------------------------------------- /c-utils/code/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -eu 3 | 4 | # ExM C-UTILS Bootstrap 5 | 6 | rm -rf autom4te.cache 7 | 8 | echo "ExM C-UTILS: bootstrap: running autoreconf..." 9 | 10 | autoreconf --force --install 11 | 12 | echo "ExM C-UTILS: bootstrap: OK" 13 | -------------------------------------------------------------------------------- /stc/code/etc/help/stc-header.txt: -------------------------------------------------------------------------------- 1 | STC Help 2 | 3 | Usage: 4 | stc ? 5 | 6 | Compiles program.swift with STC. 7 | The argument is optional. 8 | 9 | Swift/T Web Site: http://swift-lang.org/Swift-T 10 | -------------------------------------------------------------------------------- /stc/tests/112-noparens.swift: -------------------------------------------------------------------------------- 1 | (int a, int b) f(int i, int j) 2 | { 3 | a = 2; 4 | b = 3; 5 | } 6 | 7 | main 8 | { 9 | int x; 10 | int y; 11 | int z; 12 | int q; 13 | 14 | x = 1; 15 | y = 2; 16 | 17 | z, q = f(x,y); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /stc/tests/370-structfail-1.swift: -------------------------------------------------------------------------------- 1 | //THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | type t { 4 | int a; 5 | int b; 6 | } 7 | 8 | main { 9 | t x; 10 | // Compiler should detect that x.a isn't written 11 | x.b = 1; 12 | trace(x.a); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/988-matrix.swift: -------------------------------------------------------------------------------- 1 | import blob; 2 | import matrix; 3 | 4 | main() { 5 | // Fortran arrays are column major 6 | blob b = blob_from_floats([1,2,3,4,5,6,7,8,9]); 7 | int n = 3; 8 | matrix_print(matrix_from_blob_fortran(b, n, n), n); 9 | } 10 | -------------------------------------------------------------------------------- /stc/code/NOTICE: -------------------------------------------------------------------------------- 1 | STC was developed at the University of Chicago and Argonne National 2 | Laboratory and is distributed under the terms of the Apache 2.0 license. 3 | Details of the license are available at: 4 | 5 | http://www.apache.org/licenses/LICENSE-2.0.txt 6 | -------------------------------------------------------------------------------- /stc/code/src/exm/stc/jvm/runtime/InvalidReadException.java: -------------------------------------------------------------------------------- 1 | package exm.stc.jvm.runtime; 2 | 3 | @SuppressWarnings("serial") 4 | public class InvalidReadException extends LogicException { 5 | public InvalidReadException(String msg) { 6 | super(msg); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /stc/tests/207-nest.swift: -------------------------------------------------------------------------------- 1 | 2 | (int ret) notmain (int inp) 3 | { 4 | int a; 5 | a = 1; 6 | 7 | { 8 | int b; 9 | b = 1; 10 | } 11 | 12 | { 13 | int b; 14 | b = 1; 15 | } 16 | ret = 0; 17 | } 18 | 19 | main 20 | { 21 | 22 | } 23 | -------------------------------------------------------------------------------- /stc/tests/292-chain-statements.swift: -------------------------------------------------------------------------------- 1 | import sys; 2 | 3 | // COMPILE-ONLY-TEST 4 | 5 | main { 6 | // Check that declaration of y and z is visible in main block scope 7 | x = 1 => 8 | y = 1 => 9 | z = 1; 10 | trace(x, y, z); 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/306-arrays-6.swift: -------------------------------------------------------------------------------- 1 | 2 | import assert; 3 | import stats; 4 | 5 | (int M[]) f () { 6 | M[0] = 1; 7 | M[1] = 2; 8 | M[2] = 3; 9 | } 10 | 11 | main { 12 | trace(sum_integer(f())); 13 | assertEqual(sum_integer(f()), 6,""); 14 | } 15 | -------------------------------------------------------------------------------- /stc/tests/5698-url.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-RUN 2 | // Cannot copy urls 3 | 4 | main () { 5 | url x<"somewhere">; 6 | 7 | x = somewhere_else(); 8 | } 9 | 10 | (url out) somewhere_else() { 11 | 12 | out = input_url("somewhere_else"); 13 | } 14 | -------------------------------------------------------------------------------- /turbine/code/scripts/submit/cobalt/turbine-cobalt-submit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export TCLLIBPATH=/f/g 4 | export X=2 5 | 6 | MPI=${HOME}/sfw/mpich-3.0.3-x86_64-mx 7 | ${MPI}/bin/mpiexec -l -machinefile ${COBALT_NODEFILE} -np 10 $PWD/test.sh 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /turbine/code/src/tcl/python/Notes.txt: -------------------------------------------------------------------------------- 1 | 2 | Linking notes for Python: 3 | 4 | Used Python 2.7 on MCS system 'crush' with Numpy. 5 | 6 | Error messages are bad- read them in order carefully. 7 | 8 | Check location of python in PATH and PYTHONPATH- these must agree. 9 | -------------------------------------------------------------------------------- /c-utils/code/NOTICE: -------------------------------------------------------------------------------- 1 | c-utils was developed at the University of Chicago and Argonne National 2 | Laboratory and is distributed under the terms of the Apache 2.0 license. 3 | Details of the license are available at: 4 | 5 | http://www.apache.org/licenses/LICENSE-2.0.txt 6 | -------------------------------------------------------------------------------- /stc/code/etc/vim/README: -------------------------------------------------------------------------------- 1 | Syntax highlighting for VIM. 2 | 3 | Installation 4 | ============ 5 | Copy to your .vim directory: 6 | 7 | mkdir -p ~/.vim/syntax ~/.vim/ftdetect 8 | cp syntax/swift.vim ~/.vim/syntax 9 | cp ftdetect/swift.vim ~/.vim/ftdetect 10 | -------------------------------------------------------------------------------- /stc/tests/117-multiassign-1.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | main { 4 | 5 | int a; int b; int c; 6 | 7 | 8 | int x; int y; int z; 9 | 10 | a, b, c = 1, 2, 3; 11 | trace(a, b, c); 12 | 13 | (x, y, z) = c+1, b+1, a+1; 14 | trace(x, y, z); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /stc/tests/211-if-2.swift: -------------------------------------------------------------------------------- 1 | 2 | main 3 | { 4 | int a; 5 | a = 1; 6 | 7 | int d; 8 | if (a) 9 | { 10 | int b; 11 | b = 1; 12 | d = b + 1; 13 | } else { 14 | 15 | int c; 16 | c = 2; 17 | d = c; 18 | } 19 | trace(d); 20 | } 21 | -------------------------------------------------------------------------------- /stc/tests/271-conditional-deadlock-2.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | main { 4 | 5 | int a; 6 | // Detect this deadlock! 7 | switch (a) { 8 | case 3: 9 | a = 2; 10 | default: 11 | a = 3; 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /stc/tests/272-conditional-deadlock-3.swift: -------------------------------------------------------------------------------- 1 | // SKIP-THIS-TEST 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | 4 | main { 5 | 6 | int a; 7 | // Detect this deadlock! 8 | if (a + 1) { 9 | a = 2; 10 | } else { 11 | a = 3; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/468-assoc-array-err.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | // Can't use arrays as keys 4 | 5 | type a int[]; 6 | 7 | main { 8 | float A[a]; 9 | 10 | a x; 11 | x[0] = 1; 12 | 13 | A[x] = 0.1; 14 | 15 | trace(A[x]); 16 | } 17 | -------------------------------------------------------------------------------- /stc/tests/636-app.swift: -------------------------------------------------------------------------------- 1 | // Check forward refs work 2 | main { 3 | 4 | file x<"636-out.txt"> = echo("hello"); 5 | } 6 | 7 | app (file dst) echo (string s) { 8 | "./636-echo.sh" @dst (id(s)); 9 | } 10 | 11 | (string o) id (string i) { 12 | o = i; 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/664-subtype.swift: -------------------------------------------------------------------------------- 1 | import assert; 2 | 3 | type arrayT int[string]; 4 | 5 | 6 | main { 7 | arrayT A; 8 | 9 | A["one"] = 1; 10 | A["two"] = 2; 11 | 12 | assertEqual(A["one"], 1, "one"); 13 | assertEqual(A["two"], 2, "two"); 14 | } 15 | -------------------------------------------------------------------------------- /turbine/code/NOTICE: -------------------------------------------------------------------------------- 1 | Turbine was developed at the University of Chicago and Argonne National 2 | Laboratory and is distributed under the terms of the Apache 2.0 license. 3 | Details of the license are available at: 4 | 5 | http://www.apache.org/licenses/LICENSE-2.0.txt 6 | -------------------------------------------------------------------------------- /www/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -eu 2 | 3 | if [ ! -f swift.css ] 4 | then 5 | echo "Make a soft link to swift.css!" 6 | exit 1 7 | fi 8 | 9 | asciidoc --attribute stylesheet=$PWD/swift.css \ 10 | -a max-width=750px -a textwidth=80 downloads.txt 11 | -------------------------------------------------------------------------------- /dev/devguide.txt: -------------------------------------------------------------------------------- 1 | 2 | OBSOLETE: See dev.txt in the gh-pages branch! 3 | 4 | //// 5 | Swift/T devguide, asciidoc format 6 | //// 7 | 8 | = Swift/T Developers' Guide 9 | 10 | //// 11 | Local Variables: 12 | mode: doc 13 | eval: (auto-fill-mode 1) 14 | End: 15 | //// 16 | -------------------------------------------------------------------------------- /stc/bench/suite/reducetree/o-level-takeone-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PATH=$PATH:~/ExM/inst/stc/bin:~/ExM/inst/turbine/bin 4 | 5 | export ARGS="--n=24 --sleeptime=0" 6 | 7 | ../scripts/o-level-test.sh ./fib.swift ../scripts/o-level-takeone.txt ./o-level-takeone-out 8 | -------------------------------------------------------------------------------- /stc/code/src/exm/stc/jvm/runtime/JVMRuntime.java: -------------------------------------------------------------------------------- 1 | package exm.stc.jvm.runtime; 2 | 3 | import org.apache.log4j.Logger; 4 | 5 | public class JVMRuntime { 6 | 7 | public static Logger getLogger() { 8 | return Logger.getLogger(JVMRuntime.class); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/006-assert-1.swift: -------------------------------------------------------------------------------- 1 | 2 | // Test that assert works ok when they pass 3 | 4 | import assert; 5 | 6 | main { 7 | assert(true, "true"); 8 | assertEqual(123, 123, "123 == 123"); 9 | assertLT(1, 2, "1 < 2"); 10 | assertLTE(2, 2, "2 <= 2"); 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/3441-multidimensional.swift: -------------------------------------------------------------------------------- 1 | // Basic test to make sure that multidimensional arrays work 2 | 3 | main { 4 | int M[][]; 5 | int M1[]; 6 | 7 | M[0] = M1; 8 | 9 | M1[3] = 1; 10 | 11 | trace(M[1][3]); 12 | 13 | M[1] = M1; 14 | } 15 | -------------------------------------------------------------------------------- /stc/tests/466-assoc-array-err.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | // Matching key type but mismatch value 4 | main { 5 | float A[string]; 6 | A["test"] = 0.1; 7 | f(A); 8 | } 9 | 10 | 11 | f (int A[string]) { 12 | trace("CALLED F"); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/470-assoc-array-err.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | // Can't use arrays as keys 4 | 5 | typedef a int[]; 6 | 7 | main { 8 | float A[a]; 9 | 10 | a x; 11 | x[0] = 1; 12 | 13 | A[x] = 0.1; 14 | 15 | trace(A[x]); 16 | } 17 | -------------------------------------------------------------------------------- /stc/tests/5611-file-analysis.swift: -------------------------------------------------------------------------------- 1 | (file o) f() 2 | { 3 | // Remove next two lines to reproduce #128 4 | file r = input("5611-file-analysis.txt"); 5 | o = r; 6 | // Note: file r does not exist! But f() is unused. 7 | 8 | trace("file: " + filename(r)); 9 | } 10 | -------------------------------------------------------------------------------- /stc/tests/642-typevar.swift: -------------------------------------------------------------------------------- 1 | // COMPILE-ONLY-TEST 2 | 3 | 4 | (T out) f (T arr[], int i) "package" "0.0.0" "f"; 5 | 6 | main { 7 | float A[] = [1, 2.0, 3]; 8 | int B[] = [1, 2, 3]; 9 | float x = f(A, 1); 10 | int y = f(B, 1); 11 | trace(x, y); 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/656-typevar.swift: -------------------------------------------------------------------------------- 1 | // COMPILE-ONLY-TEST 2 | // This should typecheck ok 3 | 4 | (T1 o1[], T2 o2, T3 o3) f(T1 i1, T2 i2, T3 i3[]) "turbine" "0.0" "f"; 5 | 6 | float o1[]; 7 | int o2; 8 | int o3; 9 | 10 | 11 | (o1, o2, o3) = f(0, 0, [0, 1]); 12 | -------------------------------------------------------------------------------- /c-utils/code/tests/heap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TESTS=$( dirname $0 ) 4 | 5 | set -x 6 | 7 | THIS=$0 8 | BIN=${THIS%.sh}.x 9 | OUTPUT=${THIS%.sh}.out 10 | 11 | ${BIN} >& ${OUTPUT} 12 | [[ ${?} == 0 ]] || exit 1 13 | 14 | grep DONE ${OUTPUT} || exit 1 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /c-utils/code/tests/list.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TESTS=$( dirname $0 ) 4 | 5 | set -x 6 | 7 | THIS=$0 8 | BIN=${THIS%.sh}.x 9 | OUTPUT=${THIS%.sh}.out 10 | 11 | ${BIN} >& ${OUTPUT} 12 | [[ ${?} == 0 ]] || exit 1 13 | 14 | grep DONE ${OUTPUT} || exit 1 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /c-utils/code/tests/table.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TESTS=$( dirname $0 ) 4 | 5 | set -x 6 | 7 | THIS=$0 8 | BIN=${THIS%.sh}.x 9 | OUTPUT=${THIS%.sh}.out 10 | 11 | ${BIN} >& ${OUTPUT} 12 | [[ ${?} == 0 ]] || exit 1 13 | 14 | grep DONE ${OUTPUT} || exit 1 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /c-utils/code/tests/tree.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TESTS=$( dirname $0 ) 4 | 5 | set -x 6 | 7 | THIS=$0 8 | BIN=${THIS%.sh}.x 9 | OUTPUT=${THIS%.sh}.out 10 | 11 | ${BIN} >& ${OUTPUT} 12 | [[ ${?} == 0 ]] || exit 1 13 | 14 | grep DONE ${OUTPUT} || exit 1 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /stc/code/src/exm/stc/jvm/runtime/DoubleWriteException.java: -------------------------------------------------------------------------------- 1 | package exm.stc.jvm.runtime; 2 | 3 | @SuppressWarnings("serial") 4 | public class DoubleWriteException extends LogicException { 5 | public DoubleWriteException(String stringmsg) { 6 | super(stringmsg); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /stc/tests/810-numberformat-err.swift: -------------------------------------------------------------------------------- 1 | 2 | // Test that toint(empty string) results in error 3 | // THIS-TEST-SHOULD-NOT-RUN 4 | 5 | import io; 6 | import sys; 7 | 8 | main { 9 | int N = toint(""); 10 | int V = N-1; 11 | printf("V: %i", V); 12 | trace(V); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/8561-file-misuse.swift: -------------------------------------------------------------------------------- 1 | // Duplicate argument names 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | 4 | (file o) f(file o) "turbine" "0.0" 5 | [ "exec cp <> <>" ]; 6 | 7 | main 8 | { 9 | file i = input("i.txt"); 10 | file o<"o.txt">; 11 | o = f(i); 12 | } 13 | -------------------------------------------------------------------------------- /c-utils/code/tests/table_bp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TESTS=$( dirname $0 ) 4 | 5 | set -x 6 | 7 | THIS=$0 8 | BIN=${THIS%.sh}.x 9 | OUTPUT=${THIS%.sh}.out 10 | 11 | ${BIN} >& ${OUTPUT} 12 | [[ ${?} == 0 ]] || exit 1 13 | 14 | grep DONE ${OUTPUT} || exit 1 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /c-utils/code/tests/table_ip.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TESTS=$( dirname $0 ) 4 | 5 | set -x 6 | 7 | THIS=$0 8 | BIN=${THIS%.sh}.x 9 | OUTPUT=${THIS%.sh}.out 10 | 11 | ${BIN} >& ${OUTPUT} 12 | [[ ${?} == 0 ]] || exit 1 13 | 14 | grep DONE ${OUTPUT} || exit 1 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /c-utils/code/tests/table_lp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TESTS=$( dirname $0 ) 4 | 5 | set -x 6 | 7 | THIS=$0 8 | BIN=${THIS%.sh}.x 9 | OUTPUT=${THIS%.sh}.out 10 | 11 | ${BIN} >& ${OUTPUT} 12 | [[ ${?} == 0 ]] || exit 1 13 | 14 | grep DONE ${OUTPUT} || exit 1 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /stc/bench/suite/uts/rc-level-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export STC_FLAGS="-T no-engine" 4 | 5 | export TURBINE_USER_LIB=$(dirname $0)/lib 6 | 7 | ARGS="--gen_mx=20" 8 | 9 | export ARGS 10 | 11 | ../scripts/o-level-test.sh ./uts.swift ./rc-o-levels.txt ./rc-o-levels-out 12 | -------------------------------------------------------------------------------- /stc/tests/101-error.swift: -------------------------------------------------------------------------------- 1 | 2 | // Checks that basic task failure is handled properly 3 | 4 | // THIS-TEST-SHOULD-NOT-RUN 5 | 6 | import io; 7 | 8 | @dispatch=WORKER 9 | () f() "turbine" "0.0" [ "error \"MY USER ERROR MESSAGE\"" ]; 10 | 11 | main 12 | { 13 | f(); 14 | } 15 | -------------------------------------------------------------------------------- /stc/tests/148-overload-err.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | /* 4 | * Test handling when there is no way to resolve overload. 5 | */ 6 | 7 | (T x) f() "turbine" "0.0" "f"; 8 | 9 | overloaded(int A[]) {} 10 | overloaded(blob x) {} 11 | 12 | overloaded(f()); 13 | -------------------------------------------------------------------------------- /stc/tests/491-bag.exp: -------------------------------------------------------------------------------- 1 | trace: string_bag,hello, world 2 | trace: string_bag,mayday, mayday 3 | trace: string_bag,eins, zwei, drei, vier, fünf 4 | trace: copy of string_bag,hello, world 5 | trace: copy of string_bag,mayday, mayday 6 | trace: copy of string_bag,eins, zwei, drei, vier, fünf 7 | -------------------------------------------------------------------------------- /stc/tests/587-foreach-range-8.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | COUNT=`grep -E '(\[[0-9]*\])? trace: [0-9]+$' ${TURBINE_OUTPUT} | wc -l` 4 | if [ ${COUNT} -ne 100 ]; then 5 | echo "Expected 100 trace statements in ${TURBINE_OUTPUT}, but only saw ${COUNT}" 6 | exit 1 7 | fi 8 | exit 0 9 | -------------------------------------------------------------------------------- /stc/tests/633-app-fail.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-RUN 3 | 4 | // Check that bad executable 5 | app (file out) f () { 6 | "sdfdsfdskwejiojwet"; 7 | } 8 | 9 | main { 10 | file x <"outfile"> = f(); 11 | wait (x) { 12 | trace("DONE"); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /stc/tests/714-compile-arg.swift: -------------------------------------------------------------------------------- 1 | // Test compile-time args 2 | import assert; 3 | import sys; 4 | 5 | argv_accept("compile_arg", "runtime-arg"); 6 | assertEqual("SUCCESS!", argv("compile_arg"), "Test compile time arg"); 7 | assertEqual("SUCCESS", argv("runtime-arg"), "Test runtime arg"); 8 | -------------------------------------------------------------------------------- /stc/tests/805-array-brackets.swift: -------------------------------------------------------------------------------- 1 | 2 | // Tests error handling: erroneous brackets in array definition 3 | 4 | // THIS-TEST-SHOULD-NOT-COMPILE 5 | 6 | // Output argument should be (string result[]) 7 | (string[] result) f(string inp) "nothing" "0.0.0" "f"; 8 | 9 | main{} 10 | -------------------------------------------------------------------------------- /stc/tests/821-opt-regression.swift: -------------------------------------------------------------------------------- 1 | 2 | @pure 3 | (int x, int y) doubleresult() { 4 | x = 1; 5 | y = 1; 6 | } 7 | 8 | main { 9 | int a, b; 10 | a, b = doubleresult(); 11 | // Regression test for dead code elim where only one result is used. 12 | trace(a); 13 | } 14 | -------------------------------------------------------------------------------- /turbine/code/scripts/main-wrap/settings/machine.vanilla-g++.sh: -------------------------------------------------------------------------------- 1 | 2 | # VANILLA 3 | 4 | TURBINE_HOME=$( cd $GENLEAF_HOME/../.. ; /bin/pwd ) 5 | source $TURBINE_HOME/scripts/turbine-build-config.sh 6 | 7 | CC=g++ 8 | STC=stc 9 | 10 | source $GENLEAF_HOME/settings/flags.g++.sh 11 | -------------------------------------------------------------------------------- /turbine/code/scripts/main-wrap/settings/machine.vanilla-gcc.sh: -------------------------------------------------------------------------------- 1 | 2 | # VANILLA 3 | 4 | TURBINE_HOME=$( cd $GENLEAF_HOME/../.. ; /bin/pwd ) 5 | source $TURBINE_HOME/scripts/turbine-build-config.sh 6 | 7 | CC=gcc 8 | STC=stc 9 | 10 | source $GENLEAF_HOME/settings/flags.gcc.sh 11 | -------------------------------------------------------------------------------- /stc/tests/396-multidimensional-17.swift: -------------------------------------------------------------------------------- 1 | 2 | main { 3 | // Simple regression test for inserting into array 4 | string A[][]; 5 | A[f(0)][f(0)] = "1"; 6 | 7 | wait (A) { 8 | trace(A[0][0]); 9 | } 10 | } 11 | 12 | (int o) f (int i) { 13 | o = i; 14 | } 15 | -------------------------------------------------------------------------------- /stc/tests/428-forloop-string.swift: -------------------------------------------------------------------------------- 1 | 2 | // Check that string operations work ok in for loop 3 | 4 | import string; 5 | 6 | main { 7 | for (string s = "", int i = 0; i < 10; 8 | i = i + 1, 9 | s = sprintf("%s %i", s, i)) 10 | { 11 | trace(i,s); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/5697-url.exp: -------------------------------------------------------------------------------- 1 | copy_url http://example.com ftp://example.com 2 | copy_url http://example.com ftp://example.com/two 3 | copy_url3 http://three.com file://test3 4 | copy_url3 http://four.com file://test4 5 | copy_url5 http://five.com file://test5 6 | copy_url5 http://six.com file://test6 7 | -------------------------------------------------------------------------------- /stc/tests/920-wait-1.swift: -------------------------------------------------------------------------------- 1 | 2 | import assert; 3 | 4 | main { 5 | int x = f(0); 6 | int y = f(1); 7 | wait(x, y, f(3)) { 8 | trace(x + y); 9 | assertEqual(x + y, 3, "x+y"); 10 | } 11 | } 12 | 13 | 14 | (int r) f (int x) { 15 | r = x + 1; 16 | } 17 | -------------------------------------------------------------------------------- /stc/tests/include/module_620.swift: -------------------------------------------------------------------------------- 1 | // To be imported with preprocessing off 2 | 3 | 4 | # invalid preprocessor directive to check preprocessor not on 5 | 6 | 7 | # Should not do recursive import 8 | import include.module_620; 9 | 10 | (int o) u (int i) { 11 | o = 0; 12 | } 13 | -------------------------------------------------------------------------------- /turbine/code/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by configure 2 | install.txt 3 | source.txt 4 | system-libs.txt 5 | 6 | # Generated by Makefile 7 | deps.txt 8 | deps_contents.txt 9 | 10 | # Optional Swift/T JVM scripting package: 11 | swift-t-jvm 12 | 13 | # Debian work directory 14 | debian 15 | -------------------------------------------------------------------------------- /turbine/code/maint/jenkins.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | set -eu 3 | 4 | # Turbine Jenkins script - build only 5 | 6 | print JENKINS.ZSH 7 | 8 | source maint/jenkins-configure.sh 9 | 10 | # Ignore autoscan warning for AC_PROG_MAKE_SET 11 | 12 | make V=1 13 | 14 | make V=1 install 15 | -------------------------------------------------------------------------------- /c-utils/code/tests/ptr-array.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TESTS=$( dirname $0 ) 4 | 5 | set -x 6 | 7 | THIS=$0 8 | BIN=${THIS%.sh}.x 9 | OUTPUT=${THIS%.sh}.out 10 | 11 | ${VALGRIND} ${BIN} >& ${OUTPUT} 12 | [[ ${?} == 0 ]] || exit 1 13 | 14 | grep DONE ${OUTPUT} || exit 1 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /c-utils/code/tests/rbtree.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TESTS=$( dirname $0 ) 4 | 5 | set -x 6 | 7 | THIS=$0 8 | BIN=${THIS%.sh}.x 9 | OUTPUT=${THIS%.sh}.out 10 | 11 | ${VALGRIND} ${BIN} >& ${OUTPUT} 12 | [[ ${?} == 0 ]] || exit 1 13 | 14 | grep DONE ${OUTPUT} || exit 1 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /c-utils/code/tests/rbtree_bp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TESTS=$( dirname $0 ) 4 | 5 | set -x 6 | 7 | THIS=$0 8 | BIN=${THIS%.sh}.x 9 | OUTPUT=${THIS%.sh}.out 10 | 11 | ${VALGRIND} ${BIN} >& ${OUTPUT} 12 | [[ ${?} == 0 ]] || exit 1 13 | 14 | grep DONE ${OUTPUT} || exit 1 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /c-utils/code/tests/tools.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TESTS=$( dirname $0 ) 4 | 5 | set -x 6 | 7 | THIS=$0 8 | BIN=${THIS%.sh}.x 9 | OUTPUT=${THIS%.sh}.out 10 | 11 | ${VALGRIND} ${BIN} >& ${OUTPUT} 12 | [[ ${?} == 0 ]] || exit 1 13 | 14 | grep DONE ${OUTPUT} || exit 1 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /stc/tests/005-define-function-2.swift: -------------------------------------------------------------------------------- 1 | 2 | (int output) func_a(int a, int b) 3 | { 4 | // UNSET-VARIABLE-EXPECTED 5 | int i; 6 | output = 0; 7 | } 8 | 9 | (int output) func_b(int a, int b) 10 | { 11 | int j; 12 | output = 0; 13 | } 14 | 15 | main 16 | { 17 | int p; 18 | } 19 | -------------------------------------------------------------------------------- /stc/tests/015-main-1.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | (int output) func_a(int a, int b) 5 | { 6 | // UNSET-VARIABLE-EXPECTED 7 | int i; 8 | output = 0; 9 | } 10 | 11 | (int output) func_b(int a, int b) 12 | { 13 | int j; 14 | output = 0; 15 | } 16 | 17 | main 18 | { 19 | int k; 20 | } 21 | -------------------------------------------------------------------------------- /stc/tests/135-func-err-11.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | 4 | (int o) f (int i) { 5 | o = i; 6 | } 7 | 8 | // Check can't define conflicting type with function 9 | type f { 10 | int a; 11 | int b; 12 | } 13 | 14 | main { 15 | int x = 3; 16 | trace(x); 17 | } 18 | -------------------------------------------------------------------------------- /stc/tests/705-split.check.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | set -x 4 | 5 | # Note we are using ZSH quoting here: 6 | WORDS=( hello world /bin "/home/user/evil path/d2/d1" /usr/bin ) 7 | for W in ${WORDS} 8 | do 9 | grep "trace: ${W}" ${TURBINE_OUTPUT} || exit 1 10 | done 11 | 12 | exit 0 13 | -------------------------------------------------------------------------------- /stc/tests/760-hdf-1.swift: -------------------------------------------------------------------------------- 1 | 2 | // Cf. 594-blob-write 3 | 4 | // SKIP-THIS-TEST uses HDF 5 | 6 | import blob; 7 | import io; 8 | 9 | main 10 | { 11 | float A[] = [ 0.2, 0.3, 0.4, 0.5 ]; 12 | blob b = blob_from_floats(A); 13 | file f<"A.hdf"> = blob_hdf_write("entry", b); 14 | } 15 | -------------------------------------------------------------------------------- /stc/tests/7910-python-1.swift: -------------------------------------------------------------------------------- 1 | 2 | // SKIP-THIS-TEST 3 | // this should work but we do not assume everyone has Python installed 4 | 5 | import io; 6 | import python; 7 | 8 | main 9 | { 10 | i = python("print(\"python works\")\n'{0}'.format(2+2)"); 11 | printf("i: %s", i); 12 | } 13 | -------------------------------------------------------------------------------- /c-utils/code/maint/depend.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIR="$1" 4 | shift 5 | if [ -n "$DIR" ] 6 | then 7 | DIR=$DIR 8 | fi 9 | 10 | # Refer to GCC docs on -M and -MG 11 | # sed: Take filename without .o and paste $DIR on it 12 | ${CC} -M -MG "$@" | sed -e "s@^\(.*\)\.o:@$DIR/\1.d $DIR/\1.o:@" 13 | -------------------------------------------------------------------------------- /c-utils/code/tests/dyn_array_i.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TESTS=$( dirname $0 ) 4 | 5 | set -x 6 | 7 | THIS=$0 8 | BIN=${THIS%.sh}.x 9 | OUTPUT=${THIS%.sh}.out 10 | 11 | ${VALGRIND} ${BIN} >& ${OUTPUT} 12 | [[ ${?} == 0 ]] || exit 1 13 | 14 | grep DONE ${OUTPUT} || exit 1 15 | 16 | exit 0 17 | -------------------------------------------------------------------------------- /stc/bench/suite/reducetree/rc-level-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export STC_FLAGS="-T no-engine" 4 | 5 | export TURBINE_USER_LIB=$(dirname $0)/lib 6 | 7 | ARGS="--n=24 --sleeptime=0" 8 | 9 | export ARGS 10 | 11 | ../scripts/o-level-test.sh ./fib.swift ./rc-o-levels.txt ./rc-o-levels-out 12 | -------------------------------------------------------------------------------- /stc/tests/404-foreach-5.exp: -------------------------------------------------------------------------------- 1 | trace: 0,15 2 | trace: 1,16 3 | trace: 2,17 4 | trace: 3,18 5 | trace: 4,19 6 | trace: 5,20 7 | trace: 6,21 8 | trace: 7,22 9 | trace: 8,23 10 | trace: 9,24 11 | trace: 10,25 12 | trace: 11,26 13 | trace: 12,27 14 | trace: 13,28 15 | trace: 14,29 16 | trace: 15,30 17 | -------------------------------------------------------------------------------- /stc/tests/454-assoc-array.swift: -------------------------------------------------------------------------------- 1 | // Test for associative array literals 2 | 3 | main { 4 | int A[string]; 5 | 6 | A = { "test":1, "testing":2, "tested":3 }; 7 | 8 | foreach k, i in { 1: "test", 2: "testing", 3: "tested" } { 9 | trace(i, k, A[k], contains(A, k)); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/514-string-multiline.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -x 4 | 5 | grep -q 1234 ${TURBINE_OUTPUT} || exit 1 6 | grep -q 4321 ${TURBINE_OUTPUT} || exit 1 7 | grep -q AA ${TURBINE_OUTPUT} || exit 1 8 | grep -q "x=1" ${TURBINE_OUTPUT} || exit 1 9 | 10 | echo OK 11 | 12 | exit 0 13 | -------------------------------------------------------------------------------- /stc/tests/585-foreach-range-6.swift: -------------------------------------------------------------------------------- 1 | 2 | import assert; 3 | 4 | main { 5 | // Unroll a small loop and check that the whole thing gets inlined ok 6 | @unroll=10 7 | foreach i in [4:12] { 8 | trace(i+1); 9 | assert(i >= 4 && i <= 12, "i range"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /stc/tests/636-app.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | OUT=636-out.txt 3 | if [ ! -f $OUT ]; then 4 | echo "$OUT not created" 5 | exit 1 6 | fi 7 | 8 | contents=`cat $OUT` 9 | if [ "$contents" = "hello" ]; then 10 | rm ${OUT} 11 | else 12 | echo "Contents of $OUT not right" 13 | exit 1 14 | fi 15 | -------------------------------------------------------------------------------- /stc/tests/645-typevar.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | 4 | (T out1, T out2) f (T arr[], int i) "package" "0.0.0" "f"; 5 | 6 | main { 7 | float A[] = [1, 2.0, 3]; 8 | int B[] = [1, 2, 3]; 9 | float x; 10 | int y; 11 | x, y = f(A, 1); 12 | trace(x, y); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /stc/tests/683-consume.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | dir=$1 3 | f=$dir/tmp.txt 4 | if [ ! -f $f ] 5 | then 6 | echo "$f not found" 7 | exit 1 8 | fi 9 | 10 | f_contents=$(cat $f) 11 | if [ "$f_contents" != "TEST" ] 12 | then 13 | echo "$f didn't have expected contents" 14 | exit 1 15 | fi 16 | -------------------------------------------------------------------------------- /stc/tests/921-wait-2.swift: -------------------------------------------------------------------------------- 1 | 2 | import assert; 3 | 4 | (int r) f (int a, int b) { 5 | wait(a, b) { 6 | r = a + b; 7 | } 8 | } 9 | 10 | main { 11 | int a = f(1, 2); 12 | int b = f(f(1,1), f(2,2)); 13 | 14 | assertEqual(a, 3, "a"); 15 | assertEqual(b, 6, "b"); 16 | } 17 | -------------------------------------------------------------------------------- /stc/bench/dataflow/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export TURBINE_ENGINES=1 4 | export ADLB_SERVERS=1 5 | PROCS=8 6 | 7 | stc dataflow-1D.swift dataflow-1D.tcl 8 | 9 | turbine -l -n ${PROCS} dataflow-1D.tcl 10 | 11 | clog2_print adlb.clog2 > adlb.clog2.txt 12 | 13 | grep metadata adlb.clog2.txt 14 | -------------------------------------------------------------------------------- /stc/tests/123-sub-error-2.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | (int x, int y) f () { 3 | x = 1; 4 | y = 2; 5 | } 6 | 7 | main { 8 | int x; 9 | int y; 10 | int z = 1; 11 | (x, y) = f(z); 12 | if (x != 0) { 13 | trace(y); 14 | } else { 15 | trace(z); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /stc/tests/213-if-3.swift: -------------------------------------------------------------------------------- 1 | 2 | main 3 | { 4 | int a; 5 | a = 1; 6 | int b = 3; 7 | 8 | int d; 9 | if (a + 4 - (b + a)) 10 | { 11 | int c; 12 | c = 1; 13 | d = c + 1; 14 | } else { 15 | 16 | int c; 17 | c = 2; 18 | d = c; 19 | } 20 | trace(d); 21 | } 22 | -------------------------------------------------------------------------------- /stc/tests/261-expressions-2.swift: -------------------------------------------------------------------------------- 1 | // Check that combined declaration/assignment works 2 | 3 | (int r) f (int x) { 4 | r = 5 * x + 1; 5 | } 6 | 7 | main { 8 | int x = f(2); 9 | int y = (f(3) + f(2)) * -2 + 2; 10 | int z = f((f(3) - f(1)) * 22); 11 | 12 | trace(x, y, z); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/include/header-620.swift: -------------------------------------------------------------------------------- 1 | // To be imported with preprocessing on 2 | 3 | 4 | // (int o) q(int i1, int i2) "headerpackage" "3.3.2" "hpf"; 5 | 6 | #define INVALID_SYNTAX 7 | 8 | (int o) t (int i) { 9 | 10 | // Check preprocessor runs 11 | INVALID_SYNTAX 12 | 13 | o = 0; 14 | } 15 | -------------------------------------------------------------------------------- /turbine/code/src/executables/turbine_sh.manifest: -------------------------------------------------------------------------------- 1 | # +=======================================================+ 2 | # | Manifest file to build Turbine application executable | 3 | # +=======================================================+ 4 | 5 | # This is a bare-bones manifest to generate a generic launcher 6 | -------------------------------------------------------------------------------- /turbine/code/tests/coasters/coaster-env-args.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | [[ -s "f4.out" ]] \ 4 | && echo "f4.out present : PASS" \ 5 | || echo "f4.out missing : FAIL" 6 | [[ -f "f4.err" ]] \ 7 | && echo "f4.err present : PASS" \ 8 | || echo "f4.err missing : FAIL" 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /dev/conda/helpers.zsh: -------------------------------------------------------------------------------- 1 | 2 | # HELPERS ZSH 3 | # Helpers for Anaconda stuff 4 | 5 | checksum() 6 | { 7 | # Use redirection to suppress filename in program output 8 | local PKG=$1 9 | if [[ $CONDA_PLATFORM =~ osx-* ]] { 10 | md5 -r < $PKG 11 | } else { 12 | md5sum < $PKG 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /stc/bench/suite/util/lognorm_test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "bench_util.h" 3 | int main () { 4 | for (int i = 0; i < 100; i++) 5 | { 6 | //printf("%f\n", lognorm_sample(-6.905, 1)); 7 | } 8 | 9 | fprintf(stderr, "START\n"); 10 | spin(2); 11 | fprintf(stderr, "STOP\n"); 12 | } 13 | -------------------------------------------------------------------------------- /stc/bench/suite/wavefront/rc-level-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export STC_FLAGS="-T no-engine" 4 | 5 | export TURBINE_USER_LIB=$(dirname $0)/lib 6 | 7 | ARGS="-N=400 --mu=-15 --sigma=1" 8 | 9 | export ARGS 10 | 11 | ../scripts/o-level-test.sh ./wavefront.swift ./rc-o-levels.txt ./rc-o-levels-out 12 | -------------------------------------------------------------------------------- /stc/code/src/exm/stc/common/lang/Pragmas.java: -------------------------------------------------------------------------------- 1 | package exm.stc.common.lang; 2 | 3 | /** 4 | * Keep names of pragmas in one place. 5 | */ 6 | public class Pragmas { 7 | public static final String WORK_TYPE_DEF = "worktypedef"; 8 | public static final String APP_EXECUTOR_DEF = "appexecdef"; 9 | } 10 | -------------------------------------------------------------------------------- /stc/code/src/exm/stc/frontend/WalkMode.java: -------------------------------------------------------------------------------- 1 | package exm.stc.frontend; 2 | 3 | /** 4 | * Control what statement walker should process 5 | */ 6 | enum WalkMode { 7 | NORMAL, 8 | ONLY_DECLARATIONS, // Only process variable declarations 9 | ONLY_EVALUATION, // Process everything but declarations 10 | } -------------------------------------------------------------------------------- /stc/tests/3012-arrays.swift: -------------------------------------------------------------------------------- 1 | 2 | import assert; 3 | 4 | // Regression test for rontainer reference bugs 5 | 6 | main { 7 | int array[]; 8 | 9 | array[2] = 5; 10 | 11 | int x; 12 | x = array[2]; 13 | 14 | int y; 15 | y = 2 + array[2]; 16 | assertEqual(y, 7, "y=7"); 17 | } 18 | -------------------------------------------------------------------------------- /stc/tests/315-arrays-15.swift: -------------------------------------------------------------------------------- 1 | import string; 2 | 3 | // THIS-TEST-SHOULD-NOT-RUN 4 | // Regression test for array lookup not failing correctly 5 | 6 | main { 7 | string toks[]; 8 | 9 | toks = split("a,b,c", ","); 10 | 11 | trace(toks[3]); // Doesn't exist, so we should get nice error 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/330-arrays-compile-error-1.swift: -------------------------------------------------------------------------------- 1 | //THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | (int r) f(int A[]) { 4 | r = A[1]; 5 | A[2] = 3; 6 | } 7 | 8 | 9 | main { 10 | int A[]; 11 | A[0] = 2; 12 | A[1] = 123; 13 | A[2] = 321; 14 | 15 | trace(f(A)); 16 | 17 | } 18 | 19 | 20 | -------------------------------------------------------------------------------- /stc/tests/400-foreach-1.swift: -------------------------------------------------------------------------------- 1 | 2 | main { 3 | int A[]; 4 | A[0] = 1; 5 | A[1] = 2; 6 | 7 | foreach x, i in A { 8 | trace(i, x); 9 | } 10 | 11 | A[5] = 3; 12 | A[6] = 4; 13 | 14 | @async 15 | foreach x in A { 16 | trace(x); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /stc/tests/401-foreach-2.swift: -------------------------------------------------------------------------------- 1 | // SKIP-THIS-TEST 2 | // this example will only pass once we can overlap array creation and insertion 3 | 4 | main { 5 | int A[]; 6 | A[0] = 1; 7 | foreach x, i in A { 8 | if (i < 100) { 9 | A[i+1] = A[i] + 1; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/481-exists.swift: -------------------------------------------------------------------------------- 1 | 2 | // Test exists(A,i) 3 | 4 | import io; 5 | 6 | main 7 | { 8 | int A[]; 9 | b = exists(A, 0); 10 | trace("initial: ", b); 11 | wait (b) 12 | { 13 | A[0] = 3; 14 | } 15 | wait (A) 16 | { 17 | trace("after wait A: ", exists(A, 0)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /stc/tests/665-subtype.swift: -------------------------------------------------------------------------------- 1 | import io; 2 | import location; 3 | 4 | type wrapped_rank int; 5 | 6 | main { 7 | location A[]; 8 | foreach i in [1:10] { 9 | A[i] = random_worker(); 10 | } 11 | 12 | foreach j in [1:10] { 13 | printf("%d: %d", j, wrapped_rank(A[j].rank)); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /stc/tests/666-swiftk-type.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-CAUSE-WARNING 3 | type blah; 4 | 5 | app (blah out) make_blah () { 6 | "/bin/echo" 12345 @stdout=out 7 | } 8 | 9 | blah f<"666-out.tmp"> = make_blah(); 10 | 11 | import assert; 12 | import files; 13 | assertEqual(toint(read(f)), 12345, ""); 14 | -------------------------------------------------------------------------------- /stc/tests/6921-file-map.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | F=./6921-test.txt 5 | if [ ! -f $F ]; then 6 | echo "Expected file $F" 7 | exit 1 8 | fi 9 | 10 | if ! grep -q "import files" $F; then 11 | echo "$F does not have expected contents" 12 | exit 1 13 | fi 14 | 15 | rm 6921-test.txt 16 | -------------------------------------------------------------------------------- /stc/tests/693-file-map-loop.swift: -------------------------------------------------------------------------------- 1 | 2 | app (file out) runcommand (string instr){ 3 | "/bin/sh" "-c" instr @stdout=out; 4 | } 5 | 6 | import string; 7 | 8 | main () { 9 | foreach i in [0:31]{ 10 | file f = runcommand("echo hello world"); 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /www/alcf/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eu 3 | 4 | # Before running, create a soft link to 5 | # https://svn.mcs.anl.gov/repos/exm/www/css/swift.css 6 | 7 | cd $(dirname $0) 8 | 9 | asciidoc --attribute stylesheet=${PWD}/swift.css \ 10 | -a max-width=750px -a textwidth=80 alcf.txt 11 | -------------------------------------------------------------------------------- /stc/bench/foreach-sum/foreach-sum.cfg: -------------------------------------------------------------------------------- 1 | 2 | # Configuration file for plotter 3 | 4 | label.cA.data = f() 5 | label.cB.data = g() 6 | label.cS.data = sum() 7 | 8 | shape.cA.data = none 9 | shape.cB.data = none 10 | shape.cS.data = none 11 | 12 | xlabel = time (seconds) 13 | ylabel = leaf functions completed 14 | -------------------------------------------------------------------------------- /stc/tests/016-main-2.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | (int output) func_a(int a, int b) 5 | { 6 | // UNSET-VARIABLE-EXPECTED 7 | int i; 8 | output = 0; 9 | } 10 | 11 | (int output) rules(int a, int b) 12 | { 13 | int j; 14 | output = 0; 15 | } 16 | 17 | main 18 | { 19 | int k; 20 | k = rules(1,2); 21 | } 22 | -------------------------------------------------------------------------------- /stc/tests/206-nest-error-1.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-COMPILE 3 | 4 | main 5 | { 6 | int a; 7 | a = 1; 8 | 9 | { 10 | int b; 11 | b = 1; 12 | } 13 | 14 | { 15 | int b; 16 | b = 1; 17 | // This is a double definition in a nested scope: 18 | int b; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /stc/tests/312-arrays-12.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-RUN 2 | 3 | // CHeck that double writes are caught 4 | 5 | main { 6 | int A[]; 7 | A[id(1)] = 1; 8 | A[id(1)] = 2; 9 | // Prevent A getting optimized out 10 | trace(A[1]); 11 | } 12 | 13 | (int o) id (int i) { 14 | o = i; 15 | } 16 | -------------------------------------------------------------------------------- /stc/tests/356-nested-insert.swift: -------------------------------------------------------------------------------- 1 | 2 | // Regression test for compiler bug with 3 | // lvalue/rvalue nested array lookups 4 | 5 | 6 | main { 7 | int A[][]; 8 | int i = f(1), j = f(1); 9 | trace(A[i][j]); 10 | A[i][j] = 2; 11 | } 12 | 13 | 14 | (int o) f (int i) { 15 | o = i; 16 | } 17 | -------------------------------------------------------------------------------- /stc/tests/632-split.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | if [ $# -ne 4 ]; then 3 | echo "Wrong number of args: $#" 4 | exit 1 5 | fi 6 | in=$1 7 | lines=$2 8 | out1=$3 9 | out2=$4 10 | 11 | linesplusone=$(($lines + 1)) 12 | head -n "$lines" "$in" > "$out1" 13 | tail -n "+$linesplusone" "$in" > "$out2" 14 | 15 | -------------------------------------------------------------------------------- /stc/tests/644-typevar.swift: -------------------------------------------------------------------------------- 1 | import assert; 2 | 3 | main { 4 | float A[] = [1, 2.0, 3]; 5 | // Test polymorphic container functions 6 | assertEqual(3, size(A), "size(A)"); 7 | assertEqual(true, contains(A, 0), "contains(A, 0)"); 8 | assertEqual(false, contains(A, 4), "contains(A, 4)"); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /stc/tests/649-typevar.swift: -------------------------------------------------------------------------------- 1 | // COMPILE-ONLY-TEST 2 | 3 | // Check more deeply nested types 4 | 5 | (T out) f (T A[][]) "package" "0.0.0" "f"; 6 | 7 | main { 8 | int A[][]; 9 | A[0][0] = 1; 10 | A[0][1] = 1; 11 | A[1][0] = 1; 12 | int x = f(A); 13 | trace(x); 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /lb/code/tests/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -eux 3 | 4 | THIS=$0 5 | EXEC=${THIS%.sh}.x 6 | OUTPUT=${THIS%.sh}.out 7 | 8 | if mpiexec -n 4 ${EXEC} > ${OUTPUT} 2>&1 9 | then 10 | CODE=0 11 | echo "OK" 12 | else 13 | CODE=$? 14 | echo "FAILED: CODE=$CODE" 15 | cat $OUTPUT 16 | fi 17 | 18 | exit $CODE 19 | -------------------------------------------------------------------------------- /stc/bench/fs/chirp-scripts/local-server.zsh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # Start a local Chirp server 4 | 5 | CHIRP_FS=/sandbox/${USER}/chirp_fs 6 | 7 | mkdir -pv ${CHIRP_FS} 8 | 9 | chirp_server -r ${CHIRP_FS} -o ${HOME}/local-server.log & 10 | CHIRP_PID=${!} 11 | 12 | declare CHIRP_PID 13 | 14 | return 0 15 | -------------------------------------------------------------------------------- /stc/tests/388-arrayostruct-2.swift: -------------------------------------------------------------------------------- 1 | 2 | type X { 3 | int x; 4 | int y; 5 | } 6 | 7 | main { 8 | X A[]; 9 | X mem; 10 | mem.x = 1; 11 | mem.y = 2; 12 | A[0] = mem; 13 | 14 | 15 | X othermem; 16 | othermem = A[f()]; 17 | } 18 | 19 | 20 | (int r) f () { 21 | r = 0; 22 | } 23 | -------------------------------------------------------------------------------- /stc/tests/570-range-1.check.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | 4 | z_member_count=$(grep -E 'z member: [0-9]+' $TURBINE_OUTPUT | wc -l) 5 | z_member_exp=2000 6 | 7 | if [[ "$z_member_count" != $z_member_exp ]]; then 8 | echo "Expected z to have $z_member_exp members, but had $z_member_count" 9 | exit 1 10 | fi 11 | -------------------------------------------------------------------------------- /stc/tests/814-parseint.swift: -------------------------------------------------------------------------------- 1 | /* Test that parseInt works as expected */ 2 | import assert; 3 | 4 | assertEqual(parseInt("10"), 10, "no base"); 5 | 6 | assertEqual(parseInt("11", 7), 8, "base 7"); 7 | 8 | assertEqual(parseInt("11111", 2), 31, "base 2"); 9 | 10 | assertEqual(parseInt("ff", 16), 255, "base 16"); 11 | -------------------------------------------------------------------------------- /turbine/code/README.txt: -------------------------------------------------------------------------------- 1 | Turbine is a runtime library that supports distributed execution of 2 | task-parallel data-flow-based applications. 3 | 4 | Mailing List 5 | ============ 6 | 7 | https://groups.google.com/forum/#!forum/swift-t-user 8 | 9 | Contact 10 | ======= 11 | Justin Wozniak: wozniak@mcs.anl.gov 12 | -------------------------------------------------------------------------------- /dev/conda/linux-64/build.sh: -------------------------------------------------------------------------------- 1 | 2 | # linux-64 BUILD SH 3 | # Simply calls build-generic. 4 | # `conda build` calls this as Bash. 5 | 6 | echo "build.sh: START" 7 | 8 | DEV_CONDA=$( cd $RECIPE_DIR/.. ; /bin/pwd -P ) 9 | 10 | ( 11 | set -x 12 | $DEV_CONDA/build-generic.sh 13 | ) 14 | 15 | echo "build.sh: STOP" 16 | -------------------------------------------------------------------------------- /stc/bench/suite/sweep/rc-level-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export STC_FLAGS="-T no-engine" 4 | 5 | export TURBINE_USER_LIB=$(dirname $0)/lib 6 | 7 | ARGS="--mu=-9 --sigma=1 --M=1000 --N=100" 8 | 9 | export ARGS 10 | 11 | ../scripts/o-level-test.sh ./embarrassing_lognorm.swift ./rc-o-levels.txt ./rc-o-levels-out 12 | -------------------------------------------------------------------------------- /stc/tests/709-join.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | if ! grep s:a:bc:d:e:f:g ${TURBINE_OUTPUT} 4 | then 5 | echo "Correct output string not found!" 6 | exit 1 7 | fi 8 | 9 | if ! grep fs:1.0,2.5,3.25 ${TURBINE_OUTPUT} 10 | then 11 | echo "Correct output string not found!" 12 | exit 1 13 | fi 14 | exit 0 15 | 16 | -------------------------------------------------------------------------------- /dev/conda/linux-aarch64/build.sh: -------------------------------------------------------------------------------- 1 | 2 | # linux-64 BUILD SH 3 | # Simply calls build-generic. 4 | # `conda build` calls this as Bash. 5 | 6 | echo "build.sh: START" 7 | 8 | DEV_CONDA=$( cd $RECIPE_DIR/.. ; /bin/pwd -P ) 9 | 10 | ( 11 | set -x 12 | $DEV_CONDA/build-generic.sh 13 | ) 14 | 15 | echo "build.sh: STOP" 16 | -------------------------------------------------------------------------------- /stc/tests/220-elseif-1.swift: -------------------------------------------------------------------------------- 1 | 2 | import assert; 3 | 4 | main { 5 | int x; 6 | 7 | if (f() == 2) { 8 | x = 1; 9 | } else if (f() == 3) { 10 | x = 2; 11 | } else { 12 | x = 3; 13 | } 14 | 15 | assertEqual(x, 2, "x"); 16 | } 17 | 18 | (int r) f() { 19 | r = 3; 20 | } 21 | -------------------------------------------------------------------------------- /stc/tests/469-assoc-array-err.swift: -------------------------------------------------------------------------------- 1 | 2 | // Structs aren't valid array keys 3 | type mystruct { 4 | int a; 5 | float b; 6 | } 7 | 8 | // THIS-TEST-SHOULD-NOT-COMPILE 9 | main { 10 | string A[mystruct]; 11 | 12 | mystruct key; 13 | key.a = 1; 14 | key.b = 1; 15 | 16 | A[key] = "test"; 17 | } 18 | -------------------------------------------------------------------------------- /stc/tests/522-floats-3.swift: -------------------------------------------------------------------------------- 1 | 2 | // Check that promotion of function args works 3 | () printfloat (float x) { 4 | trace(x); 5 | } 6 | 7 | main () { 8 | printfloat(1.0); 9 | printfloat(1); // Should be promoted 10 | printfloat(1+1); // Should be promoted 11 | float x = 1 + 1 * 2; 12 | printfloat(x); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/525-sci.swift: -------------------------------------------------------------------------------- 1 | import assert; 2 | 3 | main { 4 | trace(2.3e10); 5 | trace(2.3e-10); 6 | assertEqual(2.3e6, 2300000.0, "pos exponent 1"); 7 | assertEqual(2.3e-2, 0.023, "neg exponent 1"); 8 | assertEqual(1e-4, 0.0001, "neg exponent 2"); 9 | assertEqual(2e3 + 2000, 4000.0, "add"); 10 | } 11 | -------------------------------------------------------------------------------- /stc/tests/5695-url.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | // Doesn't make sense to redirect stdout to a url 3 | 4 | app (url o) echo(url i) 5 | { 6 | "echo" "echo:" i @stdout=o; 7 | } 8 | 9 | main() { 10 | // This should be valid 11 | url f<"ftp://example.com/"> = echo(input_url("http://example.com")); 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/581-foreach-range-2.swift: -------------------------------------------------------------------------------- 1 | 2 | // Check that range can support calculated vals 3 | 4 | import assert; 5 | 6 | main { 7 | foreach x in [1:f()] { 8 | trace(x); 9 | assert(x >= 1, ">= 1"); 10 | assert(x <= 10, "<= 10"); 11 | } 12 | } 13 | 14 | (int r) f() { 15 | r = 10; 16 | } 17 | -------------------------------------------------------------------------------- /stc/tests/593-blob-read.swift: -------------------------------------------------------------------------------- 1 | import blob; 2 | import io; 3 | 4 | main { 5 | file data = input_file("593-blob-read.data"); 6 | blob b = blob_read(data); 7 | float v[] = floats_from_blob(b); 8 | printf("size(v) = %i", size(v)); 9 | printf("v[0]=%0.2f", v[0]); 10 | printf("v[last]=%0.2f", v[size(v)-1]); 11 | } 12 | -------------------------------------------------------------------------------- /turbine/code/scripts/main-wrap/settings/machine.vesta-xlc.sh: -------------------------------------------------------------------------------- 1 | 2 | # VESTA 3 | 4 | TCL_HOME=/home/wozniak/Public/tcl-8.5.12-bgq 5 | TCL_VERSION=8.5 6 | 7 | CC=bgxlc 8 | STC=/home/wozniak/Public/sfw/stc/bin/stc 9 | 10 | TURBINE_HOME=/home/wozniak/Public/sfw/turbine 11 | 12 | source $GENLEAF_HOME/settings/flags.xlc.sh 13 | -------------------------------------------------------------------------------- /c-utils/code/maint/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Input: FILE containing list of file names 4 | # Output: Warning for each file name that does not exist 5 | 6 | # Used to check for the presence of include files 7 | 8 | FILE=$1 9 | 10 | for f in $( cat ${FILE} ) 11 | do 12 | test -e ${f} || echo "Not found: ${f}" 13 | done 14 | -------------------------------------------------------------------------------- /stc/bench/suite/uts/o-level-takeone-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PATH=$PATH:~/ExM/inst/stc/bin:~/ExM/inst/turbine/bin 4 | 5 | export TURBINE_USER_LIB=$(dirname $0)/lib 6 | 7 | ARGS="--gen_mx=20" 8 | 9 | export ARGS 10 | 11 | ../scripts/o-level-test.sh ./uts.swift ../scripts/o-level-takeone.txt ./o-level-takeone-out 12 | -------------------------------------------------------------------------------- /stc/tests/041-keyword-arg.swift: -------------------------------------------------------------------------------- 1 | import assert; 2 | 3 | (string o) hello(string name="") { 4 | o = "Hello " + name + "!"; 5 | } 6 | 7 | assertEqual(hello(), "Hello !", "not provided"); 8 | assertEqual(hello("x"), "Hello x!", "positional"); 9 | assertEqual(hello(name="y"), "Hello y!", "keyword"); 10 | -------------------------------------------------------------------------------- /stc/tests/5694-url.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | // Check that we gracefully fail when user tries to copy url 3 | 4 | app echo(url i) 5 | { 6 | "echo" "echo:" i; 7 | } 8 | 9 | main() { 10 | url src = input_url("http://www.example.com"); 11 | url dst<"http://destination.com"> = src; 12 | echo(dst); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/695-app-coasters.cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Killing service ${COASTER_SVC_PID} and immediate children" 4 | for child_pid in $(ps -ef| awk '$3 == '${COASTER_SVC_PID}' { print $2 }') 5 | do 6 | echo "Killing process $pid" 7 | kill $child_pid 8 | done 9 | 10 | kill ${COASTER_SVC_PID} 11 | wait || true 12 | -------------------------------------------------------------------------------- /stc/tests/831-opt-regression.swift: -------------------------------------------------------------------------------- 1 | import io; 2 | 3 | /* Regression test for compile error */ 4 | // COMPILE-ONLY-TEST 5 | 6 | @pure @dispatch=WORKER 7 | (float o) my_log (float x, float base) "turbine" "0.7.0" [ 8 | "set <> [ expr {log(<>)/log(<>)} ]" 9 | ]; 10 | 11 | printf("log10(100) = " + my_log(100, 10)); 12 | -------------------------------------------------------------------------------- /turbine/code/maint/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Input: FILE containing list of file names 4 | # Output: Warning for each file name that does not exist 5 | 6 | # Used to check for the presence of include files 7 | 8 | FILE=$1 9 | 10 | for f in $( cat ${FILE} ) 11 | do 12 | test -e ${f} || echo "Not found: ${f}" 13 | done 14 | -------------------------------------------------------------------------------- /dev/git-svn/svn-authors.txt: -------------------------------------------------------------------------------- 1 | armstron = Tim Armstrong 2 | wozniak = Justin Wozniak 3 | ketan = Ketan Maheswari 4 | zzhang = Zhao Zhang 5 | yadunand = Yadu Nand B 6 | skrieder = Scott J. Krieder 7 | -------------------------------------------------------------------------------- /stc/bench/fs/chirp-scripts/bb.zsh: -------------------------------------------------------------------------------- 1 | 2 | # Helper scripts for Breadboard 3 | 4 | bbhosts() 5 | { 6 | OUTPUT=$1 7 | if [[ ${OUTPUT} = "" ]] 8 | then 9 | heckle stat | grep ${USER} | clm 1 10 | else 11 | heckle stat | grep ${USER} | clm 1 > ${OUTPUT} 12 | print "WROTE: ${OUTPUT}" 13 | fi 14 | return 0 15 | } 16 | -------------------------------------------------------------------------------- /stc/tests/242-operators-3.swift: -------------------------------------------------------------------------------- 1 | 2 | import assert; 3 | 4 | main 5 | { 6 | boolean a = true; 7 | boolean b = true; 8 | boolean x; 9 | boolean y; 10 | 11 | // test the ! operator 12 | x = !a || b; 13 | y = !a && b; 14 | 15 | trace(x, y); 16 | assertEqual(x, true, "x"); 17 | assertEqual(y, false, "y"); 18 | } 19 | -------------------------------------------------------------------------------- /stc/tests/309-arrays-9.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | main { 4 | int A[]; 5 | A[f(0)] = 2; 6 | A[f(1)] = 3; 7 | // Check that we can wait on arrays, and 8 | // that optimizations exploiting that work 9 | wait (A) { 10 | trace(A[0], A[1]); 11 | } 12 | } 13 | 14 | 15 | (int r) f (int x) { 16 | r = x; 17 | } 18 | -------------------------------------------------------------------------------- /stc/tests/422-forloops-3.swift: -------------------------------------------------------------------------------- 1 | 2 | import assert; 3 | 4 | (int r) up (int x) { 5 | r = x + 1; 6 | } 7 | 8 | (int r) f () { 9 | r = 5; 10 | } 11 | 12 | main { 13 | int n = f(); 14 | for (int i = 0; i < n; i = up(i)) { 15 | trace(i, "is less than", n); 16 | assert(i < 5, "i<5"); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /stc/tests/670-typedef.swift: -------------------------------------------------------------------------------- 1 | import assert; 2 | 3 | typedef superint int; 4 | 5 | main { 6 | int x = 0; 7 | superint y = 2; 8 | trace(x, y); 9 | assert(y == 2, "y == 2"); 10 | 11 | // Should be able to freely convert between types 12 | int z = y; 13 | superint a = z; 14 | trace(a, z); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /stc/tests/825-opt-regression.swift: -------------------------------------------------------------------------------- 1 | // Reference counting regressino test with two nested for loops 2 | 3 | main { 4 | int numDS = f(); 5 | 6 | for (int i=0; i 5 | trace("after 0.5"); 6 | 7 | float y; 8 | int x = 1 => 9 | trace("start") => 10 | sleep(1) => 11 | trace("after 1") => 12 | y = 0.5 => 13 | sleep(y) => 14 | trace("after 1.5"); 15 | } 16 | -------------------------------------------------------------------------------- /stc/tests/620-include-1.swift: -------------------------------------------------------------------------------- 1 | // Test include works 2 | import io; 3 | 4 | 5 | #include "include/header-620.swift" 6 | 7 | // Test import works 8 | import include.module_620; 9 | // Check double import 10 | import include.module_620; 11 | 12 | main { 13 | printf("INCLUDE: %i", t(1)); 14 | printf("IMPORT: %i", u(1)); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /stc/tests/631-app.swift: -------------------------------------------------------------------------------- 1 | 2 | app (file out) f (file inp, string s, int i) { 3 | "./631-app-cat.sh" @inp @out ("hello " + s) i; 4 | } 5 | 6 | main { 7 | file x = input_file("helloworld.txt"); 8 | file y <"631-outfile.txt">; 9 | y = f(x, "some text", 1); 10 | wait (y) { 11 | trace("DONE"); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/634-app-fail.swift: -------------------------------------------------------------------------------- 1 | 2 | // THIS-TEST-SHOULD-NOT-RUN 3 | 4 | // This shell script returns a failure return code 5 | // Check that error is caught 6 | app (file out) f () { 7 | "./634-fail-app.sh" @out; 8 | } 9 | 10 | main { 11 | file x <"outfile"> = f(); 12 | wait (x) { 13 | trace("DONE"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /stc/tests/660-subtype.swift: -------------------------------------------------------------------------------- 1 | import assert; 2 | 3 | 4 | 5 | // Check we can declare the type 6 | type superint int; 7 | 8 | // Convert outside of type system 9 | (superint o) make_superint(int i) "turbine" "0.0.1" [ 10 | "set <> <>" 11 | ]; 12 | 13 | main { 14 | superint y = make_superint(1); 15 | int z = y; 16 | } 17 | -------------------------------------------------------------------------------- /stc/tests/675-polymorphic.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DIR=./dir_675 4 | FILE=test_675.tgz 5 | if [ ! -d $DIR ]; then 6 | echo "$DIR was not created" 7 | exit 1 8 | fi 9 | 10 | if [ ! -f $DIR/$FILE ]; then 11 | echo "$DIR/$FILE was not created" 12 | exit 1 13 | fi 14 | 15 | rm $DIR/$FILE 16 | rmdir $DIR 17 | rm ./$FILE 18 | -------------------------------------------------------------------------------- /dev/report-versions.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | THIS=${0:h:A} 4 | source $THIS/get-versions.sh 5 | 6 | Vs=( CUTILS_VERSION 7 | ADLBX_VERSION 8 | TURBINE_VERSION 9 | STC_VERSION 10 | SWIFT_T_VERSION 11 | ) 12 | 13 | for V in $Vs 14 | do 15 | printf "%-15s %6s\n" $V ${(P)V} 16 | done 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /lb/code/maint/depend.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Autogenerates Makefile dependencies 4 | # See the GCC documentation for -M, -MG 5 | # This does not work with XLC - set DEPCC to gcc 6 | 7 | DIR="$1" 8 | shift 9 | if [ -n "$DIR" ] ; then 10 | DIR="$DIR" 11 | fi 12 | 13 | ${DEPCC} -M -MG "$@" | sed -e "s@^\(.*\)\.o:@$DIR\1.d $DIR\1.o:@" 14 | -------------------------------------------------------------------------------- /stc/tests/316-array-build.task.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eu 2 | 3 | INPUT=$1 4 | N=$2 5 | 6 | if [[ ! -f ${INPUT} ]] 7 | then 8 | echo "File not found: ${INPUT}" 9 | exit 1 10 | fi 11 | 12 | for (( i=0 ; $i < $N ; i++ )) 13 | do 14 | VALUE=$RANDOM 15 | FILE=test-316-$VALUE.data 16 | echo $VALUE > $FILE 17 | echo "wrote: $FILE" 18 | done 19 | -------------------------------------------------------------------------------- /stc/tests/317-array-build.task.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eu 2 | 3 | INPUT=$1 4 | N=$2 5 | 6 | if [[ ! -f ${INPUT} ]] 7 | then 8 | echo "File not found: $INPUT" 9 | exit 1 10 | fi 11 | 12 | for (( i=0 ; $i < $N ; i++ )) 13 | do 14 | VALUE=$RANDOM 15 | FILE=test-317-$VALUE.data 16 | echo $VALUE > $FILE 17 | echo "wrote: $FILE" 18 | done 19 | -------------------------------------------------------------------------------- /stc/tests/517-external.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | 3 | app (external o) echo (string msg[]) { 4 | "echo" "msg:" msg 5 | } 6 | 7 | main { 8 | external x = echo(["hello"]); 9 | void y = x; 10 | // Check that external type is specialization of void 11 | external z = y; // This should fail typechecking 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/5696-url.swift: -------------------------------------------------------------------------------- 1 | // THIS-TEST-SHOULD-NOT-COMPILE 2 | // Check that we can't provide unmapped URL as output arg 3 | 4 | app (url o) echo(url i) 5 | { 6 | "echo" "echo:" i o; 7 | } 8 | 9 | main() { 10 | // This doesn't make sense, as we can't allocate a temporary URL 11 | url f = echo(input_url("http://www.example.com")); 12 | } 13 | -------------------------------------------------------------------------------- /stc/tests/682-make-data.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # MAKE-DATA 4 | 5 | N=$1 6 | OUTPUT=$2 7 | 8 | source helpers.sh 9 | 10 | nonempty N 11 | nonempty OUTPUT 12 | 13 | touch ${OUTPUT} ; check "Could not create output: ${OUTPUT}" 14 | 15 | for (( i=0 ; i ${OUTPUT} 19 | 20 | exit 0 21 | -------------------------------------------------------------------------------- /stc/tests/020-tuple.swift: -------------------------------------------------------------------------------- 1 | import assert; 2 | 3 | main { 4 | x, y = (2, 3); 5 | 6 | assertEqual(x, 2, "x"); 7 | assertEqual(y, 3, "y"); 8 | 9 | a, b, c = (x + y, x - y, x * y); 10 | assertEqual(a, 5, "a"); 11 | assertEqual(b, -1, "b"); 12 | assertEqual(c, 6, "c"); 13 | 14 | q = (x); 15 | assertEqual(q, x, "q"); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /stc/tests/368-structs-wait.swift: -------------------------------------------------------------------------------- 1 | // Don't support waiting on struct (for now...) 2 | // This should fail gracefully 3 | 4 | type test { 5 | string a; 6 | string b; 7 | } 8 | 9 | main { 10 | test x; 11 | 12 | wait (x) { 13 | trace("HELLO WORLD"); 14 | } 15 | 16 | x.a = "test"; 17 | x.b = "test"; 18 | } 19 | -------------------------------------------------------------------------------- /stc/tests/405-foreach-6.swift: -------------------------------------------------------------------------------- 1 | // Test the @sync loop modifier 2 | main { 3 | int A[]; 4 | A[0] = 1; 5 | A[1] = 2; 6 | 7 | @sync 8 | foreach x, i in A { 9 | trace(i, x); 10 | } 11 | 12 | A[5] = 3; 13 | A[6] = 4; 14 | 15 | @sync 16 | foreach x in A { 17 | trace(x); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /stc/tests/406-foreach-7.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | main { 4 | int A[] = [35:1000]; 5 | 6 | @sync 7 | @splitdegree=128 8 | @leafdegree=100 9 | foreach x, i in A { 10 | trace(x, i); 11 | } 12 | 13 | @sync 14 | @splitdegree=128 15 | @leafdegree=100 16 | foreach x in A { 17 | trace(x); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /stc/tests/652-typevar-err.swift: -------------------------------------------------------------------------------- 1 | // Regression test for compiler internal error where we substitute invalid 2 | // type into typevar 3 | 4 | type test { 5 | int a; 6 | int b; 7 | } 8 | 9 | puts (T t) "turbine" "0.0.0" [ 10 | "puts <>" 11 | ]; 12 | 13 | main () { 14 | test t; 15 | t.a = 1; 16 | t.b = 2; 17 | puts(t); 18 | } 19 | -------------------------------------------------------------------------------- /turbine/code/bin/turbine-read-doubles: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # TURBINE READ DOUBLES 4 | 5 | TURBINE_BIN=$( cd "$( dirname "$0" )" ; /bin/pwd ) 6 | if [ ${?} != 0 ] 7 | then 8 | echo "Could not find Turbine!" 9 | exit 1 10 | fi 11 | 12 | source $( $TURBINE_BIN/turbine -C ) 13 | 14 | $TCLSH $TURBINE_HOME/scripts/turbine-read-doubles.tcl ${*} 15 | -------------------------------------------------------------------------------- /stc/bench/suite/sweep/o-level-takeone-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PATH=$PATH:~/ExM/inst/stc/bin:~/ExM/inst/turbine/bin 4 | 5 | export TURBINE_USER_LIB=$(dirname $0)/lib 6 | 7 | export ARGS="--mu=-9 --sigma=1 --M=1000 --N=100" 8 | 9 | ../scripts/o-level-test.sh ./embarrassing_lognorm.swift ../scripts/o-level-takeone.txt ./o-level-takeone-out 10 | -------------------------------------------------------------------------------- /stc/bench/suite/wavefront/o-level-takeone-test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export PATH=$PATH:~/ExM/inst/stc/bin:~/ExM/inst/turbine/bin 4 | 5 | export TURBINE_USER_LIB=$(dirname $0)/lib 6 | 7 | ARGS="-N=400 --mu=-15 --sigma=1" 8 | 9 | export ARGS 10 | 11 | ../scripts/o-level-test.sh ./wavefront.swift ../scripts/o-level-takeone.txt ./o-level-takeone-out 12 | -------------------------------------------------------------------------------- /stc/code/src/exm/stc/jvm/runtime/LogicException.java: -------------------------------------------------------------------------------- 1 | package exm.stc.jvm.runtime; 2 | 3 | /** 4 | * Exception caused by logic error in program 5 | * @author tim armstrong 6 | * 7 | */ 8 | @SuppressWarnings("serial") 9 | public class LogicException extends Exception { 10 | public LogicException(String msg) { 11 | super(msg); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/182-globals-1.swift: -------------------------------------------------------------------------------- 1 | 2 | 3 | global const int MY_INT = 2; 4 | global const string MY_S = "hello world"; 5 | global const boolean MY_B = false; 6 | global const float MY_F = 3.14; 7 | global const float MY_NEG = -3.14; 8 | global const float DUPE_MY_INT = 2; 9 | 10 | 11 | main { 12 | trace(MY_INT, MY_S, MY_B, MY_F, MY_NEG); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /stc/tests/250-switch-1.swift: -------------------------------------------------------------------------------- 1 | 2 | main 3 | { 4 | int a; 5 | a = 1; 6 | 7 | int b; 8 | switch (a) { 9 | case 1: 10 | int c; 11 | c = a + a; 12 | b = a + 1; 13 | case 20: 14 | b = 1; 15 | case 2000: 16 | b = 2; 17 | default: 18 | b = 2102 + 2420; 19 | } 20 | trace(b); 21 | } 22 | -------------------------------------------------------------------------------- /stc/tests/550-blob-1.swift: -------------------------------------------------------------------------------- 1 | import assert; 2 | import blob; 3 | 4 | main { 5 | blob x = blob_from_string("hello world"); 6 | int res = f(x, x); 7 | assertEqual(res, 1, "res"); 8 | string msg = string_from_blob(x); 9 | assertEqual(msg, "hello world", "msg"); 10 | } 11 | 12 | 13 | (int r) f (blob x, blob y) { 14 | r = 1; 15 | } 16 | -------------------------------------------------------------------------------- /stc/tests/5612-mktemp.swift: -------------------------------------------------------------------------------- 1 | import files; 2 | 3 | string s = mktemp_string(); 4 | trace(s); 5 | 6 | (file o, void w) g() 7 | { 8 | o = mktemp(); 9 | w = trace(filename(o)); // Or Python 10 | } 11 | 12 | report(file r) 13 | { 14 | trace(filename(r)); 15 | } 16 | 17 | file f; 18 | void v; 19 | (f, v) = g(); 20 | propagate(f,v) => report(f); 21 | -------------------------------------------------------------------------------- /stc/tests/635-app.check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | IN="635-rand.tmp" 3 | OUT="635-rand-end.tmp" 4 | 5 | if [ ! -f "${OUT}" ]; then 6 | echo "${OUT} was not created" 7 | exit 1 8 | fi 9 | 10 | if diff ${IN} ${OUT} ; then 11 | rm "${IN}" "${OUT}" 12 | exit 0 13 | else 14 | echo "${OUT} did not have expected contents" 15 | exit 1 16 | fi 17 | -------------------------------------------------------------------------------- /stc/tests/806-double-warn.check.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | warn_count=$(grep "WARN" ${STC_ERR_FILE} | wc -l) 5 | 6 | echo "Warnings: $warn_count" 7 | 8 | if (( warn_count != 1 )) 9 | then 10 | echo "Expected only 1 warning in ${STC_ERR_FILE} but got ${warn_count}" 11 | cat ${STC_ERR_FILE} 12 | exit 1 13 | fi 14 | 15 | exit 0 16 | -------------------------------------------------------------------------------- /stc/tests/adlb-test-env.sh: -------------------------------------------------------------------------------- 1 | # Environment variables for ADLB tests 2 | # Reduce buffer limits to improve test coverage 3 | export ADLB_DEBUG_SYNC_BUFFER_SIZE=4 4 | export ADLB_SYNC_RECVS=3 5 | export ADLB_CLOSED_CACHE_SIZE=8 6 | 7 | # Reduce exhaust time to speed up tests and better 8 | # stress-test exhaust checking 9 | export ADLB_EXHAUST_TIME=0.01 10 | -------------------------------------------------------------------------------- /stc/tests/164-autowrap-loc-fail.swift: -------------------------------------------------------------------------------- 1 | import location; 2 | //THIS-TEST-SHOULD-NOT-COMPILE 3 | // Check that we can't give location to local task 4 | 5 | 6 | // Should be local by default 7 | f(int i) "turbine" "0.0.1" [ 8 | "puts \"HELLO <>\"" 9 | ]; 10 | 11 | main { 12 | @location=location_from_rank(0) 13 | f(0); 14 | 15 | f(1); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /stc/tests/335-arrays-runtime-error.swift: -------------------------------------------------------------------------------- 1 | 2 | // Regression test for compiler bug 3 | 4 | // Test should fail from double write 5 | // THIS-TEST-SHOULD-NOT-RUN 6 | main { 7 | int A[]; 8 | foreach i in [1:10] { 9 | // Assign array multiple times - should not be hoistedout of loop 10 | A[0] = 0; 11 | } 12 | trace(A[0]); 13 | } 14 | -------------------------------------------------------------------------------- /stc/tests/344-multidimensional-5.swift: -------------------------------------------------------------------------------- 1 | // Basic test to make sure that multidimensional arrays work 2 | 3 | main { 4 | int M[][]; 5 | int M1[]; 6 | 7 | M[0] = M1; 8 | 9 | M1[3] = 1; 10 | 11 | trace(M[0][3]); 12 | trace(M[1][3]); 13 | 14 | // Test that we can assign a more complex expression 15 | M[1] = M[0]; 16 | } 17 | --------------------------------------------------------------------------------