[Rock-dev] Typleib and Builtins...

Martin Zenzes martin.zenzes at dfki.de
Wed Aug 6 16:53:34 CEST 2014


On 08/05/2014 08:08 PM, Sylvain Joyeux wrote:
>> Coming back to the signed char / unsigned char / char
>> thing above. Is it actually allowed by design (of typelib),
>> to have theses three types in the registry not aliased ?
>> (char being an alias of either signed or unsigned char)
> Yes, and it should stay that way. Typelib fundamental types are this
> way represented as the non-ambiguous (u)intX_t type names instead of
> the ambiguous normal C names. It requires a little bit more work on
> the importer side, but that is in my opinion worth it.
>
> Basically, there are two ways in the importer:
>   - either directly translate numerical types into the non-ambiguous naming
>   - or initialize the importer's registry with typelib's "standard
> C/C++ types". The importer would then avoid resolving them as they are
> already present in the registry.
Having hardcoded types or mapping somewhere in the registry smells like 
a bad solution. The importer should be able to figure out everything, 
since in the end its a compiler, which knows the language better than 
us. This also allows switching the target-arch for parsing (as Janosch 
mentioned earlier) for example.

Having this mapping from "char" to "(u)int8" hardcoded somewhere is 
arch-specific. As soon as an ARM talks to an x86 both would use the same 
hardcoded mapping for chars (ints). They could talk to each other with 
messages containing chars (or ints) while typelib should prevent it in 
the first place, because they are different on the two machines?
>
> Sylvain
> _______________________________________________
> Rock-dev mailing list
> Rock-dev at dfki.de
> http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev

-- 
M.Sc. Martin Zenzes
Space Robotics

Hauptgeschäftsstelle Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany

Phone: +49 (0) 421 178 45 - 6658
Fax: +49 (0) 421 178 45 - 4150
E-Mail: martin.zenzes at dfki.de

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
-----------------------------------------------------------------------



More information about the Rock-dev mailing list