Removed unused feature.
Optimized use statements in main. Simplified truth_combinations code a little. Updated OpenAPI spec
This commit is contained in:
@ -3,29 +3,50 @@ using TypeSpec.OpenAPI;
|
||||
|
||||
namespace Models;
|
||||
|
||||
@summary("A binary operator")
|
||||
enum BinaryOperator {
|
||||
AND,
|
||||
OR,
|
||||
IMPLICATION
|
||||
AND,
|
||||
OR,
|
||||
IMPLICATION,
|
||||
}
|
||||
|
||||
@summary("The inverse of an expression")
|
||||
model ExpressionNot {
|
||||
not: Expression;
|
||||
@summary("The expression to negate")
|
||||
not: Expression;
|
||||
}
|
||||
|
||||
@summary("A binary expression")
|
||||
model ExpressionBinary {
|
||||
left: Expression;
|
||||
operator: BinaryOperator;
|
||||
right: Expression;
|
||||
@summary("The left expression")
|
||||
left: Expression;
|
||||
|
||||
@summary("The binary operator")
|
||||
operator: BinaryOperator;
|
||||
|
||||
@summary("The right expression")
|
||||
right: Expression;
|
||||
}
|
||||
|
||||
@summary("An atomic expression")
|
||||
model ExpressionAtomic {
|
||||
atomic: string;
|
||||
@summary("The atomic value")
|
||||
atomic: string;
|
||||
}
|
||||
|
||||
@oneOf
|
||||
@summary("A truth expression")
|
||||
union Expression {
|
||||
ExpressionNot;
|
||||
ExpressionBinary;
|
||||
ExpressionAtomic;
|
||||
}
|
||||
ExpressionNot,
|
||||
ExpressionBinary,
|
||||
ExpressionAtomic,
|
||||
}
|
||||
|
||||
@summary("A truth table")
|
||||
model TruthTable {
|
||||
@summary("The header of the truth table")
|
||||
header: string[];
|
||||
|
||||
@summary("The rows and columns of the truth table")
|
||||
truthMatrix: boolean[][];
|
||||
}
|
||||
|
Reference in New Issue
Block a user