3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-06 22:23:22 +00:00

porting to windows

This commit is contained in:
U-REDMOND\kenmcmil 2013-03-27 12:17:52 -07:00
parent 78848f3ddd
commit 28266786f3
7 changed files with 56 additions and 46 deletions

View file

@ -909,6 +909,7 @@ class ExeComponent(Component):
for dep in deps: for dep in deps:
c_dep = get_component(dep) c_dep = get_component(dep)
out.write(' ' + c_dep.get_link_name()) out.write(' ' + c_dep.get_link_name())
out.write(' ' + FOCI2LIB)
out.write(' $(LINK_EXTRA_FLAGS)\n') out.write(' $(LINK_EXTRA_FLAGS)\n')
out.write('%s: %s\n\n' % (self.name, exefile)) out.write('%s: %s\n\n' % (self.name, exefile))
@ -1012,6 +1013,7 @@ class DLLComponent(Component):
if not dep in self.reexports: if not dep in self.reexports:
c_dep = get_component(dep) c_dep = get_component(dep)
out.write(' ' + c_dep.get_link_name()) out.write(' ' + c_dep.get_link_name())
out.write(' ' + FOCI2LIB)
out.write(' $(SLINK_EXTRA_FLAGS)') out.write(' $(SLINK_EXTRA_FLAGS)')
if IS_WINDOWS: if IS_WINDOWS:
out.write(' /DEF:%s.def' % os.path.join(self.to_src_dir, self.name)) out.write(' /DEF:%s.def' % os.path.join(self.to_src_dir, self.name))

View file

@ -1,39 +1,39 @@
using System; using System;
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Security.Permissions; using System.Security.Permissions;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("Z3 .NET Interface")] [assembly: AssemblyTitle("Z3 .NET Interface")]
[assembly: AssemblyDescription(".NET Interface to the Z3 Theorem Prover")] [assembly: AssemblyDescription(".NET Interface to the Z3 Theorem Prover")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft Corporation")] [assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyProduct("Z3")] [assembly: AssemblyProduct("Z3")]
[assembly: AssemblyCopyright("Copyright © Microsoft Corporation 2006")] [assembly: AssemblyCopyright("Copyright © Microsoft Corporation 2006")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible // Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from // to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type. // COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM // The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4853ed71-2078-40f4-8117-bc46646bce0e")] [assembly: Guid("4853ed71-2078-40f4-8117-bc46646bce0e")]
// Version information for an assembly consists of the following four values: // Version information for an assembly consists of the following four values:
// //
// Major Version // Major Version
// Minor Version // Minor Version
// Build Number // Build Number
// Revision // Revision
// //
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("4.2.0.0")] // [assembly: AssemblyVersion("4.2.0.0")]
[assembly: AssemblyVersion("4.3.2.0")] [assembly: AssemblyVersion("4.3.2.0")]
[assembly: AssemblyFileVersion("4.3.2.0")] [assembly: AssemblyFileVersion("4.3.2.0")]

View file

@ -39,8 +39,6 @@ Notes:
#include"for_each_expr.h" #include"for_each_expr.h"
#include"scoped_timer.h" #include"scoped_timer.h"
#include"interpolant_cmds.h" #include"interpolant_cmds.h"
//FIXME Does this break modularity?
// #include"smt_solver.h"
func_decls::func_decls(ast_manager & m, func_decl * f): func_decls::func_decls(ast_manager & m, func_decl * f):
m_decls(TAG(func_decl*, f, 0)) { m_decls(TAG(func_decl*, f, 0)) {

View file

@ -243,6 +243,7 @@ bool iz3base::is_sat(ast f){
Z3_pop(ctx,1); Z3_pop(ctx,1);
return res != Z3_L_FALSE; return res != Z3_L_FALSE;
#endif #endif
return false;
} }

View file

@ -145,7 +145,7 @@ class iz3base : public iz3mgr, public scopes {
ast simplify_and(std::vector<ast> &conjuncts); ast simplify_and(std::vector<ast> &conjuncts);
ast simplify_with_lit_rec(ast n, ast lit, stl_ext::hash_map<ast,ast> &memo, int depth); ast simplify_with_lit_rec(ast n, ast lit, stl_ext::hash_map<ast,ast> &memo, int depth);
ast simplify_with_lit(ast n, ast lit); ast simplify_with_lit(ast n, ast lit);
void find_children(const stl_ext::hash_set<ast> &cnsts_set, void find_children(const hash_set<ast> &cnsts_set,
const ast &tree, const ast &tree,
std::vector<ast> &cnsts, std::vector<ast> &cnsts,
std::vector<int> &parents, std::vector<int> &parents,

View file

@ -114,7 +114,7 @@ class ast_r : public ast_i {
}; };
// to make ast_r hashable // to make ast_r hashable
namespace stl_ext { namespace hash_space {
template <> template <>
class hash<ast_r> { class hash<ast_r> {
public: public:
@ -124,12 +124,21 @@ namespace stl_ext {
}; };
} }
// to make ast_r hashable in windows
#ifdef WIN32
template <> inline
size_t stdext::hash_value<ast_r >(const ast_r& s)
{
return s.raw()->get_id();
}
#endif
// to make ast_r usable in ordered collections // to make ast_r usable in ordered collections
namespace std { namespace std {
template <> template <>
class less<ast_r> { class less<ast_r> {
public: public:
size_t operator()(const ast_r &s, const ast_r &t) const { bool operator()(const ast_r &s, const ast_r &t) const {
return s.raw() < t.raw(); // s.raw()->get_id() < t.raw()->get_id(); return s.raw() < t.raw(); // s.raw()->get_id() < t.raw()->get_id();
} }
}; };

View file

@ -81,8 +81,8 @@ namespace std {
class less<Z3_resolvent > { class less<Z3_resolvent > {
public: public:
bool operator()(const Z3_resolvent &x, const Z3_resolvent &y) const { bool operator()(const Z3_resolvent &x, const Z3_resolvent &y) const {
size_t ixproof = (size_t) x.proof; size_t ixproof = (size_t) x.proof.raw();
size_t iyproof = (size_t) y.proof; size_t iyproof = (size_t) y.proof.raw();
if(ixproof < iyproof) return true; if(ixproof < iyproof) return true;
if(ixproof > iyproof) return false; if(ixproof > iyproof) return false;
return x.pivot < y.pivot; return x.pivot < y.pivot;