Skip to content

Commit

Permalink
CLI: Improved output message when diagnosis fails due to UNKNOWN resu…
Browse files Browse the repository at this point in the history
…lts.
  • Loading branch information
andreaskatis authored and anmavrid committed May 23, 2024
1 parent a61efab commit 2c5faa5
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions fret-electron/app/cli/realizabilityCLI.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,15 @@ function printResultsinConsole(options, analysisResult, ccResult) {
console.log('\nDiagnosis results for connected component '+cc.ccName+':')
let ccConflictsTable = {}
let conflictIndex = 0;
cc.diagnosisReport.Conflicts.forEach(conflict => {
ccConflictsTable['Conflict '+ (conflictIndex+1)] = {'Requirements': conflict.Conflict}
conflictIndex++;
})
console.table(ccConflictsTable);
if (cc.diagnosisStatus !== 'ERROR') {
cc.diagnosisReport.Conflicts.forEach(conflict => {
ccConflictsTable['Conflict '+ (conflictIndex+1)] = {'Requirements': conflict.Conflict}
conflictIndex++;
})
console.table(ccConflictsTable);
} else {
console.log(cc.error);
}
})
} else if (compositionalResult.result === 'UNKNOWN') {
console.log('Diagnosis is not available for UNKNOWN results.')
Expand All @@ -79,11 +83,15 @@ function printResultsinConsole(options, analysisResult, ccResult) {
console.log('\nDiagnosis results for component '+ analysisResult.systemComponents[0].name +':')
let conflictsTable = {}
let conflictIndex = 0;
monolithicResult.diagnosisReport.Conflicts.forEach(conflict => {
conflictsTable['Conflict '+ (conflictIndex+1)] = {'Requirements': conflict.Conflict}
conflictIndex++;
})
console.table(conflictsTable);
if (monolithicResult.diagnosisStatus !== 'ERROR') {
monolithicResult.diagnosisReport.Conflicts.forEach(conflict => {
conflictsTable['Conflict '+ (conflictIndex+1)] = {'Requirements': conflict.Conflict}
conflictIndex++;
})
console.table(conflictsTable);
} else {
console.log(monolithicResult.error);
}
} else if (monolithicResult.result === 'UNKNOWN') {
console.log('Diagnosis is not available for UNKNOWN results.')
}
Expand Down

0 comments on commit 2c5faa5

Please sign in to comment.