Example #1
0
        public string Visit(Model.Verification.UnaryProperty expression)
        {
            var operand     = expression.Operand.Accept(this);
            var translation = string.Empty;

            switch (expression.Operator)
            {
            case TemporalOperator.Next: translation = string.Format("EX (!pInS U ({0} & pInS))", operand); break;

            case TemporalOperator.Eventually: translation = string.Format("EF ({0} & pInS)", operand); break;

            case TemporalOperator.Always: translation = string.Format("AG ({0} | !pInS)", operand); break;

            case TemporalOperator.Never: translation = string.Format("!(EF ({0} & pInS))", operand); break;

            case TemporalOperator.InfinitelyOften: translation = string.Format("AG (EF ({0} & pInS) | !pInS)", operand); break;

            case TemporalOperator.SteadyState: translation = string.Format("AF (AG ({0} | !pInS) & pInS)", operand); break;
            }

            return(translation);
        }
        public string Visit(Model.Verification.UnaryProperty expression)
        {
            var operand     = expression.Operand.Accept(this);
            var translation = string.Empty;

            switch (expression.Operator)
            {
            case TemporalOperator.Next: translation = string.Format("X (state != step_complete U ({0} && state == step_complete))", operand); break;

            case TemporalOperator.Eventually: translation = string.Format("<> ({0} && state == step_complete)", operand); break;

            case TemporalOperator.Always: translation = string.Format("[] ({0} || state != step_complete)", operand); break;

            case TemporalOperator.Never: translation = string.Format("!(<> ({0} && state == step_complete))", operand); break;

            case TemporalOperator.InfinitelyOften: translation = string.Format("[] (<> ({0} && state == step_complete) || state != step_complete)", operand); break;

            case TemporalOperator.SteadyState: translation = string.Format("<> ([] ({0} || state != step_complete) && state == step_complete)", operand); break;
            }

            return(translation);
        }