(private val innerRefToPrec: RefutationToPrec
) :
- RefutationToPrec {
- val newDerefs = refutation[index].dereferences
- val innerPrec = innerRefToPrec.toPrec(refutation, index).repatch()
- return PtrPrec(innerPrec, newDerefs.flatMap { it.ops }.toSet(),
- if (newDerefs.isEmpty()) 0 else refutation.size() - index)
- }
+ override fun toPrec(refutation: ItpRefutation, index: Int): PtrPrec {
+ val newDerefs = refutation[index].dereferences
+ val innerPrec = innerRefToPrec.toPrec(refutation, index).repatch()
+ return PtrPrec(
+ innerPrec,
+ newDerefs.flatMap { it.ops }.toSet(),
+ if (newDerefs.isEmpty()) 0 else refutation.size() - index,
+ )
+ }
- override fun join(prec1: PtrPrec , prec2: PtrPrec ): PtrPrec {
- Preconditions.checkNotNull(prec1)
- Preconditions.checkNotNull(prec2)
- return PtrPrec(innerRefToPrec.join(prec1.innerPrec, prec2.innerPrec))
- }
+ override fun join(prec1: PtrPrec , prec2: PtrPrec ): PtrPrec {
+ Preconditions.checkNotNull(prec1)
+ Preconditions.checkNotNull(prec2)
+ return PtrPrec(innerRefToPrec.join(prec1.innerPrec, prec2.innerPrec))
+ }
- override fun toString(): String {
- return Utils.lispStringBuilder(javaClass.simpleName).aligned().add(innerRefToPrec)
- .toString()
- }
+ override fun toString(): String {
+ return Utils.lispStringBuilder(javaClass.simpleName).aligned().add(innerRefToPrec).toString()
+ }
}
diff --git a/subprojects/common/analysis/src/main/java/hu/bme/mit/theta/analysis/ptr/PtrAction.kt b/subprojects/common/analysis/src/main/java/hu/bme/mit/theta/analysis/ptr/PtrAction.kt
index 015084a889..f5a4875219 100644
--- a/subprojects/common/analysis/src/main/java/hu/bme/mit/theta/analysis/ptr/PtrAction.kt
+++ b/subprojects/common/analysis/src/main/java/hu/bme/mit/theta/analysis/ptr/PtrAction.kt
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package hu.bme.mit.theta.analysis.ptr
import com.google.common.base.Preconditions
@@ -32,57 +31,70 @@ import hu.bme.mit.theta.core.utils.ExprUtils
private val varList = LinkedHashMap