Ejemplo n.º 1
0
def form_mutex_check(varnames, expected_formulae):
    # More like a regression test given fragility of formula strings.
    assert mutex(varnames) == expected_formulae
Ejemplo n.º 2
0
# The system specification describes how the system is allowed to move
# and what the system is required to do in response to an environmental
# action.  
#
sys_vars = {'X0', 'X1', 'X2', 'X3', 'X4', 'X5'}
sys_init = {'X0'}
sys_safe = {
    'X0 -> X (X1 || X3)',
    'X1 -> X (X0 || X4 || X2)',
    'X2 -> X (X1 || X5)',
    'X3 -> X (X0 || X4)',
    'X4 -> X (X3 || X1 || X5)',
    'X5 -> X (X4 || X2)',
}

sys_safe |= spec.mutex({'X0', 'X1', 'X2', 'X3', 'X4', 'X5'})

sys_prog = set()                # empty set

# 
# System specification
#
# The system specification is that the robot should repeatedly revisit
# the upper right corner of the grid while at the same time responding
# to the park signal by visiting the lower left corner.  The LTL
# specification is given by 
#
#     []<> X5 && [](park -> <>X0)
#
# Since this specification is not in GR(1) form, we introduce an
# environment variable X0reach that is initialized to True and the