Comments (3)
Hi @cvick32,
indeed it should work: there is nothing special about Read or Write, they are terms for the substituter.
What is the behavior of pysmt? does it crash?
Can you provide a full example to reproduce the bug?
from pysmt.
Here's a python file that fails to substitute a term like one that I had above:
from pysmt.shortcuts import Function, Symbol, Implies, Not, Iff, Equals
from pysmt.typing import BOOL, INT, _TypeDecl, FunctionType, PySMTType
arr = _TypeDecl("Arr-Id-Bool", 0)
arr_type = PySMTType(arr, "Arr-Id-Bool")
ReadType = FunctionType(BOOL, [arr_type, INT])
WriteType = FunctionType(arr_type, [arr_type, INT, BOOL])
Read = Symbol(f"ReadArr-Id-Bool", ReadType)
Write = Symbol(f"WriteArr-Id-Bool", WriteType)
V = Symbol("V", BOOL)
L = Symbol("L", INT)
Z = Symbol("Z", INT)
Arr1 = Symbol("Arr1", arr_type)
lhs = Read(Write(Arr1, L, V), Z)
rhs = Read(Arr1, Z)
phi = Read(Write(Arr1, L, V), Z)
assert phi.substitute({lhs: rhs}) == rhs, "Assert Fails"
I would expect for phi
to match lhs
as they are syntactically equivalent, but the assert fails for me.
from pysmt.
Hey @mikand, just wanted to check in and make sure this script has the same behavior for you.
from pysmt.
Related Issues (20)
- ImportError: No module named shortcuts HOT 5
- Division by constant
- Converting PySMT formulas to Z3Py ones HOT 4
- CNF conversion improvement
- CVC4 has been superseded by CVC5 - please update the project
- Substitution issue for ForAll using MGSubstituter HOT 3
- The "bvxnor" operator seems to be misdefined HOT 1
- Your thought about Integration to IDE. HOT 2
- Failing to install solvers on Apple M1 chip HOT 4
- Add labels to the constraints to mimic `assert_and_track` from Z3 in pySMT
- Z3 works while Yices fails simple example HOT 9
- Using solvers that are obtained by other means (such as homebrew) HOT 1
- Fastest way to create a (big) model HOT 3
- Support Cython 3.0.0 HOT 1
- SMTLIB Parser cant parse MOD operation
- Can't install the MathSAT solver on Mac OS Ventura + Apple silicon (M2) HOT 2
- Support for continuous subtraction HOT 2
- distutils is removed from Python 3.12 standard library HOT 1
- The imp module is removed in Python 3.12 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysmt.