Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions ba/doc/conformance.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions ba/org.osate.ba.edit/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ _UI_LogicalOperator_None_literal =
_UI_LogicalOperator_And_literal = and
_UI_LogicalOperator_Or_literal = or
_UI_LogicalOperator_Xor_literal = xor
_UI_LogicalOperator_AndThen_literal = and then
_UI_LogicalOperator_OrElse_literal = or else
_UI_MultiplyingOperator_None_literal =
_UI_MultiplyingOperator_Multiply_literal = *
_UI_MultiplyingOperator_Divide_literal = /
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
error | syntax | 15 | 48 | 5 | extraneous input 'right' expecting ']->'
error | syntax | 16 | 41 | 4 | no viable alternative at input 'else'
error | syntax | 16 | 46 | 5 | extraneous input 'right' expecting ']->'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
error | semantic | 35 | 34 | 19 | There is no applicable operator "and then" for type Base_Types::Integer
error | semantic | 36 | 33 | 18 | There is no applicable operator "or else" for type Base_Types::Integer
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
error | syntax | 15 | 48 | 5 | extraneous input 'right' expecting ']->'
error | syntax | 16 | 41 | 4 | no viable alternative at input 'else'
error | syntax | 16 | 46 | 5 | extraneous input 'right' expecting ']->'
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
annex[0] owner=ShortCircuitOperators::operation
(BehaviorAnnex, behavior_specification, 216, 246)
(BehaviorCondition, <null>, 368, 13)
(BehaviorCondition, <null>, 432, 12)
(BehaviorCondition, <null>, 368, 19)
(BehaviorCondition, <null>, 432, 18)
(BehaviorState, finish, 300, 6)
(BehaviorState, start, 275, 5)
(BehaviorStateGroup, <null>, 275, 21)
Expand All @@ -11,16 +11,19 @@ annex[0] owner=ShortCircuitOperators::operation
(BehaviorVariable, left, 229, 4)
(BehaviorVariable, right, 235, 5)
(BehaviorVariableGroup, <null>, 229, 33)
(BinaryExpression, <null>, 368, 13)
(BinaryExpression, <null>, 432, 12)
(ExecuteCondition, <null>, 368, 13)
(ExecuteCondition, <null>, 432, 12)
(BinaryExpression, <null>, 368, 19)
(BinaryExpression, <null>, 432, 18)
(ExecuteCondition, <null>, 368, 19)
(ExecuteCondition, <null>, 432, 18)
(Reference, <null>, 368, 4)
(Reference, <null>, 377, 4)
(Reference, <null>, 382, 5)
(Reference, <null>, 432, 4)
(Reference, <null>, 445, 5)
(ReferenceExpression, <null>, 368, 4)
(ReferenceExpression, <null>, 377, 4)
(ReferenceExpression, <null>, 382, 5)
(ReferenceExpression, <null>, 432, 4)
(ReferenceExpression, <null>, 445, 5)
(ReferenceSegment, left, 368, 4)
(ReferenceSegment, left, 432, 4)
(ReferenceSegment, then, 377, 4)
(ReferenceSegment, right, 382, 5)
(ReferenceSegment, right, 445, 5)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
annex[0] owner=InvalidShortCircuitOperands::operation
(BehaviorAnnex, behavior_specification, 1861, 246)
(BehaviorCondition, <null>, 2013, 19)
(BehaviorCondition, <null>, 2077, 18)
(BehaviorState, finish, 1945, 6)
(BehaviorState, start, 1920, 5)
(BehaviorStateGroup, <null>, 1920, 21)
(BehaviorStateGroup, <null>, 1945, 20)
(BehaviorTransition, and_then_transition, 1983, 61)
(BehaviorTransition, or_else_transition, 2048, 59)
(BehaviorVariable, left, 1874, 4)
(BehaviorVariable, right, 1880, 5)
(BehaviorVariableGroup, <null>, 1874, 33)
(BinaryExpression, <null>, 2013, 19)
(BinaryExpression, <null>, 2077, 18)
(ExecuteCondition, <null>, 2013, 19)
(ExecuteCondition, <null>, 2077, 18)
(Reference, <null>, 2013, 4)
(Reference, <null>, 2027, 5)
(Reference, <null>, 2077, 4)
(Reference, <null>, 2090, 5)
(ReferenceExpression, <null>, 2013, 4)
(ReferenceExpression, <null>, 2027, 5)
(ReferenceExpression, <null>, 2077, 4)
(ReferenceExpression, <null>, 2090, 5)
(ReferenceSegment, left, 2013, 4)
(ReferenceSegment, left, 2077, 4)
(ReferenceSegment, right, 2027, 5)
(ReferenceSegment, right, 2090, 5)
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
annex[0] owner=Issue3169::operation
(BehaviorAnnex, behavior_specification, 1843, 306)
(BehaviorCondition, <null>, 1995, 20)
(BehaviorCondition, <null>, 2060, 77)
(BehaviorState, finish, 1927, 6)
(BehaviorState, start, 1902, 5)
(BehaviorStateGroup, <null>, 1902, 21)
(BehaviorStateGroup, <null>, 1927, 20)
(BehaviorTransition, and_then_transition, 1965, 62)
(BehaviorTransition, or_else_transition, 2031, 118)
(BehaviorVariable, left, 1856, 4)
(BehaviorVariable, right, 1862, 5)
(BehaviorVariableGroup, <null>, 1856, 33)
(BinaryExpression, <null>, 1995, 20)
(BinaryExpression, <null>, 2060, 77)
(ExecuteCondition, <null>, 1995, 20)
(ExecuteCondition, <null>, 2060, 77)
(Reference, <null>, 1995, 4)
(Reference, <null>, 2010, 5)
(Reference, <null>, 2060, 4)
(Reference, <null>, 2132, 5)
(ReferenceExpression, <null>, 1995, 4)
(ReferenceExpression, <null>, 2010, 5)
(ReferenceExpression, <null>, 2060, 4)
(ReferenceExpression, <null>, 2132, 5)
(ReferenceSegment, left, 1995, 4)
(ReferenceSegment, left, 2060, 4)
(ReferenceSegment, right, 2010, 5)
(ReferenceSegment, right, 2132, 5)
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
annex[0] owner=ShortCircuitOperators::operation
<unparsed>
parsedAnnexSubclause : BehaviorAnnex name=behavior_specification
variables[0] : BehaviorVariable name=left
variables[1] : BehaviorVariable name=right
states[0] : BehaviorState name=start
states[1] : BehaviorState name=finish
transitions[0] : BehaviorTransition name=and_then_transition
condition : ValueExpression
relations[0] : Relation
firstExpression : SimpleExpression
terms[0] : Term
factors[0] : Factor
firstValue : BehaviorVariableHolder element=left [BehaviorVariable]
relations[1] : Relation
firstExpression : SimpleExpression
terms[0] : Term
factors[0] : Factor
firstValue : BehaviorVariableHolder element=right [BehaviorVariable]
transitions[1] : BehaviorTransition name=or_else_transition
condition : ValueExpression
relations[0] : Relation
firstExpression : SimpleExpression
terms[0] : Term
factors[0] : Factor
firstValue : BehaviorVariableHolder element=left [BehaviorVariable]
relations[1] : Relation
firstExpression : SimpleExpression
terms[0] : Term
factors[0] : Factor
firstValue : BehaviorVariableHolder element=right [BehaviorVariable]
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
annex[0] owner=InvalidShortCircuitOperands::operation
parsedAnnexSubclause : BehaviorAnnex name=behavior_specification
variables[0] : BehaviorVariable name=left
variables[1] : BehaviorVariable name=right
states[0] : BehaviorState name=start
states[1] : BehaviorState name=finish
transitions[0] : BehaviorTransition name=and_then_transition
condition : ValueExpression
relations[0] : Relation
firstExpression : SimpleExpression
terms[0] : Term
factors[0] : Factor
firstValue : BehaviorVariableHolder element=left [BehaviorVariable]
relations[1] : Relation
firstExpression : SimpleExpression
terms[0] : Term
factors[0] : Factor
firstValue : BehaviorVariableHolder element=right [BehaviorVariable]
transitions[1] : BehaviorTransition name=or_else_transition
condition : ValueExpression
relations[0] : Relation
firstExpression : SimpleExpression
terms[0] : Term
factors[0] : Factor
firstValue : BehaviorVariableHolder element=left [BehaviorVariable]
relations[1] : Relation
firstExpression : SimpleExpression
terms[0] : Term
factors[0] : Factor
firstValue : BehaviorVariableHolder element=right [BehaviorVariable]
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
annex[0] owner=Issue3169::operation
parsedAnnexSubclause : BehaviorAnnex name=behavior_specification
variables[0] : BehaviorVariable name=left
variables[1] : BehaviorVariable name=right
states[0] : BehaviorState name=start
states[1] : BehaviorState name=finish
transitions[0] : BehaviorTransition name=and_then_transition
condition : ValueExpression
relations[0] : Relation
firstExpression : SimpleExpression
terms[0] : Term
factors[0] : Factor
firstValue : BehaviorVariableHolder element=left [BehaviorVariable]
relations[1] : Relation
firstExpression : SimpleExpression
terms[0] : Term
factors[0] : Factor
firstValue : BehaviorVariableHolder element=right [BehaviorVariable]
transitions[1] : BehaviorTransition name=or_else_transition
condition : ValueExpression
relations[0] : Relation
firstExpression : SimpleExpression
terms[0] : Term
factors[0] : Factor
firstValue : BehaviorVariableHolder element=left [BehaviorVariable]
relations[1] : Relation
firstExpression : SimpleExpression
terms[0] : Term
factors[0] : Factor
firstValue : BehaviorVariableHolder element=right [BehaviorVariable]
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
===== annex[0] owner=InvalidShortCircuitOperands::operation =====

