Skip to content

[minor] Named asserts, various fixes#300

Merged
tnelson merged 3 commits intomainfrom
dev
Feb 21, 2025
Merged

[minor] Named asserts, various fixes#300
tnelson merged 3 commits intomainfrom
dev

Conversation

@tnelson
Copy link
Owner

@tnelson tnelson commented Feb 21, 2025

Sterling Update

Added two features:

  • A "Help" button in the lower bar that gives instructions on the view mode currently selected. E.g., the evaluator, timing, zooming on trackpad using two fingers rather than pinch and drag, etc.
  • The default visualizer will now show the most-specific sig name that the atom inhabits in this instance (or state, if the instance is temporal). At the moment, this annotation cannot be themed, but this avoids the need for a dynamic atom-renaming strategy like Alloy 6 uses.

Named assertions

Assertions can now be named, similarly to run. E.g.,

someBsat: assert {some B} is sat
emptyBunsat: assert {no B} is unsat 
BsufficientA: assert B is sufficient for A
BnecessaryA: assert B is necessary for A
BconsistentWithA: assert B is consistent with A

Recall that assertions can receive bounds, just like run commands:

someBsat: assert {some B} is sat for 5 A, 4, B
wellformedTraceSat: assert {wellformed} is sat for 10 State for {next is linear}

Fixes and Experimental Features

Predicate typechecking

Previously, predicate type checking could infer an argument of type univ (meaning any type), but report Int. This was caused by the error system selecting the first of a list of options (which, in the case of univ, was a list of all possible sigs). This should no longer happen, as the list of sigs is now compressed by combining child sigs that cover all possibilities in the parent.

Extending Int (Experimental)

Fixed an issue when a sig is declared that extends Int. This is now running and tested, but has not been exercised much yet. Treat the feature as experimental.

sidprasad and others added 3 commits February 14, 2025 08:27
* A start

* Some changes

* better?

* bug change

* Imprv

* Better default

* oops

* Making corresponding change for cmd

---------

Co-authored-by: Siddhartha Prasad <siddhartha.a.prasad@gmail.com>
* working on fix

* update sterling to add most-specific-sig, help modal

* add: basic example showing optimizer inst
@tnelson tnelson merged commit cd04e08 into main Feb 21, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants