kernel 0.3.18

  • README.md
  • Installing
  • Versions
  • 64

Dart Kernel #

Dart Kernel is a small high-level language derived from Dart. It is designed for use as an intermediate format for whole-program analysis and transformations, and to be consumed by codegen and execution backends.

The kernel language has an in-memory representation in Dart and can be serialized as binary or text.

Both the kernel language and its implementations are unstable and are under development.

This package contains the Dart part of the implementation and contains:

  • A transformable IR for the kernel language
  • Serialization of kernel code

Note: The APIs in this package are in an early state; developers should be careful about depending on this package. In particular, there is no semver contract for release versions of this package. Please depend directly on individual versions.

See ast.dart for the in-memory IR, or binary.md for a description of the binary format. For now, the textual format is very ad-hoc and cannot be parsed back in.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  kernel: ^0.3.18

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:kernel/kernel.dart';
  
Version Uploaded Documentation Archive
0.3.18 May 3, 2019 Go to the documentation of kernel 0.3.18 Download kernel 0.3.18 archive
0.3.17 Apr 24, 2019 Go to the documentation of kernel 0.3.17 Download kernel 0.3.17 archive
0.3.16 Apr 22, 2019 Go to the documentation of kernel 0.3.16 Download kernel 0.3.16 archive
0.3.15 Mar 21, 2019 Go to the documentation of kernel 0.3.15 Download kernel 0.3.15 archive
0.3.14 Mar 15, 2019 Go to the documentation of kernel 0.3.14 Download kernel 0.3.14 archive
0.3.13 Feb 28, 2019 Go to the documentation of kernel 0.3.13 Download kernel 0.3.13 archive
0.3.12 Feb 22, 2019 Go to the documentation of kernel 0.3.12 Download kernel 0.3.12 archive
0.3.11 Feb 12, 2019 Go to the documentation of kernel 0.3.11 Download kernel 0.3.11 archive
0.3.10 Jan 29, 2019 Go to the documentation of kernel 0.3.10 Download kernel 0.3.10 archive
0.3.9+1 Feb 1, 2019 Go to the documentation of kernel 0.3.9+1 Download kernel 0.3.9+1 archive

All 43 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
96
Health:
Code health derived from static analysis. [more]
21
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
50
Overall:
Weighted score of the above. [more]
64
Learn more about scoring.

We analyzed this package on Jun 19, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.2
  • pana: 0.12.18

Platforms

Detected platforms: Flutter, other

Primary library: package:kernel/kernel.dart with components: io.

Health issues and suggestions

Fix bin/transform.dart. (-25 points)

Analysis of bin/transform.dart failed with 1 error:

line 9 col 8: Target of URI doesn't exist: 'package:front_end/src/api_prototype/constant_evaluator.dart'.

Fix lib/ast.dart. (-48.66 points)

Analysis of lib/ast.dart reported 133 hints, including:

line 296 col 3: Avoid return types on setters.

line 303 col 3: Avoid return types on setters.

line 336 col 22: Use = to separate a named parameter from its default value.

line 771 col 3: Avoid return types on setters.

line 778 col 3: Avoid return types on setters.

Fix lib/class_hierarchy.dart. (-10.89 points)

Analysis of lib/class_hierarchy.dart reported 23 hints, including:

line 34 col 3: Avoid return types on setters.

line 37 col 3: Avoid return types on setters.

line 93 col 65: Use = to separate a named parameter from its default value.

line 105 col 62: Use = to separate a named parameter from its default value.

line 116 col 66: Use = to separate a named parameter from its default value.

Fix additional 18 files with analysis or formatting issues. (-48.23 points)

Additional issues in the following files:

  • lib/target/targets.dart (21 hints)
  • lib/transformations/coq.dart (15 hints)
  • lib/text/ast_to_text.dart (14 hints)
  • lib/binary/ast_from_binary.dart (10 hints)
  • lib/binary/ast_to_binary.dart (9 hints)
  • lib/clone.dart (6 hints)
  • lib/transformations/mixin_full_resolution.dart (5 hints)
  • lib/kernel.dart (3 hints)
  • lib/src/bounds_checks.dart (3 hints)
  • lib/text/text_reader.dart (2 hints)
  • lib/transformations/continuation.dart (2 hints)
  • lib/type_algebra.dart (2 hints)
  • lib/type_checker.dart (2 hints)
  • lib/error_formatter.dart (1 hint)
  • lib/naive_type_checker.dart (1 hint)
  • lib/src/tool/command_line_util.dart (1 hint)
  • lib/transformations/method_call.dart (1 hint)
  • lib/transformations/setup_builtin_library.dart (1 hint)

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and kernel.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.48.0 <3.0.0
args >=0.13.4 <2.0.0 1.5.2
Dev dependencies
expect any
front_end any
test any
testing any