Recent Updates Page 4 Toggle Comment Threads | Keyboard Shortcuts

  • Blanca Mancilla 05:52 on 2010/08/24 Permalink | Reply  

    Jarryd, why the “TransLucid Doxygen documentation” doesn’t include all the methods available to a class? Unless I’m missing something, I can’t find the class “Translator” under the class list, only under the “TransLucid Namespace Reference” and there, I can’t find the methods available. Is there a trick?

     
  • cartesianprogramming 06:59 on 2010/08/09 Permalink | Reply  

    The “tlcore with demands” and “reactive tlcore” entries have been updated: The ## has been replaced with $$.

     
  • Jarryd Beck 12:04 on 2010/08/03 Permalink | Reply  

    Current todo list 

    This is the current list of features that are required to work to make tlcore begin to be useful. The important system at the moment is the reactive one.

    • Load libraries in the header
    • define time and pass it in the context
    • add time : #time .. inf to the definition of equations
    • only begin execution after $$
    • bestfit with priority
    • print uuids
    • add a uuid type to allow the manipulation of equations
    • delete and replace
     
  • cartesianprogramming 05:36 on 2010/06/15 Permalink | Reply  

    tlcore with demands 

    When the –demands option is set in tlcore, then it can handle demands. In this case, in each instant, there are four parts, not three. The fourth part is introduced with another %% pair, as follows:

    header
    %%
    equations
    %%
    demands
    %%
    expressions
    $$
    header
    %%
    equations
    %%
    demands
    %%
    expressions
    $$
    ...

    A demand requests that a variable be computed in a specific context. It is written as a pair

    (x,tuple);;

    and it is registered internally by the system with a UUID. At each instant, should the tuple be valid in that instant, then this pair is evaluated, producing the result, along with the other expressions. The response for an instant therefore looks like this:

    dem1demanswer1;;
    ...
    demmdemanswerm ;;
    %%
    answer1;;
    ...
    answern;;

    If the –uuid option is set, then the UUID of the demands is printed out, as it is for equations:

    eqnuuid1;;
    ...
    eqnuuidl;;
    %%
    dem1demuuid1demanswer1;;
    ...
    demmdemuuidmdemanswerm ;;
    %%
    answer1;;
    ...
    answern;;

    Should the –verbose option also be set, then the results will be of the form

    eqn1eqnuuid1;;
    ...
    eqnleqnuuidl;;
    %%
    dem1demuuid1demanswer1;;
    ...
    demmdemuuidmdemanswerm ;;
    %%
    expr1answer1;;
    ...
    exprnanswern;;

     
    • jarro2783 14:00 on 2010/06/20 Permalink | Reply

      Are demands always added to the previous demands? So at any time instant, all the demands from previous instants are evaluated if valid?
      Also where is this context for demands coming from?
      Suppose I write
      (fact, [0:15]);;
      Where does the 0 dimension come from?

      • cartesianprogramming 19:37 on 2010/06/24 Permalink | Reply

        Yes, demands are added to previous demands. But, because there are UUIDs, you can also replace and delete demands, as you can for definitions.

        The 0 dimension just is.

    • yvdriess 13:02 on 2010/06/30 Permalink | Reply

      Could you give a usage example of tlcore? I’ve managed to compile everything, but I cannot seem to get anything out of tlcore.

    • yvdriess 13:43 on 2010/07/07 Permalink | Reply

      Do you have some example input you can pass to tlcore for this? I tried out the repository code, but it isn’t reacting to any input.

    • superspreadsheet 05:47 on 2010/08/24 Permalink | Reply

      Dimension 0 comes from the equations, right? What would happen differently if there were an aether? I’m still looking for the notion of a context in the way TransLucid is running now.

  • cartesianprogramming 04:43 on 2010/06/15 Permalink | Reply  

    Bestfitting with time and priority 

    The simplified bestfitting becomes even simpler in the presence of time and priority. We no longer need deftime nor validtime dimensions. We simply need to use the time dimension. Then definitions might have the form

    x | [time:40..50, priority:2] = E

    There is nothing special about the time dimension as far as bestfitting is concerned. For the priority dimension, this is different, as it is an ordered dimension. We need to adapt the refinement order ⊂ on equations so that the priority is considered first. We can consider an equation q as a quadruple (xq, Pq, Kq, Eq), where Pq is the priority of q. Then

    qq' if xq = xq' and Pq < Pq' or KqKq'

     
  • cartesianprogramming 04:31 on 2010/06/15 Permalink | Reply  

    Bestfitting simplified 

    With the simplification of contexts, bestfitting becomes simpler as well, as does the semantics for identifiers in expressions.

    An equation q is, conceptually, a triple (xq, Kq, Eq), where xq is the variable being defined, Kq is the set of contexts where the equation is valid, and Eq is the defining expression.

    Given two equations q and q’, we write qq’ if xq = xq’ and KqKq’.

    If we have a set of equations σ, then best(σ) consists of the bestfit equations in σ , i.e.,

    best(σ) = {q ∊ σ | ∄ q' ∊ σ. qq'}

    The restriction of a set of equations σ to an identifier x and a context κ is written

    σ|xκ = {q ∊ σ | x = xq and κ ∊ Kq}

    We can now write the semantics for identifiers in equations.

    x⟧σκ =
    let {q1, ..., qn} = best(σ|xκ) in
    let vi = ⟦Eqi⟧σκ in
    v1 ⊕ ⋯ ⊕ vn

    where ⊕ is the combining operator. The simplest combining operator checks that all of its arguments are identical, and returns that value. In the general language, each identifier could have its own combining operator, which could be any commutative, associative operator.

     
  • cartesianprogramming 03:40 on 2010/06/15 Permalink | Reply  

    Contexts simplified 

    In previous work on TransLucid, it was never clear whether a context was a finite or an infinite object. Well, it turns out that by making it an infinite object, then the semantics is a lot cleaner, and bestfitting will become simpler as well. This is the way that it works. Let D be the domain of atomic values. Then a context κ is an element of K = D to D, and a set of contexts K is a subset of K. Then the denotational semantics of TransLucid expressions is much more easily expressed. Here it is, ignoring identifiers and undefined values:


    c⟧σκ = c
    op(E1, ..., En)⟧σκ = op(⟦E1⟧σκ, ..., ⟦En⟧σκ)
    if E1 then E2 else E3⟧σκ = if ⟦E1⟧σκ then ⟦E2⟧σκ else ⟦E3⟧σκ
    #E⟧σκ = κ(⟦E⟧σκ)
    ⟦E11:E12, ..., En1:En2⟧σκ = {⟦E11⟧σκ ⟼ ⟦E12⟧σκ, ..., ⟦En1⟧σκ ⟼ ⟦En2⟧σκ}
    ⟦E2 @ E1⟧σκ = ⟦E2⟧σ(κ † ⟦E1⟧σκ)

     
  • cartesianprogramming 19:36 on 2010/06/10 Permalink | Reply  

    TransLucid Doxygen documentation 

    The documentation automatically generated by Doxygen for the TransLucid code can be found at
    http://translucid.sourceforge.net/doc/index.html

     
  • cartesianprogramming 19:33 on 2010/06/10 Permalink | Reply  

    Reactive tlcore 

    When the –reactive option is set for tlcore, then the application becomes reactive, and the set of equations is allowed to vary over time, and the expressions being evaluated can refer to the time dimension. The idea is that at each instant,

    • The header may be added to.
    • The set of equations may be modified.
    • The set of expressions to be evaluated may be modified.
    • Then the expressions for that instant are evaluated.

    When tlcore is reading from the standard input, then the input will be of the form

    header
    %%
    equations
    %%
    expressions
    $$
    header
    %%
    equations
    %%
    expressions
    $$
    ...

    Each instant corresponds to the lines appearing between successive occurrences of $$.
    The output is of the same form as the input, with occurrences of $$ to separate the different instants.

    When the input is given in the form of option —input=infile, then the entire input, for all instants, is read from infile. When the input is given in the form of option –inputiter=inprefix, then the input for instant n comes from file inprefixn. In other words, the input for each instant is placed in a different file.

    Similarly for –output and –outputiter.

    If the –uuid option is set, then the universal identifiers for the equations are presented to the programmer, who can then manipulate them explicitly, with lines like the following two:

    delete eqnuuid1;;
    replace eqnuuid2 equation;;

    For the first line, if #time, the time that this line is added to the equations, has value t, then from t on, eqnuuid1 is no longer usable. For the second line, the equation corresponding to eqnuuid2 is replaced, from t on, with equation. If the value of #time is changed to t’, which happens to be less than t, then all of the equations available at time t’ continue to be accessible.

    Changes to the set of equations are done synchronously. All additions, deletions and replacements for a given instant are done as a single transaction, and must be consistent.

    An empty instant stops the tlcore program.

     
  • cartesianprogramming 18:41 on 2010/06/10 Permalink | Reply  

    Equation UUIDs 

    When an equation is added to the TransLucid system, it is automatically given a unique identifier, generated by the Boost.UUID library. When tlcore is passed the –uuid option, then both the equations and the expressions will return results. The results will be of the form

    eqnuuid1;;
    ...
    eqnuuidm;;
    %%
    answer1;;
    ...
    answern;;

    Should the –verbose option also be set, then the results will be of the form

    eqn1eqnuuid1;;
    ...
    eqnmeqnuuidm;;
    %%
    expr1answer1;;
    ...
    exprnanswern;;

     
    • superspreadsheet 15:49 on 2010/06/11 Permalink | Reply

      From a practical point of view, it is not clear to me what the difference is between expressions and equations. They could both define and both be evaluated… No?

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel