Ejemplo n.º 1
0
Equation instantiate_equation(Equation innerEq, Name variable, Real index, VarSymbolTable &symbolTable) {
  VarSymbolTable v=symbolTable;
  VarInfo vinfo = VarInfo(TypePrefixes(1,parameter), "Integer", Option<Comment>(), Modification(ModEq(Expression(index))));
  v.insert(variable,vinfo);
  if (is<Equality>(innerEq)) {
      Equality eqeq = boost::get<Equality>(innerEq);
      Expression l=eqeq.left(), r=eqeq.right();
      //std::cout << "Left= " << l << " right " << r << std::endl;
      return Equality(Visit(Modelica::PartEvalExp(v),l),Visit(Modelica::PartEvalExp(v),r));
  } else {
      ERROR("process_for_equations - instantiate_equation:\n"
            "Incorrect equation type or not supported yet.\n");
  }
  return Equation();
}
Ejemplo n.º 2
0
static void add_trans(State& src, const State& dst, const Function& evt, std::size_t ovid) {
    Guard g({ Equality(src.observer().mk_var(ovid)) });
    src.add_transition(std::make_unique<Transition>(evt, g, dst));
}
Ejemplo n.º 3
0
static void add_trans(State& src, const State& dst, const Function& evt) {
    Guard g({ Equality(OValue::Empty()) });
    src.add_transition(std::make_unique<Transition>(evt, g, dst));
}
Ejemplo n.º 4
0
Archivo: ptr_lib.c Proyecto: 8l/rose
bool LessOrEqual(struct IntStruct ptr,struct IntStruct other_ptr) {
	return LessThan(ptr, other_ptr) || Equality(ptr, other_ptr);
}
Ejemplo n.º 5
0
Archivo: ptr_lib.c Proyecto: 8l/rose
bool GreaterOrEqual(struct IntStruct ptr,struct IntStruct other_ptr) {
	return GreaterThan(ptr, other_ptr) || Equality(ptr, other_ptr);
}
Ejemplo n.º 6
0
Archivo: ptr_lib.c Proyecto: 8l/rose
bool NotEqual(struct IntStruct ptr,struct IntStruct other_ptr) {
	return !Equality(ptr,other_ptr);
}