mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	merge of Leo's changes
This commit is contained in:
		
						commit
						5b87fb4cc3
					
				
					 3 changed files with 57 additions and 70 deletions
				
			
		| 
						 | 
				
			
			@ -1822,7 +1822,7 @@ def update_version():
 | 
			
		|||
        raise MKException("set_version(major, minor, build, revision) must be used before invoking update_version()")
 | 
			
		||||
    if not ONLY_MAKEFILES:
 | 
			
		||||
        mk_version_dot_h(major, minor, build, revision)
 | 
			
		||||
        update_all_assembly_infos(major, minor, build, revision)
 | 
			
		||||
        mk_all_assembly_infos(major, minor, build, revision)
 | 
			
		||||
        mk_def_files()
 | 
			
		||||
        
 | 
			
		||||
# Update files with the version number
 | 
			
		||||
| 
						 | 
				
			
			@ -1837,49 +1837,32 @@ def mk_version_dot_h(major, minor, build, revision):
 | 
			
		|||
    if VERBOSE:
 | 
			
		||||
        print("Generated '%s'" % os.path.join(c.src_dir, 'version.h'))
 | 
			
		||||
 | 
			
		||||
# Update version number in AssemblyInfo.cs files
 | 
			
		||||
def update_all_assembly_infos(major, minor, build, revision):
 | 
			
		||||
# Generate AssemblyInfo.cs files with the right version numbers by using AssemblyInfo files as a template
 | 
			
		||||
def mk_all_assembly_infos(major, minor, build, revision):
 | 
			
		||||
    for c in get_components():
 | 
			
		||||
        if c.has_assembly_info():
 | 
			
		||||
            assembly = os.path.join(c.src_dir, c.assembly_info_dir, 'AssemblyInfo.cs')
 | 
			
		||||
            assembly = os.path.join(c.src_dir, c.assembly_info_dir, 'AssemblyInfo')
 | 
			
		||||
            if os.path.exists(assembly):
 | 
			
		||||
                # It is a CS file
 | 
			
		||||
                update_assembly_info_version(assembly,
 | 
			
		||||
                                             major, minor, build, revision, False)
 | 
			
		||||
                mk_assembly_info_version(assembly, major, minor, build, revision)
 | 
			
		||||
            else:
 | 
			
		||||
                assembly = os.path.join(c.src_dir, c.assembly_info_dir, 'AssemblyInfo.cs')
 | 
			
		||||
                if os.path.exists(assembly):
 | 
			
		||||
                    # It is a cpp file
 | 
			
		||||
                    update_assembly_info_version(assembly,
 | 
			
		||||
                                                 major, minor, build, revision, True)
 | 
			
		||||
                else:
 | 
			
		||||
                    raise MKException("Failed to find assembly info file at '%s'" % os.path.join(c.src_dir, c.assembly_info_dir))
 | 
			
		||||
                raise MKException("Failed to find assembly info file 'AssemblyInfo' at '%s'" % os.path.join(c.src_dir, c.assembly_info_dir))
 | 
			
		||||
                    
 | 
			
		||||
                
 | 
			
		||||
# Update version number in the given AssemblyInfo.cs files
 | 
			
		||||
def update_assembly_info_version(assemblyinfo, major, minor, build, revision, is_cpp=False):
 | 
			
		||||
    if is_cpp:
 | 
			
		||||
        ver_pat   = re.compile('[assembly:AssemblyVersionAttribute\("[\.\d]*"\) *')
 | 
			
		||||
        fver_pat  = re.compile('[assembly:AssemblyFileVersionAttribute\("[\.\d]*"\) *')
 | 
			
		||||
    else:
 | 
			
		||||
        ver_pat   = re.compile('[assembly: AssemblyVersion\("[\.\d]*"\) *')
 | 
			
		||||
        fver_pat  = re.compile('[assembly: AssemblyFileVersion\("[\.\d]*"\) *')
 | 
			
		||||
# Generate version number in the given 'AssemblyInfo.cs' file using 'AssemblyInfo' as a template.
 | 
			
		||||
