mirror of
https://github.com/Z3Prover/z3
synced 2025-08-11 05:30:51 +00:00
Java bindings with no finalizers
Replacing finalizers with PhantomReferences, required quite a lot of changes to the codebase.
This commit is contained in:
parent
dfc80d3b69
commit
495ef0f055
48 changed files with 368 additions and 939 deletions
|
@ -17,11 +17,10 @@ Notes:
|
|||
|
||||
package com.microsoft.z3;
|
||||
|
||||
import java.util.Map;
|
||||
import java.lang.String;
|
||||
|
||||
import com.microsoft.z3.enumerations.Z3_lbool;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* The InterpolationContext is suitable for generation of interpolants.
|
||||
*
|
||||
|
@ -33,13 +32,13 @@ public class InterpolationContext extends Context
|
|||
/**
|
||||
* Constructor.
|
||||
**/
|
||||
public InterpolationContext()
|
||||
public static InterpolationContext mkContext()
|
||||
{
|
||||
super();
|
||||
long m_ctx;
|
||||
synchronized(creation_lock) {
|
||||
m_ctx = Native.mkInterpolationContext(0);
|
||||
initContext();
|
||||
}
|
||||
return new InterpolationContext(m_ctx);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -49,17 +48,21 @@ public class InterpolationContext extends Context
|
|||
* Remarks:
|
||||
* @see Context#Context
|
||||
**/
|
||||
public InterpolationContext(Map<String, String> settings)
|
||||
public static InterpolationContext mkContext(Map<String, String> settings)
|
||||
{
|
||||
super();
|
||||
long m_ctx;
|
||||
synchronized(creation_lock) {
|
||||
long cfg = Native.mkConfig();
|
||||
for (Map.Entry<String, String> kv : settings.entrySet())
|
||||
Native.setParamValue(cfg, kv.getKey(), kv.getValue());
|
||||
m_ctx = Native.mkInterpolationContext(cfg);
|
||||
Native.delConfig(cfg);
|
||||
initContext();
|
||||
}
|
||||
return new InterpolationContext(m_ctx);
|
||||
}
|
||||
|
||||
private InterpolationContext(long m_ctx) {
|
||||
super(m_ctx);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue