public string Visit(Model.Verification.BinaryProperty expression) { var leftOperand = expression.LeftOperand.Accept(this); var rightOperand = expression.RightOperand.Accept(this); var translation = string.Empty; switch (expression.Operator) { case TemporalOperator.Until: translation = string.Format("({0} && state != step_complete) U ({1} && state == step_complete)", leftOperand, rightOperand); break; case TemporalOperator.FollowedBy: translation = string.Format("[] (({0} -> <> ({1} && state == step_complete)) || state != step_complete)", leftOperand, rightOperand); break; case TemporalOperator.PrecededBy: translation = string.Format("!((!({0}) || state != step_complete) U (!({0}) && {1} && state == step_complete))", leftOperand, rightOperand); break; } return(translation); }
public string Visit(Model.Verification.BinaryProperty expression) { var leftOperand = expression.LeftOperand.Accept(this); var rightOperand = expression.RightOperand.Accept(this); var translation = string.Empty; switch (expression.Operator) { case TemporalOperator.Until: translation = string.Format("A [({0} & !pInS) U ({1} & pInS)]", leftOperand, rightOperand); break; case TemporalOperator.FollowedBy: translation = string.Format("AG (({0} -> EF ({1} & pInS)) | !pInS)", leftOperand, rightOperand); break; // Mehmet has changed to the following line which he believes the correct form of preceded-by is //case TemporalOperator.PrecededBy: translation = string.Format("!(E [!({1}) U (!({1}) & {0})])", leftOperand, rightOperand); break; case TemporalOperator.PrecededBy: translation = string.Format("!(E [(!({0}) | !pInS) U (!({0}) & {1} & pInS)])", leftOperand, rightOperand); break; } return(translation); }