amharrison / jactr

-old - jACT-R Bundles
http://jact-r.org/
7 stars 5 forks source link

Use xtext to replace io system #8

Open monochromata opened 9 years ago

amharrison commented 9 years ago

The current thinking is a slimmer format (than the xml). We will build both the general AST (EMF/Ecore) for all models, and then this new syntax (Xtext linked to the EMF). For a first pass, it will probably be easier to build the Xtext parser and then create a custom model-to-model transform to convert the new AST into the current system. This will permit us to continue to use the existing tooling, while we incrementally upgrade.

The format I'm proposing is like this:

semanticLabel(parameters...)[
 //symbolic contents
]
{
 //subsymbolic contents
}

example:

model(modelName)[
   module(org.jactr.core.declarative.ClassName)[] {RetrievalThreshold=0, EnabledPartialMatching=true}
  ....

   declarative()[
    chunktype(chunkTypeName, parent)[slot1=null, slot2=null]{}
    chunk(chunkName, chunkTypeName)[slot1=1, slot2=2]{CreationCycle=-1}
   ]{}

  procedural()[
   production(pName)[
    match(goal, chunkType)[
        slot1>1, slot2<2]
    match(retrieval, otherType)[slot1!=2]

    add(goal, chunkType)[]
    remove(retrieval)[]
    ]{Utility=1}
  ]{}
]
{
  EnabledPersistentExecution = true,
  EnableCycleSkipping = true
}
monochromata commented 8 years ago

I'm not sure if this issue might better fit jactr-eclipse instead of jactr. Anyways, I found a number of notes in org.jactr.eclipse.core that might be kept in mind when re-implementing the editors:

-Editor templates!!

-Quick Fix

-Code completion

-Coloring