3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-22 16:45:31 +00:00

moved dll and examples

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-10-23 16:33:20 -07:00
parent 81fd292c66
commit e2f4943b4e
24 changed files with 0 additions and 0 deletions

27
src/dll/dll.cpp Normal file
View file

@ -0,0 +1,27 @@
#include "windows.h"
#ifdef _MANAGED
#pragma managed(push, off)
#endif
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#ifdef _MANAGED
#pragma managed(pop)
#endif

101
src/dll/dll.rc Normal file
View file

@ -0,0 +1,101 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,2,0,0
PRODUCTVERSION 4,2,0,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "Z3 Dynamic Link Library"
VALUE "FileVersion" "4,2,0,0"
VALUE "InternalName", "Z3 DLL"
VALUE "LegalCopyright", "(c) Microsoft Corporation. All rights reserved."
VALUE "OriginalFilename", "z3.dll"
VALUE "ProductName", "Z3"
VALUE "ProductVersion", "4,2,0,0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="commercial|Win32">
@ -17,6 +17,14 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="external_64|Win32">
<Configuration>external_64</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="external_64|x64">
<Configuration>external_64</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="external|Win32">
<Configuration>external</Configuration>
<Platform>Win32</Platform>
@ -41,65 +49,99 @@
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="trace|Win32">
<Configuration>trace</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="trace|x64">
<Configuration>trace</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{9E76526D-EDA2-4B88-9616-A8FC08F31071}</ProjectGuid>
<RootNamespace>test_capi</RootNamespace>
<ProjectGuid>{0BF8CB94-61C7-4545-AE55-C58D858AA8B6}</ProjectGuid>
<RootNamespace>dll</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='trace|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='external|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='external_64|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='external|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='trace|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='external|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='commercial|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='external_64|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='external|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='commercial|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='trace|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='external_64|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='external|Win32'" Label="PropertySheets">
@ -108,13 +150,19 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'" Label="PropertySheets">
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='trace|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='external_64|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='external|x64'" Label="PropertySheets">
@ -123,7 +171,7 @@
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='commercial|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'" Label="PropertySheets">
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
@ -138,36 +186,66 @@
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='external|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='external|Win32'">$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='external|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='external|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='external|x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='external|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='external|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='external|Win32'">$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='external|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='external|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='external|x64'">$(Platform)\$(Configuration)\</IntDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='external|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='external_64|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='external_64|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='external_64|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='external_64|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='external_64|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='external_64|x64'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='trace|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='trace|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='trace|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='trace|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='trace|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='trace|x64'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='external_64|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='external_64|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='external_64|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='external_64|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='external_64|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='external_64|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='external|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='external|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='external|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='external|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='external|x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='commercial|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='external|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='commercial|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'" />
@ -175,29 +253,36 @@
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='external|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='external|Win32'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='external|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='external|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='external|x64'" />
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='commercial|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='external|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='commercial|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='trace|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='trace|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='trace|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='trace|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='trace|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='trace|x64'" />
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='external_64|x64'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='external_64|Win32'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='external|Win32'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='trace|Win32'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='external|x64'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">z3</TargetName>
<TargetName Condition="'$(Configuration)|$(Platform)'=='trace|x64'">z3</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CONSOLE;Z3DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@ -207,8 +292,11 @@
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)z3.dll</OutputFile>
<ModuleDefinitionFile>z3.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<ProgramDatabaseFile>$(TargetDir)z3_dll.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
@ -221,8 +309,7 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CONSOLE;Z3DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@ -232,63 +319,17 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)z3.dll</OutputFile>
<ModuleDefinitionFile>z3.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'">
<ClCompile>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>8388608</StackReserveSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<StackReserveSize>8388608</StackReserveSize>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ProgramDatabaseFile>$(TargetDir)z3_dll.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CONSOLE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
@ -296,50 +337,11 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)z3.dll</OutputFile>
<ModuleDefinitionFile>z3.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='external|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CONSOLE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CONSOLE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<ProgramDatabaseFile>$(TargetDir)z3_dll.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
@ -353,8 +355,7 @@
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CONSOLE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
@ -362,20 +363,68 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)z3.dll</OutputFile>
<ModuleDefinitionFile>z3.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<ProgramDatabaseFile>$(TargetDir)z3_dll.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='external|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)z3.dll</OutputFile>
<ModuleDefinitionFile>z3.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)z3_dll.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)z3.dll</OutputFile>
<ModuleDefinitionFile>z3.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)z3_dll.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='external|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CONSOLE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_AMD64_;WIN32;NDEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
@ -383,8 +432,11 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)z3.dll</OutputFile>
<ModuleDefinitionFile>z3.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<ProgramDatabaseFile>$(TargetDir)z3_dll.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
@ -395,8 +447,7 @@
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>..\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CONSOLE;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
@ -404,21 +455,169 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)z3.dll</OutputFile>
<ModuleDefinitionFile>z3.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<ProgramDatabaseFile>$(TargetDir)z3_dll.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)z3.dll</OutputFile>
<ModuleDefinitionFile>z3.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)z3_dll.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release_mt|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)z3.dll</OutputFile>
<ModuleDefinitionFile>z3.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)z3_dll.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(TargetName).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='external_64|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)z3.dll</OutputFile>
<ModuleDefinitionFile>z3.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)z3_dll.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='external_64|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)z3.dll</OutputFile>
<ModuleDefinitionFile>z3.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)z3_dll.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='trace|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)z3.dll</OutputFile>
<ModuleDefinitionFile>z3.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)z3_dll.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='trace|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DLL_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<OutputFile>$(OutDir)z3.dll</OutputFile>
<ModuleDefinitionFile>z3.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(TargetDir)z3_dll.pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="test_capi.c" />
<ClCompile Include="dll.cpp" />
</ItemGroup>
<ItemGroup>
<None Include="z3.def" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="dll.rc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\dll\dll.vcxproj">
<Project>{0bf8cb94-61c7-4545-ae55-c58d858aa8b6}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\lib\lib.vcxproj">
<Project>{4a7e5a93-19d8-4382-8950-fb2edec7a76e}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>

14
src/dll/resource.h Normal file
View file

@ -0,0 +1,14 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by dll.rc
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

528
src/dll/z3.def Normal file
View file

