python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Determining language from a grammar
I'm trying to solve an exercise on grammars and languages. Here is the exercise:
Let the grammar G be:
G = {V, T, P, S},
V = {S, A, B},
T = {a, b, c},
P = {S → ABA; A → a | bb; B → bS | ε}
What la...
Draconyx
Votes: 0
Answers: 1
How to model struct in z3?
Given a struct like this:
struct MyStruct {
uint[10] a;
uint b;
bool c;
};
Mystruct m;
My problem is how to model variable m using z3? a trivial solution is to split m into multiple variables: m.a, m...
Hugevn
Votes: 0
Answers: 1
Removing ambiguity in a grammar
I have a grammar with one production rule:
S → aSbS | bSaS | ∈
This is ambiguous. Is it allowed to remove the ambiguity this way?
S → A|B|∈
A → aS
B → bS
This makes it unambiguous.
Another grammar:
...
Millennial
Votes: 0
Answers: 1
What is the correct way to define functions with a bound variable in Python?
I want to create a family of functions each with a different parameter. In trying to doing so I encountered an issue which I demonstrate below using a dummy code (in python):
Suppose I want 4 function...
Chirag Shetty
Votes: 0
Answers: 0