Repository navigation
fix(grpc): verification RPCs naming no subject evaluate over the held population #1618
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0cd4051
test(grpc): pin VerifyRequirement without a subject over the held pop…
devin-ai-integration[bot] 20f6bc0
fix(grpc): verification RPCs naming no subject evaluate over the held…
devin-ai-integration[bot] 45b1423
fix(repl): %satisfy labels a nested object by the indexed path %valid…
devin-ai-integration[bot] 6abe008
test(grpc): pin VerifyRequirement over the held population as a confo…
devin-ai-integration[bot] be643d9
docs: verification RPCs over the held population and the shared objec…
devin-ai-integration[bot] b47ba16
fix(runtime): a carrier's label keeps the declaration a subsetting co…
devin-ai-integration[bot] 07ceba2
fix(grpc): RunAnalysis of a held verification case at the bound is RE…
devin-ai-integration[bot] c1ab124
fix(grpc): a tool dry run leaves the runtime as it found it
devin-ai-integration[bot] d88a0ca
docs: tool previews and the explore schedule over the held population
devin-ai-integration[bot] ceb28f7
Merge remote-tracking branch 'origin/develop' into fix/grpc-verify-he…
devin-ai-integration[bot] 76204f8
refactor: keep the comments of the held-population change to two lines
devin-ai-integration[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,2 @@ | ||
| - gRPC `VerifyConstraint`, `VerifyRequirement` and `RunAnalysis` naming no `subject_symbol_id` now evaluate over the objects `Instantiate` holds for the model, as `VerifySatisfaction` already did and as the REPL's checks are about the objects a session holds: a verification case a definition owns runs once per held object of the definition and its `verification_verdicts` name each object, a constraint or requirement a definition owns is checked on the held object carrying it (ambiguous over several), and a case a definition owns runs as a feature of the held object of that definition. Before, `VerifyRequirement` after `Instantiate` answered a definition-owned case `inconclusive: needs an object … none is instantiated` while `VerifySatisfaction` on the same model reported it `pass` per object. A named subject keeps a worker of its own. A sweep over the population that would pass the `OPENSYSML_GRPC_MAX_HELD_OBJECTS` bound is `RESOURCE_EXHAUSTED`, as `Instantiate` is, rather than an error verdict quoting the runtime; `runtime.VerificationVerdict` carries the error an error verdict reports, and a `this` read keeps its cause in the error chain. | ||
| - A `RunAnalysis` run of a verification case over the held population that would pass the held-objects bound is `RESOURCE_EXHAUSTED` too, and a `RunAnalysis` tool dry run over the population undoes the preview's writes and puts the runtime's tool runner back, as the REPL's preview does. |
This file contains hidden or 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 @@ | ||
| - `%satisfy`, `-satisfy` and the gRPC `VerifySatisfaction` sweep over a definition's `satisfy r;` now label each object they decide by the indexed path `%validate` and `-validate=` print for it — `satisfy costReq holds (on test::fleet.cheap[1] ID: 2)` rather than `(on test::fleet.cheap ID: 2)` — the runtime spelling a carrier's path once, as the validation walk spells the object it reaches; the gRPC satisfy verdict carries it as `instance_path`. |
This file contains hidden or 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,42 @@ | ||
| package main | ||
|
|
||
| import ( | ||
| "strings" | ||
| "testing" | ||
| ) | ||
|
|
||
| // repeatedPartModel holds two objects of a definition stating a satisfaction | ||
| // under one usage with a multiplicity. | ||
| const repeatedPartModel = `package test { | ||
| private import ScalarValues::Real; | ||
| requirement def CostRequirement { | ||
| subject product : Definition; | ||
| attribute maximumCost : Real; | ||
| require constraint costOk { product.cost <= maximumCost } | ||
| } | ||
| requirement costReq : CostRequirement { :>> maximumCost = 100.0; } | ||
| part def Definition { | ||
| attribute cost : Real; | ||
| satisfy costReq; | ||
| } | ||
| part def Fleet { part cheap : Definition [2] { attribute :>> cost = 80.0; } } | ||
| part fleet : Fleet; | ||
| }` | ||
|
|
||
| // TestSatisfyLabelsObjectsAsValidateDoes checks that -satisfy names each object a | ||
| // definition's `satisfy r;` is decided on by the indexed path -validate prints for it. | ||
| func TestSatisfyLabelsObjectsAsValidateDoes(t *testing.T) { | ||
| binary := buildCLI(t) | ||
| files := map[string]string{"fleet.sysml": repeatedPartModel} | ||
| labels := []string{ | ||
| "✓ satisfy costReq holds (on test::fleet.cheap[1] ID: 2)", | ||
| "✓ satisfy costReq holds (on test::fleet.cheap[2] ID: 3)", | ||
| } | ||
| satisfied := checkFiles(t, binary, files, "-instantiate", "test::fleet", "-satisfy") | ||
| wantReport(t, satisfied, 0, labels...) | ||
| validated := checkFiles(t, binary, files, "-instantiate", "test::fleet", "-validate=test::fleet") | ||
| wantReport(t, validated, 0, labels...) | ||
| if strings.Contains(satisfied.output(), "fleet.cheap ID") { | ||
| t.Errorf("-satisfy labels an object by its feature alone, not its indexed path:\n%s", satisfied.output()) | ||
| } | ||
| } |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.