@ -0,0 +1,528 @@
LIBRARY "Z3"
EXPORTS
Z3_mk_config @3
Z3_del_config @4
Z3_set_param_value @5
Z3_mk_context @6
Z3_mk_context_rc @7
Z3_del_context @8
Z3_inc_ref @9
Z3_dec_ref @10
Z3_update_param_value @11
Z3_get_param_value @12
Z3_interrupt @13
Z3_mk_params @14
Z3_params_inc_ref @15
Z3_params_dec_ref @16
Z3_params_set_bool @17
Z3_params_set_uint @18
Z3_params_set_double @19
Z3_params_set_symbol @20
Z3_params_to_string @21
Z3_params_validate @22
Z3_param_descrs_inc_ref @23
Z3_param_descrs_dec_ref @24
Z3_param_descrs_get_kind @25
Z3_param_descrs_size @26
Z3_param_descrs_get_name @27
Z3_param_descrs_to_string @28
Z3_mk_int_symbol @29
Z3_mk_string_symbol @30
Z3_mk_uninterpreted_sort @31
Z3_mk_bool_sort @32
Z3_mk_int_sort @33
Z3_mk_real_sort @34
Z3_mk_bv_sort @35
Z3_mk_finite_domain_sort @36
Z3_mk_array_sort @37
Z3_mk_tuple_sort @38
Z3_mk_enumeration_sort @39
Z3_mk_list_sort @40
Z3_mk_constructor @41
Z3_del_constructor @42
Z3_mk_datatype @43
Z3_mk_constructor_list @44
Z3_del_constructor_list @45
Z3_mk_datatypes @46
Z3_query_constructor @47
Z3_mk_func_decl @48
Z3_mk_app @49
Z3_mk_const @50
Z3_mk_fresh_func_decl @51
Z3_mk_fresh_const @52
Z3_mk_true @53
Z3_mk_false @54
Z3_mk_eq @55
Z3_mk_distinct @56
Z3_mk_not @57
Z3_mk_ite @58
Z3_mk_iff @59
Z3_mk_implies @60
Z3_mk_xor @61
Z3_mk_and @62
Z3_mk_or @63
Z3_mk_add @64
Z3_mk_mul @65
Z3_mk_sub @66
Z3_mk_unary_minus @67
Z3_mk_div @68
Z3_mk_mod @69
Z3_mk_rem @70
Z3_mk_power @71
Z3_mk_lt @72
Z3_mk_le @73
Z3_mk_gt @74
Z3_mk_ge @75
Z3_mk_int2real @76
Z3_mk_real2int @77
Z3_mk_is_int @78
Z3_mk_bvnot @79
Z3_mk_bvredand @80
Z3_mk_bvredor @81
Z3_mk_bvand @82
Z3_mk_bvor @83
Z3_mk_bvxor @84
Z3_mk_bvnand @85
Z3_mk_bvnor @86
Z3_mk_bvxnor @87
Z3_mk_bvneg @88
Z3_mk_bvadd @89
Z3_mk_bvsub @90
Z3_mk_bvmul @91
Z3_mk_bvudiv @92
Z3_mk_bvsdiv @93
Z3_mk_bvurem @94
Z3_mk_bvsrem @95
Z3_mk_bvsmod @96
Z3_mk_bvult @97
Z3_mk_bvslt @98
Z3_mk_bvule @99
Z3_mk_bvsle @100
Z3_mk_bvuge @101
Z3_mk_bvsge @102
Z3_mk_bvugt @103
Z3_mk_bvsgt @104
Z3_mk_concat @105
Z3_mk_extract @106
Z3_mk_sign_ext @107
Z3_mk_zero_ext @108
Z3_mk_repeat @109
Z3_mk_bvshl @110
Z3_mk_bvlshr @111
Z3_mk_bvashr @112
Z3_mk_rotate_left @113
Z3_mk_rotate_right @114
Z3_mk_ext_rotate_left @115
Z3_mk_ext_rotate_right @116
Z3_mk_int2bv @117
Z3_mk_bv2int @118
Z3_mk_bvadd_no_overflow @119
Z3_mk_bvadd_no_underflow @120
Z3_mk_bvsub_no_overflow @121
Z3_mk_bvsub_no_underflow @122
Z3_mk_bvsdiv_no_overflow @123
Z3_mk_bvneg_no_overflow @124
Z3_mk_bvmul_no_overflow @125
Z3_mk_bvmul_no_underflow @126
Z3_mk_select @127
Z3_mk_store @128
Z3_mk_const_array @129
Z3_mk_map @130
Z3_mk_array_default @131
Z3_mk_set_sort @132
Z3_mk_empty_set @133
Z3_mk_full_set @134
Z3_mk_set_add @135
Z3_mk_set_del @136
Z3_mk_set_union @137
Z3_mk_set_intersect @138
Z3_mk_set_difference @139
Z3_mk_set_complement @140
Z3_mk_set_member @141
Z3_mk_set_subset @142
Z3_mk_numeral @143
Z3_mk_real @144
Z3_mk_int @145
Z3_mk_unsigned_int @146
Z3_mk_int64 @147
Z3_mk_unsigned_int64 @148
Z3_mk_pattern @149
Z3_mk_bound @150
Z3_mk_forall @151
Z3_mk_exists @152
Z3_mk_quantifier @153
Z3_mk_quantifier_ex @154
Z3_mk_forall_const @155
Z3_mk_exists_const @156
Z3_mk_quantifier_const @157
Z3_mk_quantifier_const_ex @158
Z3_get_symbol_kind @159
Z3_get_symbol_int @160
Z3_get_symbol_string @161
Z3_get_sort_name @162
Z3_get_sort_id @163
Z3_sort_to_ast @164
Z3_is_eq_sort @165
Z3_get_sort_kind @166
Z3_get_bv_sort_size @167
Z3_get_finite_domain_sort_size @168
Z3_get_array_sort_domain @169
Z3_get_array_sort_range @170
Z3_get_tuple_sort_mk_decl @171
Z3_get_tuple_sort_num_fields @172
Z3_get_tuple_sort_field_decl @173
Z3_get_datatype_sort_num_constructors @174
Z3_get_datatype_sort_constructor @175
Z3_get_datatype_sort_recognizer @176
Z3_get_datatype_sort_constructor_accessor @177
Z3_get_relation_arity @178
Z3_get_relation_column @179
Z3_func_decl_to_ast @180
Z3_is_eq_func_decl @181
Z3_get_func_decl_id @182
Z3_get_decl_name @183
Z3_get_decl_kind @184
Z3_get_domain_size @185
Z3_get_arity @186
Z3_get_domain @187
Z3_get_range @188
Z3_get_decl_num_parameters @189
Z3_get_decl_parameter_kind @190
Z3_get_decl_int_parameter @191
Z3_get_decl_double_parameter @192
Z3_get_decl_symbol_parameter @193
Z3_get_decl_sort_parameter @194
Z3_get_decl_ast_parameter @195
Z3_get_decl_func_decl_parameter @196
Z3_get_decl_rational_parameter @197
Z3_app_to_ast @198
Z3_get_app_decl @199
Z3_get_app_num_args @200
Z3_get_app_arg @201
Z3_is_eq_ast @202
Z3_get_ast_id @203
Z3_get_ast_hash @204
Z3_get_sort @205
Z3_is_well_sorted @206
Z3_get_bool_value @207
Z3_get_ast_kind @208
Z3_is_app @209
Z3_is_numeral_ast @210
Z3_is_algebraic_number @211
Z3_to_app @212
Z3_to_func_decl @213
Z3_get_numeral_string @214
Z3_get_numeral_decimal_string @215
Z3_get_numerator @216
Z3_get_denominator @217
Z3_get_numeral_small @218
Z3_get_numeral_int @219
Z3_get_numeral_uint @220
Z3_get_numeral_uint64 @221
Z3_get_numeral_int64 @222
Z3_get_numeral_rational_int64 @223
Z3_get_algebraic_number_lower @224
Z3_get_algebraic_number_upper @225
Z3_pattern_to_ast @226
Z3_get_pattern_num_terms @227
Z3_get_pattern @228
Z3_get_index_value @229
Z3_is_quantifier_forall @230
Z3_get_quantifier_weight @231
Z3_get_quantifier_num_patterns @232
Z3_get_quantifier_pattern_ast @233
Z3_get_quantifier_num_no_patterns @234
Z3_get_quantifier_no_pattern_ast @235
Z3_get_quantifier_num_bound @236
Z3_get_quantifier_bound_name @237
Z3_get_quantifier_bound_sort @238
Z3_get_quantifier_body @239
Z3_simplify @240
Z3_simplify_ex @241
Z3_simplify_get_help @242
Z3_simplify_get_param_descrs @243
Z3_update_term @244
Z3_substitute @245
Z3_substitute_vars @246
Z3_translate @247
Z3_model_inc_ref @248
Z3_model_dec_ref @249
Z3_model_eval @250
Z3_model_get_const_interp @251
Z3_model_get_func_interp @252
Z3_model_get_num_consts @253
Z3_model_get_const_decl @254
Z3_model_get_num_funcs @255
Z3_model_get_func_decl @256
Z3_model_get_num_sorts @257
Z3_model_get_sort @258
Z3_model_get_sort_universe @259
Z3_is_as_array @260
Z3_get_as_array_func_decl @261
Z3_func_interp_inc_ref @262
Z3_func_interp_dec_ref @263
Z3_func_interp_get_num_entries @264
Z3_func_interp_get_entry @265
Z3_func_interp_get_else @266
Z3_func_interp_get_arity @267
Z3_func_entry_inc_ref @268
Z3_func_entry_dec_ref @269
Z3_func_entry_get_value @270
Z3_func_entry_get_num_args @271
Z3_func_entry_get_arg @272
Z3_open_log @273
Z3_append_log @274
Z3_close_log @275
Z3_toggle_warning_messages @276
Z3_set_ast_print_mode @277
Z3_ast_to_string @278
Z3_pattern_to_string @279
Z3_sort_to_string @280
Z3_func_decl_to_string @281
Z3_model_to_string @282
Z3_benchmark_to_smtlib_string @283
Z3_parse_smtlib2_string @284
Z3_parse_smtlib2_file @285
Z3_parse_smtlib_string @286
Z3_parse_smtlib_file @287
Z3_get_smtlib_num_formulas @288
Z3_get_smtlib_formula @289
Z3_get_smtlib_num_assumptions @290
Z3_get_smtlib_assumption @291
Z3_get_smtlib_num_decls @292
Z3_get_smtlib_decl @293
Z3_get_smtlib_num_sorts @294
Z3_get_smtlib_sort @295
Z3_get_smtlib_error @296
Z3_parse_z3_string @297
Z3_parse_z3_file @298
Z3_get_error_code @299
Z3_set_error_handler @300
Z3_set_error @301
Z3_get_error_msg @302
Z3_get_error_msg_ex @303
Z3_get_version @304
Z3_reset_memory @305
Z3_mk_theory @306
Z3_theory_get_ext_data @307
Z3_theory_mk_sort @308
Z3_theory_mk_value @309
Z3_theory_mk_constant @310
Z3_theory_mk_func_decl @311
Z3_theory_get_context @312
Z3_set_delete_callback @313
Z3_set_reduce_app_callback @314
Z3_set_reduce_eq_callback @315
Z3_set_reduce_distinct_callback @316
Z3_set_new_app_callback @317
Z3_set_new_elem_callback @318
Z3_set_init_search_callback @319
Z3_set_push_callback @320
Z3_set_pop_callback @321
Z3_set_restart_callback @322
Z3_set_reset_callback @323
Z3_set_final_check_callback @324
Z3_set_new_eq_callback @325
Z3_set_new_diseq_callback @326
Z3_set_new_assignment_callback @327
Z3_set_new_relevant_callback @328
Z3_theory_assert_axiom @329
Z3_theory_assume_eq @330
Z3_theory_enable_axiom_simplification @331
Z3_theory_get_eqc_root @332
Z3_theory_get_eqc_next @333
Z3_theory_get_num_parents @334
Z3_theory_get_parent @335
Z3_theory_is_value @336
Z3_theory_is_decl @337
Z3_theory_get_num_elems @338
Z3_theory_get_elem @339
Z3_theory_get_num_apps @340
Z3_theory_get_app @341
Z3_mk_fixedpoint @342
Z3_fixedpoint_inc_ref @343
Z3_fixedpoint_dec_ref @344
Z3_fixedpoint_add_rule @345
Z3_fixedpoint_add_fact @346
Z3_fixedpoint_assert @347
Z3_fixedpoint_query @348
Z3_fixedpoint_query_relations @349
Z3_fixedpoint_get_answer @350
Z3_fixedpoint_get_reason_unknown @351
Z3_fixedpoint_update_rule @352
Z3_fixedpoint_get_num_levels @353
Z3_fixedpoint_get_cover_delta @354
Z3_fixedpoint_add_cover @355
Z3_fixedpoint_get_statistics @356
Z3_fixedpoint_register_relation @357
Z3_fixedpoint_set_predicate_representation @358
Z3_fixedpoint_simplify_rules @359
Z3_fixedpoint_set_params @360
Z3_fixedpoint_get_help @361
Z3_fixedpoint_get_param_descrs @362
Z3_fixedpoint_to_string @363
Z3_fixedpoint_push @364
Z3_fixedpoint_pop @365
Z3_fixedpoint_init @366
Z3_fixedpoint_set_reduce_assign_callback @367
Z3_fixedpoint_set_reduce_app_callback @368
Z3_mk_ast_vector @369
Z3_ast_vector_inc_ref @370
Z3_ast_vector_dec_ref @371
Z3_ast_vector_size @372
Z3_ast_vector_get @373
Z3_ast_vector_set @374
Z3_ast_vector_resize @375
Z3_ast_vector_push @376
Z3_ast_vector_translate @377
Z3_ast_vector_to_string @378
Z3_mk_ast_map @379
Z3_ast_map_inc_ref @380
Z3_ast_map_dec_ref @381
Z3_ast_map_contains @382
Z3_ast_map_find @383
Z3_ast_map_insert @384
Z3_ast_map_erase @385
Z3_ast_map_reset @386
Z3_ast_map_size @387
Z3_ast_map_keys @388
Z3_ast_map_to_string @389
Z3_mk_goal @390
Z3_goal_inc_ref @391
Z3_goal_dec_ref @392
Z3_goal_precision @393
Z3_goal_assert @394
Z3_goal_inconsistent @395
Z3_goal_depth @396
Z3_goal_reset @397
Z3_goal_size @398
Z3_goal_formula @399
Z3_goal_num_exprs @400
Z3_goal_is_decided_sat @401
Z3_goal_is_decided_unsat @402
Z3_goal_translate @403
Z3_goal_to_string @404
Z3_mk_tactic @405
Z3_tactic_inc_ref @406
Z3_tactic_dec_ref @407
Z3_mk_probe @408
Z3_probe_inc_ref @409
Z3_probe_dec_ref @410
Z3_tactic_and_then @411
Z3_tactic_or_else @412
Z3_tactic_par_or @413
Z3_tactic_par_and_then @414
Z3_tactic_try_for @415
Z3_tactic_when @416
Z3_tactic_cond @417
Z3_tactic_repeat @418
Z3_tactic_skip @419
Z3_tactic_fail @420
Z3_tactic_fail_if @421
Z3_tactic_fail_if_not_decided @422
Z3_tactic_using_params @423
Z3_probe_const @424
Z3_probe_lt @425
Z3_probe_gt @426
Z3_probe_le @427
Z3_probe_ge @428
Z3_probe_eq @429
Z3_probe_and @430
Z3_probe_or @431
Z3_probe_not @432
Z3_get_num_tactics @433
Z3_get_tactic_name @434
Z3_get_num_probes @435
Z3_get_probe_name @436
Z3_tactic_get_help @437
Z3_tactic_get_param_descrs @438
Z3_tactic_get_descr @439
Z3_probe_get_descr @440
Z3_probe_apply @441
Z3_tactic_apply @442
Z3_tactic_apply_ex @443
Z3_apply_result_inc_ref @444
Z3_apply_result_dec_ref @445
Z3_apply_result_to_string @446
Z3_apply_result_get_num_subgoals @447
Z3_apply_result_get_subgoal @448
Z3_apply_result_convert_model @449
Z3_mk_solver @450
Z3_mk_simple_solver @451
Z3_mk_solver_for_logic @452
Z3_mk_solver_from_tactic @453
Z3_solver_get_help @454
Z3_solver_get_param_descrs @455
Z3_solver_set_params @456
Z3_solver_inc_ref @457
Z3_solver_dec_ref @458
Z3_solver_push @459
Z3_solver_pop @460
Z3_solver_reset @461
Z3_solver_get_num_scopes @462
Z3_solver_assert @463
Z3_solver_get_assertions @464
Z3_solver_check @465
Z3_solver_check_assumptions @466
Z3_solver_get_model @467
Z3_solver_get_proof @468
Z3_solver_get_unsat_core @469
Z3_solver_get_reason_unknown @470
Z3_solver_get_statistics @471
Z3_solver_to_string @472
Z3_stats_to_string @473
Z3_stats_inc_ref @474
Z3_stats_dec_ref @475
Z3_stats_size @476
Z3_stats_get_key @477
Z3_stats_is_uint @478
Z3_stats_is_double @479
Z3_stats_get_uint_value @480
Z3_stats_get_double_value @481
Z3_mk_injective_function @482
Z3_set_logic @483
Z3_push @484
Z3_pop @485
Z3_get_num_scopes @486
Z3_persist_ast @487
Z3_assert_cnstr @488
Z3_check_and_get_model @489
Z3_check @490
Z3_check_assumptions @491
Z3_get_implied_equalities @492
Z3_del_model @493
Z3_soft_check_cancel @494
Z3_get_search_failure @495
Z3_mk_label @496
Z3_get_relevant_labels @497
Z3_get_relevant_literals @498
Z3_get_guessed_literals @499
Z3_del_literals @500
Z3_get_num_literals @501
Z3_get_label_symbol @502
Z3_get_literal @503
Z3_disable_literal @504
Z3_block_literals @505
Z3_get_model_num_constants @506
Z3_get_model_constant @507
Z3_get_model_num_funcs @508
Z3_get_model_func_decl @509
Z3_eval_func_decl @510
Z3_is_array_value @511
Z3_get_array_value @512
Z3_get_model_func_else @513
Z3_get_model_func_num_entries @514
Z3_get_model_func_entry_num_args @515
Z3_get_model_func_entry_arg @516
Z3_get_model_func_entry_value @517
Z3_eval @518
Z3_eval_decl @519
Z3_context_to_string @520
Z3_statistics_to_string @521
Z3_get_context_assignment @522
Z3_mk_polynomial_manager @523
Z3_del_polynomial_manager @524
Z3_mk_zero_polynomial @525
Z3_polynomial_inc_ref @526
Z3_polynomial_dec_ref @527
Z3_polynomial_to_string @528