def mk_assembly_info_version(assemblyinfo, major, minor, build, revision):
 | 
			
		||||
    ver_pat   = re.compile('[assembly: AssemblyVersion\("[\.\d]*"\) *')
 | 
			
		||||
    fver_pat  = re.compile('[assembly: AssemblyFileVersion\("[\.\d]*"\) *')
 | 
			
		||||
    fin  = open(assemblyinfo, 'r')
 | 
			
		||||
    tmp  = '%s.new' % assemblyinfo
 | 
			
		||||
    tmp  = '%s.cs' % assemblyinfo
 | 
			
		||||
    fout = open(tmp, 'w')
 | 
			
		||||
    num_updates = 0
 | 
			
		||||
    for line in fin:
 | 
			
		||||
        if ver_pat.match(line):
 | 
			
		||||
            if is_cpp:
 | 
			
		||||
                fout.write('[assembly:AssemblyVersionAttribute("%s.%s.%s.%s")];\n' % (major, minor, build, revision))
 | 
			
		||||
            else:
 | 
			
		||||
                fout.write('[assembly: AssemblyVersion("%s.%s.%s.%s")]\n' % (major, minor, build, revision))
 | 
			
		||||
            fout.write('[assembly: AssemblyVersion("%s.%s.%s.%s")]\n' % (major, minor, build, revision))
 | 
			
		||||
            num_updates = num_updates + 1
 | 
			
		||||
        elif fver_pat.match(line):
 | 
			
		||||
            if is_cpp:
 | 
			
		||||
                fout.write('[assembly:AssemblyFileVersionAttribute("%s.%s.%s.%s")];\n' % (major, minor, build, revision))
 | 
			
		||||
            else:
 | 
			
		||||
                fout.write('[assembly: AssemblyFileVersion("%s.%s.%s.%s")]\n' % (major, minor, build, revision))
 | 
			
		||||
            fout.write('[assembly: AssemblyFileVersion("%s.%s.%s.%s")]\n' % (major, minor, build, revision))
 | 
			
		||||
            num_updates = num_updates + 1
 | 
			
		||||
        else:
 | 
			
		||||
            fout.write(line)
 | 
			
		||||
| 
						 | 
				
			
			@ -1888,7 +1871,6 @@ def update_assembly_info_version(assemblyinfo, major, minor, build, revision, is
 | 
			
		|||
    assert num_updates == 2, "unexpected number of version number updates"
 | 
			
		||||
    fin.close()
 | 
			
		||||
    fout.close()
 | 
			
		||||
    shutil.move(tmp, assemblyinfo)
 | 
			
		||||
    if VERBOSE:
 | 
			
		||||
        print("Updated '%s'" % assemblyinfo)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,39 +1,38 @@
 | 
			
		|||
using System;
 | 
			
		||||
using System.Reflection;
 | 
			
		||||
using System.Runtime.CompilerServices;
 | 
			
		||||
using System.Runtime.InteropServices;
 | 
			
		||||
using System.Security.Permissions;
 | 
			
		||||
 | 
			
		||||
// General Information about an assembly is controlled through the following 
 | 
			
		||||
// set of attributes. Change these attribute values to modify the information
 | 
			
		||||
// associated with an assembly.
 | 
			
		||||
[assembly: AssemblyTitle("Z3 .NET Interface")]
 | 
			
		||||
[assembly: AssemblyDescription(".NET Interface to the Z3 Theorem Prover")]
 | 
			
		||||
[assembly: AssemblyConfiguration("")]
 | 
			
		||||
[assembly: AssemblyCompany("Microsoft Corporation")]
 | 
			
		||||
[assembly: AssemblyProduct("Z3")]
 | 
			
		||||
[assembly: AssemblyCopyright("Copyright © Microsoft Corporation 2006")]
 | 
			
		||||
[assembly: AssemblyTrademark("")]
 | 
			
		||||
[assembly: AssemblyCulture("")]
 | 
			
		||||
 | 
			
		||||
// 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 
 | 
			
		||||
// COM, set the ComVisible attribute to true on that type.
 | 
			
		||||
[assembly: ComVisible(false)]
 | 
			
		||||
 | 
			
		||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
 | 
			
		||||
[assembly: Guid("4853ed71-2078-40f4-8117-bc46646bce0e")]
 | 
			
		||||
 | 
			
		||||
// Version information for an assembly consists of the following four values:
 | 
			
		||||
//
 | 
			
		||||
//      Major Version
 | 
			
		||||
//      Minor Version 
 | 
			
		||||
//      Build Number
 | 
			
		||||
//      Revision
 | 
			
		||||
//
 | 
			
		||||
// You can specify all the values or you can default the Build and Revision Numbers 
 | 
			
		||||
// by using the '*' as shown below:
 | 
			
		||||
// [assembly: AssemblyVersion("4.2.0.0")]
 | 
			
		||||
[assembly: AssemblyVersion("4.3.2.0")]
 | 
			
		||||
[assembly: AssemblyFileVersion("4.3.2.0")]
 | 
			
		||||
 | 
			
		||||
using System;
 | 
			
		||||
using System.Reflection;
 | 
			
		||||
using System.Runtime.CompilerServices;
 | 
			
		||||
using System.Runtime.InteropServices;
 | 
			
		||||
using System.Security.Permissions;
 | 
			
		||||
 | 
			
		||||
// General Information about an assembly is controlled through the following 
 | 
			
		||||
// set of attributes. Change these attribute values to modify the information
 | 
			
		||||
// associated with an assembly.
 | 
			
		||||
[assembly: AssemblyTitle("Z3 .NET Interface")]
 | 
			
		||||
[assembly: AssemblyDescription(".NET Interface to the Z3 Theorem Prover")]
 | 
			
		||||
[assembly: AssemblyConfiguration("")]
 | 
			
		||||
[assembly: AssemblyCompany("Microsoft Corporation")]
 | 
			
		||||
[assembly: AssemblyProduct("Z3")]
 | 
			
		||||
[assembly: AssemblyCopyright("Copyright © Microsoft Corporation 2006")]
 | 
			
		||||
[assembly: AssemblyTrademark("")]
 | 
			
		||||
[assembly: AssemblyCulture("")]
 | 
			
		||||
 | 
			
		||||
// 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 
 | 
			
		||||
// COM, set the ComVisible attribute to true on that type.
 | 
			
		||||
[assembly: ComVisible(false)]
 | 
			
		||||
 | 
			
		||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
 | 
			
		||||
[assembly: Guid("4853ed71-2078-40f4-8117-bc46646bce0e")]
 | 
			
		||||
 | 
			
		||||
// Version information for an assembly consists of the following four values:
 | 
			
		||||
//
 | 
			
		||||
//      Major Version
 | 
			
		||||
//      Minor Version 
 | 
			
		||||
//      Build Number
 | 
			
		||||
//      Revision
 | 
			
		||||
//
 | 
			
		||||
// You can specify all the values or you can default the Build and Revision Numbers 
 | 
			
		||||
// by using the '*' as shown below:
 | 
			
		||||
// [assembly: AssemblyVersion("4.2.0.0")]
 | 
			
		||||
[assembly: AssemblyVersion("4.3.2.0")]
 | 
			
		||||
[assembly: AssemblyFileVersion("4.3.2.0")]
 | 
			
		||||
| 
						 | 
				
			
			@ -367,8 +367,14 @@ expr_ref dl_interface::get_answer() {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
void dl_interface::cancel() {
 | 
			
		||||
#if 0
 | 
			
		||||
  if(_d && _d->ls)
 | 
			
		||||
    _d->ls->cancel();
 | 
			
		||||
#else
 | 
			
		||||
  // HACK: duality can't cancel at all times, we just exit here
 | 
			
		||||
  std::cout << "(error \"duality canceled\")\nunknown\n";
 | 
			
		||||
  exit(0);
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void dl_interface::cleanup() {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue