I would understand if it is possible to deduce a context-free grammar for the following…
- User
I would understand if it is possible to deduce a context-free grammar for the following scneario. I am developing a direct acyclic graph representation in which nodes are processes (in time) and edges are dependencies. However, nodes without connecting links can share a dependency because a synchronization mechanisms can act between them. For example, a node can start when another node signal it via a condition variable. Consider the followin syntax on a case study: A = 10; B = 4; C = 2; D = 5; D?A = t > T(A)/2; A -> B -> C; D?A -> C; The represented context is that A starts, D starts to watch its condition variable D?A. After 5 units, the condition D?A is true and D starts. They complete together, then B starts and after 4 units C can start because both dependencies are satisfied. Additionally, consider that at the moment I am considering to introduce condition variable, mutex and shared temporal variables. Please provide a feedback on the proposal and highlight the pitfalls and the ambiguities.
- Assistant
- User
Focus on the Conditional part. 2. Conditional Dependencies: in my mind, I would borrow syntax from lambda function. In this sense, t is an inline variable that counts for the time passes, T(A) is the relative time. One of the goal of this system is to implement a strong concept of relative time. Indeed, the same result of before can be to define another node N = 5; and then N -> D -> C; with N the null node. However, this is what I am trying to avoid to enhance the relationship between existing node instead of absolute existence of them. 4. Conditional Execution: D?A,E : t1 > T(A)/2 && t2 > T(E)/3; D?A,E ->C; This syntax ideally means: D conditionally depends on nodes A and E, such that from the first context (A) takes t1 and perform a verification and from the second context an independent verification. The condition is satisfied when both are true. Note: I replaced = with : to decrease the ambiguity with initialization of nodes.
- Ambiguity in Conditional Dependencies: To further borrow syntax from lambda function, maybe this can decrease the ambiguity. D?A,E[t1, t2] : t1 > T(A)/2 && t2 > T(E)/3;
- Synchronization Mechanisms: I think this is the key feature of my proposal. I am considering to borrow elements from shared memory model. For the , I think the same condition of C++ is fine, like using all boolean operators. Please provide a feedback on these answers.
- Assistant