View file

@ -1,24 +0,0 @@
This directory contains scripts to build the test application using
Microsoft C compiler, or g++.
1) Using Microsoft C compiler
Use 'build.cmd' to build the test application using Microsoft C
compiler.
Remark: The Microsoft C compiler (cl) must be in your path,
or you can use the Visual Studio Command Prompt.
The script 'exec.cmd' adds the bin directory to the path. So,
example.exe can find z3.dll.
2) Using gcc
You must install Z3 before running this example.
To install Z3, execute the following command in the Z3 root directory.
sudo make install
Use 'build.sh' to build the test application using g++.
It generates the executable 'example'.

View file

@ -1 +0,0 @@
cl /EHsc /I ..\..\include /I . ..\..\bin\z3.lib example.cpp

View file

@ -1 +0,0 @@
cl /W3 /EHsc /I ..\lib ..\debug\z3_dbg.lib example.cpp

View file

@ -1,9 +0,0 @@
if g++ -fopenmp -o example example.cpp -lz3; then
echo "Example was successfully compiled."
echo "To run example, execute:"
echo " ./example"
else
echo "You must install Z3 before compiling this example."
echo "To install Z3, execute the following command in the Z3 root directory."
echo " sudo make install"
fi

View file

@ -1,701 +0,0 @@
#include"z3++.h"
using namespace z3;
/**
Demonstration of how Z3 can be used to prove validity of
De Morgan's Duality Law: {e not(x and y) <-> (not x) or ( not y) }
*/
void demorgan() {
std::cout << "de-Morgan example\n";
context c;
expr x = c.bool_const("x");
expr y = c.bool_const("y");
expr conjecture = !(x && y) == (!x || !y);
solver s(c);
// adding the negation of the conjecture as a constraint.
s.add(!conjecture);
std::cout << s << "\n";
switch (s.check()) {
case unsat: std::cout << "de-Morgan is valid\n"; break;
case sat: std::cout << "de-Morgan is not valid\n"; break;
case unknown: std::cout << "unknown\n"; break;
}
}
/**
\brief Find a model for <tt>x >= 1 and y < x + 3</tt>.
*/
void find_model_example1() {
std::cout << "find_model_example1\n";
context c;
expr x = c.int_const("x");
expr y = c.int_const("y");
solver s(c);
s.add(x >= 1);
s.add(y < x + 3);
std::cout << s.check() << "\n";
model m = s.get_model();
std::cout << m << "\n";
// traversing the model
for (unsigned i = 0; i < m.size(); i++) {
func_decl v = m[i];
// this problem contains only constants
assert(v.arity() == 0);
std::cout << v.name() << " = " << m.get_const_interp(v) << "\n";
}
// we can evaluate expressions in the model.
std::cout << "x + y + 1 = " << m.eval(x + y + 1) << "\n";
}
/**
\brief Prove <tt>x = y implies g(x) = g(y)</tt>, and
disprove <tt>x = y implies g(g(x)) = g(y)</tt>.
This function demonstrates how to create uninterpreted types and
functions.
*/
void prove_example1() {
std::cout << "prove_example1\n";
context c;
expr x = c.int_const("x");
expr y = c.int_const("y");
sort I = c.int_sort();
func_decl g = function("g", I, I);
solver s(c);
expr conjecture1 = implies(x == y, g(x) == g(y));
std::cout << "conjecture 1\n" << conjecture1 << "\n";
s.add(!conjecture1);
if (s.check() == unsat)
std::cout << "proved" << "\n";
else
std::cout << "failed to prove" << "\n";
s.reset(); // remove all assertions from solver s
expr conjecture2 = implies(x == y, g(g(x)) == g(y));
std::cout << "conjecture 2\n" << conjecture2 << "\n";
s.add(!conjecture2);
if (s.check() == unsat) {
std::cout << "proved" << "\n";
}
else {
std::cout << "failed to prove" << "\n";
model m = s.get_model();
std::cout << "counterexample:\n" << m << "\n";
std::cout << "g(g(x)) = " << m.eval(g(g(x))) << "\n";
std::cout << "g(y) = " << m.eval(g(y)) << "\n";
}
}
/**
\brief Prove <tt>not(g(g(x) - g(y)) = g(z)), x + z <= y <= x implies z < 0 </tt>.
Then, show that <tt>z < -1</tt> is not implied.
This example demonstrates how to combine uninterpreted functions and arithmetic.
*/
void prove_example2() {
std::cout << "prove_example1\n";
context c;
expr x = c.int_const("x");
expr y = c.int_const("y");
expr z = c.int_const("z");
sort I = c.int_sort();
func_decl g = function("g", I, I);
expr conjecture1 = implies(g(g(x) - g(y)) != g(z) && x + z <= y && y <= x,
z < 0);
solver s(c);
s.add(!conjecture1);
std::cout << "conjecture 1:\n" << conjecture1 << "\n";
if (s.check() == unsat)
std::cout << "proved" << "\n";
else
std::cout << "failed to prove" << "\n";
expr conjecture2 = implies(g(g(x) - g(y)) != g(z) && x + z <= y && y <= x,
z < -1);
s.reset();
s.add(!conjecture2);
std::cout << "conjecture 2:\n" << conjecture2 << "\n";
if (s.check() == unsat) {
std::cout << "proved" << "\n";
}
else {
std::cout << "failed to prove" << "\n";
std::cout << "counterexample:\n" << s.get_model() << "\n";
}
}
/**
\brief Nonlinear arithmetic example 1
*/
void nonlinear_example1() {
std::cout << "nonlinear example 1\n";
config cfg;
cfg.set(":auto-config", true);
context c(cfg);
expr x = c.real_const("x");
expr y = c.real_const("y");
expr z = c.real_const("z");
solver s(c);
s.add(x*x + y*y == 1); // x^2 + y^2 == 1
s.add(x*x*x + z*z*z < c.real_val("1/2")); // x^3 + z^3 < 1/2
s.add(z != 0);
std::cout << s.check() << "\n";
model m = s.get_model();
std::cout << m << "\n";
c.set(":pp-decimal", true); // set decimal notation
std::cout << "model in decimal notation\n";
std::cout << m << "\n";
c.set(":pp-decimal-precision", 50); // increase number of decimal places to 50.
std::cout << "model using 50 decimal places\n";
std::cout << m << "\n";
}
/**
\brief Simple function that tries to prove the given conjecture using the following steps:
1- create a solver
2- assert the negation of the conjecture
3- checks if the result is unsat.
*/
void prove(expr conjecture) {
context & c = conjecture.ctx();
solver s(c);
s.add(!conjecture);
std::cout << "conjecture:\n" << conjecture << "\n";
if (s.check() == unsat) {
std::cout << "proved" << "\n";
}
else {
std::cout << "failed to prove" << "\n";
std::cout << "counterexample:\n" << s.get_model() << "\n";
}
}
/**
\brief Simple bit-vector example. This example disproves that x - 10 <= 0 IFF x <= 10 for (32-bit) machine integers
*/
void bitvector_example1() {
std::cout << "bitvector example 1\n";
context c;
expr x = c.bv_const("x", 32);
// using signed <=
prove((x - 10 <= 0) == (x <= 10));
// using unsigned <=
prove(ule(x - 10, 0) == ule(x, 10));
}
/**
\brief Find x and y such that: x ^ y - 103 == x * y
*/
void bitvector_example2() {
std::cout << "bitvector example 2\n";
context c;
expr x = c.bv_const("x", 32);
expr y = c.bv_const("y", 32);
solver s(c);
// In C++, the operator == has higher precedence than ^.
s.add((x ^ y) - 103 == x * y);
std::cout << s << "\n";
std::cout << s.check() << "\n";
std::cout << s.get_model() << "\n";
}
/**
\brief Mixing C and C++ APIs.
*/
void capi_example() {
std::cout << "capi example\n";
context c;
expr x = c.bv_const("x", 32);
expr y = c.bv_const("y", 32);
// Invoking a C API function, and wrapping the result using an expr object.
expr r = to_expr(c, Z3_mk_bvsrem(c, x, y));
std::cout << "r: " << r << "\n";
}
/**
\brief Demonstrate how to evaluate expressions in a model.
*/
void eval_example1() {
std::cout << "eval example 1\n";
context c;
expr x = c.int_const("x");
expr y = c.int_const("y");
solver s(c);
/* assert x < y */
s.add(x < y);
/* assert x > 2 */
s.add(x > 2);
std::cout << s.check() << "\n";
model m = s.get_model();
std::cout << "Model:\n" << m << "\n";
std::cout << "x+y = " << m.eval(x+y) << "\n";
}
/**
\brief Several contexts can be used simultaneously.
*/
void two_contexts_example1() {
std::cout << "two contexts example 1\n";
context c1, c2;
expr x = c1.int_const("x");
expr n = x + 1;
// We cannot mix expressions from different contexts, but we can copy
// an expression from one context to another.
// The following statement copies the expression n from c1 to c2.
expr n1 = to_expr(c2, Z3_translate(c1, n, c2));
std::cout << n1 << "\n";
}
/**
\brief Demonstrates how to catch API usage errors.
*/
void error_example() {
std::cout << "error example\n";
context c;
expr x = c.bool_const("x");
// Error using the C API can be detected using Z3_get_error_code.
// The next call fails because x is a constant.
Z3_ast arg = Z3_get_app_arg(c, x, 0);
if (Z3_get_error_code(c) != Z3_OK) {
std::cout << "last call failed.\n";
}
// The C++ layer converts API usage errors into exceptions.
try {
// The next call fails because x is a Boolean.
expr n = x + 1;
}
catch (exception ex) {
std::cout << "failed: " << ex << "\n";
}
// The functions to_expr, to_sort and to_func_decl also convert C API errors into exceptions.
try {
expr arg = to_expr(c, Z3_get_app_arg(c, x, 0));
}
catch (exception ex) {
std::cout << "failed: " << ex << "\n";
}
}
/**
\brief Demonstrate different ways of creating rational numbers: decimal and fractional representations.
*/
void numeral_example() {
std::cout << "numeral example\n";
context c;
expr n1 = c.real_val("1/2");
expr n2 = c.real_val("0.5");
expr n3 = c.real_val(1, 2);
std::cout << n1 << " " << n2 << " " << n3 << "\n";
prove(n1 == n2 && n1 == n3);
n1 = c.real_val("-1/3");
n2 = c.real_val("-0.3333333333333333333333333333333333");
std::cout << n1 << " " << n2 << "\n";
prove(n1 != n2);
}
/**
\brief Test ite-term (if-then-else terms).
*/
void ite_example() {
std::cout << "if-then-else example\n";
context c;
expr f = c.bool_val(false);
expr one = c.int_val(1);
expr zero = c.int_val(0);
expr ite = to_expr(c, Z3_mk_ite(c, f, one, zero));
std::cout << "term: " << ite << "\n";
}
/**
\brief Unsat core example
*/
void unsat_core_example() {
std::cout << "unsat core example\n";
context c;
expr p1 = c.bool_const("p1");
expr p2 = c.bool_const("p2");
expr p3 = c.bool_const("p3");
expr x = c.int_const("x");
expr y = c.int_const("y");
solver s(c);
s.add(implies(p1, x > 10));
s.add(implies(p1, y > x));
s.add(implies(p2, y < 5));
s.add(implies(p3, y > 0));
expr assumptions[3] = { p1, p2, p3 };
std::cout << s.check(3, assumptions) << "\n";
expr_vector core = s.unsat_core();
std::cout << core << "\n";
std::cout << "size: " << core.size() << "\n";
for (unsigned i = 0; i < core.size(); i++) {
std::cout << core[i] << "\n";
}
// Trying again without p2
expr assumptions2[2] = { p1, p3 };
std::cout << s.check(2, assumptions2) << "\n";
}
void tactic_example1() {
/*
Z3 implements a methodology for orchestrating reasoning engines where "big" symbolic
reasoning steps are represented as functions known as tactics, and tactics are composed
using combinators known as tacticals. Tactics process sets of formulas called Goals.
When a tactic is applied to some goal G, four different outcomes are possible. The tactic succeeds
in showing G to be satisfiable (i.e., feasible); succeeds in showing G to be unsatisfiable (i.e., infeasible);
produces a sequence of subgoals; or fails. When reducing a goal G to a sequence of subgoals G1, ..., Gn,
we face the problem of model conversion. A model converter construct a model for G using a model for some subgoal Gi.
In this example, we create a goal g consisting of three formulas, and a tactic t composed of two built-in tactics:
simplify and solve-eqs. The tactic simplify apply transformations equivalent to the ones found in the command simplify.
The tactic solver-eqs eliminate variables using Gaussian elimination. Actually, solve-eqs is not restricted
only to linear arithmetic. It can also eliminate arbitrary variables.
Then, sequential composition combinator & applies simplify to the input goal and solve-eqs to each subgoal produced by simplify.
In this example, only one subgoal is produced.
*/
std::cout << "tactic example 1\n";
context c;
expr x = c.real_const("x");
expr y = c.real_const("y");
goal g(c);
g.add(x > 0);
g.add(y > 0);
g.add(x == y + 2);
std::cout << g << "\n";
tactic t1(c, "simplify");
tactic t2(c, "solve-eqs");
tactic t = t1 & t2;
apply_result r = t(g);
std::cout << r << "\n";
}
void tactic_example2() {
/*
In Z3, we say a clause is any constraint of the form (f_1 || ... || f_n).
The tactic split-clause will select a clause in the input goal, and split it n subgoals.
One for each subformula f_i.
*/
std::cout << "tactic example 2\n";
context c;
expr x = c.real_const("x");
expr y = c.real_const("y");
goal g(c);
g.add(x < 0 || x > 0);
g.add(x == y + 1);
g.add(y < 0);
tactic t(c, "split-clause");
apply_result r = t(g);
for (unsigned i = 0; i < r.size(); i++) {
std::cout << "subgoal " << i << "\n" << r[i] << "\n";
}
}
void tactic_example3() {
/*
- The choice combinator t | s first applies t to the given goal, if it fails then returns the result of s applied to the given goal.
- repeat(t) Keep applying the given tactic until no subgoal is modified by it.
- repeat(t, n) Keep applying the given tactic until no subgoal is modified by it, or the number of iterations is greater than n.
- try_for(t, ms) Apply tactic t to the input goal, if it does not return in ms millisenconds, it fails.
- with(t, params) Apply the given tactic using the given parameters.
*/
std::cout << "tactic example 3\n";
context c;
expr x = c.real_const("x");
expr y = c.real_const("y");
expr z = c.real_const("z");
goal g(c);
g.add(x == 0 || x == 1);
g.add(y == 0 || y == 1);
g.add(z == 0 || z == 1);
g.add(x + y + z > 2);
// split all clauses
tactic split_all = repeat(tactic(c, "split-clause") | tactic(c, "skip"));
std::cout << split_all(g) << "\n";
tactic split_at_most_2 = repeat(tactic(c, "split-clause") | tactic(c, "skip"), 1);
std::cout << split_at_most_2(g) << "\n";
// In the tactic split_solver, the tactic solve-eqs discharges all but one goal.
// Note that, this tactic generates one goal: the empty goal which is trivially satisfiable (i.e., feasible)
tactic split_solve = split_all & tactic(c, "solve-eqs");
std::cout << split_solve(g) << "\n";
}
void tactic_example4() {
/*
A tactic can be converted into a solver object using the method mk_solver().
If the tactic produces the empty goal, then the associated solver returns sat.
If the tactic produces a single goal containing False, then the solver returns unsat.
Otherwise, it returns unknown.
In this example, the tactic t implements a basic bit-vector solver using equation solving,
bit-blasting, and a propositional SAT solver.
We use the combinator `with` to configure our little solver.
We also include the tactic `aig` which tries to compress Boolean formulas using And-Inverted Graphs.
*/
std::cout << "tactic example 4\n";
context c;
params p(c);
p.set(":mul2concat", true);
tactic t =
with(tactic(c, "simplify"), p) &
tactic(c, "solve-eqs") &
tactic(c, "bit-blast") &
tactic(c, "aig") &
tactic(c, "sat");
solver s = t.mk_solver();
expr x = c.bv_const("x", 16);
expr y = c.bv_const("y", 16);
s.add(x*32 + y == 13);
// In C++, the operator < has higher precedence than &.
s.add((x & y) < 10);
s.add(y > -100);
std::cout << s.check() << "\n";
model m = s.get_model();
std::cout << m << "\n";
std::cout << "x*32 + y = " << m.eval(x*32 + y) << "\n";
std::cout << "x & y = " << m.eval(x & y) << "\n";
}
void tactic_example5() {
/*
The tactic smt wraps the main solver in Z3 as a tactic.
*/
std::cout << "tactic example 5\n";
context c;
expr x = c.int_const("x");
expr y = c.int_const("y");
solver s = tactic(c, "smt").mk_solver();
s.add(x > y + 1);
std::cout << s.check() << "\n";
std::cout << s.get_model() << "\n";
}
void tactic_example6() {
/*
In this example, we show how to implement a solver for integer arithmetic using SAT.
The solver is complete only for problems where every variable has a lower and upper bound.
*/
std::cout << "tactic example 6\n";
context c;
params p(c);
p.set(":arith-lhs", true);
p.set(":som", true); // sum-of-monomials normal form
solver s =
(with(tactic(c, "simplify"), p) &
tactic(c, "normalize-bounds") &
tactic(c, "lia2pb") &
tactic(c, "pb2bv") &
tactic(c, "bit-blast") &
tactic(c, "sat")).mk_solver();
expr x = c.int_const("x");
expr y = c.int_const("y");
expr z = c.int_const("z");
s.add(x > 0 && x < 10);
s.add(y > 0 && y < 10);
s.add(z > 0 && z < 10);
s.add(3*y + 2*x == z);
std::cout << s.check() << "\n";
std::cout << s.get_model() << "\n";
s.reset();
s.add(3*y + 2*x == z);
std::cout << s.check() << "\n";
}
void tactic_example7() {
/*
Tactics can be combined with solvers.
For example, we can apply a tactic to a goal, produced a set of subgoals,
then select one of the subgoals and solve it using a solver.
This example demonstrates how to do that, and
how to use model converters to convert a model for a subgoal into a model for the original goal.
*/
std::cout << "tactic example 7\n";
context c;
tactic t =
tactic(c, "simplify") &
tactic(c, "normalize-bounds") &
tactic(c, "solve-eqs");
expr x = c.int_const("x");
expr y = c.int_const("y");
expr z = c.int_const("z");
goal g(c);
g.add(x > 10);
g.add(y == x + 3);
g.add(z > y);
apply_result r = t(g);
// r contains only one subgoal
std::cout << r << "\n";
solver s(c);
goal subgoal = r[0];
for (unsigned i = 0; i < subgoal.size(); i++) {
s.add(subgoal[i]);
}
std::cout << s.check() << "\n";
model m = s.get_model();
std::cout << "model for subgoal:\n" << m << "\n";
std::cout << "model for original goal:\n" << r.convert_model(m) << "\n";
}
void tactic_example8() {
/*
Probes (aka formula measures) are evaluated over goals.
Boolean expressions over them can be built using relational operators and Boolean connectives.
The tactic fail_if(cond) fails if the given goal does not satisfy the condition cond.
Many numeric and Boolean measures are available in Z3.
In this example, we build a simple tactic using fail_if.
It also shows that a probe can be applied directly to a goal.
*/
std::cout << "tactic example 8\n";
context c;
expr x = c.int_const("x");
expr y = c.int_const("y");
expr z = c.int_const("z");
goal g(c);
g.add(x + y + z > 0);
probe p(c, "num-consts");
std::cout << "num-consts: " << p(g) << "\n";
tactic t = fail_if(p > 2);
try {
t(g);
}
catch (exception) {
std::cout << "tactic failed...\n";
}
std::cout << "trying again...\n";
g.reset();
g.add(x + y > 0);
std::cout << t(g) << "\n";
}
void tactic_example9() {
/*
The combinator (tactical) cond(p, t1, t2) is a shorthand for:
(fail_if(p) & t1) | t2
The combinator when(p, t) is a shorthand for:
cond(p, t, tactic(c, "skip"))
The tactic skip just returns the input goal.
This example demonstrates how to use the cond combinator.
*/
std::cout << "tactic example 9\n";
context c;
expr x = c.int_const("x");
expr y = c.int_const("y");
expr z = c.int_const("z");
goal g(c);
g.add(x*x - y*y >= 0);
probe p(c, "num-consts");
tactic t = cond(p > 2, tactic(c, "simplify"), tactic(c, "factor"));
std::cout << t(g) << "\n";
g.reset();
g.add(x + x + y + z >= 0);
g.add(x*x - y*y >= 0);
std::cout << t(g) << "\n";
}
void visit(expr const & e) {
if (e.is_app()) {
unsigned num = e.num_args();
for (unsigned i = 0; i < num; i++) {
visit(e.arg(i));
}
// do something
// Example: print the visited expression
func_decl f = e.decl();
std::cout << "application of " << f.name() << ": " << e << "\n";
}
else if (e.is_quantifier()) {
visit(e.body());
// do something
}
else {
assert(e.is_var());
// do something
}
}
void tst_visit() {
std::cout << "visit example\n";
context c;
expr x = c.int_const("x");
expr y = c.int_const("y");
expr z = c.int_const("z");
expr f = x*x - y*y >= 0;
visit(f);
}
int main() {
try {
demorgan(); std::cout << "\n";
find_model_example1(); std::cout << "\n";
prove_example1(); std::cout << "\n";
prove_example2(); std::cout << "\n";
nonlinear_example1(); std::cout << "\n";
bitvector_example1(); std::cout << "\n";
bitvector_example2(); std::cout << "\n";
capi_example(); std::cout << "\n";
eval_example1(); std::cout << "\n";
two_contexts_example1(); std::cout << "\n";
error_example(); std::cout << "\n";
numeral_example(); std::cout << "\n";
ite_example(); std::cout << "\n";
unsat_core_example(); std::cout << "\n";
tactic_example1(); std::cout << "\n";
tactic_example2(); std::cout << "\n";
tactic_example3(); std::cout << "\n";
tactic_example4(); std::cout << "\n";
tactic_example5(); std::cout << "\n";
tactic_example6(); std::cout << "\n";
tactic_example7(); std::cout << "\n";
tactic_example8(); std::cout << "\n";
tactic_example9(); std::cout << "\n";
tst_visit(); std::cout << "\n";
std::cout << "done\n";
}
catch (exception & ex) {
std::cout << "unexpected error: " << ex << "\n";
}
return 0;
}

