GithubHelp home page GithubHelp logo

fprime-community / fpp Goto Github PK

View Code? Open in Web Editor NEW
39.0 7.0 31.0 13.07 MB

F Prime Prime: A modeling language for F Prime

Home Page: https://fprime.jpl.nasa.gov

License: Apache License 2.0

Scala 10.15% Shell 1.22% Fortran 1.24% C++ 87.24% Python 0.03% Vim Script 0.03% Emacs Lisp 0.09%

fpp's Issues

Update README

Update the README file to reflect the new capabilities in release 0.3.0.

Fix XML code gen for port return type

The XML type needs the full qualified C++ type, e.g. Fw::ParamValid. This is due to the way the XML to C++ code generator works: the literal return type is pasted into the generated code, which may be in a different namespace.

Add optional header file to instance definitions

For example, you should be able to say

instance foo: Foo base id 0x100 at "../../Bar.hpp"

This definition says that foo is an instance of the Foo component and the C++ header file of its implementation is located at ../../Bar.hpp. This construction supports the case where a single component model has several different C++ implementation classes. If no path is given, e.g.,

instance foo: Foo base id 0x100

then the translator will use a default header file, e.g., Foo.hpp (or FooComponentImpl.hpp if that more verbose form is desired) in the directory where the Foo component model is located.

Check component instance specifiers

Extend fpp-check to cover component instance specifiers.

  • Update algorithms on the wiki.
  • Revise Enter Symbols, Check Uses, and Check Use Def Cycles.
  • Define the Topology object and write a pass for checking topology defs.
  • Check component instance specifiers.
  • Add tests.

Add XML code gen for types defined in components

Mangle the names. For example, when enum E is defined inside component C, generate an XML array C_EArrayAi.ml. It would be better to define an inner class C::E, but the F Prime XML doesn't support this.

Compute unconnected ports

  • Revise spec and syntax: remove "declared unconnected" ports. This is too hard to maintain the FPP source and is not necessary.
  • Compute the unconnected ports for each topology.
  • Add an option to fpp-check to write out the unconnected ports
  • Add tests.

With regard to the first item: The purpose of declared unconnected ports was to suppress warnings, so that every compilation would not spew warnings when ports are unconnected. However, we solve this problem by generating the unconnected list only on demand, via fpp-check -u [file]. One can then filter the unconnected list however desired, e.g., by piping it through egrep -vi '(pingin|pingout)'.

The alternative is to maintain long lists of unconnected ports in the source model, which is a pain, or provide some more advanced capability for specifying sets of ports, which is more complicated.

Check connection graph specifiers

Write the initial pass for checking connection graph specifiers. Don't resolve patterns yet. Don't check patterns for correctness, except to detect duplicate patterns and to resolve port instance identifiers.

Number ports

Apply automatic numbering of ports

  • Update algorithm in spec and on wiki
  • Check output port numbers
  • Apply matched numbering
  • Apply general numbering
  • Add tests

Tighten up connection patterns

  • Fix the set of available patterns in the language spec. Don't make it depend on the translation context.
  • Make the pattern selector a keyword, not a number or enumeration constant.
  • Add a telemetry pattern.

Tighten up checking for invalid uses of symbols

A few invalid uses of symbols cause a crash. For example this:

constant a = 0
constant b = a.c

In checking the second constant definition, the analyzer expects the symbol a to have an associated scope and throws an exception because it doesn't. Instead, it should report the error.

Tighten up the checks.

Revise semantics of ref formal parameters in ports

Allow the use of ref port parameters in an async context. In this case, ref should be a no-op. In the current XML implementation, it affects the way the autocode is generated. We can note this as an XML limitation in the User's Guide.

  • Revise spec
  • Revise implementation and tests
  • Revise User's Guide

Check unused port specifiers

Write the initial pass for checking unused port specifiers. Resolve each specifier to a semantic port instance identifier.

Tighten up numeric format specifiers

Right now you can use an integer or rational format specifier for any numeric argument. Tighten this up so you can use integer specifiers for integer arguments and rational specifiers for floating-point arguments. For example, you can't use the specifier {x} for an argument of type F32 or the specifier {f} for an argument of type U32.

Resolve partially numbered topologies

Resolve each topology definition to a partially numbered topology T.

  • Compute the instances of T.
  • Compute the connection graphs based on imported connections and directly specified connections.
  • Resolve pattern specifiers.
  • Add tests.

Revise automatic numbering

Generalize the scheme so that you can specify any pair of matching port arrays P1 and P2 for any component C. Then for all instances I of C, and for all instances I' that have connections to I.P1[n1] and I.P2[n2] the renumbering will ensure that n1 = n2. This handles all the special cases listed (command registration, dispatch, and response; sequence command and response; health ping send and receive). It also extends to new cases.

This will require a new kind of component specifier for matching. For example, in the Health component:

match pingIn with pingOut
  • Revise spec
  • Add syntax to components
  • Check semantics for new syntax
  • Add tests

General updates to the User's Guide

Update Scope (section 1), Analyzing and Translating Models (Section 10), and any other sections to reflect the new capabilities in release 0.3.0.

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.