-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Having issue with specific symbols #5
Comments
I use Windows and I think the problem is because of that. |
This seems to be a Windows-specific bug. Apparently it defaults to using the CP-1252 encoding. |
Unlike before, it now halts during execution but without producing any output. |
What happens if you try to parse (without linearization)? |
For example for this command: p "a ⤔ b" |
Okay, I've tried to specify the encoding in more places. Could you please install the newest version one more time and see if it works now? |
I got the new version, but the kernel doesn't work again, although I checked the line '22' (now is in line 21) in the file GFRepl and it references to the address of gf.exe. Did you add UTF-8 encoding to that line too? maybe that's why the gf kernel doesn't start again. |
Ah, yes, I forgot that that's still an issue. |
Will you release the new update soon? I was using gf-kernel and after getting the new version the kernel stoped working. |
I could undo the changes, but then the unicode symbols won't work. self.gf_shell = Popen(('C:\\Users\\fatemeh\\gf-3.11-windows\\gf.exe', '--run', '--coding=utf8') If it's that line and it doesn't work for you, then I will undo the changes and Unicode symbols unfortunately won't work on Windows until I find a different solution. |
I've now managed to get Windows in VirtualBox and the most recent version does work for me there (assuming that line 21 in |
This is the line number 21: self.gf_shell = Popen(('C:\Users\fatemeh\gf-3.11-windows\gf.exe', '--run', '--coding=utf8'), |
Did you release new updates? |
The problem might be that you use single backslashes. Can you try |
I tried with single backslashes and it still doesn't work. I don't think backslashes make problem, since before kernel was working with double backslashes too. |
I mean that in the line you copied, you used single backslashes. It has to be double backslashes. |
I got the gf-kernel again, and tried with both single and double backslashes. Unfortunately doesn't work. |
[I 11:08:34.028 NotebookApp] Serving notebooks from local directory: C:\Users\fatemeh
[W 11:08:53.081 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20230303110833 (::1) 13.990000ms referer=http://localhost:8888/notebooks/anaconda3/Projects/GF.ipynb |
Ah, in the error messages it shows that line 21 wasn't update: |
I got it with these commands: |
Yes, one more: |
I did. But nothing changed. [I 11:28:10.092 NotebookApp] Kernel started: 058029e6-7fdc-421b-99be-cc06ebfd3fa3, name: gf |
Somehow the installed kernel does not get updated. Maybe you have different python installations and it gets installed for the wrong one. |
I changed the GFRepl in the address you mentioned. Now the Kernel works but still can not detect the operators. Thank you for your help, may be it's better to use the text editors to write my gf codes and run them in the gf shell, since operators can be recognized there. |
In between yes, I have two python installation. |
That's a pity - but then running them in the GF shell might really be the better option. I thought it would work now. |
Thank you! |
Hello,
This is my concrete grammar:
concrete Test111 of Test11 = {
lincat
Predicate = Str;
Expr = Str ;
lin
Not e1 = "not " ++ e1 ;
Element e1 e2 = e1 ++("is "|"is an element of "|" ∈ ") ++ e2 ;
Eq e1 e2 = e1 ++ (" is "|" = ") ++ e2 ;
Neq e1 e2 = e1 ++ " is not equal to " ++ e2 ;
Nelement e1 e2 = e1 ++ " is not an element of " ++ e2 ;
Gt e1 e2 = e1 ++ (" is greater than "| " > ") ++ e2;
Lt e1 e2 = e1 ++ (" is less than "|" < ") ++ e2;
Pair e1 e2 = "a pair with " ++ e1 ++ "and " ++ e2;
Relation e1 e2 = "a relation between " ++ e1 ++ " and " ++ e2 ;
TotalFunction e1 e2 = "a total function from " ++ e1 ++ "to " ++ e2;
PartialInject e1 e2 = "a partial injection"++" from " ++ e1 ++ "to " ++ e2|e1++" ⤔"++e2;
TotalSurj e1 e2 = "a total surjection from " ++ e1 ++ " to " ++ e2 ;
CartesianProd e1 e2 = "a cartesian product of " ++ e1 ++ "and " ++ e2|e1 ++" × "++e2;
Union e1 e2 = "a union of the sets " ++ e1 ++ "and " ++ e2;
DirectProd e1 e2 = "a direct product of " ++ e1 ++ "and " ++ e2 | e1 ++ "⊗" ++e2 ;
Interval e1 e2 = "between " ++ e1 ++ "and " ++ e2 ;
Add e1 e2 = e1 ++ (" plus " | " + ") ++ e2;
Sub e1 e2 = e1 ++ " - " ++ e2 ;
Mul e1 e2 = e1 ++ " * " ++ e2 ;
Neg e = "negation of " ++ e ;
Ident e1 = e1.s ;
IntegerLiteral e1 = e1.s ;
Expr2Pred t = t ;
}
For the inputs like : p -lang=1 "b + c" | l -treebank or p -lang=1 "b < c" | l -treebank, p -lang=1 "b = c" | l -treebank... I can get the correct output.
But for the inputs with the specific operators like : p -lang=1 "b ⊗ c" | l -treebank or p -lang=1 "b ⤔ c" | l -treebank, p -lang=1 "b ∈ c" | l -treebank... my code in Jupyter keeps running with no output.
Any idea how I can fix this issue?
The text was updated successfully, but these errors were encountered: