Comments (5)
I like this idea. The "DSL" sounds similar to the TLAPM tests, e.g. https://github.com/tlaplus/tlapm/blob/main/test/fast/basic/z3_false_test.tla. Here, the file contains relevant theorems, and the expected result is stated after the module. The part after the module is ignored by parsers, so the module itself is valid as is. The expectation definition has to be more elaborated in the case of the parser, compared to the proof tests.
from tlaplus.
The more tests the better, although almost all TLC tests implicitly test SANY; its test coverage should not be too bad.
More importantly, will these tests be independent of the existing test suite unless we upgrade to junit5? I see value in having a single, uniform test suite. If this is the case, we should explore upgrading to junit5 first.
from tlaplus.
These tests will be added alongside the current test suite. It will just be a single junit test that runs the entire test corpus, and fails if any of them fail. The only real benefit to using dynamic tests in junit 5 is it should make each corpus test appear as a single individual unit test; you can see it in this video, it looks quite nice in the eclipse UI: https://www.youtube.com/watch?v=8kxgO0Fv6d4
I agree SANY gets exercised a lot with the existing test suite, but I don't think existing tests are sufficient to confidently modify SANY itself if we want to do that (I do want to do that lol).
from tlaplus.
To evolve SANY, we not only require blackbox tests but also whitebox tests that access and validate SANY's internal state during testing - SANY is more than a parser. It's fine if these blackbox tests cannot access SANY programmatically, but we want seamless integration with the existing and future whitebox tests. If JUnit4 doesn't have the necessary features, upgrading to JUnit5 seems like a sensible first step.
That said, I would like to point out that the fine-grained "debuggability" of the current test suite is worth the effort of writing what some call verbose/cumbersome tests for the existing test suite; it's a price paid only once. Moreover, I presume that Java's preformatted strings will make writing new tests a lot more convenient.
from tlaplus.
Sure, I would like to have several levels of tests - syntax parsing being the lowest, unless the lexer can be accessed independently - then adding on semantic tests and finally level tests.
from tlaplus.
Related Issues (20)
- Normalize line endings as LF or CRLF and encode choice in .gitattributes file HOT 6
- Pluscal translator crush (very easy fix) HOT 2
- Feature request: -trace-validation/-tracevalidate mode HOT 4
- Split toolbox into a separate repo HOT 4
- Enforce using either tabs or spaces, at least on a per-file basis HOT 1
- Nondeterminism in diameter reported by TLC
- SANY fails to parse negative and !! operators in nonfix form HOT 1
- SANY incorrectly allows subexpression prefixes for labels with parameters
- SANY incorrectly allows an empty tuple of identifiers in quantifier bounds HOT 15
- Proposed refactoring goal: remove all static global variables HOT 4
- Incorrect operator precedences in either documentation or SANY HOT 1
- SANY handles operator precedence incorrectly with the negative prefix operator
- SANY should exit with nonzero error code when parsing invalid PlusCal code and `-error-codes` is given
- Feature proposal: parallelize tlatools unit tests HOT 11
- `test-verify` and `test-dist-long` Ant targets both fail HOT 2
- `pcal.trans` outputs blank lines in translation if block comments are present in PlusCal source HOT 1
- Counterexample too short with StateDeque HOT 3
- Build failure on Windows: package jdk.jfr does not exist HOT 1
- Add pointer to https://arxiv.org/abs/2311.14452 in OpenAddressing.tla
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tlaplus.