-
Notifications
You must be signed in to change notification settings - Fork 11
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
Implement SomSom, A Metacircular SOM #29
Conversation
This slightly exceeds my ability to quickly understand, but one suggestion based on previous SOM tests experience is that it might be worth having a number of "negative" tests in here so that you can also ensure the lexer doesn't match things you don't think it should match. AFAICS it only has "positive" tests at the moment. Warning: I might be wrong. |
.travis.yml
Outdated
- language: java | ||
dist: trusty | ||
env: SOM=TruffleSOM REPO=https://github.com/SOM-st/TruffleSOM.git BUILD=make SOM="./som -G" | ||
jdk: [oraclejdk8] | ||
addons: {apt: {packages: [libc6-dev-i386]}} | ||
|
||
- language: java | ||
env: SOM=spec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't you need trusty as well for spec?
.travis.yml
Outdated
git --no-pager log -n 1 | ||
eval $BUILD | ||
$SOM -cp ../Smalltalk ../TestSuite/TestHarness.som | ||
$SOM -cp ../Smalltalk:../TestSuite:../SomSom/src/compiler ../SomSom/tests/SomSomTests.som |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect the CI to go red because of those tests, except for som-java once it will be updated.
Should we keep it red for now / allow failure for the others ?
a783c68
to
3c13530
Compare
93aff7b
to
41de83e
Compare
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
…ing text context Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
This should fix all the off-by-one errors caused by the switch from 0-based to 1-based indexing Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
The result of a impl-level operation needs a impl-level class test. Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Signed-off-by: Stefan Marr <[email protected]>
Took a year, but SomSom seems to be read for merge. It runs the SOM test suite, and hello world, and I think also itself, but haven't tested that recently. @sophie-kaleba should be ready for experiments. |
Towers of Interpreters: Hello WorldLevel 0:
Level 1:
Level 2:
Level 3:
Towers of Interpreters: TestSuiteLevel 0:
Level 1:
Level 2:
|
This PR implements SOM in SOM.
It's a pretty direct translation of the basic version of the SOM bytecode interpreter with 16 bytecodes.
It is able to execute all tests of the standard SOM test suite.
Though, it's pretty darn slow.
It also runs Hello World and probably some of the benchmarks, but I haven't confirmed this yet,
because it's very very slow. Oops. I was running multiple levels of interpreters.To run, it needs the primitives introduced in #67.
It may also need changes to how the command line arguments are handled so that the options are passed to SomSom and not consumed by the host SOM, for example see: smarr/TruffleSOM@7f0f26c
It should also be able to run multiple "storeys" of a tower of interpreters.
Though, I haven't tested this recently.Yep. Works. See comment below.Adoption/Integration Status
PR History
Originally, this started out as a PR just for the lexer:
Implement the SOM Lexer in SOM.This requires three new primitives and a new string escape code:String>>#isWhiteSpace
String>>#isLetter
String>>#isDigit
\0
escape code, which should be pretty standard, but we haven't had need for it before@sophie-kaleba could you review this please, too?
@ltratt I thought this might be of interest to you. Well, perhaps not quite yet, but, it's also a nice test case for the parser and string support logic.