View file

@ -1,5 +0,0 @@
@echo off
SETLOCAL
set PATH=..\..\bin;%PATH%
example.exe
ENDLOCAL

File diff suppressed because it is too large Load diff

View file

@ -1,16 +0,0 @@
WARNING: this example still uses the old Z3 (version 3.x) C API.
The current version is backward compatible.
This directory contains scripts to build the MaxSAT application using
Microsoft C compiler, or gcc.
1) Using Microsoft C compiler (with binary release)
Use 'build.cmd' to build the MaxSAT application using Microsoft C compiler.
Remark: The Microsoft C compiler (cl) must be in your path,
or you can use the Visual Studio Command Prompt.
The script 'exec.cmd' adds the bin directory to the path. So,
maxsat.exe can find z3.dll.

View file

@ -1,28 +0,0 @@
WARNING: this example still uses the old Z3 (version 3.x) C API.
The current version is backward compatible.
1) Using Visual Studio (with Z3 source code release)
The maxsat example application is automatically built when the z3-prover.sln is processed. The following command should be used to compile z3-prover.sln in the Z3 root directory
msbuild /p:configuration=external
The maxsat executable is located at
..\external\maxsat
To process ex.smt, use
..\external\maxsat ex.smt
2) Using gcc (on Linux or OSX)
Use 'build.sh' to build the MaxSAT application using gcc.
You must install Z3 before running this example.
To install Z3, execute the following command in the Z3 root directory.
sudo make install
Use 'build.sh' to build the test application using gcc.
It generates the executable 'maxsat'.

