use of com.rockwellcollins.atc.agree.analysis.ast.AgreeASTBuilder in project AMASE by loonwerks.
the class FaultsVerifyAllHandler method wrapVerificationResult.
@Override
protected void wrapVerificationResult(ComponentInstance si, CompositeAnalysisResult wrapper) {
AgreeProgram agreeProgram = new AgreeASTBuilder().getAgreeProgram(si, isMonolithic());
// generate different lustre depending on which model checker we are
// using
Program program;
if (AgreeUtils.usingKind2()) {
if (!isMonolithic()) {
throw new AgreeException("Kind2 now only supports monolithic verification");
}
program = LustreContractAstBuilder.getContractLustreProgram(agreeProgram);
} else {
program = LustreAstBuilder.getAssumeGuaranteeLustreProgram(agreeProgram);
}
List<Pair<String, Program>> consistencies = LustreAstBuilder.getConsistencyChecks(agreeProgram);
wrapper.addChild(createVerification("Contract Guarantees", si, program, agreeProgram, AnalysisType.AssumeGuarantee));
for (Pair<String, Program> consistencyAnalysis : consistencies) {
wrapper.addChild(createVerification(consistencyAnalysis.getFirst(), si, consistencyAnalysis.getSecond(), agreeProgram, AnalysisType.Consistency));
}
}
use of com.rockwellcollins.atc.agree.analysis.ast.AgreeASTBuilder in project AMASE by loonwerks.
the class GenMCSHandler method wrapVerificationResult.
@Override
protected void wrapVerificationResult(ComponentInstance si, CompositeAnalysisResult wrapper) {
AgreeProgram agreeProgram = new AgreeASTBuilder().getAgreeProgram(si, isMonolithic());
Program program;
if (AgreeUtils.usingKind2()) {
if (!isMonolithic()) {
throw new AgreeException("Kind2 now only supports monolithic verification");
}
program = LustreContractAstBuilder.getContractLustreProgram(agreeProgram);
} else {
program = LustreAstBuilder.getAssumeGuaranteeLustreProgram(agreeProgram);
}
wrapper.addChild(createVerification("Contract Guarantees", si, program, agreeProgram, AnalysisType.AssumeGuarantee));
}
use of com.rockwellcollins.atc.agree.analysis.ast.AgreeASTBuilder in project AGREE by loonwerks.
the class VerifyHandler method wrapVerificationResult.
protected void wrapVerificationResult(ComponentInstance si, CompositeAnalysisResult wrapper) {
AgreeProgram agreeProgram = new AgreeASTBuilder().getAgreeProgram(si, isMonolithic());
// generate different lustre depending on which model checker we are
// using
Program program;
if (AgreeUtils.usingKind2()) {
if (!isMonolithic()) {
throw new AgreeException("Kind2 now only supports monolithic verification");
}
program = LustreContractAstBuilder.getContractLustreProgram(agreeProgram);
} else {
program = LustreAstBuilder.getAssumeGuaranteeLustreProgram(agreeProgram);
}
List<Pair<String, Program>> consistencies = LustreAstBuilder.getConsistencyChecks(agreeProgram);
wrapper.addChild(createVerification("Contract Guarantees", si, program, agreeProgram, AnalysisType.AssumeGuarantee));
for (Pair<String, Program> consistencyAnalysis : consistencies) {
wrapper.addChild(createVerification(consistencyAnalysis.getFirst(), si, consistencyAnalysis.getSecond(), agreeProgram, AnalysisType.Consistency));
}
}
use of com.rockwellcollins.atc.agree.analysis.ast.AgreeASTBuilder in project AGREE by loonwerks.
the class AGREESimulationEngineFactoryHelper method createSimulationEngine.
public static SimulationEngine createSimulationEngine(final SystemInstance systemInstance, final ExceptionHandler exceptionHandler, final SimulationProgramType type) {
Objects.requireNonNull(systemInstance, "systemInstance must not be null");
Objects.requireNonNull(exceptionHandler, "exceptionHandler must not be null");
// Check that the component type is compatible
if (!isCompatible(systemInstance.getComponentImplementation())) {
final ComponentType componentType = systemInstance.getComponentClassifier().getType();
throw new RuntimeException(componentType.getName() + " does not contain an AGREE annex subclause.");
}
final AgreeProgram agreeProgram = new AgreeASTBuilder().getAgreeProgram(systemInstance, type.isMonolithic());
final SimulationProgram simulationProgram = AgreeProgramToSimulationProgram.transform(agreeProgram, type);
final Simulation simulation = new Simulation(simulationProgram);
return new AGREESimulationEngine(simulation, systemInstance, exceptionHandler);
}
use of com.rockwellcollins.atc.agree.analysis.ast.AgreeASTBuilder in project AGREE by loonwerks.
the class TcgLinkerFactory method wrapVerificationResult.
// Routines for actually building the verification results...
private void wrapVerificationResult(ComponentInstance si, CompositeAnalysisResult wrapper) {
AgreeProgram agreeProgram = new AgreeASTBuilder().getAgreeProgram(si, monolithicAnalysis);
Program program;
program = LustreAstBuilder.getAssumeGuaranteeLustreProgram(agreeProgram);
wrapper.addChild(createVerification("Contract Test Cases", si, program, agreeProgram));
}
Aggregations