Skip to content

Commit

Permalink
add unary and op
Browse files Browse the repository at this point in the history
  • Loading branch information
lenaRB committed Dec 18, 2023
1 parent db98f9c commit 41a0cd9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/main/java/crml/compiler/OperatorMapping.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ public static HashMap<String, List<Signature>> get_operator_map (){
// and operators
List<Signature> and_sigs =
Arrays.asList(new Signature("CRMLtoModelica.Functions.and4", bool2, params, "Boolean", Type.FUNCTION),
new Signature("arrayAnd", bool1, params, "Boolean", Type.SET_OP, setUnary, false));
new Signature("arrayAnd", bool1, params, "Boolean", Type.SET_OP, setUnary, false),
new Signature("unaryBoolAnd", bool1, params, "Boolean", Type.FUNCTION));
built_in_operators.put("and", and_sigs);

// or operators
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
model EnsureAtEnd is ETL union {

// Requirement
Boolean y is 'check' u 'at end of' {timePeriod};

// Operator for checking that a requirement is satisfied at the end of a time period
Operator [ Boolean ] 'check' Boolean b 'at end of' Periods P = 'check' varying1 'id' b 'over' P;

// Requirement
Boolean y is 'check' u 'at end of' {timePeriod};

// Inputs
Event e1 is external;
Event e2 is external;
Expand Down

0 comments on commit 41a0cd9

Please sign in to comment.