3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-30 06:50:08 +00:00

removed test_managed, added Microsoft.Z3/test_mapi

Signed-off-by: wintersteiger <cwinter@microsoft.com>
This commit is contained in:
wintersteiger 2012-10-11 14:47:38 +01:00
parent 56b977b418
commit e0c746e382
10 changed files with 228 additions and 2052 deletions

View file

@ -184,7 +184,7 @@ namespace test_mapi
/// </summary>
public static void SimpleExample()
{
Console.WriteLine("SimpleExample");
Console.WriteLine("SimpleExample");
using (Context ctx = new Context())
{
@ -649,7 +649,7 @@ namespace test_mapi
{ "MBQI", "false" },
{ "PROOF_MODE", "2" },
{ "AUTO_CONFIG", "false" }
};
};
/* If quantified formulas are asserted in a logical context, then
the model produced by Z3 should be viewed as a potential model. */
@ -975,7 +975,7 @@ namespace test_mapi
/// </summary>
static void SMT1FileTest(string filename)
{
Console.Write("SMT File test ");
Console.Write("SMT File test ");
using (Context ctx = new Context(new Dictionary<string, string>() { { "MODEL", "true" } }))
{
@ -983,7 +983,7 @@ namespace test_mapi
BoolExpr a = ctx.MkAnd(ctx.SMTLIBFormulas);
Console.WriteLine("read formula: " + a);
}
}
}
/// <summary>
@ -2022,30 +2022,30 @@ namespace test_mapi
}
}
public static void FiniteDomainExample(Context ctx)
{
public static void FiniteDomainExample(Context ctx)
{
Console.WriteLine("FiniteDomainExample");
var s = ctx.MkFiniteDomainSort("S", 10);
var t = ctx.MkFiniteDomainSort("T", 10);
var s1 = ctx.MkNumeral(1, s);
var t1 = ctx.MkNumeral(1, t);
Console.WriteLine("{0}", s);
Console.WriteLine("{0}", t);
Console.WriteLine("{0}", s1);
Console.WriteLine("{0}", ctx.MkNumeral(2, s));
Console.WriteLine("{0}", t1);
var s = ctx.MkFiniteDomainSort("S", 10);
var t = ctx.MkFiniteDomainSort("T", 10);
var s1 = ctx.MkNumeral(1, s);
var t1 = ctx.MkNumeral(1, t);
Console.WriteLine("{0}", s);
Console.WriteLine("{0}", t);
Console.WriteLine("{0}", s1);
Console.WriteLine("{0}", ctx.MkNumeral(2, s));
Console.WriteLine("{0}", t1);
// But you cannot mix numerals of different sorts
// even if the size of their domains are the same:
// Console.WriteLine("{0}", ctx.MkEq(s1, t1));
}
// Console.WriteLine("{0}", ctx.MkEq(s1, t1));
}
static void Main(string[] args)
{
try
{
Context.ToggleWarningMessages(true);
Log.Open("test.log");
Log.Open("test.log");
Console.Write("Z3 Major Version: ");
Console.WriteLine(Microsoft.Z3.Version.Major.ToString());
@ -2090,7 +2090,7 @@ namespace test_mapi
EvalExample2(ctx);
FindSmallModelExample(ctx);
SimplifierExample(ctx);
FiniteDomainExample(ctx);
FiniteDomainExample(ctx);
}
QuantifierExample3();

View file

@ -36,6 +36,71 @@
<PropertyGroup>
<StartupObject>test_mapi.Program</StartupObject>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisLogFile>bin\Debug\test_mapi.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisLogFile>bin\Release\test_mapi.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisLogFile>bin\Debug\test_mapi.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<CodeAnalysisLogFile>bin\Release\test_mapi.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSetDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisRuleDirectories>;C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -44,15 +109,15 @@
<ItemGroup>
<Compile Include="Program.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.Z3.csproj">
<Project>{EC3DB697-B734-42F7-9468-5B62821EEB5A}</Project>
<Name>Microsoft.Z3</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>