-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '1.2' of https://github.com/PLTools/Lama into blonded04/…
…readme-installation-fixes
- Loading branch information
Showing
43 changed files
with
5,286 additions
and
3,501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,37 @@ | ||
name: Build | ||
name: Main workflow | ||
|
||
on: | ||
pull_request: | ||
push: | ||
paths-ignore: | ||
- 'README.md' | ||
branches: | ||
- '1.10' | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
#- macos-latest | ||
- ubuntu-20.04 | ||
#- windows-latest | ||
ocaml-version: | ||
#- 4.11.0 | ||
- 4.10.1 | ||
#- 4.09.1 | ||
#- 4.08.1 | ||
- ubuntu-latest | ||
ocaml-compiler: | ||
- 4.13.1 | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Use OCaml ${{ matrix.ocaml-version }} | ||
uses: avsm/setup-ocaml@v1 | ||
- name: Checkout tree | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set-up OCaml ${{ matrix.ocaml-compiler }} | ||
uses: ocaml/setup-ocaml@v2 | ||
with: | ||
ocaml-version: ${{ matrix.ocaml-version }} | ||
ocaml-compiler: ${{ matrix.ocaml-compiler }} | ||
|
||
- run: opam pin add Lama.dev . --no-action | ||
- run: opam depext Lama.dev --yes --with-test | ||
- run: opam install . --deps-only --with-test | ||
- run: opam exec -- make #dune build | ||
- run: opam exec -- make regression # dune runtest | ||
- run: eval $(opam env) | ||
- run: opam exec -- make | ||
- run: opam exec -- make regression-all | ||
- run: opam exec -- make unit_tests | ||
- run: opam exec -- make negative_scenarios_tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
*.o | ||
.merlin | ||
|
||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,35 @@ | ||
opam-version: "2.0" | ||
version: "1.10" | ||
version: "1.2" | ||
|
||
synopsis: "Lama programming system" | ||
synopsis: "Lama programming language" | ||
maintainer: "[email protected]" | ||
authors: "[email protected]" | ||
homepage: "https://github.com/JetBrains-Research/Lama" | ||
bug-reports: "https://github.com/JetBrains-Research/Lama/issues" | ||
authors: [ | ||
"Dmitry Boulytchev <[email protected]>" | ||
"Daniil Berezun <[email protected]>" | ||
"Egor Sheremetov <[email protected]>" | ||
] | ||
homepage: "https://github.com/PLTools/Lama" | ||
bug-reports: "https://github.com/PLTools/Lama/issues" | ||
|
||
depends: [ | ||
"ocaml" { >= "4.07.1" } | ||
"ocaml" { >= "4.13.1" } | ||
"ocamlfind" { build } | ||
"camlp5" { >= "8.00.05" } | ||
"ostap" { >= "0.5"} | ||
"GT" { >= "0.5.0" } | ||
"GT" { >= "0.5.1" } | ||
] | ||
|
||
build: [ | ||
[make] | ||
[make "regression"] {with-test} | ||
[make "regression-all"] {with-test} | ||
] | ||
install: [make "install"] | ||
|
||
depexts: [ | ||
["gcc-multilib"] {os-family = "debian"} | ||
] | ||
|
||
dev-repo: "git+https://github.com/JetBrains-Research/Lama.git" | ||
dev-repo: "git+https://github.com/PLTools/Lama.git" | ||
url { | ||
src: "git+https://github.com/JetBrains-Research/Lama.git#1.10+ocaml4.10" | ||
src: "git+https://github.com/PLTools/Lama.git#1.20" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
FLAGS=-m32 -g2 -fstack-protector-all | ||
|
||
all: byterun.o | ||
$(CC) -m32 -g -o byterun byterun.o ../runtime/runtime.a | ||
$(CC) $(FLAGS) -o byterun byterun.o ../runtime/runtime.a | ||
|
||
byterun.o: byterun.c | ||
$(CC) -g -fstack-protector-all -m32 -c byterun.c | ||
$(CC) $(FLAGS) -g -c byterun.c | ||
|
||
clean: | ||
$(RM) *.a *.o *~ | ||
$(RM) *.a *.o *~ byterun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(lang dune 3.3) | ||
|
||
(cram enable) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
TESTS=$(sort $(basename $(wildcard test*.lama))) | ||
DEBUG_FILES=stack-dump-before data-dump-before extra-roots-dump-before heap-dump-before stack-dump-after data-dump-after extra-roots-dump-after heap-dump-after | ||
TESTS=$(sort $(filter-out test111, $(basename $(wildcard test*.lama)))) | ||
|
||
LAMAC=../src/lamac | ||
|
||
.PHONY: check $(TESTS) | ||
|
||
check: $(TESTS) | ||
|
||
check: ctest111 $(TESTS) | ||
|
||
$(TESTS): %: %.lama | ||
@echo $@ | ||
cat $@.input | LAMA=../runtime $(LAMAC) -i $< > $@.log && diff $@.log orig/$@.log | ||
cat $@.input | LAMA=../runtime $(LAMAC) -ds -s $< > $@.log && diff $@.log orig/$@.log | ||
LAMA=../runtime $(LAMAC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log | ||
@echo "regression/$@" | ||
@cat $@.input | LAMA=../runtime $(LAMAC) -i $< > $@.log && diff $@.log orig/$@.log | ||
@cat $@.input | LAMA=../runtime $(LAMAC) -ds -s $< > $@.log && diff $@.log orig/$@.log | ||
@LAMA=../runtime $(LAMAC) $< && cat $@.input | ./$@ > $@.log && diff $@.log orig/$@.log | ||
|
||
ctest111: | ||
@echo "regression/test111" | ||
@LAMA=../runtime $(LAMAC) test111.lama && cat test111.input | ./test111 > test111.log && diff test111.log orig/test111.log | ||
|
||
clean: | ||
$(RM) test*.log *.s *~ $(TESTS) *.i | ||
$(RM) test*.log *.s *.sm *~ $(TESTS) *.i $(DEBUG_FILES) test111 | ||
$(MAKE) clean -C expressions | ||
$(MAKE) clean -C deep-expressions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
97 | ||
98 | ||
99 | ||
100 | ||
97 | ||
98 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Std; | ||
|
||
fun printString (s) { | ||
var i; | ||
for i := 0, i < s.length, i := i + 1 do | ||
write (s[i]) | ||
od | ||
} | ||
|
||
fun printListConcat ( str_list ) { | ||
printString (stringcat ( str_list )) | ||
} | ||
|
||
var l = { "a" , "b" , "c" , "d" }; | ||
printListConcat (l); | ||
|
||
l := { "ab" }; | ||
printListConcat (l); | ||
|
||
l := {}; | ||
printListConcat (l) |
Oops, something went wrong.