Giter VIP home page Giter VIP logo

flipper-2.0's People

Contributors

barachia avatar danielpd avatar janflokstra avatar jankolkmeier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flipper-2.0's Issues

Dynamic updating of weighted effects

When using weights in effects, i.e. , the effects can only have numbers, such as '3'. I would like to see also dynamic numbers for the weight, such that you get '3.

Basically, updating the weight in runtime should be a convenient feature.

js engine may fail to initialize

We were unable to get the latest Flipper to work for our project with ASAP.

     [java] 16:22:09.988 [main] INFO  starters.FlipperDialogStarter - Loading flipper config file: Prototype1/config/flipper.properties
     [java] 16:22:09.990 [main] INFO  starters.FlipperDialogStarter - Starting Flipper thread
     [java] Exception in thread "main" java.lang.NullPointerException
     [java]     at hmi.flipper2.javascript.JsEngine.eval(JsEngine.java:68)
     [java]     at hmi.flipper2.javascript.JsEngine.execute(JsEngine.java:56)
     [java]     at hmi.flipper2.Is.<init>(Is.java:40)
     [java]     at hmi.flipper2.TemplateController.<init>(TemplateController.java:152)
     [java]     at hmi.flipper2.TemplateController.<init>(TemplateController.java:180)
     [java]     at hmi.flipper2.TemplateController.create(TemplateController.java:100)
     [java]     at hmi.flipper2.launcher.FlipperLauncherThread.init(FlipperLauncherThread.java:132)
     [java]     at hmi.flipper2.launcher.FlipperLauncherThread.<init>(FlipperLauncherThread.java:79)
     [java]     at starters.FlipperDialogStarter.<init>(FlipperDialogStarter.java:36)
     [java]     at starters.FlipperDialogStarter.main(FlipperDialogStarter.java:103)
     [java] Java Result: 1

After some digging it seems like the engine in JsEngine is never really (successfully) initialized (i.e. here). Looks like using nashorn instead of graal.js still works fine for us (in an isolated test case). We're using the java version "1.8.0_301". Java 1.8 is recommended for ASAP at the moment.

My best explanation is that the 1.8 versions of javax.script.XXXX libs simply don't support graal.js yet? The best solution of course would be to get ASAP/hmibuild to work with a more recent version of java, but independently, maybe we can do some changes here:

  • Since mgr.getEngineByName doesn't seem to throw if it can't find/init the requested engine, can we add a check to whether engine is initialized successfully/not-null?
  • Can we make the script engine configurable (not sure if there are any other side effects, of if nashorn/graal are otherwise interchangeable?)

Mix of JSON libraries

Currently, Flipper uses two JSON libraries, namely Jackson and Glassfish's one. This could be improved to only use one JSON library for Flipper.

Viewer of IS

It would be a bonus to have an external module viewing the IS in real-time.

Add extra check on preconditions in templates

When having templates without precondition tags , there is no parsing error given in build time, but in runtime it will have a null exception. If possible, can we add a check to the templates that every template should have or that if they're omitted, there is no more error.

Resource Loader

.getResource() does not work when building top project with Flipper as dependency to .jar. We need to load all settings in the top project or replace everything with .getResourceAsStream().

JDK 11 compatibility

There's a difference between the JDK 8 and JDK 11, in which Flipper is unable to parse arguments for methods, functions and constructors other than type Strings.

GUI Debugger

We're currently in the state of developing a GUI debugger, making it easier to analyze exactly what is going on in the interaction and to quickly prototype.

Using GraalJS as engine

We plan to also support GraalJS in Flipper, such that it's updated to use the most recent ECMAScript.

Allow for shared objects across preconditions & effects

Consider the example template below. An object of class ...FlipperMiddleware is initialized once (at TemplateFile or Template scope?). In this example, it manages communication with other components over middleware (i.e. listening on messages from the ASR component). In preconditions, one might want use the object to check whether there are messages queued up, and in effects these messages can be added to IS or the middleware object can be used to send responses (i.e. sending a response BML to the behavior realizer).

<?xml version="1.0"?>
<behaviourtemplates>
  <is name="asr"><![CDATA[
    {
        "history": [],
        "currentMessage": {}
    }
  ]]></is>
  <object name="AsrMiddleware" class="nl.utwente.hmi.FlipperExtensions.FlipperMiddleware">
    <constructors>
      <value class="String" constant="/topic/AsrOutput"/>
      <!-- ... -->
    </constructors>
  </object>
  <template id="1" name="UserASR">
    <preconditions mode="and">
        <method object="AsrMiddleware" name="hasMessage"></method>  
    </preconditions>
    <effects>
        <method is="is.asr.currentMessage" is_type="JSONString" object="AsrMiddleware" name="getMessage"></method>  
        <!-- do operations with currentMessage -->
    </effects>
  </template>
</behaviourtemplates>

Syntax question

Hi, I'm currently working on a project that uses ARIA VALUSPA as a foundation, which includes Flipper. Having looked at the xml files with the agent's templates, I noticed that some of the syntax within the templates are inconsistent, and I am unsure of the reason for this. In some templates, the preconditions are written in the following format:

<condition><![CDATA[!is.dialogue.greeted.agent]]></condition>
Though in other areas it has been written as:

<condition>is.dialogue.greeted.agent</condition>

My understanding of CDATA is that it is to prevent a string from being interpreted as XML markup, though I am uncertain of the reason for its inconsistency in the code. Could somebody please clarify if this was likely just an oversight or if there is an additional reason?

Secondly, I am unsure of the use of DMImpBegin and DMImpEnd, as I have read somewhere that their use is to create a pause in a sentence, though I have seen them placed in sentences in what I would consider irregular locations for pauses, I'd appreciate if somebody could give an in-sentence example of exactly how they would each be used?

Thank you.

TemplateController with a database connection causes NullPointerException when using templates with databases.

When loading templates with a database connection, there is a NullPointerException.

Exception in thread "main" java.lang.NullPointerException
	at hmi.flipper2.Template.handle_effect(Template.java:116)
	at hmi.flipper2.TemplateFile.handle_database(TemplateFile.java:74)
	at hmi.flipper2.TemplateFile.handle_section(TemplateFile.java:43)
	at hmi.flipper2.TemplateFile.<init>(TemplateFile.java:34)
	at hmi.flipper2.TemplateController.addTemplateFile(TemplateController.java:209)
	at hmi.flipper2.Main.main(Main.java:39)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.