use of org.sireum.hamr.ir.ErrorAliasDef in project osate-plugin by sireum.
the class Emv2Visitor method emv2Lib.
private Emv2Library emv2Lib(ErrorModelLibrary eml) {
Name name = factory.name(VisitorUtil.toIList(EMV2Util.getLibraryName(eml)), VisitorUtil.buildPosInfo(eml));
List<String> useTypes = eml.getUseTypes().stream().map(ut -> ut.getName()).collect(Collectors.toList());
List<String> useExtends = eml.getExtends().stream().map(ue -> ue.getName()).collect(Collectors.toList());
List<ErrorTypeDef> etds = eml.getTypes().stream().map(et -> errorType(et)).collect(Collectors.toList());
List<ErrorTypeSetDef> etsds = eml.getTypesets().stream().map(ets -> errorTypeSet(ets)).collect(Collectors.toList());
List<ErrorAliasDef> etads = eml.getTypes().stream().filter(et -> et.getAliasedType() != null).map(et -> errorAliasType(et)).collect(Collectors.toList());
List<ErrorAliasDef> etsads = eml.getTypesets().stream().filter(ets -> ets.getAliasedType() != null).map(ets -> errorAliasTypeDef(ets)).collect(Collectors.toList());
List<BehaveStateMachine> bsms = eml.getBehaviors().stream().map(bs -> errorBehaviorStateMachine(bs)).collect(Collectors.toList());
return factory.emv2Library(name, VisitorUtil.addAll(useTypes, useExtends), etds, etsds, VisitorUtil.addAll(etads, etsads), bsms);
}
Aggregations