View file

@ -1 +0,0 @@
cl /I ..\..\include ..\..\bin\z3.lib maxsat.c

View file

@ -1,9 +0,0 @@
if gcc -fopenmp -o maxsat maxsat.c -lz3; then
echo "maxsat example was successfully compiled."
echo "To run example, execute:"
echo " ./maxsat ex.smt"
else
echo "You must install Z3 before compiling this example."
echo "To install Z3, execute the following command in the Z3 root directory."
echo " sudo make install"
fi

View file

@ -1,11 +0,0 @@
(benchmark ex
:logic AUFLIA
:extrafuns ((x Int) (y Int) (z Int))
:assumption (> x 0)
:assumption (<= x -1)
:assumption (or (> x 0) (< y 1))
:assumption (> y 2)
:assumption (> y 3)
:assumption (<= y -1)
:formula (= z (+ x y)))

View file

@ -1,5 +0,0 @@
@echo off
SETLOCAL
set PATH=..\..\bin;%PATH%
maxsat.exe %1
ENDLOCAL

View file

@ -1,632 +0,0 @@
/*
Simple MAXSAT solver on top of the Z3 API.
*/
#include<stdio.h>
#include<stdlib.h>
#include<memory.h>
#include<z3.h>
/**
\defgroup maxsat_ex MaxSAT/MaxSMT examples
*/
/*@{*/
/**
\brief Exit gracefully in case of error.
*/
void error(char * msg)
{
fprintf(stderr, "%s\n", msg);
exit(1);
}
/**
\brief Create a logical context.
Enable model construction only.
*/
Z3_context mk_context()
{
Z3_config cfg;
Z3_context ctx;
cfg = Z3_mk_config();
Z3_set_param_value(cfg, "MODEL", "true");
ctx = Z3_mk_context(cfg);
Z3_del_config(cfg);
return ctx;
}
/**
\brief Create a variable using the given name and type.
*/
Z3_ast mk_var(Z3_context ctx, const char * name, Z3_sort ty)
{
Z3_symbol s = Z3_mk_string_symbol(ctx, name);
return Z3_mk_const(ctx, s, ty);
}
/**
\brief Create a boolean variable using the given name.
*/
Z3_ast mk_bool_var(Z3_context ctx, const char * name)
{
Z3_sort ty = Z3_mk_bool_sort(ctx);
return mk_var(ctx, name, ty);
}
/**
\brief Create a fresh boolean variable.
*/
Z3_ast mk_fresh_bool_var(Z3_context ctx)
{
return Z3_mk_fresh_const(ctx, "k", Z3_mk_bool_sort(ctx));
}
/**
\brief Create an array with \c num_vars fresh boolean variables.
*/
Z3_ast * mk_fresh_bool_var_array(Z3_context ctx, unsigned num_vars)
{
Z3_ast * result = (Z3_ast *) malloc(sizeof(Z3_ast) * num_vars);
unsigned i;
for (i = 0; i < num_vars; i++) {
result[i] = mk_fresh_bool_var(ctx);
}
return result;
}
/**
\brief Delete array of boolean variables.
*/
void del_bool_var_array(Z3_ast * arr)
{
free(arr);
}
/**
\brief Create a binary OR.
*/
Z3_ast mk_binary_or(Z3_context ctx, Z3_ast in_1, Z3_ast in_2)
{
Z3_ast args[2] = { in_1, in_2 };
return Z3_mk_or(ctx, 2, args);
}
/**
\brief Create a ternary OR.
*/
Z3_ast mk_ternary_or(Z3_context ctx, Z3_ast in_1, Z3_ast in_2, Z3_ast in_3)
{
Z3_ast args[3] = { in_1, in_2, in_3 };
return Z3_mk_or(ctx, 3, args);
}
/**
\brief Create a binary AND.
*/
Z3_ast mk_binary_and(Z3_context ctx, Z3_ast in_1, Z3_ast in_2)
{
Z3_ast args[2] = { in_1, in_2 };
return Z3_mk_and(ctx, 2, args);
}
/**
\brief Get hard constraints from a SMT-LIB file. We assume hard constraints
are formulas preceeded with the keyword :formula.
Return an array containing all formulas read by the last Z3_parse_smtlib_file invocation.
It will store the number of formulas in num_cnstrs.
*/
Z3_ast * get_hard_constraints(Z3_context ctx, unsigned * num_cnstrs)
{
Z3_ast * result;
unsigned i;
*num_cnstrs = Z3_get_smtlib_num_formulas(ctx);
result = (Z3_ast *) malloc(sizeof(Z3_ast) * (*num_cnstrs));
for (i = 0; i < *num_cnstrs; i++) {
result[i] = Z3_get_smtlib_formula(ctx, i);
}
return result;
}
/**
\brief Get soft constraints from a SMT-LIB file. We assume soft constraints
are formulas preceeded with the keyword :assumption.
Return an array containing all assumptions read by the last Z3_parse_smtlib_file invocation.
It will store the number of formulas in num_cnstrs.
*/
Z3_ast * get_soft_constraints(Z3_context ctx, unsigned * num_cnstrs)
{
Z3_ast * result;
unsigned i;
*num_cnstrs = Z3_get_smtlib_num_assumptions(ctx);
result = (Z3_ast *) malloc(sizeof(Z3_ast) * (*num_cnstrs));
for (i = 0; i < *num_cnstrs; i++) {
result[i] = Z3_get_smtlib_assumption(ctx, i);
}
return result;
}
/**
\brief Free the given array of cnstrs that was allocated using get_hard_constraints or get_soft_constraints.
*/
void free_cnstr_array(Z3_ast * cnstrs)
{
free(cnstrs);
}
/**
\brief Assert hard constraints stored in the given array.
*/
void assert_hard_constraints(Z3_context ctx, unsigned num_cnstrs, Z3_ast * cnstrs)
{
unsigned i;
for (i = 0; i < num_cnstrs; i++) {
Z3_assert_cnstr(ctx, cnstrs[i]);
}
}
/**
\brief Assert soft constraints stored in the given array.
This funtion will assert each soft-constraint C_i as (C_i or k_i) where k_i is a fresh boolean variable.
It will also return an array containing these fresh variables.
*/
Z3_ast * assert_soft_constraints(Z3_context ctx, unsigned num_cnstrs, Z3_ast * cnstrs)
{
unsigned i;
Z3_ast * aux_vars;
aux_vars = mk_fresh_bool_var_array(ctx, num_cnstrs);
for (i = 0; i < num_cnstrs; i++) {
Z3_ast assumption = cnstrs[i];
Z3_assert_cnstr(ctx, mk_binary_or(ctx, assumption, aux_vars[i]));
}
return aux_vars;
}
/**
\brief Create a full adder with inputs \c in_1, \c in_2 and \c cin.
The output of the full adder is stored in \c out, and the carry in \c c_out.
*/
void mk_full_adder(Z3_context ctx, Z3_ast in_1, Z3_ast in_2, Z3_ast cin, Z3_ast * out, Z3_ast * cout)
{
*cout = mk_ternary_or(ctx, mk_binary_and(ctx, in_1, in_2), mk_binary_and(ctx, in_1, cin), mk_binary_and(ctx, in_2, cin));
*out = Z3_mk_xor(ctx, Z3_mk_xor(ctx, in_1, in_2), cin);
}
/**
\brief Create an adder for inputs of size \c num_bits.
The arguments \c in1 and \c in2 are arrays of bits of size \c num_bits.
\remark \c result must be an array of size \c num_bits + 1.
*/
void mk_adder(Z3_context ctx, unsigned num_bits, Z3_ast * in_1, Z3_ast * in_2, Z3_ast * result)
{
Z3_ast cin, cout, out;
unsigned i;
cin = Z3_mk_false(ctx);
for (i = 0; i < num_bits; i++) {
mk_full_adder(ctx, in_1[i], in_2[i], cin, &out, &cout);
result[i] = out;
cin = cout;
}
result[num_bits] = cout;
}
/**
\brief Given \c num_ins "numbers" of size \c num_bits stored in \c in.
Create floor(num_ins/2) adder circuits. Each circuit is adding two consecutive "numbers".
The numbers are stored one after the next in the array \c in.
That is, the array \c in has size num_bits * num_ins.
Return an array of bits containing \c ceil(num_ins/2) numbers of size \c (num_bits + 1).
If num_ins/2 is not an integer, then the last "number" in the output, is the last "number" in \c in with an appended "zero".
*/
void mk_adder_pairs(Z3_context ctx, unsigned num_bits, unsigned num_ins, Z3_ast * in, unsigned * out_num_ins, Z3_ast * out)
{
unsigned out_num_bits = num_bits + 1;
unsigned i = 0;
Z3_ast * _in = in;
Z3_ast * _out = out;
*out_num_ins = (num_ins % 2 == 0) ? (num_ins / 2) : (num_ins / 2) + 1;
for (i = 0; i < num_ins / 2; i++) {
mk_adder(ctx, num_bits, _in, _in + num_bits, _out);
_in += num_bits;
_in += num_bits;
_out += out_num_bits;
}
if (num_ins % 2 != 0) {
for (i = 0; i < num_bits; i++) {
_out[i] = _in[i];
}
_out[num_bits] = Z3_mk_false(ctx);
}
}
/**
\brief Create a counter circuit to count the number of "ones" in lits.
The function returns an array of bits (i.e. boolean expressions) containing the output of the circuit.
The size of the array is stored in out_sz.
*/
Z3_ast * mk_counter_circuit(Z3_context ctx, unsigned n, Z3_ast * lits, unsigned * out_sz)
{
unsigned num_ins = n;
unsigned num_bits = 1;
Z3_ast * aux_1;
Z3_ast * aux_2;
if (n == 0)
return 0;
aux_1 = (Z3_ast *) malloc(sizeof(Z3_ast) * (n + 1));
aux_2 = (Z3_ast *) malloc(sizeof(Z3_ast) * (n + 1));
memcpy(aux_1, lits, sizeof(Z3_ast) * n);
while (num_ins > 1) {
unsigned new_num_ins;
Z3_ast * tmp;
mk_adder_pairs(ctx, num_bits, num_ins, aux_1, &new_num_ins, aux_2);
num_ins = new_num_ins;
num_bits++;
#ifdef MAXSAT_DEBUG
{
unsigned i;
printf("num_bits: %d, num_ins: %d \n", num_bits, num_ins);
for (i = 0; i < num_ins * num_bits; i++) {
printf("bit %d:\n%s\n", i, Z3_ast_to_string(ctx, aux_2[i]));
}
printf("-----------\n");
}
#endif
tmp = aux_1;
aux_1 = aux_2;
aux_2 = tmp;
}
*out_sz = num_bits;
free(aux_2);
return aux_1;
}
/**
\brief Return the \c idx bit of \c val.
*/
int get_bit(unsigned val, unsigned idx)
{
unsigned mask = 1 << (idx & 31);
return (val & mask) != 0;
}
/**
\brief Given an integer val encoded in n bits (boolean variables), assert the constraint that val <= k.
*/
void assert_le_k(Z3_context ctx, unsigned n, Z3_ast * val, unsigned k)
{
Z3_ast i1, i2, not_val, out;
unsigned idx;
not_val = Z3_mk_not(ctx, val[0]);
if (get_bit(k, 0))
out = Z3_mk_true(ctx);
else
out = not_val;
for (idx = 1; idx < n; idx++) {
not_val = Z3_mk_not(ctx, val[idx]);
if (get_bit(k, idx)) {
i1 = not_val;
i2 = out;
}
else {
i1 = Z3_mk_false(ctx);
i2 = Z3_mk_false(ctx);
}
out = mk_ternary_or(ctx, i1, i2, mk_binary_and(ctx, not_val, out));
}
// printf("at-most-k:\n%s\n", Z3_ast_to_string(ctx, out));
Z3_assert_cnstr(ctx, out);
}
/**
\brief Assert that at most \c k literals in \c lits can be true,
where \c n is the number of literals in lits.
We use a simple encoding using an adder (counter).
An interesting exercise consists in implementing more sophisticated encodings.
*/
void assert_at_most_k(Z3_context ctx, unsigned n, Z3_ast * lits, unsigned k)
{
Z3_ast * counter_bits;
unsigned counter_bits_sz;
if (k >= n || n <= 1)
return; /* nothing to be done */
counter_bits = mk_counter_circuit(ctx, n, lits, &counter_bits_sz);
assert_le_k(ctx, counter_bits_sz, counter_bits, k);
del_bool_var_array(counter_bits);
}
/**
\brief Assert that at most one literal in \c lits can be true,
where \c n is the number of literals in lits.
*/
void assert_at_most_one(Z3_context ctx, unsigned n, Z3_ast * lits)
{
assert_at_most_k(ctx, n, lits, 1);
}
/**
\brief Small test for the at-most-one constraint.
*/
void tst_at_most_one()
{
Z3_context ctx = mk_context();
Z3_ast k1 = mk_bool_var(ctx, "k1");
Z3_ast k2 = mk_bool_var(ctx, "k2");
Z3_ast k3 = mk_bool_var(ctx, "k3");
Z3_ast k4 = mk_bool_var(ctx, "k4");
Z3_ast k5 = mk_bool_var(ctx, "k5");
Z3_ast k6 = mk_bool_var(ctx, "k6");
Z3_ast args1[5] = { k1, k2, k3, k4, k5 };
Z3_ast args2[3] = { k4, k5, k6 };
Z3_model m = 0;
Z3_lbool result;
printf("testing at-most-one constraint\n");
assert_at_most_one(ctx, 5, args1);
assert_at_most_one(ctx, 3, args2);
printf("it must be sat...\n");
result = Z3_check_and_get_model(ctx, &m);
if (result != Z3_L_TRUE)
error("BUG");
printf("model:\n%s\n", Z3_model_to_string(ctx, m));
if (m) {
Z3_del_model(ctx, m);
}
Z3_assert_cnstr(ctx, mk_binary_or(ctx, k2, k3));
Z3_assert_cnstr(ctx, mk_binary_or(ctx, k1, k6));
printf("it must be sat...\n");
result = Z3_check_and_get_model(ctx, &m);
if (result != Z3_L_TRUE)
error("BUG");
printf("model:\n%s\n", Z3_model_to_string(ctx, m));
if (m) {
Z3_del_model(ctx, m);
}
Z3_assert_cnstr(ctx, mk_binary_or(ctx, k4, k5));
printf("it must be unsat...\n");
result = Z3_check_and_get_model(ctx, &m);
if (result != Z3_L_FALSE)
error("BUG");
Z3_del_context(ctx);
}
/**
\brief Return the number of soft-constraints that were disable by the given model.
A soft-constraint was disabled if the associated auxiliary variable was assigned to true.
*/
unsigned get_num_disabled_soft_constraints(Z3_context ctx, Z3_model m, unsigned num_soft_cnstrs, Z3_ast * aux_vars)
{
unsigned i;
unsigned num_disabled = 0;
Z3_ast t = Z3_mk_true(ctx);
for (i = 0; i < num_soft_cnstrs; i++) {
Z3_ast val;
if (Z3_eval(ctx, m, aux_vars[i], &val) == Z3_TRUE) {
// printf("%s", Z3_ast_to_string(ctx, aux_vars[i]));
// printf(" -> %s\n", Z3_ast_to_string(ctx, val));
if (Z3_is_eq_ast(ctx, val, t)) {
num_disabled++;
}
}
}
return num_disabled;
}
/**
\brief Naive maxsat procedure based on linear search and at-most-k
constraint. Return the number of soft-constraints that can be
satisfied. Return -1 if the hard-constraints cannot be
satisfied. That is, the formula cannot be satisfied even if all
soft-constraints are ignored.
Exercise: use binary search to implement MaxSAT.
Hint: you will need to use an answer literal to retract the at-most-k constraint.
*/
int naive_maxsat(Z3_context ctx, unsigned num_hard_cnstrs, Z3_ast * hard_cnstrs, unsigned num_soft_cnstrs, Z3_ast * soft_cnstrs)
{
Z3_ast * aux_vars;
Z3_lbool is_sat;
unsigned r, k;
assert_hard_constraints(ctx, num_hard_cnstrs, hard_cnstrs);
printf("checking whether hard constraints are satisfiable...\n");
is_sat = Z3_check(ctx);
if (is_sat == Z3_L_FALSE) {
// It is not possible to make the formula satisfiable even when ignoring all soft constraints.
return -1;
}
if (num_soft_cnstrs == 0)
return 0; // nothing to be done...
aux_vars = assert_soft_constraints(ctx, num_soft_cnstrs, soft_cnstrs);
// Perform linear search.
r = 0;
k = num_soft_cnstrs - 1;
for (;;) {
Z3_model m;
unsigned num_disabled;
// at most k soft-constraints can be ignored.
printf("checking whether at-most %d soft-constraints can be ignored.\n", k);
assert_at_most_k(ctx, num_soft_cnstrs, aux_vars, k);
is_sat = Z3_check_and_get_model(ctx, &m);
if (is_sat == Z3_L_FALSE) {
printf("unsat\n");
return num_soft_cnstrs - k - 1;
}
num_disabled = get_num_disabled_soft_constraints(ctx, m, num_soft_cnstrs, aux_vars);
if (num_disabled > k) {
error("BUG");
}
if (m) {
Z3_del_model(ctx, m);
}
printf("sat\n");
k = num_disabled;
if (k == 0) {
// it was possible to satisfy all soft-constraints.
return num_soft_cnstrs;
}
k--;
}
}
/**
\brief Implement one step of the Fu&Malik algorithm.
See fu_malik_maxsat function for more details.
Input: soft constraints + aux-vars (aka answer literals)
Output: done/not-done when not done return updated set of soft-constraints and aux-vars.
- if SAT --> terminates
- if UNSAT
* compute unsat core
* add blocking variable to soft-constraints in the core
- replace soft-constraint with the one with the blocking variable
- we should also add an aux-var
- replace aux-var with a new one
* add at-most-one constraint with blocking
*/
int fu_malik_maxsat_step(Z3_context ctx, unsigned num_soft_cnstrs, Z3_ast * soft_cnstrs, Z3_ast * aux_vars)
{
// create assumptions
Z3_ast * assumptions = (Z3_ast*) malloc(sizeof(Z3_ast) * num_soft_cnstrs);
Z3_ast * core = (Z3_ast*) malloc(sizeof(Z3_ast) * num_soft_cnstrs);
unsigned core_size;
Z3_ast dummy_proof; // we don't care about proofs in this example
Z3_model m;
Z3_lbool is_sat;
unsigned i = 0;
for (i = 0; i < num_soft_cnstrs; i++) {
// Recall that we asserted (soft_cnstrs[i] \/ aux_vars[i])
// So using (NOT aux_vars[i]) as an assumption we are actually forcing the soft_cnstrs[i] to be considered.
assumptions[i] = Z3_mk_not(ctx, aux_vars[i]);
core[i] = 0;
}
is_sat = Z3_check_assumptions(ctx, num_soft_cnstrs, assumptions, &m, &dummy_proof, &core_size, core);
if (is_sat != Z3_L_FALSE) {
return 1; // done
}
else {
Z3_ast * block_vars = (Z3_ast*) malloc(sizeof(Z3_ast) * core_size);
unsigned k = 0;
// update soft-constraints and aux_vars
for (i = 0; i < num_soft_cnstrs; i++) {
unsigned j;
// check whether assumption[i] is in the core or not
for (j = 0; j < core_size; j++) {
if (assumptions[i] == core[j])
break;
}
if (j < core_size) {
// assumption[i] is in the unsat core... so soft_cnstrs[i] is in the unsat core
Z3_ast block_var = mk_fresh_bool_var(ctx);
Z3_ast new_aux_var = mk_fresh_bool_var(ctx);
soft_cnstrs[i] = mk_binary_or(ctx, soft_cnstrs[i], block_var);
aux_vars[i] = new_aux_var;
block_vars[k] = block_var;
k++;
// Add new constraint containing the block variable.
// Note that we are using the new auxiliary variable to be able to use it as an assumption.
Z3_assert_cnstr(ctx, mk_binary_or(ctx, soft_cnstrs[i], new_aux_var));
}
}
assert_at_most_one(ctx, k, block_vars);
return 0; // not done.
}
}
/**
\brief Fu & Malik procedure for MaxSAT. This procedure is based on
unsat core extraction and the at-most-one constraint.
Return the number of soft-constraints that can be
satisfied. Return -1 if the hard-constraints cannot be
satisfied. That is, the formula cannot be satisfied even if all
soft-constraints are ignored.
For more information on the Fu & Malik procedure:
Z. Fu and S. Malik, On solving the partial MAX-SAT problem, in International
Conference on Theory and Applications of Satisfiability Testing, 2006.
*/
int fu_malik_maxsat(Z3_context ctx, unsigned num_hard_cnstrs, Z3_ast * hard_cnstrs, unsigned num_soft_cnstrs, Z3_ast * soft_cnstrs)
{
Z3_ast * aux_vars;
Z3_lbool is_sat;
unsigned k;
assert_hard_constraints(ctx, num_hard_cnstrs, hard_cnstrs);
printf("checking whether hard constraints are satisfiable...\n");
is_sat = Z3_check(ctx);
if (is_sat == Z3_L_FALSE) {
// It is not possible to make the formula satisfiable even when ignoring all soft constraints.
return -1;
}
if (num_soft_cnstrs == 0)
return 0; // nothing to be done...
/*
Fu&Malik algorithm is based on UNSAT-core extraction.
We accomplish that using auxiliary variables (aka answer literals).
*/
aux_vars = assert_soft_constraints(ctx, num_soft_cnstrs, soft_cnstrs);
k = 0;
for (;;) {
printf("iteration %d\n", k);
if (fu_malik_maxsat_step(ctx, num_soft_cnstrs, soft_cnstrs, aux_vars)) {
return num_soft_cnstrs - k;
}
k++;
}
}
#define NAIVE_MAXSAT 0
#define FU_MALIK_MAXSAT 1
/**
\brief Finds the maximal number of assumptions that can be satisfied.
An assumption is any formula preceeded with the :assumption keyword.
"Hard" constraints can be supported by using the :formula keyword.
Input: file in SMT-LIB format, and MaxSAT algorithm to be used: 0 - Naive, 1 - Fu&Malik's algo.
Output: the maximum number of assumptions that can be satisfied.
*/
int smtlib_maxsat(char * file_name, int approach)
{
Z3_context ctx;
unsigned num_hard_cnstrs, num_soft_cnstrs;
Z3_ast * hard_cnstrs, * soft_cnstrs;
unsigned result;
ctx = mk_context();
Z3_parse_smtlib_file(ctx, file_name, 0, 0, 0, 0, 0, 0);
hard_cnstrs = get_hard_constraints(ctx, &num_hard_cnstrs);
soft_cnstrs = get_soft_constraints(ctx, &num_soft_cnstrs);
switch (approach) {
case NAIVE_MAXSAT:
result = naive_maxsat(ctx, num_hard_cnstrs, hard_cnstrs, num_soft_cnstrs, soft_cnstrs);
break;
case FU_MALIK_MAXSAT:
result = fu_malik_maxsat(ctx, num_hard_cnstrs, hard_cnstrs, num_soft_cnstrs, soft_cnstrs);
break;
default:
/* Exercise: implement your own MaxSAT algorithm.*/
error("Not implemented yet.");
break;
}
free_cnstr_array(hard_cnstrs);
free_cnstr_array(soft_cnstrs);
return result;
}
int main(int argc, char * argv[]) {
#if 1
int r;
if (argc != 2) {
error("usage: maxsat [filename.smt].");
}
r = smtlib_maxsat(argv[1], FU_MALIK_MAXSAT);
printf("result: %d\n", r);
#else
tst_at_most_one();
#endif
return 0;
}
/*@}*/

