Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
8ad9cf1
Add flag and stubs for compiling to LPGF format
johnjcamilleri Jan 19, 2021
93b81b9
Add first version of LPGF datatype, with linearization function and s…
johnjcamilleri Jan 22, 2021
cd5881d
Early work on LPGF compiler
johnjcamilleri Jan 22, 2021
f24c503
Strip down format. More early work on compiler. Add testsuite (doesn'…
johnjcamilleri Jan 25, 2021
32b0860
Make LPGF testsuite work (but still fails)
johnjcamilleri Jan 25, 2021
270e7f0
Add binary instances
johnjcamilleri Jan 25, 2021
6f622b4
Rename Zero grammar to Walking
johnjcamilleri Jan 26, 2021
cead0cc
Add selection and projection cases but not working
johnjcamilleri Jan 26, 2021
fe15aa0
Use canonical GF in LPGF compiler
johnjcamilleri Feb 1, 2021
2a58500
Correctly handle projection, but only in limited cases
johnjcamilleri Feb 1, 2021
c94bffe
Generalise testsuite script to use treebank files, add FoodEng
johnjcamilleri Feb 2, 2021
d09838e
Separate .trees and .treebank, and add a script for making the latter…
johnjcamilleri Feb 2, 2021
153bffd
Support nested parameters, but fails with non-static values (see Food…
johnjcamilleri Feb 2, 2021
132f693
Minor cleanup
johnjcamilleri Feb 3, 2021
42b9e70
Support dynamic param values
johnjcamilleri Feb 3, 2021
34f0fc0
Fix bug in dynamic parameter handling, compile FoodsBul successfully
johnjcamilleri Feb 3, 2021
9c2d8eb
Add FoodsChi, FoodsHeb to LPGF testsuite
johnjcamilleri Feb 9, 2021
d5f6897
Add FoodsSwe (fails)
johnjcamilleri Feb 9, 2021
a12f58e
Add test case for selection using records (fails)
johnjcamilleri Feb 10, 2021
8cfaa69
Handle record tables, pass FoodSwe in testsuite
johnjcamilleri Feb 12, 2021
98f6136
Add support for BIND
johnjcamilleri Feb 12, 2021
a58a6c8
Add FoodsFin to testsuite (fails)
johnjcamilleri Feb 12, 2021
d563abb
Minors
johnjcamilleri Feb 12, 2021
1098226
Pass test with FoodsFin, by forcibly resorting record fields to make …
johnjcamilleri Feb 14, 2021
4f0abe5
Add FoodsFre, fails because pre is not implemented
johnjcamilleri Feb 15, 2021
4d1217b
Add support for pre
johnjcamilleri Feb 15, 2021
23e49cd
Add support for SOFT_BIND (which PGF runtime doesn't support)
johnjcamilleri Feb 16, 2021
21f14c2
Add support for SOFT_SPACE
johnjcamilleri Feb 16, 2021
d394cac
Add support for CAPIT and ALL_CAPIT
johnjcamilleri Feb 16, 2021
398b294
Use Data.Text instead of String. Rename Abstr to Abstract, Concr to C…
johnjcamilleri Feb 16, 2021
7227ede
WIP return type from val2lin for use in projection case
johnjcamilleri Feb 16, 2021
4c06c3f
Add case for when pre is not followed by anything
johnjcamilleri Feb 16, 2021
2d03b9e
Finish type passing in val2lin, generalise projection case and pass F…
johnjcamilleri Feb 16, 2021
312cfeb
Add Afr, Amh, Cat, Cze, Dut, Ger foods grammars to testsuite
johnjcamilleri Feb 16, 2021
d5cf00f
Add and pass all Foods languages, except Jpn
johnjcamilleri Feb 16, 2021
5be21db
Add and pass FoodsJpn
johnjcamilleri Feb 16, 2021
29114ce
Improve binary format, reducing Foods.lpgf from 300 to 73KB (4x small…
johnjcamilleri Feb 16, 2021
768c3d9
Include return types for params, records, pre
johnjcamilleri Feb 16, 2021
236dbdb
Minor tidying
johnjcamilleri Feb 16, 2021
d3988f9
writePGF et al. functions return path[s] of written files
johnjcamilleri Feb 17, 2021
6a7ead0
Add benchmark for comparing PGF and LPGF
johnjcamilleri Feb 17, 2021
b4fce5d
Use envvars in benchmark for controlling PGF/LPGF. Add readme.
johnjcamilleri Feb 17, 2021
8e1fa49
Add memory stats to benchmark
johnjcamilleri Feb 17, 2021
9a26345
Add PFG2 linearisation to benchmark
johnjcamilleri Feb 17, 2021
7a5bc2d
Separate compile/run in benchmark
johnjcamilleri Feb 17, 2021
d8557e8
Enable debug output to files with envvar DEBUG=1
johnjcamilleri Feb 18, 2021
866a210
When projecting a non-existent field, return Prelude.False
johnjcamilleri Feb 18, 2021
e607952
Remove ParamAliasDefs by inlining their definitions
johnjcamilleri Feb 18, 2021
5240749
Make grammar and trees files command line arguments into benchmark sc…
johnjcamilleri Feb 18, 2021
625386a
Force evaluation in benchmark linearisation
johnjcamilleri Feb 18, 2021
51e5438
Add support for wildcards when specifying modules names in benchmark …
johnjcamilleri Feb 18, 2021
2b0493e
Tweak memory reporting and strictness in benchmark
johnjcamilleri Feb 19, 2021
023b505
Write LPGF dump to file when DEBUG is set, rather than console
johnjcamilleri Feb 19, 2021
505c12c
Rename run.hs to test.hs
johnjcamilleri Feb 19, 2021
9f3f413
Grammar and languages to run in testsuite can be specified by command…
johnjcamilleri Feb 19, 2021
5ad5789
Filter out record fields which don't exist in lintype
johnjcamilleri Feb 19, 2021
dca2eba
Add Phrasebook to testsuite. Move grammars into subfolders. Add run-b…
johnjcamilleri Feb 20, 2021
9942908
Add unit test for missing lins
johnjcamilleri Feb 21, 2021
b4a393a
Pass missing unit test
johnjcamilleri Feb 21, 2021
20290be
Add Params2 unit test, from problem uncovered in PhrasebookGer
johnjcamilleri Feb 22, 2021
8324ad8
Add pretty-printing of LPGF grammars, to help debugging
johnjcamilleri Feb 26, 2021
6a5d735
Reduce Params2 unittest (still fails)
johnjcamilleri Feb 26, 2021
9785f83
Reduce Params2 further
johnjcamilleri Feb 26, 2021
4771d9c
WIP params
johnjcamilleri Feb 26, 2021
f42b5ec
More work on params, but Foods fails now
johnjcamilleri Feb 26, 2021
83bc3c9
More work on params: pass all tests except params1 (!)
johnjcamilleri Feb 27, 2021
33e0e98
Add 1-tree treebank for Phrasebook in a few languages
johnjcamilleri Feb 27, 2021
4c09e4a
Remove LF prefix from constructors. Pass all unit tests and Foods aga…
johnjcamilleri Mar 3, 2021
997d7c1
Use ErrorMonad instead of IOE
johnjcamilleri Mar 3, 2021
a8e3dc8
Improve mkTreebank script. Add 100-tree Phrasebook treebank. Improve …
johnjcamilleri Mar 3, 2021
3beed2c
Replace list comprehension lookups with maps. Halfway through transit…
johnjcamilleri Mar 3, 2021
adc162b
Pass all unit tests and Foods again, with new strategy. Cleanup.
johnjcamilleri Mar 3, 2021
4082c00
Extract token strings and put them in map which linfuns refer to by i…
johnjcamilleri Mar 3, 2021
30b0160
Also store Pre prefixes in token map. Introduce IntMapBuilder data st…
johnjcamilleri Mar 4, 2021
0ba0438
Add a little colour to benchmark output
johnjcamilleri Mar 4, 2021
f5886bf
Add more complex param/table unit tests and pass them. Still fails on…
johnjcamilleri Mar 4, 2021
94f76b9
Add more tests to Params5 which cause it to fail again
johnjcamilleri Mar 4, 2021
bca1e22
New handling of tables, works for all tests but Phrasebook still fails
johnjcamilleri Mar 4, 2021
70581c2
Improve base case in table handling, cleanup. Add run-phrasebook scri…
johnjcamilleri Mar 4, 2021
575a746
Add LPGF function for catching errors. Manual fixes to Phrasebook tre…
johnjcamilleri Mar 5, 2021
0d4659f
Add workaround for missing param defs. Add links to gf-core issues in…
johnjcamilleri Mar 5, 2021
dbf369a
Make removal of record fields recursive. Latest results with Phrasebook:
johnjcamilleri Mar 5, 2021
0f4b349
Remove old commented code
johnjcamilleri Mar 5, 2021
785d606
Fix lin2string and pass all unittests and Phrasebook
johnjcamilleri Mar 8, 2021
c76efcf
Use C runtime in mkTreebank script
johnjcamilleri Mar 8, 2021
fd07946
Remove commented line
johnjcamilleri Mar 8, 2021
3e9d128
Switch to 10000-tree Phrasebook treebank. All errors to do with missi…
johnjcamilleri Mar 8, 2021
99abb9b
Add Phrasebook benchmark snippet to LPGF README
johnjcamilleri Mar 8, 2021
126b61e
Merge branch 'master' into lpgf
johnjcamilleri Mar 8, 2021
8f5033e
Add notes on profiling
johnjcamilleri Mar 9, 2021
6c6a201
Introduce state with Map for caching compilation, but results are worse
johnjcamilleri Mar 12, 2021
c9f0867
Remove state Map from compilation
johnjcamilleri Mar 12, 2021
d9c37fc
Minors to LPGF readme
johnjcamilleri Mar 12, 2021
f900ea3
Don't process impossible values at all (not even for finding their ty…
johnjcamilleri Mar 16, 2021
2d06685
Add unit test for literals (fails)
johnjcamilleri Mar 22, 2021
f7df62a
Add support for literals
johnjcamilleri Mar 22, 2021
d0c27cd
Make GF.Grammar.Canonical.Id a type synonym for GF.Infra.Ident.RawIdent
johnjcamilleri Apr 6, 2021
c1af405
Add some stuff to gitignore
johnjcamilleri Apr 30, 2021
4bd26ea
Merge branch 'master' into lpgf
johnjcamilleri Jul 7, 2021
2be54ff
Update ConcreteNew, RConcrete in gf.cabal
johnjcamilleri Jul 7, 2021
045def6
Merge branch 'master' into lpgf
johnjcamilleri Jul 7, 2021
2b8d792
Updates to cabal file
johnjcamilleri Jul 7, 2021
7b06378
Add explicit exports to LPGF module
johnjcamilleri Jul 7, 2021
d641608
Move some definitions into LPGF.Internal, clean up public API.
johnjcamilleri Jul 8, 2021
7dc396e
Merge branch 'master' into lpgf
johnjcamilleri Jul 8, 2021
2315641
Don't build benchmarks in CI
johnjcamilleri Jul 8, 2021
89a01d8
Add ghc-prim to build-depends for LPGF testsuite
johnjcamilleri Jul 8, 2021
d6e26e0
Do not run lpgf tests in CI, since they require RGL
johnjcamilleri Jul 8, 2021
c02a3e0
Merge branch 'master' into lpgf
johnjcamilleri Jul 8, 2021
639f1f0
Cabal file fixes. Fix tests in CI with cabal too.
johnjcamilleri Jul 8, 2021
e681e4d
Remove --show-details flag in CI/cabal
johnjcamilleri Jul 8, 2021
1b8a9b3
Remove auto/wagen variant from PhrasebookGer
johnjcamilleri Jul 22, 2021
e2ed512
Merge branch 'master' into lpgf
johnjcamilleri Aug 1, 2021
42bdee1
Remove workarounds for bugs in canonical format
johnjcamilleri Aug 4, 2021
b96fa7e
Add more unit tests for missing lin functions
johnjcamilleri Aug 10, 2021
48dba4a
Pass all missing test cases, including Phrasebook, except PhrasebookSnd
johnjcamilleri Aug 10, 2021
1ce1cea
Add bounds check (probably unnecessary)
johnjcamilleri Aug 10, 2021
b47eb18
Minor additions to LPGF readme
johnjcamilleri Aug 27, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions .github/workflows/build-all-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ jobs:

- name: Build
run: |
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
cabal build all
cabal configure --enable-tests --test-show-details=direct
cabal build

# - name: Test
# run: |
# cabal test all
- name: Test
run: |
PATH="$PWD/dist/build/gf:$PATH" cabal test gf-tests

stack:
name: stack / ghc ${{ matrix.ghc }}
Expand Down Expand Up @@ -88,9 +88,8 @@ jobs:

- name: Build
run: |
stack build --system-ghc --stack-yaml stack-ghc${{ matrix.ghc }}.yaml
# stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
stack build --system-ghc --stack-yaml stack-ghc${{ matrix.ghc }}.yaml --test --no-run-tests

- name: Test
run: |
stack test --system-ghc --stack-yaml stack-ghc${{ matrix.ghc }}.yaml
stack test --system-ghc --stack-yaml stack-ghc${{ matrix.ghc }}.yaml gf:test:gf-tests
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*.jar
*.gfo
*.pgf
*.lpgf
debian/.debhelper
debian/debhelper-build-stamp
debian/gf
Expand Down Expand Up @@ -48,7 +49,7 @@ src/runtime/java/.libs/
src/runtime/python/build/
.cabal-sandbox
cabal.sandbox.config
.stack-work
.stack-work*
DATA_DIR

stack*.yaml.lock
Expand All @@ -73,3 +74,10 @@ doc/icfp-2012.html
download/*.html
gf-book/index.html
src/www/gf-web-api.html

DEBUG/
PROF/
*.aux
*.hp
*.prof
*.ps
Loading