{"issue":{"pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"state":"open","user":{"avatar_url":"https://secure.gravatar.com/avatar/2037f364937bb1a1a5392748aee4d777?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2037f364937bb1a1a5392748aee4d777","url":"https://api.github.com/users/juli1","login":"juli1","id":993972},"milestone":null,"assignee":null,"updated_at":"2011-11-04T15:55:19Z","labels":[],"comments":2,"closed_at":null,"url":"https://api.github.com/repos/osate/osate2-core/issues/9","body":"Hello,\r\n\r\nWhen trying OSATE2 and defining my own properties, I get compilation errors. However, these property set compile fine with Ocarina. There are the property definition (see below).\r\n\r\nAny idea on why this is not working in OSATE2 ?\r\n\r\nThanks for any comment/suggestion,\r\n\r\nBest regards,\r\n\r\nproperty set Processor_Properties is\r\n\r\n  Frequency : type aadlinteger 0 Hz .. Max_Aadlinteger  units \r\n  (Hz,\r\n  KHz => Hz  * 1000,\r\n  MHz => KHz * 1000,\r\n  GHz => MHz * 1000);\r\n  \r\n  CPU_Speed : Frequency applies to (processor);\r\n  \r\n  MIPS : aadlinteger 0 .. Max_Aadlinteger applies to (processor, abstract);\r\n\r\nend Processor_Properties; \r\n\r\n\r\nproperty set Physical_Properties is\r\n\r\n  -----------------\r\n  -- Power units --\r\n  -----------------\r\n\r\n  Power_Units: type units \r\n  (W, \r\n   KW  => W * 1000, \r\n   MW  => KW * 1000, \r\n   GW  => MW * 1000,\r\n   TW  => GW * 1000);\r\n  \r\n  Max_Power: constant Physical_Properties::Power_Units => 2#1#e32 W;\r\n  Power : type aadlreal 0 W .. Max_Power units Physical_Properties::Power_Units;\r\n  Power_Consume : Power applies to (processor, device, memory, system);\r\n  Power_Provide : Power applies to (device);\r\n  Total_Power   : Power applies to (system);\r\n  \r\n  ---------\r\n  -- EMC --\r\n  ---------\r\n\r\n  Ionizing_Dose_Units : type units (\r\n  rad, \r\n  Krad  => rad * 1000,\r\n  Mrad  => Krad * 1000, \r\n  Grad  => Mrad * 1000,\r\n  Trad  => Grad * 1000);\r\n  \r\n  Max_Ionizing_Dose: constant Ionizing_Dose_Units => 2#1#e32 rad;\r\n  \r\n  Ionizing_Type : type aadlinteger \r\n     0 rad .. Max_Ionizing_Dose units Ionizing_Dose_Units;\r\n  \r\n  TID : Ionizing_Type applies to (processor, device, memory);\r\n\r\n\r\n\r\n  Mass_Units: type units (\r\n  g, \r\n  Kg => g  * 1000, \r\n  T  => Kg * 1000);\r\n\r\n  Maximum_Mass: constant Mass_Units => 2#1#e32 g;\r\n\r\n  Mass_Type : type aadlreal 0 g .. Maximum_Mass units Mass_Units;\r\n\r\n  Mass : Mass_Type applies to (processor, device, memory, system);\r\n\r\n  Max_Mass : Mass_Type applies to (processor, device, memory, system);\r\n\r\nend Physical_Properties;\r\n\r\n\r\n\r\n","html_url":"https://github.com/osate/osate2-core/issues/9","title":"Failed to parse properties","number":9,"id":2078132,"created_at":"2011-10-28T12:35:57Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/ab82d190d0cd32183c56c522ec115fb3?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"ab82d190d0cd32183c56c522ec115fb3","url":"https://api.github.com/users/reteprelief","login":"reteprelief","id":750520},"updated_at":"2011-11-04T15:55:19Z","url":"https://api.github.com/repos/osate/osate2-core/issues/comments/2632591","body":"In your second property set you have the following problems:\r\n\r\nThe constant Max_Power is defined to be of type Units but holds an integer and a unit.\r\nI think you want:\r\nMax_Power: constant aadlinteger units Physical_Properties::Power_Units => 10 W;\r\n\r\nIn the definition of the type Power Max_Power must be qualified with the proeprty set name.\r\n\r\nIn the definition of the properties Power_Consume, Power_Provide, Total_Power you need to qualify the reference to Power with the property set name.\r\n\r\nThe Ionizing related defintions and Mass related definitions have the same issue.\r\n\r\nPeter\r\n","id":2632591,"created_at":"2011-11-04T15:55:19Z"}}