master > master: codego - iff

This commit is contained in:
RD
2021-05-15 00:05:03 +02:00
parent 9b225b0551
commit 79bfcf57bb
5 changed files with 24 additions and 4 deletions

View File

@@ -139,6 +139,11 @@ func (ant antlrTree) toFormula() formulae.Formula {
if nChildren == 3 {
return formulae.Implies(subants[0].toFormula(), subants[2].toFormula())
}
case "iff":
// NOTE: expr = expr <=> expr
if nChildren == 3 {
return formulae.DoubleImplication(subants[0].toFormula(), subants[2].toFormula())
}
case "and", "or":
// NOTE: expr = expr op expr op ... op expr
var n int = int((len(subants) + 1) / 2)