TFW the SPARK (Z3) prover says it's fine after editing more than one line. pic.twitter.com/T39vWol8qI
Normal view
- Fosstodon @adaprogrammers
- Moving on to the next project. Whatever that might be. Perhaps rewriting the formal methods class assignments I completed a while back from #Daphny to #SPARK.
- Fosstodon @adaprogrammers
- TFW the SPARK (Z3) prover says it's fine after editing more than one line. pic.twitter.com/T39vWol8qI
TFW the SPARK (Z3) prover says it's fine after editing more than one line. pic.twitter.com/T39vWol8qI
How to get process id in Ada?
I want to make a method returning the calling process id, but can't seem to find how to do that in Ada. Must be looking in the wrong places.
How to get process id on windows and POSIX platforms?
- Newest questions tagged ada - Stack Overflow
- How is Ada and GPR supposed to handle conditional compilation? [duplicate]
How is Ada and GPR supposed to handle conditional compilation? [duplicate]
I'm rewriting C source to Ada and on some places there is conditional compilation for handling different platforms, such as windows vs posix, DEBUG, or architecture. For what I can tell neither Ada nor GPR has the notion of conditional compilation.
What's the Ada way of handling it?
Example:
/* Determine if a process is alive. */
#ifndef _WIN32
if (kill(pid, 0) && errno == ESRCH)
return 0; /* pid does not exist */
#else
HANDLE h;
if ((h = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, (DWORD)pid)) == 0)
return 0; /* pid does not exist */
CloseHandle(h);
#endif
return 1;
How to locate input file on Run?
Using GNAT Studio I have a project with a Main and an input file. The latter is next to the project file. I want to pass the path to the input file as argument to Main Run. How to do that?
(In Visual Studio I'd add it to the project and set "Copy to output directory", then locate it relative the output dir.)