Unexpected grammar image/ACE mismatch message

(This will sound like I simply am wrong about which files I used, but I think I am not because I double checked, so I want to post this.)

I am trying to work with ACE source code, so I am compiling it on a linux machine. I got the source code first from svn co http://sweaglesw.org/svn/ace/trunk and then, after I encountered the issue described below, also by clicking on the link http://sweaglesw.org/linguistics/ace/download/ace-0.9.34.tar.gz

I then compiled repp and ace itself, and on linux this seems to work. However then when I tried to parse a sentence I got the familiar grammar image/ACE mismatch message:

version mismatch: this is ACE version 0.9.30, but this grammar image was compiled by ACE version 0.9.34

When I recompiled the grammar, the issue went away but I don’t understand why it says the ACE version is 0.9.30 when I am clicking on 0.9.34 link? First I thought, maybe in the trunk it’s still 0.9.30, but would the link also be wrong?

You can check what version of ACE you are compiling (specifically the string used for that check) by looking in the version.h file. If the source tree was used previously for an older ACE and then “svn update” was used, you could keep getting the old version if you didn’t “make clean”, but otherwise I don’t see how the executable you produced could have a different version than the version.h file. You can check the compiled ace version with “./ace --version” though. Did you run it directly out of the compiler location like that or did you install it to some bin directory?

1 Like

UPDATE: I am now getting the same behavior when debugging and when not debugging, finally, which is good (I fixed the way I was trying to pass VS Code the arguments; a simple rookie mistake). However, it is still the “version mismatch” error message, which is still confusing, given that I have just compiled the grammar and that the same command works in the terminal. I confirmed that indeed, the “frozen_ace_version” appears to be 0.9.30 (while debugging). I don’t understand why this would be.

Original post:
My suspicion currently is that this error message is invoked by some default grammar file, maybe, which ACE resorts to upon not being able to work with the path that I am providing it? Could that be the case?

Mind you, the same path works in the terminal but it is very possible that I misunderstand what format Visual Studio Code wants (for the command). So maybe I will figure it out eventually. It’s mysterious that I get different behavior when debugging and when running without debugging though. When I debug, I get “no such file or directory” (which indicates it can’t interpret the argument that I am providing it through the launching configuration). When I run in VS Code without debugging, I get the wrong version message. Which is mysterious, but now I have this theory that maybe it tries some default grammar somewhere… Still, why wouldn’t it do that in the debug mode then? I don’t know. And finally when I type the very same command in the integrated terminal, everything is fine and I get a parse…

You can check the compiled ace version with “./ace --version” though.

Can or can’t? Looks like it’s not a recognized option:

(base) olga@condorito:~/delphin/my-ace/ace$ ./ace --version
./ace: unrecognized option '--version'
usage: ./ace [-1 | -n COUNT] [-R] [-f] [-e] [-g grammar-to-load] [-G grammar-to-save] [sentences-file] [--license-info] 

version.h:

\#define	ACE_VERSION	"0.9.34"

To illustrate what I said above: I re-compiled the grammar just now, using integrated terminal in VS Code. Then, typing in that same terminal, I get a parse like normal:

