Rainer Müller - 2025-08-14

__cpp__ is used in

test# replaceable with PEARL comment
002 yes obsolete: remove test
003 no test for proper operation of __cpp__
006 yes
008 yes obsolete: remove test
010 yes use SIGNAL handler
011 ??? obsolete: remove test
021 yes setExitCode()
025 yes use SIGNAL handler char-concat and setExitCode
026 ??? let's generate PRL-code
030 yes setExitCode
031 yes remove comments with cpp
042 yes use PUT and setExitCode
044 yes use PUT and setExitCode ; obsolete?
045 yes use PUT, setExitCode; extend loop tests
050 yes use setExitCode
060 yes use PUT and setExitCode ; obsolete?
080 yes merge with 045
081 yes setExitCode
082 yes merge with 080
100 yes use SIZEOF, PUT, setExitCode
102 yes remove cpp in commentd, add value tests. obsolete?
150 yes add value checks, complete tests (e.g. short initializers)
200 yes use SIZEOF, PUT, setExitCode
224 yes setExitCode
301 yes use PEARL-comparison, setExitCode
350 yes use PUT, setExitCode
400 yes add test, setExitCode
401 yes setExitCode
402 yes add tests for unicode, setExitCode
410 yes setExitCode
460 yes setExitCode
600 ?? must be extended with decl, init and expressions
700 yes setExitCode
704 yes remove comments with cpp, add tests with RST
705 yes merge with 704 , add RST tests
710 yes setExitCode
720 yes use SIGNAL handler, setExitCode
850 yes translate tests to PEARL code, use PUT, setExitCode; obsolete with 851?
851 yes use setExitCode

Proposal

Supply an interface for c++-written extensions to the OpenPEARL-library

  • add PEARL-modules for specific platforms
  • they become compiled and added to the runtime library

Example:

MODULE(OpenPEARL_Linux):
PROBLEM;
setExitCode: PROC(FIXED(31) x) GLOBAL;
    __cpp__("pearlrt::Control::setExitCode(x.x);");
END;

getHostName: PROC RETURNS CHAR(80);
    DCL hostname CHAR(80);
    __cpp__("gethostname(_hostname.data,80);");
    RETURN(hostname);
END;    

Idea of Implementation

We need a new step in the build process

current steps

  1. build: configuration/include/autoconf.h configuration/include/auto.conf \
    runtime compiler errorChecker static_analyzer
  2. install the components to /usr/local/OpenPEARL

additional steps:

  1. build extensions like simulators and platform specific extensions with the installed compiler
  2. add the created objects the the OpenPEARL-libraries
 

Last edit: Rainer Müller 2025-08-14