예제 #1
0
파일: hypy.py 프로젝트: ystex/hyst
import argparse
import shutil

import hybridpy.hybrid_tool as hybrid_tool
from hybridpy.hybrid_tool import get_env_var_path
from hybridpy.hybrid_tool import random_string

from hybridpy.tool_flowstar import FlowstarTool
from hybridpy.tool_dreach import DReachTool
from hybridpy.tool_spaceex import SpaceExTool
from hybridpy.tool_hycreate import HyCreateTool
from hybridpy.tool_pysim import PySimTool

# tools for which models can be generated
TOOLS = {'flowstar':FlowstarTool(), 'hycreate':HyCreateTool(), \
         'spaceex':SpaceExTool(), 'dreach':DReachTool(), 'pysim':PySimTool()}


# return codes for Engine.run()
def enum(**enums):
    '''return codes for Engine.run()'''
    return type('Enum', (), enums)

RUN_CODES = enum(SUCCESS='Success', ERROR_TOOL='Error (Tool)', \
    ERROR_UNSUPPORTED='Error (Unsupported Dynamics)', ERROR_CONVERSION='Error (Conversion)', \
    TIMEOUT_CONVERSION='Timeout (Conversion)', TIMEOUT_TOOL='Timeout (Tool)')

EXIT_CODE_TERM = 143


def get_error_run_codes():
예제 #2
0
파일: hypy.py 프로젝트: tianshubao1/hyst
import argparse
import shutil

import hybridpy.hybrid_tool as hybrid_tool
from hybridpy.hybrid_tool import get_tool_path
from hybridpy.hybrid_tool import random_string

from hybridpy.tool_flowstar import FlowstarTool
from hybridpy.tool_dreach import DReachTool
from hybridpy.tool_spaceex import SpaceExTool
from hybridpy.tool_pysim import PySimTool
from hybridpy.tool_hylaa2 import Hylaa2Tool

# tools for which models can be generated
TOOLS = {'flowstar':FlowstarTool(), 'spaceex':SpaceExTool(), 
         'dreach':DReachTool(), 'pysim':PySimTool(), 'hylaa':Hylaa2Tool()}

EXIT_CODE_TERM = 143

def _get_all_toolnames():
    ''' get a comma-separated list of all tool names'''
    rv = ''

    for t in TOOLS:
        if len(rv) > 0:
            rv += ", "

        rv += t

    return rv
예제 #3
0
파일: hypy.py 프로젝트: leanderBehr/hyst
import hybridpy.hybrid_tool as hybrid_tool
from hybridpy.hybrid_tool import get_tool_path
from hybridpy.hybrid_tool import random_string

from hybridpy.tool_flowstar import FlowstarTool
from hybridpy.tool_dreach import DReachTool
from hybridpy.tool_spaceex import SpaceExTool
from hybridpy.tool_pysim import PySimTool
from hybridpy.tool_hylaa2 import Hylaa2Tool

# tools for which models can be generated
TOOLS = {
    'flowstar': FlowstarTool(),
    'spaceex': SpaceExTool(),
    'dreach': DReachTool(),
    'pysim': PySimTool(),
    'hylaa': Hylaa2Tool()
}

EXIT_CODE_TERM = 143


def _get_all_toolnames():
    ''' get a comma-separated list of all tool names'''
    rv = ''

    for t in TOOLS:
        if len(rv) > 0:
            rv += ", "