-
Yingjian Wang authoredYingjian Wang authored
Connective.jrag 517 B
import java.util.*;
aspect Connective{
uncache Connective.eval();
syn boolean Connective.eval();
eq Conjunction.eval(){
return this.getLeft().eval() && this.getRight().eval();
}
eq Disjunction.eval(){
return this.getLeft().eval() || this.getRight().eval();
}
eq Implication.eval(){
return (!this.getLeft().eval()) || this.getRight().eval();
}
eq Negation.eval()= !getConnective().eval();
eq Atom.eval(){
return this.getRelation().eval();
}
}