ACGtk issues
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues
2024-02-20T15:10:26+01:00
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/44
ACGtk user documentation - update
2024-02-20T15:10:26+01:00
COUSIN Marie
ACGtk user documentation - update
The new 'Update' section in the user documentation is not displayed the same way the remaining documentation is, I thing the formatting of code words and blocks does not work.
![ACGtk-user-doc-update](/uploads/6ea210cb52b4e5e59d967853ce9...
The new 'Update' section in the user documentation is not displayed the same way the remaining documentation is, I thing the formatting of code words and blocks does not work.
![ACGtk-user-doc-update](/uploads/6ea210cb52b4e5e59d967853ce9f0c00/ACGtk-user-doc-update.png)
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/43
"load file.acgo" pour plusieurs fichiers .acgo
2024-02-20T15:10:26+01:00
COUSIN Marie
"load file.acgo" pour plusieurs fichiers .acgo
Ce n'est plus possible sur cette nouvelle version de copier/coller plusieurs `load file.acgo` d'un seul coup :
```
ACGtk> load "deep_syntactic.acgo";
... load "semantic.acgo";
... load "dsynt_tree.acgo";
... load "dsynt_rule.acgo";
... l...
Ce n'est plus possible sur cette nouvelle version de copier/coller plusieurs `load file.acgo` d'un seul coup :
```
ACGtk> load "deep_syntactic.acgo";
... load "semantic.acgo";
... load "dsynt_tree.acgo";
... load "dsynt_rule.acgo";
... load "dsynt_para.acgo";
... load "fl.acgo";
... load "surface_syntactic.acgo";
... load "ssynt_tree.acgo";
[ERROR] Script syntax error: line 2, characters 0-4: Trailing chars at end of the line.
```
C'était possible sur l'ancienne version, maintenant je suis obligée de compiler mes fichiers dans un unique file.acgo pour le charger en une ligne (et non huit commandes distinctes) dans acg.
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/40
acgc complains that an output file is not specified
2023-09-29T11:34:10+02:00
POGODALLA Sylvain
acgc complains that an output file is not specified
`acgc` complains that an output file is not specified when only object files are provided as parameters, even if the `-o output` option is provided.
`acgc` complains that an output file is not specified when only object files are provided as parameters, even if the `-o output` option is provided.
POGODALLA Sylvain
POGODALLA Sylvain
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/38
parser messages in scripting
2023-10-04T18:59:49+02:00
POGODALLA Sylvain
parser messages in scripting
We should check:
- whether automatic check and promotion of newly generated message files is managed
- whether message generation with release profile is disabled (it can break installation if menhir changes the format of the generated m...
We should check:
- whether automatic check and promotion of newly generated message files is managed
- whether message generation with release profile is disabled (it can break installation if menhir changes the format of the generated messages)
- whether `link_deps` is the suitable way to handle messages check
Vincent Tourneur
Vincent Tourneur
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/37
Missing interface files for errors.ml files
2023-09-20T14:35:02+02:00
POGODALLA Sylvain
Missing interface files for errors.ml files
Files [src/scripting/errors.ml](src/scripting/errors.ml), [src/acg-data/errors.ml](src/acg-data/errors.ml), and [src/grammars/errors.ml](src/grammars/errors.ml) are missing their (documented !:-)interface files.
Documentation of [src/ut...
Files [src/scripting/errors.ml](src/scripting/errors.ml), [src/acg-data/errors.ml](src/acg-data/errors.ml), and [src/grammars/errors.ml](src/grammars/errors.ml) are missing their (documented !:-)interface files.
Documentation of [src/utils/error.mli](src/utils/error.mli) would be welcome too.
Vincent Tourneur
Vincent Tourneur
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/36
Combining < and |
2023-09-20T14:35:02+02:00
POGODALLA Sylvain
Combining < and |
When we try to combine `<` and `|`, we get the following error:
```
ACGtk> parse lexicon=yield_TAG type=S < "John + kicked + the + bucket : string" | realize lexicons=sem_TAG
[ERROR] Script syntax error: line 1, characters 74-75: Unknow...
When we try to combine `<` and `|`, we get the following error:
```
ACGtk> parse lexicon=yield_TAG type=S < "John + kicked + the + bucket : string" | realize lexicons=sem_TAG
[ERROR] Script syntax error: line 1, characters 74-75: Unknown error
```
where `characters 74-75` corresponds to `|`.
Vincent Tourneur
Vincent Tourneur
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/35
Separate compilation causes not listed data
2023-09-29T10:59:56+02:00
POGODALLA Sylvain
Separate compilation causes not listed data
[sig.acg](/uploads/1ccef72ea1bcfc8bfbd9080031b36e29/sig.acg)
[lex.acg](/uploads/459392827d57db0fdc902de72aa848b8/lex.acg)
1. When compiling the above files with:
```
acgc sig.acg lex.acg
```
the `lex.acgo` file is generated....
[sig.acg](/uploads/1ccef72ea1bcfc8bfbd9080031b36e29/sig.acg)
[lex.acg](/uploads/459392827d57db0fdc902de72aa848b8/lex.acg)
1. When compiling the above files with:
```
acgc sig.acg lex.acg
```
the `lex.acgo` file is generated.
We can then run `acg` and the following commands:
```
ACGtk> load "lex.acgo"
ACGtk> list
```
We get (as expected):
```
lexicon Lex(SigOne): SigTwo
signature SigOne
signature SigTwo
```
2. When compiling the above files with:
```
acgc sig.acg
```
```
acgc sig.acgo lex.acg
```
the `sig.acgo` and `lex.acgo` files are generated.
We can then run `acg` and the following commands:
```
ACGtk> load "lex.acgo"
ACGtk> list
```
We now only get:
```
lexicon Lex(SigOne): SigTwo
```
This behavior makes sense (to a certain extent only), but it might be worth issuing a warning.
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/34
print command
2023-09-27T10:00:06+02:00
POGODALLA Sylvain
print command
The `print` command only applies to lexicons. Is there a reason why it does not apply to signatures anymore?
The `print` command only applies to lexicons. Is there a reason why it does not apply to signatures anymore?
Vincent Tourneur
Vincent Tourneur
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/33
Unknown error
2023-09-23T23:01:35+02:00
POGODALLA Sylvain
Unknown error
When a script file contains two commands and the separating `;` is missing (as in the following example):
```
list
list
```
`acg` raises the following error:
```
[ERROR] Script syntax error: file "test-script", line 2, character 4: Unkn...
When a script file contains two commands and the separating `;` is missing (as in the following example):
```
list
list
```
`acg` raises the following error:
```
[ERROR] Script syntax error: file "test-script", line 2, character 4: Unknown error
```
Vincent Tourneur
Vincent Tourneur
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/32
error message 'The function "funct" can't be called here'
2023-10-05T16:15:15+02:00
POGODALLA Sylvain
error message 'The function "funct" can't be called here'
This error message (triggered by InvalidFunctionType) is not informative enough.
For instance, it is raised when running:
```
parse lexicon=Lex type=S "the_term:its_type"
```
instead of:
```
parse lexicon=Lex type=S < "the_term:its_type"...
This error message (triggered by InvalidFunctionType) is not informative enough.
For instance, it is raised when running:
```
parse lexicon=Lex type=S "the_term:its_type"
```
instead of:
```
parse lexicon=Lex type=S < "the_term:its_type"
```
Vincent Tourneur
Vincent Tourneur
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/31
resizing terminal
2023-10-04T19:38:22+02:00
POGODALLA Sylvain
resizing terminal
When running `acg` with a script file argument, resizing terminal is not triggered (it is part of the `welcome_msg` output function, which, for some reason, is not triggered either).
It seems to me that resizing is not necessary if stdin...
When running `acg` with a script file argument, resizing terminal is not triggered (it is part of the `welcome_msg` output function, which, for some reason, is not triggered either).
It seems to me that resizing is not necessary if stdin is not a tty. It should be in any other case. Moreover, if stdout is redirected to a file, then we could set the formatter margins to a very large number.
Vincent Tourneur
Vincent Tourneur
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/30
The -s option does not seem to do what the help message says
2023-10-04T19:48:37+02:00
POGODALLA Sylvain
The -s option does not seem to do what the help message says
Assume a `test.acgs` script file:
```
help;
list;
help;
```
Then
```
acg -s test.acgs
```
will run the 3 commands in a row.
Moreover, for commands outputting some result (such as `parse`), an interaction seems to be needed after the res...
Assume a `test.acgs` script file:
```
help;
list;
help;
```
Then
```
acg -s test.acgs
```
will run the 3 commands in a row.
Moreover, for commands outputting some result (such as `parse`), an interaction seems to be needed after the result being output.
Vincent Tourneur
Vincent Tourneur
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/29
Lose information from exception backtrace
2023-03-27T17:28:15+02:00
POGODALLA Sylvain
Lose information from exception backtrace
After commit 3a59ea0541f89a615abc2161a95e73551e8da2d1, some information about the exception trace is lost. For instance, instead of
```
ACGtk> list-terms logic t | parse sem_real Sentence;
acg: internal error, uncaught exception:
Ut...
After commit 3a59ea0541f89a615abc2161a95e73551e8da2d1, some information about the exception trace is lost. For instance, instead of
```
ACGtk> list-terms logic t | parse sem_real Sentence;
acg: internal error, uncaught exception:
UtilsLib.SharedForest.Make(W).No_next_alt
Raised at UtilsLib__SharedForest.Make.swap in file "src/utils/sharedForest.ml", line 304, characters 17-34
Called from UtilsLib__SharedForest.Make.resume in file "src/utils/sharedForest.ml", line 673, characters 6-14
Called from AcgData__Acg_lexicon.Data_Lexicon.get_analysis in file "src/acg-data/acg_lexicon.ml", line 508, characters 14-58
Called from Dune__exe__Functions.resume_to_lazy_list in file "src/scripting/functions.ml", line 16, characters 8-38
Called from Dune__exe__Functions.fun_parse.fun_parse_aux in file "src/scripting/functions.ml", line 74, characters 4-41
Called from Dune__exe__Functions.make_no_env_fun in file "src/scripting/functions.ml" (inlined), line 24, characters 21-30
Called from Dune__exe__Functions.parse in file "src/scripting/functions.ml", line 82, characters 112-137
Called from Dune__exe__Interpreter.interactive in file "src/scripting/interpreter.ml", line 65, characters 36-82
Called from Dune__exe__Acg.interactive.interactive_rec in file "src/scripting/acg.ml", line 63, characters 10-37
Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 24, characters 19-24
Called from Cmdliner_eval.run_parser in file "cmdliner_eval.ml", line 34, characters 37-44
```
we get
```
ACGtk> list-terms logic t | parse sem_real Sentence;
acg: internal error, uncaught exception:
UtilsLib.SharedForest.Make(W).No_next_alt
Raised at UtilsLib__Error.print_error in file "src/utils/error.ml", line 42, characters 9-16
Called from Dune__exe__Interpreter.interactive in file "src/scripting/interpreter.ml", line 72, characters 9-37
Called from Dune__exe__Acg.interactive.interactive_rec in file "src/scripting/acg.ml", line 63, characters 10-37
Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 24, characters 19-24
Called from Cmdliner_eval.run_parser in file "cmdliner_eval.ml", line 34, characters 37-44
```
So most of the relevant part is lost.
Vincent Tourneur
Vincent Tourneur
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/28
Add a help command in acg
2023-04-03T15:41:11+02:00
POGODALLA Sylvain
Add a help command in acg
A `help` command would be quite useful:
```
ACGtk> help
[ERROR] Unknown function help.
```
For commands as well:
```
ACGtk> load help
[ERROR] Expecting a string for parameter path.
ACGtk> load --help
[ERROR] Lexing error.
```
A `help` command would be quite useful:
```
ACGtk> help
[ERROR] Unknown function help.
```
For commands as well:
```
ACGtk> load help
[ERROR] Expecting a string for parameter path.
ACGtk> load --help
[ERROR] Lexing error.
```
Vincent Tourneur
Vincent Tourneur
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/27
Uniformative lexing error in acg
2023-10-04T19:48:59+02:00
POGODALLA Sylvain
Uniformative lexing error in acg
When quotes are missing around string arguments, a lexing error is raised, but is not informative enough:
```
ACGtk> load path=Jean-regarde-telescope.acg
[ERROR] Lexing error.
```
When quotes are missing around string arguments, a lexing error is raised, but is not informative enough:
```
ACGtk> load path=Jean-regarde-telescope.acg
[ERROR] Lexing error.
```
Vincent Tourneur
Vincent Tourneur
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/26
Exception not caught in acg
2023-03-31T17:59:52+02:00
POGODALLA Sylvain
Exception not caught in acg
When running `acg` and a command that use a lexicon which was not loaded, an exception is raised but not caught.
Example:
```
ACGtk> "Jean + regarde + un + homme + avec + un + telescope:string" | parse lexicon=CFG type= S | limit 10
acg...
When running `acg` and a command that use a lexicon which was not loaded, an exception is raised but not caught.
Example:
```
ACGtk> "Jean + regarde + un + homme + avec + un + telescope:string" | parse lexicon=CFG type= S | limit 10
acg: internal error, uncaught exception:
AcgData.Environment.Environment.Entry_not_found("CFG")
(...)
```
Vincent Tourneur
Vincent Tourneur
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/25
"Failure: bug" when trying to assign a value to a macro in a lexicon
2022-10-27T13:04:15+02:00
Vincent Tourneur
"Failure: bug" when trying to assign a value to a macro in a lexicon
When compiling this file [example-bug-macro.acg](/uploads/4795af9d6e9eb4af584ea29660e2f013/example-bug-macro.acg), `acgc` throws this uncaught exception :
```
Parsing "deep-syntactic.acg"...
acgc: internal error, uncaught exception:
...
When compiling this file [example-bug-macro.acg](/uploads/4795af9d6e9eb4af584ea29660e2f013/example-bug-macro.acg), `acgc` throws this uncaught exception :
```
Parsing "deep-syntactic.acg"...
acgc: internal error, uncaught exception:
Failure("Bug: Trying to add a rule that does not correspond to a constant")
```
The error is at line 17 in the lexicon, because we try to assign a value to a macro (defined in a signature at line 5).
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/24
Pretty-printer folds binders but parser can't parse it
2022-05-03T17:51:16+02:00
Vincent Tourneur
Pretty-printer folds binders but parser can't parse it
This term :
```
lambda x y. Ex a. Ex b. x a & y b
```
is printed :
```
lambda x y. Ex a b. x a & y b
```
The pretty-printer folds the binder syntax, as it does with function variables. But the parser can't parse this syntax and will giv...
This term :
```
lambda x y. Ex a. Ex b. x a & y b
```
is printed :
```
lambda x y. Ex a b. x a & y b
```
The pretty-printer folds the binder syntax, as it does with function variables. But the parser can't parse this syntax and will give an error.
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/23
[DL_PARSER] Going menhir and weighted latent-annotated Datalog
2022-03-29T14:28:46+02:00
LUDMANN Pierre
[DL_PARSER] Going menhir and weighted latent-annotated Datalog
I think I want to settle the syntax for weighted latent-annotated Datalog as follows:
```
w::A0[h0](...) :- A1[h1](...), ..., An[hn](...).
```
Typing in a weight `w` or a state `h` would be optional.
Also, we could keep the arity hint wi...
I think I want to settle the syntax for weighted latent-annotated Datalog as follows:
```
w::A0[h0](...) :- A1[h1](...), ..., An[hn](...).
```
Typing in a weight `w` or a state `h` would be optional.
Also, we could keep the arity hint with the slash; preferably closer to the predicate symbol than after the state (so `A/n[h]`).
Looking at `menhir` documentation, I draft the following `.mly` where *semantic actions* are missing for the moment.
```ocaml
%token <int> WEIGHT
%token DBLCOL
%token <string> PRED
%token SLASH
%token <int> ARITY
%token LBRA
%token <int> STATE
%token RBRA
%token LPAR
%token <string> VAR
%token COMMA
%token <int> CONST
%token RPAR
%token FROM
%token DOT
%token EOI
%token QUEST
%start program
%%
program:
| EOI
| fact; program
| rule; program
;
rule:
| (~=weight; DBLCOL)?;
head=atom;
FROM; body=separated_list(COMMA, atom);
DOT
;
atom: p=PRED; (SLASH; n=ARITY)?; (LBRA; q=STATE; RBRA)?; LPAR; param=separated_list(COMMA, term); RPAR
;
term:
| ~=VAR
| ~=CONST
;
edb: edb=(fact*); EOI
;
fact: p=PRED; (SLASH; n=ARITY)?; (LBRA; q=STATE; RBRA)?; LPAR; param=separated_list(COMMA, CONST); RPAR
;
query: atom; QUEST
;
```
https://gitlab.inria.fr/ACG/dev/ACGtk/-/issues/22
Failure("lexing: empty token") when a parsing command does not end with a ';'
2021-02-09T18:19:55+01:00
POGODALLA Sylvain
Failure("lexing: empty token") when a parsing command does not end with a ';'
When a parsing command that does not end with a `;` in a file that is loaded by acg, an uncaught exception is raised.
Note that if using redirection `<`, nothing happens.
MWE: using the [montague.acg](https://gitlab.inria.fr/ACG/dev/AC...
When a parsing command that does not end with a `;` in a file that is loaded by acg, an uncaught exception is raised.
Note that if using redirection `<`, nothing happens.
MWE: using the [montague.acg](https://gitlab.inria.fr/ACG/dev/ACGtk/-/blob/master/examples/montague.acg) file provided in the example directory and the following script file:
```
$ cat ~/tmp/test2
syntactic_realisation realize LOVE MARY JOHN : s
```
we get:
```
$ acg ~/tmp/test2
Welcome to the ACG toplevel
Version 1.5.2-20201204
©INRIA 2008-2021
Please send your comments or bug reports or feature requests to sylvain.pogodalla@inria.fr
Type
help;
to get help.
Parsing script file "/home/pogodall/tmp/test2"...
acg: internal error, uncaught exception:
Failure("lexing: empty token")
Raised by primitive operation at Stdlib__lexing.engine in file "lexing.ml", line 65, characters 15-37
Called from Scripting__Script_lexer.__ocaml_lex_string_rec in file "src/scripting/script_lexer.ml", line 2457, characters 8-65
Called from MenhirLib.Engine.Make.lexer_lexbuf_to_supplier in file "lib/pack/menhirLib.ml", line 1675, characters 18-30
Called from MenhirLib.Engine.Make.loop_handle in file "lib/pack/menhirLib.ml", line 1732, characters 21-27
Called from Scripting__Parse_functions.parse_file in file "src/scripting/parse_functions.ml", line 41, characters 22-274
Called from Stdlib__list.fold_left in file "list.ml", line 121, characters 24-34
Called from Acg.parse_files in file "src/scripting/acg.ml", line 97, characters 6-114
Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 25, characters 19-24
Called from Cmdliner.Term.run in file "cmdliner.ml", line 117, characters 32-39
```
POGODALLA Sylvain
POGODALLA Sylvain