View file

@ -1,295 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="commercial|Win32">
<Configuration>commercial</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="commercial|x64">
<Configuration>commercial</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="external|Win32">
<Configuration>external</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="external|x64">
<Configuration>external</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7C154132-AAAB-4F60-B652-F8C51A63D244}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>maxsat</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='external|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='external|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='commercial|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='external|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='external|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='commercial|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='external|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='external|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\lib</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\lib</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\lib</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\lib</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='external|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\lib</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='external|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_AMD64_;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\lib</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='commercial|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\lib</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='commercial|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\lib</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="maxsat.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\lib\lib.vcxproj">
<Project>{4a7e5a93-19d8-4382-8950-fb2edec7a76e}</Project>
<Private>true</Private>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View file

@ -1,25 +0,0 @@
WARNING: this example still uses the old Z3 (version 3.x) C API.
The current version is backward compatible.
1) Using Visual Studio (with Z3 source code release)
The test_capi application is automatically built when the z3-prover.sln is processed. The following command should be used to compile z3-prover.sln in the Z3 root directory
msbuild /p:configuration=external
The maxsat executable is located at
..\external\test_capi
2) Using gcc (on Linux or OSX)
Use 'build.sh' to build the test application using gcc.
You must install Z3 before running this example.
To install Z3, execute the following command in the Z3 root directory.
sudo make install
Use 'build.sh' to build the test application using gcc.
It generates the executable 'test_capi'.

View file

@ -1,9 +0,0 @@
if gcc -fopenmp -o test_capi test_capi.c -lz3; then
echo "test_capi applicatio was successfully compiled."
echo "To try it, execute:"
echo " ./test_capi"
else
echo "You must install Z3 before compiling this example."
echo "To install Z3, execute the following command in the Z3 root directory."
echo " sudo make install"
fi

File diff suppressed because it is too large Load diff