(base) olga@condorito:~/delphin/my-ace/ace$ ace -g ../../erg/2020/ace/english.dat sentences.txt
SENT: Abrams barked.
[ LTOP: h0 INDEX: e2 [ e SF: prop TENSE: past MOOD: indicative PROG: - PERF: - ] RELS: < [ proper_q<0:6> LBL: h4 ARG0: x3 [ x PERS: 3 NUM: sg IND: + ] RSTR: h5 BODY: h6 ]  [ named<0:6> LBL: h7 CARG: "Abrams" ARG0: x3 ]  [ _bark_v_1<7:13> LBL: h1 ARG0: e2 ARG1: x3 ] > HCONS: < h0 qeq h1 h5 qeq h7 > ICONS: < > ] ;  (832 sb-hd_mc_c 2.736912 0 3 (829 hdn_bnp-pn_c 1.095210 0 1 (828 n_sg_ilr 1.562781 0 1 (79 abrams 0.630550 0 1 ("abrams" 59 "token [ +FORM \"abrams\" +FROM \"0\" +TO \"6\" +ID *diff-list* [ LIST *cons* [ FIRST \"0\" REST *list* ] LAST *list* ] +TNT null_tnt [ +TAGS *null* +PRBS *null* +MAIN tnt_main [ +TAG \"NNP\" +PRB \"1.0\" ] ] +CLASS alphabetic [ +CASE capitalized+lower +INITIAL + ] +TRAIT token_trait [ +UW - +IT italics +LB bracket_null [ LIST *list* LAST *list* ] +RB bracket_null [ LIST *list* LAST *list* ] +LD bracket_null [ LIST *list* LAST *list* ] +RD bracket_null [ LIST *list* LAST *list* ] +HD token_head [ +TI \"<0:6>\" +LL ctype [ -CTYPE- string ] +TG string ] ] +PRED predsort +CARG \"Abrams\" +TICK + +ONSET c-or-v-onset ]")))) (831 hd-pct_c 1.807236 1 3 (830 v_pst_olr 0.737621 1 2 (73 bark_v1 -0.012412 1 2 ("barked" 57 "token [ +FORM \"barked\" +FROM \"7\" +TO \"13\" +ID *diff-list* [ LIST *cons* [ FIRST \"1\" REST *list* ] LAST *list* ] +TNT null_tnt [ +TAGS *null* +PRBS *null* +MAIN tnt_main [ +TAG \"VBD\" +PRB \"1.0\" ] ] +CLASS alphabetic [ +CASE non_capitalized+lower +INITIAL - ] +TRAIT token_trait [ +UW - +IT italics +LB bracket_null [ LIST *list* LAST *list* ] +RB bracket_null [ LIST *list* LAST *list* ] +LD bracket_null [ LIST *list* LAST *list* ] +RD bracket_nonnull [ LIST *cons* [ FIRST n REST *list* ] LAST *list* ] +HD token_head [ +TI \"<7:13>\" +LL ctype [ -CTYPE- string ] +TG string ] ] +PRED predsort +CARG \"barked\" +TICK + +ONSET c-or-v-onset ]"))) (69 period_pct 0.433548 2 3 ("." 55 "token [ +FORM \".\" +FROM \"13\" +TO \"14\" +ID *diff-list* [ LIST *cons* [ FIRST \"2\" REST *list* ] LAST *list* ] +TNT null_tnt [ +TAGS *null* +PRBS *null* +MAIN tnt_main [ +TAG \".\" +PRB \"1.0\" ] ] +CLASS non_alphanumeric [ +INITIAL - ] +TRAIT token_trait [ +UW - +IT italics +LB bracket_null [ LIST *list* LAST *list* ] +RB bracket_null [ LIST *list* LAST *list* ] +LD bracket_null [ LIST *list* LAST *list* ] +RD bracket_nonnull [ LIST *cons* [ FIRST n REST *list* ] LAST *list* ] +HD token_head [ +TI \"<13:14>\" +LL ctype [ -CTYPE- string ] +TG string ] ] +PRED predsort +CARG \".\" +TICK + +ONSET c-or-v-onset ]"))))
NOTE: 1 readings, added 644 / 32 edges to chart (22 fully instantiated, 16 actives used, 13 passives used)      RAM: 1109k


NOTE: parsed 1 / 1 sentences, avg 1109k, time 0.00438s

But when I run the same command via the VS Code launcher (which I need in order to be able to debug the way I am used to, which is very imporant to me), I get:

(base) olga@condorito:~/delphin/my-ace/ace$ "/home/olga/delphin/my-ace/ace/ace" -g ../../erg/2020/ace/english.dat sentences.txt
version mismatch: this is ACE version 0.9.34, but this grammar image was compiled by ACE version 0.9.30

When I use the debug mode in VS Code, I get:

 ../../erg/2020/ace/english.dat: No such file or directory
[1] + Done                       "/usr/bin/gdb" --interpreter=mi --tty=${DbgTerm} 0<"/tmp/Microsoft-MIEngine-In-rfnzbz5t.qtb" 1>"/tmp/Microsoft-MIEngine-Out-s1kwo1mt.egs"
(base) olga@condorito:~/delphin/my-ace/ace$ 

[UPDATE: I fixed that, and I am now getting the same “version mismatch” message in the debug mode, too. This was a matter of passing the arguments properly to the various VS Code config files.]

Maybe I should give up on the idea of using VS Code after all :confused: Its configuration files are numerous and very confusing. Though its remote mode is very convenient (and I simply can’t debug without a visual debugger; I become prohibitively slow that way)…

OK, I am sorry, @sweaglesw , it was just that I did compile the grammar (and then worked in the integrated terminal) not with ./ace but with ace (which of course was set in my basrc to 0.9.30 from the ancient times).

So, in the end, of course the answer is that I didn’t know which files I was using. Problem solved. I can’t believe I am still making such mistakes but here I am.

Glad it is sorted out in the end!

1 Like

My apologies – I misspoke there. The correct option to find out the version is -V, not --version.

1 Like