GithubHelp home page GithubHelp logo

fprime-community / fpp Goto Github PK

View Code? Open in Web Editor NEW
37.0 7.0 29.0 12.31 MB

F Prime Prime: A modeling language for F Prime

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

License: Apache License 2.0

Scala 10.10% Shell 1.21% Fortran 1.23% C++ 87.30% Python 0.03% Vim Script 0.03% Emacs Lisp 0.09%

fpp's Introduction

F Prime Prime (FPP)

This repository contains the code and documentation for F Prime Prime (FPP for short). FPP is a modeling language for the F Prime flight software framework.

Contents

compiler: The FPP analysis and translation tools.

docs: The FPP User’s Guide and language specification.

editors: Syntax highlighting for code editors. Currently Vim and Emacs are supported here. There is also an FPP plugin available within Visual Studio Code.

Building and Installing

Tools

See compiler/README.adoc. To use or develop FPP in a standalone mode, you should install these tools. To use FPP as part of F Prime development, you can install the F Prime tool set, which includes FPP. See the F Prime installation instructions here.

Spec and User’s Guide

See docs/README.adoc. Build these documents from source only if you are developing them. Otherwise, read the copies available on the wiki.

Design and Implementation

See the wiki.

fpp's People

Contributors

bocchino avatar capsulecorplab avatar dennisog avatar elliotfayman avatar johanbertrand avatar john-p-cargille avatar jwest115 avatar lestarch avatar nicolasrouquette avatar rohandkn avatar smorettini avatar thomas-bc avatar tiffany1618 avatar trellixvulnteam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fpp's Issues

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

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.

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.

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.

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.

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.

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.

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.

Check unused port specifiers

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

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

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

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.

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.

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.

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.

Update README

Update the README file 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.