如何从z3公式中获取变量列表?

时间:2015-12-05 06:16:51

标签: z3 z3py

我有一个Z3公式(在Z3py中)

func buildNavigationDrawer()
{
    // Navigate to Protected page
    let mainStoryBoard:UIStoryboard = UIStoryboard(name:"Main", bundle:nil)

    // Create View Controllers
    let mainPage = mainStoryBoard.instantiateViewControllerWithIdentifier("MainPageViewController") as! MainPageViewController

    let leftSideMenu:LeftSideViewController = mainStoryBoard.instantiateViewControllerWithIdentifier("LeftSideViewController") as! LeftSideViewController

    let rightSideMenu:RightSideViewController = mainStoryBoard.instantiateViewControllerWithIdentifier("RightSideViewController") as! RightSideViewController

    let mainPageNav = UINavigationController(rootViewController:mainPage)
    let leftSideMenuNav = UINavigationController(rootViewController:leftSideMenu)
    let rightSideMenuNav = UINavigationController(rootViewController:rightSideMenu)


    drawerContainer  = MMDrawerController(centerViewController: mainPageNav, leftDrawerViewController: leftSideMenuNav, rightDrawerViewController: rightSideMenuNav)


    drawerContainer!.openDrawerGestureModeMask = MMOpenDrawerGestureMode.PanningCenterView
    drawerContainer!.closeDrawerGestureModeMask = MMCloseDrawerGestureMode.PanningCenterView

    window?.rootViewController = drawerContainer


}

如何获取变量列表i=z3.Int('x')+z3.Int('y')<2 x

1 个答案:

答案 0 :(得分:0)

我在Z3中添加了一个示例来说明Python中的步行子表达式。 https://github.com/Z3Prover/z3/blob/master/examples/python/visitor.py