\t\tvariables
\t\t\tleft, right: Base_Types::Integer;
\t\tstates
\t\t\tstart: initial state;
\t\t\tfinish: final state;
\t\ttransitions
\t\t\tand_then_transition: start -[ left and then right ]-> finish;
\t\t\tor_else_transition: start -[ left or else right ]-> finish;
\t
----- Xtext reparse -----
reparsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
===== annex[0] owner=Issue3169::operation =====

\t\tvariables
\t\t\tleft, right: Base_Types::Boolean;
\t\tstates
\t\t\tstart: initial state;
\t\t\tfinish: final state;
\t\ttransitions
\t\t\tand_then_transition: start -[ left and\t\tthen right ]-> finish;
\t\t\tor_else_transition: start -[ left or -- Hidden text must not change the operator value.
\t\t\t\telse right ]-> finish;
\t
----- Xtext reparse -----
reparsed
2 changes: 2 additions & 0 deletions ba/org.osate.ba.tests/models/issue3169/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.aadlbin-gen/
/instances/
18 changes: 18 additions & 0 deletions ba/org.osate.ba.tests/models/issue3169/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>issue3169</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.osate.core.aadlnature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-- Copyright (c) 2004-2026 Carnegie Mellon University and others. (see Contributors file).
-- All Rights Reserved.
--
-- NO WARRANTY. ALL MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY
-- KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE
-- OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT
-- MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT.
--
-- This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0
-- which is available at https://www.eclipse.org/legal/epl-2.0/
-- SPDX-License-Identifier: EPL-2.0
--
-- Created, in part, with funding and support from the United States Government. (see Acknowledgments file).
--
-- This program includes and/or can make use of certain third party source code, object code, documentation and other
-- files ("Third Party Software"). The Third Party Software that is used by this program is dependent upon your system
-- configuration. By using this program, You agree to comply with any and all relevant Third Party Software terms and
-- conditions contained in any such Third Party Software or separate license file distributed with such Third Party
-- Software. The parties who own the Third Party Software ("Third Party Licensors") are intended third party benefici-
-- aries to this license with respect to the terms applicable to their Third Party Software. Third Party Software li-
-- censes only apply to the Third Party Software and not any other portion of this program or this program as a whole.

