-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to execute unit tests #10
Comments
Exact same problem under Ubuntu 22.04.3 LTS (Linux 6.5.0-18). |
I found the error in the CMake file where the string double quote marks are surrounding the arguments:
This creates the command:
Removing the double quote marks runs the tests correctly:
I tried to search for a solution, but could not find anything with a quick google search. The problem with the path separator I am thinking we need to pass a variable
|
There's actually a predefined variable I noticed that some of the unit tests need to be adapted as I changed some of the outputs that the compiler gives. I've been going through the Oberon 07 language report and started to "unsupport" certain functionality in accordance with the standard. I'm thinking of introducing flags later on to enable these features again as they are basically supported in the codegen. Also note that I changed how Finally, I would like to point out that some of the tests fail because they are supposed to fail. For example, it is not possible according the Oberon 90 or Oberon 07 grammar to have empty statements, e.g.,
Last but not least, function procedures always have parenthesis after the identifier (both in the declaration and when they are called), even if they have no parameters. Currently, the corresponding error message looks like the parser tripped up, but this issue is already fixed and there will be a better error message in an upcoming pull request. |
I thinks it is good to use Oberon-07 report as a target first and then cover what is missing and The XDS compiler gives a warning for extra semicolons. The empty procedure is probably an error from my side. The procedure without parentheses could be from Oberon-2 (Will check this) A large amount of code exists for the Oberon-2 and it has some nice features like bound procedures. It would probably be good to add extra types to the SYSTEM module for interface with external code With regards to printing of REAL for testing purposes it is maybe an idea to add the hex version as dividing/multiply by 16 does not introduce rounding errors and should be more stable. |
I spent a bit of time on getting more unit tests to pass. Your example brought some real oversights to the surface. In particular, I improved the scanner when it comes to correctly recognizing floating-point and integer constants. I've pushed the fixes with the latest pull request, which also includes a summary of what tests still fail. With respect to Oberon language standards my plan is to initially support as many standards (Oberon-90, Oberon-2, and Oberon-07) as possible and ultimately have a compiler flag |
Excellent. I believe there are some features in Oberon-2 which makes it more practical for more general use. Pure Oberon-07 is very suitable for embedded development as it forces a very conservative style of code similar to programming languages used on PLC devices. I have a work in progress standard library project targeting the XDS Oberon-2 compiler which makes use of:
Link to code : XDSStdLib UI Example Link The XDS has some issues with 64bit support both in code and linking. So with time I was hoping to port this over to the oberon-lang compiler when it matures. |
That's super scary! 🫣 I hope this project will get to this point eventually, even though I never planned for it to be used seriously. |
The late professor N.Wirth was very wise and designed a minimal language which is perhaps possible to test to be complete watertight. |
Well, "wise" is certainly one adjective one could use to describe him. He surely had a very clear vision of what he wanted to do and what he felt was the right of way of doing it. The rigid type systems of Wirth's languages that only allow for very controlled extensions certainly make preventing type-related run-time problems more easily possible than in other languages. However, this comes at the price of having no (developer-defined) overloading (e.g., ad-hoc polymorphism) and (almost) no subtype polymorphism. In contrast, as for preventing memory-related run-time problems, these languages are very weak and, one might argue, behind even C. The C standard at least specifies By the way, I read in the documentation of your Oberon Standard Library that you are dissatisfied with the XDS Compiler due to its lack of 64bit support. I think this will not be an issue with Finally, since you mentioned Niklaus Wirth, you might be interested to read what I wrote after being invited by ETH Zurich to share my memories of him: https://inf.ethz.ch/news-and-events/editors-choice/niklaus-wirth-quotes-all.html. Mine is the second from the top. |
With regards to practical use of the language I implemented a Dictionary/Set type with record extension and This is found at ADTDictionary.ob2 In my opinion Oberon-02 (or maybe Oberon-07 with some extensions) is very usable and still relevant. Not being an expert I see there is a flurry of interesting developments in many languages with regards to replacing traditional memory handling. Found this language intriguing Lobster . With regards to working on 32bit platforms I believe the LLVM IR code should be able to work correctly in most cases. I checked the links on Wirth. Thanks. Really nice to read. |
The unit tests fail to execute when I execute the following commands on my MacBook (macOS Sonoma 14.3.1).
I get the following error message.
I am using lit 17.0.6 and filecheck 17.0.6.
Furthermore, when I try to execute a single test, for example with
lit -a codegen/array_1.mod
, I also get an error that seems to indicate that thelib
andinclude
paths are concatenated the with;
(which is platform-specific to Windows). On Linux and macOS, these paths should be concatenated with:
.The text was updated successfully, but these errors were encountered: