{"action":"created","issue":{"url":"https://api.github.com/repos/kframework/k/issues/169","repository_url":"https://api.github.com/repos/kframework/k","labels_url":"https://api.github.com/repos/kframework/k/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/kframework/k/issues/169/comments","events_url":"https://api.github.com/repos/kframework/k/issues/169/events","html_url":"https://github.com/kframework/k/issues/169","id":369090120,"node_id":"MDU6SXNzdWUzNjkwOTAxMjA=","number":169,"title":"Expressions like \"5 < 10\" can't be evaluated!","user":{"login":"Qais87","id":43268150,"node_id":"MDQ6VXNlcjQzMjY4MTUw","avatar_url":"https://avatars3.githubusercontent.com/u/43268150?v=4","gravatar_id":"","url":"https://api.github.com/users/Qais87","html_url":"https://github.com/Qais87","followers_url":"https://api.github.com/users/Qais87/followers","following_url":"https://api.github.com/users/Qais87/following{/other_user}","gists_url":"https://api.github.com/users/Qais87/gists{/gist_id}","starred_url":"https://api.github.com/users/Qais87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Qais87/subscriptions","organizations_url":"https://api.github.com/users/Qais87/orgs","repos_url":"https://api.github.com/users/Qais87/repos","events_url":"https://api.github.com/users/Qais87/events{/privacy}","received_events_url":"https://api.github.com/users/Qais87/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-11T12:08:40Z","updated_at":"2018-10-12T17:33:15Z","closed_at":null,"author_association":"NONE","body":"Hello guys,\r\n\r\nI am trying to write a few arithmetic expressions which should be evaluated.\r\n\r\nThe whole code is this one:\r\n```javascript\r\nmodule IMP-SYNTAX\r\n\r\n//syntax definitions\r\n  syntax AExp  ::= Int | Id | Float\r\n                 | AExp \"/\" AExp              [left, strict]\r\n                 | AExp \"*\" AExp              [left, strict]\r\n                 > AExp \"-\" AExp              [left, strict]\r\n                 | AExp \"+\" AExp              [left, strict]\r\n                 | \"(\" AExp \")\"               [bracket]\r\n  syntax BExp  ::= Bool\r\n                 | AExp \"<=\" AExp             [seqstrict, latex({#1}\\leq{#2})]\r\n                 | AExp \"<\" AExp                [seqstrict, latex({#1}\\leq{#2})]\r\n                 | AExp \">\" AExp                [seqstrict, latex({#1}\\leq{#2})]\r\n                 | \"!\" BExp                   [strict]\r\n                 > BExp \"&&\" BExp             [left, strict(1)]\r\n                 | \"(\" BExp \")\"               [bracket]\r\n  syntax Block ::= \"{\" \"}\"\r\n                 | \"{\" Stmt \"}\"\r\n  syntax Stmt  ::= Block\r\n                 | Id \"=\" AExp \";\"            [strict(2)]\r\n                 | \"if\" \"(\" BExp \")\"\r\n                   Block \"else\" Block         [strict(1)]\r\n                 | \"while\" \"(\" BExp \")\" Block\r\n                 > Stmt Stmt                  [left]\r\n  syntax Pgm ::= \"int\" Ids \";\" Stmt\r\n  syntax Ids ::= List{Id,\",\"}\r\nendmodule\r\n\r\nmodule IMP\r\n  imports IMP-SYNTAX\r\n\r\n//results datatypes\r\n\r\n  syntax KResult ::= Int | Bool | Float\r\n\r\n  configuration <T color=\"yellow\">\r\n                  <k color=\"green\"> $PGM:Pgm </k>\r\n                  <state color=\"red\"> .Map </state>\r\n                </T>\r\n\r\n  rule <k> X:Id => I ...</k> <state>... X |-> I ...</state>\r\n\r\n//semantic rules\r\n\r\n  rule I1 / I2 => I1 /Int I2  requires I2 =/=Int 0\r\n  rule I1 * I2 => I1 *Int I2\r\n  rule I1 - I2 => I1 -Int I2\r\n  rule I1 + I2 => I1 +Int I2\r\n\r\n  rule I1 <= I2 => I1 <=Int I2\r\n  rule ! T => notBool T\r\n  rule true && B => B\r\n  rule false && _ => false\r\n\r\n//neue Regeln\r\n  \r\n\r\n  rule {} => .   [structural]\r\n  rule {S} => S  [structural]\r\n\r\n\r\n  rule <k> X = I:Int; => . ...</k> <state>... X |-> (_ => I) ...</state>\r\n\r\n  rule S1:Stmt S2:Stmt => S1 ~> S2  [structural]\r\n\r\n\r\n  rule if (true)  S else _ => S\r\n  rule if (false) _ else S => S\r\n\r\n\r\n  rule while (B) S => if (B) {S while (B) S} else {}  [structural]\r\n\r\n\r\n  rule <k> int (X,Xs => Xs);_ </k> <state> Rho:Map (.Map => X|->0) </state>\r\n    requires notBool (X in keys(Rho))\r\n  rule int .Ids; S => S  [structural]\r\nendmodule\r\n```\r\n\r\nMy program is this one:\r\n```javascript\r\nint n, x, y;\r\nn = 120 * -22;\r\nx = 2;\r\ny = n * x;\r\nn > y;\r\n```\r\nCompiling works fine, but krun mysum.k fails with the error message:\r\n![errormessage](https://user-images.githubusercontent.com/43268150/46802791-b3164080-cd5e-11e8-80f0-a0c40218426c.PNG)\r\n\r\nWhy can't the boolean expression \"n>y\" be evaluated? I have defined them. The parser doesn't know what \">\" means, but why?\r\n\r\nThanks for your help!"},"comment":{"url":"https://api.github.com/repos/kframework/k/issues/comments/429402168","html_url":"https://github.com/kframework/k/issues/169#issuecomment-429402168","issue_url":"https://api.github.com/repos/kframework/k/issues/169","id":429402168,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTQwMjE2OA==","user":{"login":"dwightguth","id":5104541,"node_id":"MDQ6VXNlcjUxMDQ1NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/5104541?v=4","gravatar_id":"","url":"https://api.github.com/users/dwightguth","html_url":"https://github.com/dwightguth","followers_url":"https://api.github.com/users/dwightguth/followers","following_url":"https://api.github.com/users/dwightguth/following{/other_user}","gists_url":"https://api.github.com/users/dwightguth/gists{/gist_id}","starred_url":"https://api.github.com/users/dwightguth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwightguth/subscriptions","organizations_url":"https://api.github.com/users/dwightguth/orgs","repos_url":"https://api.github.com/users/dwightguth/repos","events_url":"https://api.github.com/users/dwightguth/events{/privacy}","received_events_url":"https://api.github.com/users/dwightguth/received_events","type":"User","site_admin":false},"created_at":"2018-10-12T17:33:15Z","updated_at":"2018-10-12T17:33:15Z","author_association":"MEMBER","body":"Uhh, can I see `krun --version`?"}}
{"actor":{"display_login":"dwightguth"}}