Skip to content

Commit 906b8f7

Browse files
committed
Remove tlaplus-smith dependency for now
1 parent ec04039 commit 906b8f7

File tree

4 files changed

+7
-106
lines changed

4 files changed

+7
-106
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## Upcoming: 0.3.0
2+
* Operator definitions with conjunction/disjunction list bodies now break after `==`, improving VS Code code folding.
3+
14
## 0.2.1
25
* Fix: no longer inserts spurious whitespace after symbolic prefix operators (`[]`, `<>`, `~`, `-`).
36
For example, `[][Next]_vars` was incorrectly formatted as `[] [Next]_vars`.

TESTING.md

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,6 @@ Individual component tests located in `src/test/java/me/fponzi/tlaplusformatter/
1010
### Integration Tests
1111
End-to-end tests that format complete TLA+ specifications and compare against expected outputs in `src/test/resources/`.
1212

13-
### Property-Based Tests
14-
Automated tests using [jqwik](https://jqwik.net/) that generate hundreds of random TLA+ specifications to verify formatter correctness.
15-
16-
## Property-Based Testing
17-
18-
The `PropertyBasedFormatterTest` class uses property-based testing to automatically verify formatter behavior across a wide range of inputs. Property-based testing generates random test data and verifies that certain properties always hold, making it excellent for finding edge cases that manual testing might miss.
19-
20-
The implementation generates syntactically valid TLA+ specifications with:
21-
- Random module names
22-
- 0-3 constant declarations
23-
- Simple operator definitions using the declared constants
24-
25-
Two critical properties are tested:
26-
27-
**Semantic Preservation**: The formatter must preserve the meaning of the code. This is verified by parsing both the original and formatted specifications into Abstract Syntax Trees (ASTs) and ensuring they are structurally identical.
28-
29-
**Idempotence**: Running the formatter multiple times should produce the same result. This ensures the formatter reaches a stable state and doesn't continuously modify the code.
30-
31-
### Running Property-Based Tests
32-
33-
```bash
34-
# Run all property-based tests (1000 examples each by default)
35-
./gradlew test --tests PropertyBasedFormatterTest
36-
37-
# Run with specific seed for reproducible results
38-
./gradlew test --tests PropertyBasedFormatterTest -Djqwik.seeds=123456789
39-
40-
# Run all tests
41-
./gradlew test
42-
```
43-
44-
The property-based tests automatically run 1000 random examples by default and include edge case testing, providing comprehensive coverage with minimal test code.
45-
4613
## Running Tests
4714

4815
```bash

build.gradle.kts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id("java")
33
id("io.ktor.plugin") version "2.3.12"
4-
id("com.github.spotbugs") version "6.0.7"
4+
id("com.github.spotbugs") version "6.1.3"
55
jacoco
66
}
77

@@ -16,28 +16,20 @@ java {
1616
repositories {
1717
mavenLocal()
1818
mavenCentral()
19-
// Add the repository for the snapshot dependency
19+
// Snapshot repository for org.lamport:tla2tools
2020
maven {
21-
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
22-
}
23-
maven {
24-
url = uri("https://jitpack.io")
21+
url = uri("https://central.sonatype.com/repository/maven-snapshots/")
2522
}
2623
}
2724

2825
dependencies {
29-
// TODO: Replace with a stable release when available:
30-
implementation("com.github.FedericoPonzi:tlaplus:0d86214464")
26+
implementation("org.lamport:tla2tools:1.8.0-SNAPSHOT")
3127
implementation("commons-io:commons-io:2.16.1")
32-
testImplementation("com.github.FedericoPonzi:tlaplus-smith:f5a70e21d1") {
33-
isChanging = true
34-
}
3528

3629
testImplementation(platform("org.junit:junit-bom:5.10.0"))
3730
testImplementation("org.junit.jupiter:junit-jupiter")
3831
testImplementation("org.mockito:mockito-core:5.7.0")
3932
testImplementation("org.mockito:mockito-junit-jupiter:5.7.0")
40-
testImplementation("net.jqwik:jqwik:1.8.0")
4133
implementation("commons-cli:commons-cli:1.8.0")
4234

4335
// Logging

src/test/java/me/fponzi/tlaplusformatter/PropertyBasedFormatterTest.java

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)