-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1648 from informalsystems/ik/features1647
Add the option `--features`
- Loading branch information
Showing
6 changed files
with
170 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
tlair/src/main/scala/at/forsyte/apalache/tla/lir/Feature.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package at.forsyte.apalache.tla.lir | ||
|
||
/** | ||
* An experimental feature. | ||
*/ | ||
sealed trait Feature { | ||
val name: String | ||
val description: String | ||
} | ||
|
||
/** | ||
* Enable rows, new records, and variants, as described in <a | ||
* href="https://github.com/informalsystems/apalache/blob/unstable/docs/src/adr/014adr-precise-records.md">ADR-014</a>. | ||
*/ | ||
case class RowsFeature( | ||
name: String = "rows", | ||
description: String = "enable row typing as explained in ADR-014") | ||
extends Feature | ||
|
||
object Feature { | ||
|
||
/** | ||
* A list of all supported features. | ||
* | ||
* This provides the source of truth for all valid feature names and descriptions. | ||
*/ | ||
val all = List(RowsFeature()) | ||
|
||
val fromString: String => Option[Feature] = str => all.find(_.name == str) | ||
} |