package InvalidShortCircuitOperands
public
with Base_Types;

subprogram operation
annex behavior_specification {**
variables
left, right: Base_Types::Integer;
states
start: initial state;
finish: final state;
transitions
and_then_transition: start -[ left and then right ]-> finish;
or_else_transition: start -[ left or else right ]-> finish;
**};
end operation;
end InvalidShortCircuitOperands;
40 changes: 40 additions & 0 deletions ba/org.osate.ba.tests/models/issue3169/Issue3169.aadl
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
-- Copyright (c) 2004-2026 Carnegie Mellon University and others. (see Contributors file).
-- All Rights Reserved.
--
-- NO WARRANTY. ALL MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY
-- KIND, EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE
-- OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT
-- MAKE ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT.
--
-- This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0
-- which is available at https://www.eclipse.org/legal/epl-2.0/
-- SPDX-License-Identifier: EPL-2.0
--
-- Created, in part, with funding and support from the United States Government. (see Acknowledgments file).
--
-- This program includes and/or can make use of certain third party source code, object code, documentation and other
-- files ("Third Party Software"). The Third Party Software that is used by this program is dependent upon your system
-- configuration. By using this program, You agree to comply with any and all relevant Third Party Software terms and
-- conditions contained in any such Third Party Software or separate license file distributed with such Third Party
-- Software. The parties who own the Third Party Software ("Third Party Licensors") are intended third party benefici-
-- aries to this license with respect to the terms applicable to their Third Party Software. Third Party Software li-
-- censes only apply to the Third Party Software and not any other portion of this program or this program as a whole.

package Issue3169
public
with Base_Types;

subprogram operation
annex behavior_specification {**
variables
left, right: Base_Types::Boolean;
states
start: initial state;
finish: final state;
transitions
and_then_transition: start -[ left and then right ]-> finish;
or_else_transition: start -[ left or -- Hidden text must not change the operator value.
else right ]-> finish;
**};
end operation;
end Issue3169;
Loading
Loading